Today I learn from one developer about what is bugs and when it come from. Her name is Laurent Bossavit, just shocking his job was a public servant for France Government or PNS in Indonesia :).
First He believes every code have two part, white and black like yin and yang (two different sides). Every code you write has a dark side, that dark side was a bug :))
He has nice theories:
- Write code, putting bugs in it
- Remove the bugs
But in real, every code not realizes put bugs in code. In my experience, I am always difficult to found bugs after finish the apps, moreover if the apps used a library or module was coded by another developer.
And If Bugs occur, programmer always blame processor or computer managing in a first place :).
The point was Laurent gives is
“Bugs start as bugs in the brain”.
So every bug in our software, always come from mistakes of a developer.
From that point we can see the first problem we must solve are our brain. We can solve our brain by understanding our brain, He suggest us to read Thinking Fast and Slow by Daniel Kahneman. I am still reading it, although it’s really hard to understand. The book talk about 2 system of our brain (fast thinking and slow thinking). I recommendation you read that book too.
After we understand the system we will reduce our false or bugs in our program. The second step is debugging our apps.
Every question comes from developer after debugging are:
- History (How things got the way they are)
- How can the value of life on even though no variable has it
- Models (Explanations)
- Beliefs, hypotheses
But in software development process has a myth what makes programmer not test their code.
But obviously every programmer should test their code. Because when they didn’t test the code, it will come bias just hypothesis no proof it. When we debugging our code often, we can realize the heart of the bug come from.