The effort devoted to minor bugs
Aug. 1st, 2006 06:13 pm*sigh* There were other more funadmental problems, but instrumental in the bug was my muddling the precedence of "&" and "==". Obviously, we all make these mistakes sometimes. And I've got a lot better at avoiding minor mistakes as I've taken a more professional approach to programming.
But does everyone else (who programs) still find such typos happening?
For that matter, surely there is room for improvement in editors. Most people I know seem to use emacs, UltraEdit at work, vi if they're contrary, or Visual Studio if that's what they're using. But without going into details of which I've thought a lot, there seems a lot more that could be done to make minor errors, time spent comprehending code, etc, which eats up lots of productivity better? Surely it's the most obvious project for any programmer to want to work on?
But does everyone else (who programs) still find such typos happening?
For that matter, surely there is room for improvement in editors. Most people I know seem to use emacs, UltraEdit at work, vi if they're contrary, or Visual Studio if that's what they're using. But without going into details of which I've thought a lot, there seems a lot more that could be done to make minor errors, time spent comprehending code, etc, which eats up lots of productivity better? Surely it's the most obvious project for any programmer to want to work on?
no subject
Date: 2006-08-01 05:51 pm (UTC)no subject
Date: 2006-08-01 11:21 pm (UTC)Of course, like so many things, it's probably valuble to learn the hard way first...
[1] Possible reasons: they've been exposed to many bad systems; they feel it's patronising; they're good at working without it, which skills become less important with it.
no subject
Date: 2006-08-01 06:02 pm (UTC)A good compiler can help:
sfere$ cat t.c int f() { return 1 & 1 == 0; } sfere$ gcc -Wall -c t.c t.c: In function `f': t.c:1: warning: suggest parentheses around comparison in operand of &(Of course the warning assumes that you meant what you wrote, which is probably not the case here, but that's fine, it tells you there's something wrong anyway.)
A good compiler can help:
Date: 2006-08-01 11:22 pm (UTC)Memo to self: do avoid warnings.
Re: A good compiler can help:
Date: 2006-08-01 11:30 pm (UTC)Re: A good compiler can help:
Date: 2006-08-01 11:47 pm (UTC)Re: A good compiler can help:
Date: 2006-08-02 08:08 am (UTC)Re: A good compiler can help:
Date: 2006-08-02 08:07 am (UTC)no subject
Date: 2006-08-01 07:57 pm (UTC)Yes, I do, and I've also found similar things in other code I've had to work with.
I use Visual Studio and I actually quite like it as an editor, although not as an IDE (I use command line build systems in general).
no subject
Date: 2006-08-01 09:26 pm (UTC)no subject
Date: 2006-08-01 11:27 pm (UTC)If it was visually obvious (eg. parenthesies represented on screen with colours, like in excel) it'd be easier to see at a glance if it was right.
no subject
Date: 2006-08-01 11:33 pm (UTC)no subject
Date: 2006-08-01 11:46 pm (UTC)no subject
Date: 2006-08-01 10:11 pm (UTC)Sure.
no subject
Date: 2006-08-02 06:24 am (UTC)Well, not that particular example, since our programming language doesn't have an & or any form of AND. :)