Posts in this category
- The Fun of Running a Public Web Service, and Session Storage
- CPAN Pull Request Challenge: A call to the CPAN authors
- You Write Your Own Bio
- Icinga2, the Monitoring System with the API from Hell
- Progress in Icinga2 Land
- Iron Man Challenge - Am I a Stone Man?
- Correctness in Computer Programs and Mathematical Proofs
- Why Design By Contract Does Not Replace a Test Suite
- Doubt and Confidence
- Fun and No-Fun with SVG
- Goodby Iron Man
- Harry Potter and the Methods of Rationality
- Introducing my new project: Quelology organizes books
- iPod nano 5g on linux -- works!
- Keep it stupid, stupid!
- My Diploma Thesis: Spin Transport in Mesoscopic Systems
- Why is my /tmp/ directory suddenly only 1MB big?
Sat, 05 Dec 2009
Doubt and Confidence
<meta>From my useless musings series.</meta>
As a programmer you have to have confidence in your skills, to some extent, and at the same time you have to constantly doubt them. Weird, eh?
You need some level of confidence to do anything efficiently. Planning ahead requires confidence that you can achieve the steps on your way.
As a programmer you also need some confidence with the language, libraries and other tools you're using.
If you program for money, you also have to assess what kind of programs you can write, and where you might have problems.
In the process of programming you make a lot of assumptions, some of the explicit, some of them implicit. If you want to write a good program, it's essential that you are aware of as many assumptions as possible.
When you find a bug in your program, you have to challenge previous assumptions, and that's where doubt comes in. You not only suspect, but you know that at least one of the assumptions was false (or maybe just a bit too specific), and you know that you did something wrong.
Sometimes programmers make really stupid mistakes which are rather tricky to track down. That's when you have to question your own sanity.
One example (that luckily doesn't happen all that often to me) is when I edit my program, and nothing seems to change. Nothing at all. Depending on the setup it might be some cache, but something it is even more devious - for example I didn't notice that the console where I edit and the console where I test are on different hosts - and thus the edits actually have no effect at all.
After having done such a thing once or twice I adopted the habit of just
die('BOOM'); instruction to my code, to verify that
the part I'm looking at is actually run.
These are moments when I question my own sanity, thinking "how could I have possibly done such a stupid thing?". Doubt.
The same phenomena applies when doing scientific research: since you usually do things that nobody has done before (or at nobody has published about it yet), you can't know the results beforehand -- if you could, your research would be rather boring. So you have no external reference for verification, only your intuition and discussion with peers.