Programming is educated guesswork

2022-02-21

Most of your time as a programmer will be spent figuring out things you’ve had no or minimal experience with, and you’ll have a deadline. And you might feel stuck. That’s natural, and it happens to practically everyone.

The art of programming, in my opinion, is making educated guesses about what might work and what might not within the constraints of your limited knowledge about a particular subject. You have two choices at this juncture. You can either give up feeling confused swimming in the plethora of information available on the matter or start making decisions about what to try and iterate until you get it right. No one gets it right on the first try, and if you are getting it right on the first try, it probably isn’t intellectually challenging enough for you, and you should move on.

You start looking through documentation and tutorials for specific technology and try to integrate it into your project, and it seems a mess at first. No solution is precisely plug and play, but a lot come close enough. Now you’ll see multiple different approaches to get the job done, but you’ve got to pick one. How? Well, the better question is how not. You shouldn’t choose a solution that seems easy to implement or requires you to change your architecture without fundamentally providing profound benefits. No solution with either of the two properties should be your first choice. A solution that is easy enough would help you get the job done but won’t stimulate you intellectually enough, and a solution that changes your fundamentals will put you into a seemingly endless rewrite loop.

Now you might ask, but if the simple solution does the job exactly, why shouldn’t I go ahead and implement it? You should, in production. When you initially learn to do things the hard way, you won’t necessarily implement the same strategy in production. Still, the brain cells you activate and the exercise you’ve been through will help you get a deeper understanding of the system. Implementing each part will require you to make design decisions and make educated guesses, the most fun part about programming.

Production software is meant to be stable and reliable, and your hobby project is supposed to make you think, learn, and grow. Don’t blur the lines between the two. Build your hobby project with the best practices and your hacky solution. In the end, you’ll be proud of what you’ve done, be intellectually challenged, come out of your comfort zone and learn something new.

Cheers!