The Most Important Programmer Advice I Ever Received
In this short post,
I want to share with you the most important piece of advice I ever received when I started out as a programmer.
It was so simple and yet packed with power!
When I started programming in the late 80's, there was no Internet and the word Google was not invented yet.
So we resolved to books and people that knew the answers we had questions about.
I bought every book I could find on programming.
Unfortunately, a book only says what it says and no more.
Sometimes you are lucky, and what the book says is enough on a topic.
Other times you may need the collective knowledge of a number of books to understand a topic.
Naturally, the better option was to ask someone who already knows the answers.
In my case, it was a friend teaching computer science at my alma mater, which was about 120 km from where I lived.
One weekend I decided to visit him and ask as many programming-related questions as I could possibly think of.
Ironically, I cannot remember anything we discussed, except this one thing he said.
And this one thing has stuck with me through the years.
I use it most days.
So what exactly did he say to me?
He said, "Remember, computers do not do what you want them to do. They do what you tell them to do."
That's it!
Yet, you have no idea how many times this has saved my programmer butt over the years.
It has helped me more than anything else to solve programming errors.
Sometimes, I end up literally just starting at the code on my screen.
I will get to a point where I simply cannot figure out why my code doesn't work.
Sometimes, I can be stuck on this for days.
Eventually I stop staring at my screen, sit back, and ask myself, "Ok, dummy, why did you tell the computer to do this if you want it to do something else?"
And lo and behold, most of the time, the answer stares me right back in the face.
It's amazing how often this change of mindset has helped me find errors in my code.
And coding errors you are going to have.
Lots of them.
You can trust me on that one.
So, if there is one thing only you take away from this website, make it this little piece of advice.
Computers do not do what you want them to do. They do what you tell them to do.
By the way, I literally have problems with dry eyes because of all the starting at the screen over the years.
Apparently, programmers do not blink enough, which ends up damaging their eyes.
So, please, blink regularly so your eyes can get the necessary lubrication.