Nick Ang profile picture

Nick Ang

Don't code for code's sake

person welding metal

Coding is just a means to an end. Unless you’re using programming languages as a medium of art or doing computer science research, there is no good reason to get romantically involved with your code. It’s best to not get overly attached to the (idea of) code but instead, focus on what the code is meant to achieve.

For the past month in class we’ve had an instructor who’s passionate about programming and great at it. He even used to work at Google as a developer for a number of years. His enthusiasm about programming is infectious, and I think I became more in love with the fact that I’m now a “coder” because of it. Little did I know that I’m starting to romanticise the idea of coding a little too much for my liking…

Our “new” instructor came in today and, I think unknowingly, threw me out of my daze. He declared to the class that he sees code merely as a means to an end, and although he keeps himself up to date with the latest and the coolest, he does it only to know about the most up-to-date ways to be lazy and write less code. I don’t know what to tell you, but it was really effective in bringing me back to reality.

What reality? Simple. Coding is just a means to an end. Our real calling as a developer is to write programmes that do useful stuff for people.

I knew that. That’s one of the biggest reasons I decided to dive into learning to code full time in the first place - so that I can make cool stuff that make people’s lives easier and more meaningful.

I’d temporarily lost focus, getting caught up with the code itself. If I were made to choose between being a great programmer who writes beautiful code and one that writes only decent code that works, I would choose the latter knowing myself. By spending less time worrying about the “most efficient way” to do things, I know I’d be able to spend more time on fixing annoying bugs, user testing, and anything else that makes the programme more delightful to use.

Why are you learning to code?

Your reason will decide how you should think about programming. As an aspiring entrepreneur, I’m learning to code so that I can implement projects on my own, and eventually manage a team of developers to build the rest of it. Coding is but a part of my toolkit - albeit an extremely important one that without which I’d cease to be an effective entrepreneur. Marketing, business development, user testing and product development, legal stuff, and much more are other things that an entrepreneur needs to be effective. Seeing that I’m not superhuman, it’s best to proportion time for getting decent at each of these rather than got amazing at one - even if it’s the most important.

In fact, spending time romanticising the idea of “conjuring things out of thin air” as I’ve been saying a lot lately isn’t necessarily going to make you a great programmer. Sure it may mean that you have a disposition that is primed for learning new things about your programming language and using them to create programmes with more robust and clean code; but on the flip side, it may be that you’re spending a disproportionate amount of time keeping close to the cutting edge in order to write the latest and coolest programmes.

It really depends on who you are. For me, I’d rather stand closer to the mainstream but make a lot more useful programmes that create value for people than at the edge making one or two cool ones that fellow developers would admire and respect me for.

I think that makes me a pragmatic programmer. How about you?

(image: Rob Lambert)