Being in a position of a senior developer in our company, I have complete control over the coding standards and practices of the projects that we do, which turned out to be a curse, before I could turn it into a blessing.
The first thing I wanted to talk about in this series was a very general rule that I adopted after learning from my mistakes:
Write for Others. Always.
Let me explain. Sometimes, when you write a code for your own project, or for something only, or mostly you will be working on, you may be tempted to shortcut and write messy code, with the presumption that you will understand it later because you wrote it.
Well, in that case, you're wrong.
Try to open an uncommitted script you knew very well a year ago, but didn't touch for the last few months, and you're most likely to spend a long time figuring your own code out if it isn't written properly.
So what is writing "for others"? I will sum it up with a few points, and elaborate on each one in a separate article.
Write code for others. Always:
Maintain
Extend
Separate
Stylize
No comments:
Post a Comment