Programmers Should Trust Their Instincts

People are either cut out to be programmers or they’re not. How to know, what to do if you’re not, and where to go from there is a huge issue and not the subject of discussion. But one of the signs of a good programmer is good programming instincts. The right instincts can save hours of work and provide creative solutions to even the most difficult problems; and “gut feelings” in programming are not something you should ignore lightly.

One of the first thing Computer Science teachers drill into the heads of their students is that it’s important to map everything out beforehand. Design the algorithm. Draw the UML diagrams. Decide the entire flow of data and the relationships between everything before you even touch the IDE. While this is integral advice for anything above a small-complexity project, there is an exception: if you have a gut feeling, follow it.

For instance, the other day I sat down to write a simulator for a MIPS datacache, with different replacement policies. “Ideally,” the planning procedure would have involved designing the sequence diagram, a flowchart detailing the method used by the cache to determine expired entries, and generally-speaking a lot of time down the hole just visualizing what happens beforehand.

Continue reading

Why is it You’re Studying CS, Again?

Some people tend to be rather stupid about the choices they make in life. For the most part, that’s OK – it’s human nature after all, and it can (most of the time) be rectified with a bit of hard work and a lot of concentration. But at other times, these mistakes run so deep that it’s almost impossible/unfeasible to set them straight afterwards, making you wonder just why they happened in the first place.

Take, for instance, the average class of computer science students. Go to the nearest university on a day where 2nd or 3rd year computer science students have a hands-on lab session for programming in the language of your choice. Watch as half of them struggle with the basic logic that’s already up on the board/overhead-projector. Notice how half of them (or more) have trouble writing a simple if statement or a for loop (no matter what language) that properly tests-for/does something.

It’s not their fault. In a world that has been turned upside-down in less than a decade and revolutionized in its entirety by the digital PC, you can’t blame students for turning to the number most popular field of work/study when it comes to deciding what they’ll be doing for the rest of their lives. The facts certainly support their decision: you no longer have to be a CEO of a Fortune 500 Company, a Lawyer, or a Doctor to be making 120k+ a year (and if you’re a lawyer or doctor you have to handle licensing fees, insurance, and many other money-sapping necessities) – you just have to be a programmer with 5+ years of experience.

Continue reading