Re: Universal laws of bugs?
by dws (Chancellor) on Mar 09, 2003 at 06:32 UTC
|
- Bugs travel in groups. If you see one, look for a second. If you see two close together, look for eight more.
- It's never the case that "nothing changed, really!" If you're sure that nothing changed, look again.
- The solution will pop out the moment somebody looks over your shoulder. Therefore, arrange for people to look over your shoulder a lot. Better yet, pair program.
- The best insurance against bugs sneaking in is a good set of unit tests, run frequently. When you fix a bug, write a new unit test that demonstrates the bug first, then fix it. That way, the bug will stay fixed.
- Demos to customers attract bugs. Demo to a friendly audience first.
- Remember Rudy's Rutagaba Rule (Weinberg): "Once you eliminate your number one problem, number two gets a promotion." Having another problem is a good thing. It means you still have customers.
| [reply] |
Re: Universal laws of bugs?
by gmax (Abbot) on Mar 09, 2003 at 10:08 UTC
|
Rule |
Corollary |
It won't break until you've forgotten how that clever hack works. |
The only thing you recollect is that you were very proud of such hack, but damn if you can remember why! |
It will break when you are busy creating the software masterpiece of your life, when you can't be distracted by old silly bugs. |
You will screw up both the old code and the would be masterpiece as well. |
It will break when you are boarding the plane for your honeymoon and you forgot to switch off your pager. |
Your wife will leave you saying "I can't believe this. You wrote a module without using strict!" |
_ _ _ _
(_|| | |(_|><
_|
| [reply] |
|
| [reply] |
Re: Universal laws of bugs?
by hsmyers (Canon) on Mar 09, 2003 at 08:16 UTC
|
- A skipped regression test is absolute proof of the existance of a fatal bug.
- The only sure way to write bug-free code is not to run it...er...not to write it...er...don't even think about it!
- Even faster than a code-walk-through is try-and-impress-someone.
- A good project manager may not have been 100% accurate about the going-gold date---use the false announcement to 'scare' out a few more of the little critters!
--hsm
"Never try to teach a pig to sing...it wastes your time and it annoys the pig." | [reply] |
Re: Universal laws of bugs?
by PodMaster (Abbot) on Mar 09, 2003 at 13:20 UTC
|
No.
Those would be
- If you share it, more bugs will become apparent
- If it passed all tests, buggy tests will become apparent
Most common problem cpan-testers see is that the tests are written with no portability in mind. Tests that should be skipped, usually aren't, filepaths are being compared without being run through File::Spec first...
MJD says you
can't just make shit up and expect the computer to know what you mean, retardo!
I run a Win32 PPM
repository for perl 5.6x+5.8x. I take requests.
** The Third rule of perl club is a statement of fact: pod is sexy.
|
| [reply] |
|
In addition
- If it passed all tests, then you need to write at least one more test.
| [reply] |
Re: Universal laws of bugs?
by Anonymous Monk on Mar 09, 2003 at 15:44 UTC
|
| [reply] |
|
If you give into rushed schedules and sacrifice design, you will have bugs.
Too bad that in deciding whether or not to give in, I sometimes have to give the paycheck more weight than the risk of bugs....
| [reply] |
Re: Universal laws of bugs?
by Abigail-II (Bishop) on Mar 10, 2003 at 00:41 UTC
|
This entire thread can be summed up with one of the mottos
of the monastry: "All software sucks".
To paraphrase the late E. W. Dijkstra, we have only been
programming for a few decades. We can't even answer the
fundamental question whether programming is hard or not.
Abigail | [reply] |
|
We can't even answer the fundamental question whether programming is hard or not.
Take it from one who's still struggling to tie his laces (programmatically). Programming is hard! It's coding that's easy.
It's easy to write a bit of code that does a specific "thing" ... I do it all the time.
What I still am struggling to get right is to write that same bit of code so that it is:
1.) Usable in more than just the one situation it was coded for.
2.) Stable in an unstable world.
3.) Looks good (i.e. Others can understand it.)
4.) Doesn't get me a metaphorical clout accross the skull when another programmer sees it.
Maybe I've swopped the "correct" definitions of coding and programming around? :-)
So Long
blackstarr
| [reply] |
|
1 - see CPAN, modularization is easy 'nuff said. 2 - Logic. Just understand basic logic. No one can break logical code unless they invent a square circle. 3 - Don't drop the the lowest common programmer. Just keep it relatively simple and you'll be find (common sense stuff, break complex operations into multiple lines, etc) 4 - Program for yourself and you won't need to worry about this.
| [reply] |
|
This entire thread can be summed up with one of the mottos of the monastry: "All software sucks".
Not all software sucks... Some of it blows.
One huge software company, against all logic, even manages to create software that both sucks and blows at the same time. ;o)
__________
"Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to one instruction which doesn't work." -- (Author Unknown)
| [reply] |
Re: Universal laws of bugs?
by submersible_toaster (Chaplain) on Mar 10, 2003 at 00:09 UTC
|
- If I wrote it, it has bugs I cannot find but know how to fix.
- If THEY wrote it, it has bugs I can find but can't fix.
- If it isn't written, there's a bug somewhere looking for a home.
I can't believe it's not psellchecked
| [reply] |
Re: Universal laws of bugs?
by Wysardry (Pilgrim) on Mar 09, 2003 at 15:10 UTC
|
Hey, if you want to make it foolproof, you better get a whole string of fools to test it. :o)
__________
"Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to one instruction which doesn't work." -- (Author Unknown)
| [reply] |
|
There is no such thing as "fool-proof." As I once heard it (and unfortunately, I do not know whom to attribute it to) to the effect that, "Programming is the race between programmers to write programs that are fool-proof, and the Universe to create better fools... and so far, the Universe is winning."
| [reply] |
|
Well, yes, "fool-resistant" would likely be a better term, but I've never heard of anyone using it. ;o)
I used it in the same context as "bulletproof", which is only accurate if standard/average bullets are used. Even armour plating isn't proof against armour piercing rounds, and whenever better armour is produced a better bullet will surely follow.
All anyone can ever hope to achieve in any given task, is their own personal best under whatever restrictions are placed upon them - such as time, money and the involvement of other (possibly less perfect) people.
| [reply] |
Re: Universal laws of bugs?
by webfiend (Vicar) on Mar 09, 2003 at 15:55 UTC
|
Great thread. I like to see how we think in here. Bunch of optimists, right? ;-)
Personally, I think it boils down to a single truism passed down through generations of household repairmen, wood shops, and millenia of men trying to fix or build things:
- If it hasn't broken yet, you aren't trying hard enough.
I just realized that I was using the same sig for nearly three years.
| [reply] |
Re: Universal laws of bugs?
by Biker (Priest) on Mar 10, 2003 at 15:45 UTC
|
| [reply] |
Re: Universal laws of bugs?
by tbone1 (Monsignor) on Mar 12, 2003 at 11:54 UTC
|
| [reply] |