As I’ve noted in my last couple of posts, hard work is the backbone of success, but the best don’t just work hard for the sake of working hard. The best work hard at understanding what it takes to be better, to learn and train themselves in new techniques to raise their game.
A vast majority of the software developers that I’ve ever worked with are hard workers, without question. They’ll toil for countless hours at solving difficult problems; they enjoy spending their time writing code. For many, I feel that there is too much time being spent writing code and not enough time reading code.
Writing software is similar to writing: if you want to get better at either you have to spend a fair amount of time actually writing. Whether you are writing an article or software, there is an investment of time required to think about the structure and how to best express your ideas, along with the act of actually writing to bring that idea to life.
But the act of writing is only half of the picture. Good writers will tell you that you should not only write every day, but be active readers as well. Reading broadens the horizons of writers, providing perspectives and information that they can use to write better, more informed books, articles or blog posts. Reading also exposes a writer to different ways of expressing ideas.
I’ve read code that has genuinely impressed me; and I’m not talking about so-called “clever” coding that is a combination of “job security” obfuscation or the “look at how smart I am” crap that takes forever to figure out. To me, great code is remarkably clear and concise, an elegant expression and handling of a complex problem in such a straight-forward manner that you almost don’t want to add anything to it.
Find people who write code this way. Learn from how they approached the problem at hand and consider how their logic was expressed. Try to emulate them. Participate in code reviews and listen to the feedback that others have about the clarity and expression of your own logic. Writers get plenty of feedback from a variety of sources, so don’t get defensive about code reviews. Use them as a way to improve.
Finally, be prepared to revise what you have written. Writers make revisions all of the time. More often than not, my own revisions remove extraneous sentences and adjust my wording to bring clarity and conciseness to my writing. Follow the advice of Bob Martin, who said in his book, Clean Code: A Handbook of Agile Software Craftsmanship:
“Getting software to work and making software clean are two very different activities. The problem is that too many of us think that we are done once the program works.”