Trust noone (when debugging)
Yesterday I was reminded of one of the most important things I learnt at uni: trust nothing when debugging.

It was my second year of uni (see nerdy Helen on her first day of uni to set the scene) and I had to write a simple language parser in a language called Haskell. I had gotten a little way into the program when I came across a part of the code that I just couldn’t get working. I ran the bit of code over and over again, tweaking my code endlessly to try to get the right output but I couldn’t get it to work. I lost about a week of assignment time (part debugging, part avoiding my homework) before I finally figured out what was wrong: the sample data that I’d hard coded into the program was wrong.
In the end it had cost me so much time I couldn’t get the assignment finished, but while I didn’t learn as much as I might have about language parsing and functional programming I learnt a lesson about debugging that has taught me to question everything when I’m debugging ever since.







Comments
Look at Uni Helen! Aw!