- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I recall, working in Delphi many years ago, dealing with BigEndian issues.
I assumed they were issues from a small country called Endia.
Admin
True confession: I recently wrote some code using the observer pattern. The variable I use to hold the observer object?
No, I don't believe any of my co-workers get the joke.
Admin
One little, two little, three little Indians...
Admin
The code Vladimir found goes some way to solving the usual cause of problems we see: companies and projects with too many chiefs and not enough little indians.
Admin
The Indian code maintains the batting averages for the Atlanta Braves...
Admin
I stopped using funny variable names when I had to start maintain my own apps. Should have founded a company instead.
Admin
Nagesh little indian. Many hamburgers later, big indian.
Admin
The first one does not appear to be a WTF - in fact, the developer is covering all his/her bases by not only testing for null and undefined, but a real string whose contents are "null" or "undefined" - i.e. a victim of a bad concatenation. Might be an indication of WTFs elsewhere (or just oversights) but is not a WTF in itself.
Admin
It is better to work with one Big Indian rather than three Little Indians anyway...
Admin
And nor do most outside US as MST3K isn't exported (I had to look it up too; I thought you were going with a Fringe reference).
Admin
I'm missing the WTF in the first one.
Also, my comments frequently look like Dan's submission. Very stream-of-consciousness. It's kind of like rubber ducking when there's no one to be your duck.
Admin
Big Indians in Java (the island) and little Indians in Delphi (the city) does remind me a bit of ten foot pygmies in a Montezuma hall...
Admin
Admin
On wacked-out variable names:
An embedded system I inherited in the early 90s had its own multithreading preemptive scheduler. The central control variable of this scheduler celebrated a recent purchase made by the previous developer: golf_gti.
In the same system, sloppily built in C, a set of complicated calculations (pressure- and temperature-influenced compressibility of gases) was based on some old BASIC code. The underlying equations had parts involving the Greek letters pi and tau, the latter of which had locally acquired a mispronunciation as if spelled "tor". Of course, the BASIC interpreter was unable to cope with this abuse of the reserved word "or" (some BASIC systems cope, some do not), so the developers changed it, and misspelled "pi" as well: double apple, pie;
I wasn't particularly amused, but these names became part of the local jargon.
Admin
Dephi code or Delhi code?
Admin
A long time ago, when I was implementing a tree-based construct in C++, I had to delete a tree node and wrote a comment about killing all the children before turning the gun on ourselves.
No Indians or squirrels were harmed in the writing of this WTF.
Admin
As MrBester pointed out, it's a "Mystery Science Theater 3000" reference.
Admin
Maybe... the Little BigIndians were those who fought the Battle of Little Bighorn...
Admin
Admin
Admin
Admin
I assume that
c_SecretSquirrelCommand.ExecuteSecretHandshake(syn_nuts)
occurs elsewhere in the code.
Admin
In other words, because Enterprisey.
Admin
I've had to do this interpreting Spring Web REST parameters. If you pass in an empty parameter, the string representation you get of it is "null".
Admin
as a CS major at georgia tech, I had a required intro to computer engineering class that was mostly about the basics of circuits...logic gates and whatnot. one day the professor got to endian-ness and proceeded to write "Big Indian" and "Little Indian" on the board in giant letters. I was young and stupid and argued with her for what felt like years, but was probably 30 seconds (I'd expected SOMEBODY else in the room to pipe up and agree!). She just stared at me with a dumb look on her face until I finally realized a) everybody else in the class was dumb and b) you're not supposed to correct the professor.
Admin
Oh, c'mon. Now you're just Boytzing up the articles so we'll have something to gripe about. Well we're not going to bite. So there.
Admin
Admin
Imagine: reducing the human burden on the environment and raising the average intelligence of developers in one move! I can't say it's the worst idea I've heard...
Admin
You beat me to it. This is dealing with someone else's WTF, it's not a WTF itself.
Admin
I don't get this Indian joke at all.
Admin
So what happens when a field value is 'Null'? Huh? No so smart after all, maybe?
To say nothing of internationalization...
Admin
" Million-row relational tables where someone has stored 'null' in some column instead of NULL and you have to fix a different bug immediately, but can't get approval to do a proper fix with database update. "
--and then, just when you think you've got it fixed, you find out you deleted the last name for the lady named "Linda Null" in the data...
(btdt)
Admin
The first rule of The Secret Squirrel Club is that you don't talk about The Secret Squirrel Club.
Admin
Not Cleveland?
Admin
Is the Wile E. Coyote among the programmers trying to fool the Roadrunner-like hackers? It will never succeed. There are many animated cartoons to prove this theory.
Admin
The auntie of little Bobby Tables.
Admin
So he's programming for humans, not computers. Which is what you're supposed to do.
I find that languages that make a hack workaround like this so much easier than the "proper" way to do it are fundamentally flawed.
Admin
hehe
Admin
Hey! How about the Cleveland Indians?!? (Oh, sorry - I forgot - the Cleveland Indians have no batting averages. <sob!>)
CAPTCHA: usitas - ladies-of-the-evening in Spanish-speaking locales.
Admin
The real WTF of the squirrel one is that the property is public.
Note a very secret club if you make the property public is it. It should be private and available only to elite friends.
Admin
Javascript wins again
Admin
Think of it this way - without Enterprisey thinking, millions upon millions of software developers would be out of work, starving, begging on cold street-corners, instead of sitting in once-comfortable chairs in cubicles throughout the land, waiting for approval to proceed with the obvious thing after it's been considered, debated, gone over, lost, found, folded, spindled, filed away, stamped for cancellation, returned to sender, and finally, eventually, MAYBE approved by management, thirteen levels deep - but BY NO MEANS any earlier than 4:59 PM on the Friday of a holiday weekend.
Share and enjoy.
Admin
Back in the olden days, we transferred files containing binary single-precision floating point values between old-school 68030-based Macs, 80X86-based PCs and various VAXes. Every one of them used a different byte order, and the VAX also didn't use the standard IEEE-754 floating-point format. As an extra challenge, all of the conversion code was written in Pascal.
Admin
Admin
How many different byte orders are there? Middle-Indian?
Admin
Or a better analogy is comparing little endian and big endian to written languages.
Left to right vs right to left. 10110001 in 1 is the same as 10001101 in the other.
Edit: I also wanted to attach a clip from "the honking" in futurama from the bloody binary numbers in the mirror scene, but I couldn't find one. You will just have to look it up on your own.
Admin
And we liked it! Also, aren't little indians usually in a cupboard?
Admin
In little endian, the 32-bit hex representation of 650,000(base 10) is: 10 EB 09 00 and in big endian: 00 09 EB 10
Note that the bits within each byte remain in the same order. The leftmost bit is the lowest address. In big endian, the most significant (biggest) byte comes first by address; in little endian, the least significant (littlest) byte come first by address.
Addendum (2012-10-11 14:04): ETA: To further complicate things, larger blocks may be transposed. My example assumes 8-bit blocks, but it could be 16-bit blocks, for example. Then, the little endian would be: EB 10 09 00
Addendum (2012-10-11 14:07): Oops. Make that EB 10 00 09. SOrry for confusing anyone further, but I can't edit anymore at this point.
Admin
Yes, this is why setting a field to the string "null" or other such magic values is a really really bad idea. But if someone else has done it, it is not always practical to fix it, so you just have to grit your teeth and code for it.
I used to work on a system where the original authors had done exactly that: they would put various magic values like "null" and "na" into fields to indicate unknown or not yet read. I used to fantasize about ways to torture them to death.
Admin
In fairness, the "BigIndian" programmer (not Nagesh, I mean the programmer who used that name in his code) may have known the correct name and just been joking. I haven't done any research on this, but I strongly suspect that whoever invented the terms BigEndian and LittleEndian was thinking of the song "Ten Little Indians" and making a joke.