The most important thing when writing code

I have 7 years experience in writing code. It's not the thing I knew about it in an early time, I gradually found that what's the most important thing when writing code.

Just want to share with you:

  • Keep your mind clear, the best thing to do is to write an article about your code before you write the code.

What are you going to do? Just like an article, I'll get up in the morning first, wash my face, brush my teeth, have my breakfast, blah blah blah...

  • Keep your mind clear about the big picture, and then dig into details about "how to get my breakfast? Maybe cook it my self, or buy it in a store, etc."
  • Sometimes, if you don't get your mind clear, you'll get lost in the details, and found yourself in chaos switching between the high-level and details.
  • Translate your article to a bunch of high-level functions or classes. And it's easier to do the test-driven development in this way.

That's what I found from my experience. Get your mind clear, much faster and fewer bugs.

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容