jack: (Default)
[personal profile] jack
*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?

Date: 2006-08-01 05:51 pm (UTC)
simont: A picture of me in 2016 (Default)
From: [personal profile] simont
Perhaps those programmers who feel a serious need for extra help from the editor aren't productive enough to write the code to do it, whereas those who are productive enough don't need it in the first place :-)

Date: 2006-08-01 06:02 pm (UTC)
ext_8103: (Default)
From: [identity profile] ewx.livejournal.com

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.)


Date: 2006-08-01 07:57 pm (UTC)
From: [identity profile] geekette8.livejournal.com
But does everyone else (who programs) still find such typos happening?

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).

Date: 2006-08-01 09:26 pm (UTC)
From: [identity profile] fluffymormegil.livejournal.com
I tend towards paranoiac parenthesisation.

Date: 2006-08-01 10:11 pm (UTC)
From: [identity profile] keithlard.livejournal.com
But does everyone else (who programs) still find such typos happening?

Sure.

Date: 2006-08-02 06:24 am (UTC)
From: [identity profile] bouteillebleu.livejournal.com
But does everyone else (who programs) still find such typos happening?

Well, not that particular example, since our programming language doesn't have an & or any form of AND. :)