crab

crab

The 'crabs in a barrel' mentality only exists if we view ourselves as a crab. The truth is on the map.

A new way to write smart contracts

Today I tried a way to write Solidity contracts, how to do it specifically?

  1. Divide the task into small segments.
  2. Describe what each segment does in words.
  3. Then ask AI, and with one sentence of AI's answer, write a function.
  4. Test immediately with code, and the test code can also be generated.
  5. After testing, one function is completed, with minimal errors.
  6. Then continue with the next segment.

The benefits of doing this are:

  1. Clear thinking.
  2. It is unlikely to make mistakes when working on small segments, and any approach will work.
  3. Fewer errors in each small segment, resulting in fewer overall errors.
  4. Progress may not seem fast, but it actually is.
  5. Each time is focused, solving problems every time, gradually deepening understanding.

I will continue to use this method. It has been a while since I looked at some contract code and I found that the barrier to entry for smart contracts has increased. It is becoming more and more difficult, mainly because:

  1. I am not yet very familiar with Solidity, and there are some special uses that I am not familiar with.
  2. Contracts have high quality requirements.
  3. There are more and more calls between contracts, and each contract has many methods. It takes time to understand different contracts.
  4. The business of contracts itself is complex and not easy to understand.
  5. Development is fast, but it is not in China. The barrier may gradually increase.

The ultimate idea is that everything needs continuous tracking. If you don't keep up, it will become increasingly difficult to catch up.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.