"... so now I will jiggle things randomly until they unbreak" is not acceptable'
thread.gmane.org
thread.gmane.org
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".
But an attitude combined with less than excellent technical insight is, of course, going to get posts downvoted into oblivion. Well, -4, anyway.
On the other hand, I've seen him trying to strong-arm his view in another case in just the same manner. Only here he had no technical (nor organizational) argument, beyond, ``it's easier to hack glibc than make Adobe fix Flash Player and make developers read man pages of memmove(3) and memcpy(3)''.
Oh well.
Linus stipulated that the number of CPU instructions retired stays the same, so there will be no sizeable improvement of performance. That's hand-waving, not a benchmark. Somebody else posted a micro-benchmark showing better performance in his particular case.
((in the glibc discussion)) Linus stood for users in the short term (works here and now). Not for good development practices (read manuals, fix bugs, use modern hardware facilities -- here HAS_FAST_COPY_BACKWARD CPU feature).
EDIT:
nb., the ratio of instructions retired to CPU clock ticks depends on caching issues & such -- thus a particular memory access pattern will perform better than other. That's indicated by the HAS_FAST_COPY_BACKWARD CPU feature.
EDIT 2:
I'm aware I'm making risky remarks here; Linus have worked at Transmeta for several years, so he knows way more about CPU design and internals than I do.
If you're creating an API(i.e. glibc) that everyone and their brother uses, it's a bad idea to break binary comparability in an update. You might be able to get away with it for a full version number change, but for point updates, it's a bad idea. If you're going to change it, add a new function.
You don't break binary compatibility in a major component without an extremely good reason(i.e. it doesn't work anymore). Forcing everyone to recode or even recompile to work with an OS-level component is just idiotic.
Nobody argues for breaking binary compatibility. Because that's not the case there. Both functions remain perfectly compatible with client applications -- unless those apps are buggy themselves.
What got changed was an implementation detail -- order of bytes copying. Think of it as of a private member or method of an object, if you're an OOP head. Must be untouchable by outer code, and the outer code must not rely on its internal behavior.
Certain applications were making a silent assumption about the internal workings of the function -- and they used the wrong function. Working around that is not keeping binary compatibility; that's promoting bugs. [0]
> If you're going to change it, add a new function.
That's the current state of affairs. The memmove(3) vs. memcpy(3) distinction was created decades ago for this very reason. memcpy(3) may take extra optimization, because it makes no assumption about relation of source & target memory regions. memmove(3) may be easier to use, because it performs the right thing if the source & target memory overlap. The developer picks either. There's no other difference between them -- especially in the API. The best thing is, replacing one with another takes nothing -- you just change function name; arguments are exactly the same. Perhaps for the very reason of ease of replacing one with another.
From the man pages:
The memmove() function copies n bytes from memory area src to memory area dest. The memory areas may overlap:
The memcpy() function copies n bytes from memory area src to memory area dest. The memory areas must not overlap.
See? Nothing confusing there.----
[0] A few years ago everybody and their brother were deriding Microsoft for pushing hacks into Windows XP to remain backward compatible with selected application -- like memory allocation workaround for the SimCity game. They did unsound engineering for business reasons -- increasing adoption rate of Windows XP. Now don't ask us to backpedal on that, and push bug compatibility into opensourece software. Don't ask for cart before the horse -- Flash Player before any non-buggy program. Don't ask Linux to follow in every footstep of Microsoft -- let's learn from mistakes.
(a note about that SimCity matter is here: http://www.joelonsoftware.com/articles/APIWar.html )
EDIT:
please also note, the memcpy(3) and memmove(3) functions aren't glibc's invention. They aren't specific to GNU, Linux or glibc. You'll find the functions in every modern UNIX and similar OS, no matter if based on glibc or some other system libraries.
Again, from the man page:
CONFORMING TO
SVr4, 4.3BSD, C89, C99, POSIX.1-2001.Grossly breaking sound for end-users in order to adhere to an ideologically rigorous reading of a man page isn't a win for anyone except pedants.
You do realize that the reason MS was derided for that is because MS doesn't believe in backwards compatibility at all, right? They updated their API completely, which broke Simcity, then they went and added hacks to make it run. They had two more correct options. Either tell Maxis that it's their problem and that they needed to fix it, or actually maintain backwards compatibility.
Linux strives to maintain backwards compatibility, unless they absolutely must break it. This means that you maintain buggy behavior if it's used commonly. I work on multiplatform code, and moving to new Linux versions is almost trivially simple for us-99% of the time, we just have to turn on the new compiler and OS combination, and just build it. Most of the time, any actual porting efforts are done because there are new OS features that we can leverage for performance.
"I first heard about this from one of the developers of the hit game SimCity, who told me that there was a critical bug in his application: it used memory right after freeing it, a major no-no that happened to work OK on DOS but would not work under Windows"
Still, the benchmark was for one particular case, and inconclusive (as in, ``testing can show X, but not lack of X'' ). Doesn't invalidate the finding of Ma Ling, comment #99, who got improvement in another testcase.
This is part of what a system like karma tries to address, if you see a comment that seems accurate, but is delivered in a very direct or even slightly annoyed tone by a user with high karma, you assume that this user is held in high esteem by others and while their comment may not be elegant, it should be taken to heart.
Additionally, in the hacker sphere, it seems that many of the top hackers are also VERY busy with their projects. Thus, they may have less time to spend prettying up a comment. The goal is to share knowledge or information in the most efficient manner. Not to share knowledge without worrying about hurting feelings.
Meanwhile, a direct comment from a new user with no standing in the community is likely to be met with some distrust or skepticism, even if wholly accurate. That user has not earned a status in the community. They have two options: 1) be brutally direct with all their comments and wait for people to realize they are frequently right, just inelegant. 2) start at least initially with more of a 'hearts and minds' campaign with their comments and build status in a more traditional method, slowly letting more of their actual personality come through in their comments.
It seems pretty clear to me that karma mostly measures the amount of time spent commenting. An interesting metric, but not one I would look to to predict comment quality.
Not very frequently, but one or two times a month maybe.
Could be just me...
It's not ideal, but I think the basic version is: I trust you enough to put up with your "brutal" honesty, vs. who are you and why are you being a dick?
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.
When there's a discussion on DNS, I like to know what's going on, but I can't take 2 years to go learn everything there is to know DNS (Well, I could, but I'm not going to). Luckily I know there is someone here who has done this, and until I have more or better information, I'm going to trust him. It's a necessary shortcut.
The part about people responding strongly to people acting above their status in particular was relevant.
If it were just about the value of the information conveyed, people would do their own research when a person is "brutally honest" with them, and decide whether or not that information itself is credible.
The confusion lies in the fact that in a community like HN, that worships logic (and also success), those things that make you "credible" are what make you a high-status individual. That means even the statements those high status people make which are NOT credible themselves will be accepted, or only gently rebuffed. (Which is a big reason why you don't see much criticism of pg here, or when you do, it's very respectful, vs other authors, even when he writes something ridiculous.)
Also, I might be swayed by his credibility, but what he's saying sounds reasonable.
If you think someone is being ridiculous why don't you say something.
You cannot say "The Linus rant about C++ is just wrong". You need to first blather on about why Linus is a great guy but has his limited perspective and from that perspective he is correct. However there is a world outside of that perspective where he is wrong.
If I posted the Linus rant on C++ I'd just be called an idiot. Nobody would worry about my perspective because, to my knowledge, I don't have any supporters to appease.
It is just politics. It affects tech communities as much as anywhere else. People get invested in their side. If you challenge their side then you must be sneaky about it.
You may think that you have to appease people.
If you posted "The Linus rant about C++ is just wrong" then I would down vote you. Why is it wrong, why is it a rant, what's wrong about it - that's what gets my vote.
I thought we were building a Brave New World here away from political double-speaking and ass-licking and endless regurgitation of memes. Please don't give in.
Here's an example from the first page of my comment history. Me responding to pg: http://news.ycombinator.com/item?id=2342860
You said so.
>>"those high status people make which are NOT credible themselves will be accepted, or only gently rebuffed"
If you spoke up then your story of 'people with particular status not being challenged at all' was lacking. It's probably a form of hyperbole but it was your evidence that I was trusting to make the assumption about your action. I'll try to be more careful.
I downvote when people don't add to the conversation; when I consider them to be wrong or misleading (or when we had comment scores if they're comments seemed over-rated).
Personally I don't find anything wrong with the comment made there - the chap is just asking that things aren't done without a proper rationale. Doesn't seem brusque, harsh or patronising to me.
Just decide not to be offended, job done.
Otherwise, you get either self-serving double standards or fawning hero worship (or both). Neither is strange, but neither is healthy.
HN on the other hand is the place where people come for communication and it is primary purpose, or secondary to - you know - news, but still very high on the list.
When Zed Shaw says stuff here, I think sometimes it's up-voted and some times it's down-voted. Sometimes the up-voted stuff is good and sometimes times the down-voted stuff is bad.
In ways, I think that relationship is better. Zed has carved-out the position of being celebrity who's not automatically respected. Being a curmudgeon myself, I respect him more for this...
Also, I've seen some high karma folks here still get -4's (back when karm was visible).
Most people (including Linus at times, credibility does not make you immune) confuse that issue.
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.
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.
It's called "confirmation bias"
I propose we name it the Zawinski Effect.
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?
On the individual level, he did do the debugging and analysis, on a smaller scope. Linus was asking a bigger scope analysis and a lot of work. Some people are willing to spend time to understand and fix problem for free. Some people have better things to do and aren't willing to spend the time to do it. That's their prerogative.
On a nation level, there are Chinese who want to get things done and there are Chinese who want to understand the root causes, just as there are people in other nations/cultures who want to get things done and there are people who want to understand the root causes.
A patch like that has zero (actually, negative) value. It simply shouldn't be accepted and regressing to the last "working", most tested version should be the option.
So, all in all, if you are not willing to do your homework well enough, it's better for everybody if you don't bother at all. It wastes both your time and the maintainers' time. Linus' time no less.
On your second point, yes, you can say of any cultural group that there are people who do X and people who do non-X, but that doesn't proves that there are no global traits and that all cultural stereotypes exists for no reason.
But I understand your point as "you are wrong to try to attribute the behavior of an individual to a stereotype, since they can only be used at a very broad level", and I think you're probably right.
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.
The greatest living mathematician has Chinese origins: http://en.wikipedia.org/wiki/Terence_Tao
If someone 'thinks and analyzes problems' then he does.
I don't like categorization by nation because I am Hungarian and I am afraid a lot of people in the U.S. who don't know me yet thinks something entirely different of my problem solving style than reality.
I'm a great believer in cultural traits, and I think they are normal. We are not all identical, and we are not all totally randomly different. We all share some cultural background from the country we grew up in, in varying degrees, and it does not prevent any individual from having any specific ability.
Yet, I was wrong to try to correlate a specific behavior of a specific person to his/her culture. That's where my logic was flawed.
If anyone wants more insight on cultural differences, I really recommend "When Cultures Collide" from Richard Lewis, it's a great book.
What assumptions do you normally encounter?
Are you implying the "fix it and get it done with" people don't exist in other nations?
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...
So you admit you are just fuelling your confirmation bias.
It looks to me like you are more guilty of the charge you are levelling than is the target of your accusations.
I might be wrong, but I'd appreciate a clarification.
But the GP is simply applying inductive reasoning. That isn't guaranteed to produce a correct outcome, but generalisations from large populations are not inherently flawed. It's indicative of mature thinking; generalisations are part of life and inductive reasoning is part of progress.
If you think the generalisation is deeply flawed, then make your case. That would be an honest discussion. As it is, you're just embarrassing yourself.
The key difference is that the GP asked questions based on a reasonable (although disputable) premise, while you are making conclusive statements based on simplistic (and flawed) logic.
Hmm...there's a problem with this code. It looks like changing this index to start at 5 works. OK, bug fixed!
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.
This definitely struck a chord, though, and I have my own saying for silent retorts:
"It's a computer program, not a #$%^ing Advent calendar."
The point being, I want to see analysis and process, not just the right numbers popping up in the right boxes.
http://pragprog.com/the-pragmatic-programmer/extracts/coinci...
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!
Usually, people speaking with a scornful tone of voice (or the written equivalent) are more venting than they are providing useful information. There's no need to pay too much attention to whatever they have to say, because if it's a big deal they'll say it again once they've calmed down.
I've noticed that when programming computers there are very few problems that can be fixed by behaving like a dick. And those that can be fixed by behaving like a dick, can also be fixed whilst behaving in a more gentlemanly fashion. The rest can be left unsolved, politely. There's really no reason not to do this.
But, you seriously think my comment is inflammatory? You don't think that learning to deal with people is an essential part of the job??
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.
Making changes until someting seems to "work".