News for hackers. Stuff that matters.
Re:Sometimes the bug isn't in your code, it's in the CPU by JOnAgain on Monday March 05, 2012 @06:09PM (#3668870)
Disagree. In fact, were I to come up with a rule of thumb, I'd say the opposite is true.

Want to find bugs in Sun's Java 6 compiler for X64 Linux , use annotations (yeah, I found one in their V30 release last week). Want to find bugs in MS' C++ compiler, write your own templates (this was a few years ago, maybe it's better?). The best programmers push the limit of their tools because they know what's "supposed to happen".

Poor programmers hit something that doesn't work, and just try something else, cause, well they're just trying shit. I would go so far to say that poor programmers, in fact, are unable to find compiler, optimizer, OS, or hardware bugs because, by definition, they probably don't have a firm handle on what's "supposed to happen".

Re:Sometimes the bug isn't in your code, it's in the CPU by sparsevector on Monday March 05, 2012 @06:58PM (#3669045)
I think what VBprogrammer meant is that thinking you've found a bug in a compiler / OS / CPU is often a warning sign you're a poor programmer. Often times a beginner will have a bug in their code that is too subtle for them to identify, so they end up attributing it to some external factor. Actually finding a bug in a compiler / OS / CPU is as you suggest likely a sign you're doing something advanced or unusual and therefore are perhaps more knowledgeable than most.
Re:Sometimes the bug isn't in your code, it's in the CPU by VBprogrammer on Monday March 05, 2012 @08:34PM (#3669262)
Yeah, that's exactly what I meant. Sorry if the sarcasm didn't quite carry.

I know these things can and do happen. I've come across one or two of these strange ones before, but too often I've seen people jump to the conclusion that someone / something else was to blame. Without any other real evidence other than that they have exhausted their shallow back of talent.

Re:Sometimes the bug isn't in your code, it's in the CPU by arethuza on Tuesday March 06, 2012 @04:27AM (#3670274)
I think that's often called the "select isn't broken" rule:

http://pragprog.com/the-pragmatic-programmer/extracts/tips

However, I did once work with someone who did find a bug in select on SunOS... (this was '89 or so).

Re:Sometimes the bug isn't in your code, it's in the CPU by Natsu on Tuesday March 06, 2012 @05:00AM (#3670355)
I remember scripting on a MUD that used a customized version of the standard MPROG[1] patch for ROM-based MUDs. Whoever originally "documented" it just grabbed some docs from some other ROM-based MUD that used their own customized version.

The documentation was a completely wrong for several years before I started programming there. Once I realized that the documentation was lying to me, I started methodically examining how things actually worked by writing lots of very simple test programs and documenting the actual behavior.

The others didn't care why it was broken. Most of them were just trying to build cool areas, they weren't really programmers at all. They would just tweak things until it appeared to work or they were frustrated enough to give up.

[1] I'm sure a lot of HN knows this, but to save the non-gamers the hassle of looking it up, a MUD is a type of text-based online game and an MPROG is a script used to control the actions of the characters in the game.

Re:Sometimes the bug isn't in your code, it's in the CPU by JoeAltmaier on Monday March 05, 2012 @08:50PM (#3669304)
No, templates still buggy, came across one last week.
Re:Sometimes the bug isn't in your code, it's in the CPU by ryanmolden on Monday March 05, 2012 @11:25PM (#3669638)
Reported?
Re:Sometimes the bug isn't in your code, it's in the CPU by JoeAltmaier on Tuesday March 06, 2012 @08:05AM (#3670796)
Way too complicated to identify concisely, and trying to release just now; in the end the wrong object was returned by a casting operator (very, very wrong object). Added and called a named method to do the cast (very same implementation) and all was well.