If your pseudocode requires comments, you’re doing it wrong
A friend passed me the above quote yesterday (I’m not sure where it’s from), and it made me laugh. I’m not sure I agree it’s 100% correct, but I think the basic premise, to keep things simple, is true.
It made me think about how I (we) approach tasks. And, how different my approach is based on what I’m doing. I rarely, if ever, sit down to write a paper without first making an outline. Same with presentations, I’ll jot down slide titles, and re-arrange them, and made an outline slide before I actually start filling all the slides in.
But there are other tasks, where my approach much closer resembles throwing darts at a task list. I keep jumping around, tackling various sections, often going off on an tangent when I notice something else, somewhere else, is wrong (or could be done better/differently). There’s really no logic, rhyme or reason to the order in which I work on and complete tasks. Eventually, I end up finishing (mostly) everything that’s needed. Specifically, this seems to be my method of dealing with posters and code projects where I haven’t taken the time to plan it out enough before proceeding (or requirements are changing so often I just can’t stay on top of them all).
I don’t advise people to use my second method. I’m quite sure it causes me no end in grief and extra time when I have to continually re-do things, and re-learn what I was doing since I stopped halfway through to jump to another task that interested me more at the moment. Instead, I’d like to take a moment to high encourage people to always plan before they proceed with a task – no matter how simple it may seem.
For example, if you’re going to make a recipe, you generally need to a) make sure you have all the ingredients, and b) follow the steps in order to have the recipe come together as desired. If you instead took my above method and jumped all over the place, you’d probably find yourself running to the store for missing items half way through, and wondering why the meat is still raw when everything else is finished.
I can remember exactly one class growing up where the teacher talked about planning first. And, unsurprising, it was a programming class, where we were instructed to write pseudocode first before beginning with the actual coding. And I think it’s really unfortunate that we don’t teach this in more classes. Or at least, start being more obvious when we do teach it. Instead, we focus on things like “write down everything you need to do” and “an essay consists of 5 paragraphs” without explaining how to actually start a task or why you should plan out what those 5 paragraphs will be before you start writing them.
Anyway, next time you start a task, I challenge you to take some time first and think about a) what you need to accomplish and, b) the steps needed. I think you’ll find if you have a clear idea of what you’re doing, and how you’re going to do it, it’ll be easier to finish.