11 ms·
"... so now I will jiggle things randomly until they unbreak" is not acceptable'
- hobbes 16y agoWell, that approach worked fine for the evolution of complex life-forms.
- hebejebelus 16y agoYes, but the "we have billions of years to get this right" model generally doesn't apply to software dev. ;)
- hobbes 16y agoUnless you're coding Duke Nukem Forever. ;)
- redthrowaway 16y agoThat would require they get it right.
- redthrowaway 16y agoWith a 99.9999% failure rate.
- apower 16y agoWhy do you think Linux isn't the 0.0001% survived form?
- redthrowaway 16y agoBecause I would hope they didn't follow the random mutation and non-random survival method of evolution.
- waitwhatwhoa 16y agothis would be "years and years of testing on thousands of machines," no?
- vog 16y agoOnce again, a great Linus Torvalds statement! I especially like the last paragraph, which has so much truth in it, and can be applied to small as well as large software projects: Don't just make random changes. There really are only two acceptable models of development: "think and analyze" or "years and years of testing on thousands of machines". Those two really do work.
- masklinn 16y agoTo be fair, the second case really is just a matter of fossilized random changes.
- NetMonkey 16y agoLinus knows that and says so as well. But that's okay, because that works. Starting down that very same path again without a huge reason to do so would be very painful for any mature product.
- lindvall 16y agoThat is correct, but is based on a philosophy that the longer something has been in use, the less chance it has to demonstrate behavior that has not been previously observed — he even explains that in more detail in further posts where he discusses his desire to not cause regressions.
- gritzko 16y agoYep, that's how the evolution works. Understanding stuff is how the progress works.
- andrewflnr 16y agoDoesn't that mean that while it's actually happening, it's not, in fact, an acceptable development process?
- billswift 16y agoOr, in slightly different words, "understand it" or "test the hell out of it".
- gregschlom 16y agoAm I mistaken in thinking that in this case, it might also be a cultural/communication problem? When Yinghai answers: We did do the analyzing, and only difference seems to be: good one is using 0x80000000 and bad one is using 0xa0000000. he clearly didn't understand what Linus meant by "think and analyze". I don't know the Chinese culture well enough (assuming Yinghai is from China), but I am under the impression that they would emphasize more on results (fix the problem) than on processes (understand why the fix works, in order to be sure we are not breaking something else). Am I wrong?
- vog 16y agoIndeed, those are cultural differences. However, I don't think those are directly linked to nations. Even within a single country like Germany, I'm observing vastly different approaches to software development. Also, issues like "Why don't you accept my (seemingly) working patch?" appear quite frequently in a lot of Free Software projects, independently of the nations of the people. I guess this cultural difference has more to do with professionalism and long-term experience on software projects.
- verroq 16y agoDid you just generalise an entire nation of people based on the internet postings of one person with a Chinese name? Are you implying the "fix it and get it done with" people don't exist in other nations?
- gregschlom 16y agoNope, I did the oposite: I already had a generalisation in mind, and used it to try to understand the posting of one persone with a Chinese name. Mind you, cultural traits of nations are a reality. I'm a Franco/Brazilian guy living in Vietnam, and I have seen it well enough. It doesn't mean that since you're from country X you will do Y, but it helps in understanding general behaviors. edit: excellent book on this topic: When Cultures Collide, by Richard Lewis http://www.amazon.com/When-Cultures-Collide-Richard-Lewis/dp/1857880870 http://www.amazon.com/When-Cultures-Collide-Richard-Lewis/dp...
- akent 16y agoIt gets better later in the thread: Yinghai, we have had this discussion before, and dammit, you need to understand the difference between "understanding the problem" and "put in random values until it works on one machine". "There was absolutely _zero_ analysis done. You do not actually understand WHY the numbers matter. You just look at two random numbers, and one works, the other does not. That's not "analyzing". That's just "random number games".
- benwerd 16y agoWell, there goes my development methodology.
- ilitirit 16y ago"Programming by coincidence" http://pragprog.com/the-pragmatic-programmer/extracts/coincidence http://pragprog.com/the-pragmatic-programmer/extracts/coinci...
- lindvall 16y agoAnother aspect of this thread that I find very refreshing is the fact that the previous implementation may have used magic numbers doesn't reduce anyones desire to actually understand what is going on going forward. The realization that a magic number was already being used could have caused one of two outcomes: a) justification for replacing one magic number with another b) realization that more research needed to be done to understand exactly what was going on in the first place I appreciate seeing (b) as the option chosen. We should all strive to be this diligent.
- rams 16y agoProgramming by coincidence as the PragProg says (someone has already posted the link).It's extremely common here in most Indian companies, especially with freshers.
- pjscott 16y agoAlso known as shotgun debugging, where you randomly poke at the relevant portion of the source code in the hope that the bug will magically vanish. I think the habit is formed early on, when most of the mistakes are things like syntax errors or off-by-one problems, where certain types of random tweaking actually can be somewhat effective.
- coderdude 16y agoI always get a kick out of how Linus talks to people. It's so direct and he never coats his arguments to make them easier to swallow. You could learn a lot about not bullshitting from that guy.
- muppetman 16y agoIt's strange isn't it? When people do the same in places like this community (and other communities) they're immedietly downvoted or dismissed, unless they're someone held in similar esteem to Linus.
- qq66 16y agoIt's not strange at all. Linus has earned his credibility. Some people in this community have too (pg, joshu, patio11, it's a long list). But people are downvoted when they act like they've earned credibility when they haven't.
- muppetman 16y agoIt seems you've missed my point. I don't doubt everyone you've listed has earned their credibility. What I'm trying to ask is "Why do you need to have earned credibility before you can be brutally honest with people?"
- qq66 16y agoBecause that's how people know that you know what you're talking about. I've seen many factually incorrect, heavily upvoted posts here on HN, and credibility is part of what lets me identify good material. For example, there was a post in the last few weeks about DNS -- I knew that davidu's answer was the one to trust, even though others were more upvoted.
- palish 16y agoSpeaking as a scientist, "don't think about it, don't care about it, just trust someone" is contrary to my nature. I was born with a burning desire to understand. Everything. I just wish I could locate a group of like-minded people to work with. I've been somewhat dismayed to find that "the real world" consists mostly of people whose sole ambition (or sole reality) is to fulfill their current role, without ever analyzing what it is they are doing or striving to improve the overall project. Status is very important. I wish it weren't so. At my last job, I was using EC2 to devise solutions to problems that they truly believed were technically unsolvable --- but no one would listen to me, because I was a newcomer. Their faith in the senior technical engineer was absolute and unwavering, and the senior technical engineer believed it was unsolvable, so therefore it was, for all intents and purposes, unsolvable. (After all, nothing ever came of my research, because no one cared enough to listen, or had time to think about something other than their current, immediate goal.) Worse, they even became offended when I tried to research the "unsolvable" problem in my own spare time. Status really sucks.
- enjoy-your-stay 16y agoLinus seems to be (correctly) railing against what is classic cargo cult behaviour. Making changes until someting seems to "work".
- smcl 16y agoI think Linus forgets that at one point he too was inexperienced and liable to make these hit-and-hope fixes. I agree with his point in general, but the dickish manner in which it's delivered isn't particularly helpful ("Why don't we write code that just works?")
- qq66 16y agoThe thing is, if you're inexperienced and mistake-prone, work on a pet project to gain experience (like the Linux kernel in 1992, or your flavor of location-based mobile social coupon sharing app today). Don't start pushing magic numbers into a software product that millions of people depend on.
- smcl 16y agoYep, that'd be an excellent way to word it. As I said I don't disagree with the point, I just dislike how Linus addresses people sometimes.
- alextingle 16y agoWhy so sensitive? Seriously, when someone criticises your work, do you listen to what they say or do you just listen to their tone of voice? If all you do is listen to the tone, then YOUR WORK WILL SUFFER. Because if someone comes up to you and says, "you dick! What the fuck were you thinking putting that double dereference there?? There's no way it could ever work!" If you stop listening after, "you dick! What the fuck were you thinking..." then you will miss out on learning something that you should know. The person is angry BECAUSE you have been stupid. Yes, that sucks, and perhaps they should learn to control their temper. But you can't do that for them. What you CAN do is be less stupid next time!
- smcl 16y agoI listen to what they say. I just lose respect for the person if they act like a bit of an idiot while delivering it. This is not helpful if the person is meant to be in a supervisory\managerial role.
- aangjie 16y agoReminds me of some of my last work experiences...
- ciupicri 16y agoThat patch reminds me about a nouveau bug[1] I had a couple of weeks ago. According to one of the developers behind nouveau it was caused by a new memory mapping/allocation scheme that broke things on systems with more than 4 GBs of RAM. Some device memory (registers etc) was mapped above 4 GBs and some of them don't like this. So he built a new kernel which reverted the change and the problem was "miraculously" fixed. [1] https://bugzilla.redhat.com/show_bug.cgi?id=689825 https://bugzilla.redhat.com/show_bug.cgi?id=689825
- deleted 16y ago[deleted]
- mv1 16y agoI call this "poke it with a stick" debugging. Let's poke the code like this and see if it works now. This approach is so wrong yet so common it's infuriating.
- j_baker 16y agoI can't help being reminded of this hacker koan: A novice was trying to fix a broken Lisp machine by turning the power off and on. Knight, seeing what the student was doing, spoke sternly: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong." Knight turned the machine off and on. The machine worked.
- eof 16y agoThis, in turn, reminds me of a long-shot theory about how the universe works that I sometimes ponder. I can't think of how many times someone has come to me with a computer problem, or I've gone to a vendor/support chat with a problem that hasn't worked dozens or hundreds of times. Then suddenly, with the guru there, whether it is me or someone else, suddenly the problem evaporates. I've found myself wondering if this wasn't some illusion, but an actual artifact of the nature of the universe. Think about it: if noob's problems everywhere were actually the universe not letting their shit work, there would be no one to ever notice it; because when the expert comes in and fixes it, it is magic to the noob anyway, and the expert is 100% used to mundanes not having their stuff work for any given reason.
- arethuza 16y agoSounds like quantum bogodynamics: http://www.catb.org/jargon/html/Q/quantum-bogodynamics.html http://www.catb.org/jargon/html/Q/quantum-bogodynamics.html
- cakeface 16y agoI like to call this the Scooby Doo effect. The ghost always appears for Scooby but not for the rest of the gang.
- BasDirks 16y agoScooby is just a little psychotic.
- trafficlight 16y agoWe call it The Aura. Some people have it and some don't.
- deleted 16y ago[deleted]
- kemiller 16y agoI was all set to defend the "jiggle randomly" school of development with something along the lines of "sounds like someone who has never had an external deadline to worry about" but then I got really sad, and didn't.