I didn't believe it
-
Came across this bit of code in a review
int v = 2 >> 10;
Usually I just skim by stuff like this because I figure the programmer knows what they are doing. Then I went back and looked because it was specify a max size so I figured someone was being clever. And 'clever' doesn't mean good code. Then I realized it definitely was not clever. Always willing to question myself I started wondering if I was misreading it. Or if I had actually forgotten what the operator did. So I wrote code just to verify it. If it hadn't been so weird and so wrong I wouldn't have spent that much time on it.
-
Came across this bit of code in a review
int v = 2 >> 10;
Usually I just skim by stuff like this because I figure the programmer knows what they are doing. Then I went back and looked because it was specify a max size so I figured someone was being clever. And 'clever' doesn't mean good code. Then I realized it definitely was not clever. Always willing to question myself I started wondering if I was misreading it. Or if I had actually forgotten what the operator did. So I wrote code just to verify it. If it hadn't been so weird and so wrong I wouldn't have spent that much time on it.
Maybe the author is just suffering of left-right confusion :laugh: Poor soul just wanted to write 2k.
Mircea
-
Came across this bit of code in a review
int v = 2 >> 10;
Usually I just skim by stuff like this because I figure the programmer knows what they are doing. Then I went back and looked because it was specify a max size so I figured someone was being clever. And 'clever' doesn't mean good code. Then I realized it definitely was not clever. Always willing to question myself I started wondering if I was misreading it. Or if I had actually forgotten what the operator did. So I wrote code just to verify it. If it hadn't been so weird and so wrong I wouldn't have spent that much time on it.
Was the author made aware of the error. Perhaps the authors' finger missed the '<' key.
-
Was the author made aware of the error. Perhaps the authors' finger missed the '<' key.
-
Came across this bit of code in a review
int v = 2 >> 10;
Usually I just skim by stuff like this because I figure the programmer knows what they are doing. Then I went back and looked because it was specify a max size so I figured someone was being clever. And 'clever' doesn't mean good code. Then I realized it definitely was not clever. Always willing to question myself I started wondering if I was misreading it. Or if I had actually forgotten what the operator did. So I wrote code just to verify it. If it hadn't been so weird and so wrong I wouldn't have spent that much time on it.
-
Came across this bit of code in a review
int v = 2 >> 10;
Usually I just skim by stuff like this because I figure the programmer knows what they are doing. Then I went back and looked because it was specify a max size so I figured someone was being clever. And 'clever' doesn't mean good code. Then I realized it definitely was not clever. Always willing to question myself I started wondering if I was misreading it. Or if I had actually forgotten what the operator did. So I wrote code just to verify it. If it hadn't been so weird and so wrong I wouldn't have spent that much time on it.
It would be a great way to detect if anyone stole their code. The OP only says that he came across it 'in a review', so the code may not be open source. Even if open source, it may have been inserted to detect if anyone uses the code without giving the required credit to the source. Or maybe it was the developer's little test to see how observant the reviewers are :-) Map companies often add small, non-existing villages to their maps to detect theft. I guess similar things is common in other fields as well.
Religious freedom is the freedom to say that two plus two make five.
-
It would be a great way to detect if anyone stole their code. The OP only says that he came across it 'in a review', so the code may not be open source. Even if open source, it may have been inserted to detect if anyone uses the code without giving the required credit to the source. Or maybe it was the developer's little test to see how observant the reviewers are :-) Map companies often add small, non-existing villages to their maps to detect theft. I guess similar things is common in other fields as well.
Religious freedom is the freedom to say that two plus two make five.
-
Maybe the author is just suffering of left-right confusion :laugh: Poor soul just wanted to write 2k.
Mircea
Both my Mum and my partner exhibit LRD quite commonly. I can't think of any men I've known who commonly confuse the two. For a long time, I'd jokingly say, "Oh.. you mean boys right?". I've long since learned to hold up a hand and point left or right when confirming directions in the car. That invariably works just fine. I've just read a few excerpts from research papers on the subject which suggest there to be a greater number of women afflicted than men. Fewer however, than has been suggested by historical studies - studies which often asked questions which relied upon mental rotation of an image to discern if it was a left or right hand being presented. Men typically perform more accurately at rotation tasks. When studies have been run which remove this task from tests, the difference is smaller but still present. On a side-note, I've just learned that about 65% of orangutangs are left-handed.
-
Both my Mum and my partner exhibit LRD quite commonly. I can't think of any men I've known who commonly confuse the two. For a long time, I'd jokingly say, "Oh.. you mean boys right?". I've long since learned to hold up a hand and point left or right when confirming directions in the car. That invariably works just fine. I've just read a few excerpts from research papers on the subject which suggest there to be a greater number of women afflicted than men. Fewer however, than has been suggested by historical studies - studies which often asked questions which relied upon mental rotation of an image to discern if it was a left or right hand being presented. Men typically perform more accurately at rotation tasks. When studies have been run which remove this task from tests, the difference is smaller but still present. On a side-note, I've just learned that about 65% of orangutangs are left-handed.
My mom also had this affliction. And also car trips where my father was driving and my mom was following the map and giving directions were hilarious: "turn left; no, the other left!".
enhzflep wrote:
Men typically perform more accurately at rotation tasks.
The better spatial orientation skills in men might be related to their historical role as hunters. Men who couldn't keep a good mental map of the environment were less able to bring home dinner and had a better chance of becoming lunch :)
Mircea
-
My mom also had this affliction. And also car trips where my father was driving and my mom was following the map and giving directions were hilarious: "turn left; no, the other left!".
enhzflep wrote:
Men typically perform more accurately at rotation tasks.
The better spatial orientation skills in men might be related to their historical role as hunters. Men who couldn't keep a good mental map of the environment were less able to bring home dinner and had a better chance of becoming lunch :)
Mircea
Ahhh, of course. Thanks for speculating. :thumbsup: I couldn't for the life of me come up with a theory as to why gender would play such a role. But when you put it that way, it seems perfectly reasonable that men simply had those less adept at the skill culled from their ranks, leaving only the proficient ones left to create offspring.
-
It would be a great way to detect if anyone stole their code. The OP only says that he came across it 'in a review', so the code may not be open source. Even if open source, it may have been inserted to detect if anyone uses the code without giving the required credit to the source. Or maybe it was the developer's little test to see how observant the reviewers are :-) Map companies often add small, non-existing villages to their maps to detect theft. I guess similar things is common in other fields as well.
Religious freedom is the freedom to say that two plus two make five.
A bit like the teachers now adding "invisible" text (white-on-white) to their homework assignments to catch the students who copy-n-paste into ChatGPT to cheat on their homework. :D
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer