The first on being a good programmer is that they have "write less code" in their mindset. Do not judge programmer by the number of codes, but the number of solutions. The true purpose of programmers is to create solutions. A good programmer will always know how to reduce the number of codes. One of my favorite way is to find existing solution or third party libraries on the web. I believe if my problem is too general, any other people will already solve it and let people use their solutions. Open source has becoming so far until it can let programmers finish their solution very quickly. You just have to find it.
Another way to reduce the amount of code is try new things. The "things" could be programming language, framework, library, and tools. Unfortunately, not a lot of people would have the sufficient amount of courage to learn new things. The choose to stay with their level of knowledge and stick with it. In my experience, I choose my primary programming language very carefully. When I choose web development as my specification, I tried 6 (Java, PHP, Ruby, Python, C#, and Javascript) programming languages. Then, I tried a lot of web frameworks for each language to see the design between each frameworks. I tried a lot of editor and IDE's to see which one help me the most. I have done that until I choose Python, Django, and PyCharm as my primary web development language, framework, and tools. Even for now, I still actively finding new technologies that could reduce the amount of code.
We do have heard the term "pair programming" where a person doing the code and the other one is reviewing the code simultaneously. Okay, I admit it was hard and expensive to let another programmer review my code while I write it. In real life, I have never done it, but I always seek advice and review of my application architecture, especially in the early stages of a project. Architectural design failure will makes not only the code is bigger, but also unmanageable. Next, in the absence of a partner, I always give my time to review my own code with this measurement from this cartoon. :))
Tidak ada komentar:
Posting Komentar