Care About The Code

Care About The Code

By Pete Goodliffe

C Vu, 35(2):6, May 2023


Pete Goodliffe entreats us to care. About code.

From caring comes courage.
~ Lao Tzu

It doesn’t take Sherlock Holmes to work out that good programmers write good code. Bad programmers... don’t. They produce elephantine monstrosities that the rest of us have to clean up. You want to write the good stuff, right? You want to be a good programmer.

Good code doesn’t pop out of thin air. It isn’t something that happens by luck when the planets align. To get good code you have to work at it. Hard. And you’ll only get good code if you actually care about good code.

To write good code, you have to care about it. To become a better programmer you must invest time and effort.

Good programming is not born from mere technical competence. I’ve seen highly intellectual programmers who can produce intense and impressive algorithms, who know their language standard by heart, but who write the most awful code. It’s painful to read, painful to use, and painful to modify. I’ve seen more humble programmers who stick to very simple code, but who write elegant and expressive programs that are a joy to work with.

Based on my years of experience in the software factory, I’ve concluded that the real difference between adequate programmers and great programmers is this: attitude. Good programming lies in taking a professional approach, and wanting to write the best software you can, within the Real World constraints and pressures of the software factory.

The code to hell is paved with good intentions. To be an excellent programmer you have to rise above good intentions, and actually care about the code – foster positive perspectives and develop healthy attitudes. Great code is carefully crafted by master artisans, not thoughtlessly hacked out by sloppy programmers or erected mysteriously by self-professed coding gurus.

You want to write good code. You want to be a good programmer. So, you care about the code. This means you act accordingly; for example:

  • In any coding situation, you refuse to hack something that only seems to work. You strive to craft elegant code that is clearly correct (and has good tests to show that it is correct).
  • You write code that is discoverable (that other programmers can easily pick up and understand), that is maintainable (that you, or other programmers, will be easily able to modify in the future), and that is correct (you take all steps possible to determine that you have solved the problem, not just made it look like the program works).
  • You work well alongside other programmers. No programmer is an island. Few programmers work alone; most work in a team of programmers, either in a company environment or on an open source project. You consider other programmers, and construct code that others can read. You want the team to write the best software possible, rather than to make yourself look clever.
  • Any time you touch a piece of code you strive to leave it better than you found it (either better structured, better tested, more understandable...).
  • You care about code and about programming, so you are constantly learning new languages, idioms, and techniques. But you only apply them when appropriate.

Fortunately, you’re an ACCU member because you do care about code. It interests you. It’s your passion. You like doing it well. Keep engaged with ACCU to help turn this code concern into practical action! Glean everything you can from these magazines. Come to the ACCU conferences to hear from experts, and to have precious hallway conversations with other passionate programmers. Engage in the community. Practice your passion. As you do this, never forget to have fun programming.

There is nothing wrong with an emotional response to code. Being proud of your great work, or disgusted at bad code is healthy.

Enjoy cutting code to solve tricky problems. Produce software that makes you proud.

Questions

  1. Do you care about code? How does this manifest in the work you produce?
  2. Do you want to improve as a programmer? What areas do you think you need to work on the most?
  3. If you don’t care about code, why are you reading this article?!

Pete Goodliffe Pete is a programmer who never stays at the same place in the software food chain. He has a passion for curry and doesn’t wear shoes.






Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.