- 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
Not really a WTF. The WTF is probably the client who wants his tabs re-ordered. The keys might look redundant, but maybe once had names.
Admin
Which is why I never said "ground zero". Score 1 for reading skills!
Admin
To sum up notes from others, the programmer is most likely just doing some sort of code translation. Exactly what the "panels" are we don't know without more context: they might be tab panels on a GUI window, wiring panels in some electronic device, or wood panels on the kitchen cabinets that the company produces for all we know. But there are apparently two numbering schemes attached to them and the programmer must translate between the two. Of itself not much of a WTF. About the only thing I'd fault him for is failing to include some comments to explain the translation. Even if it's as simple as "old sequence" and "new sequence", he could have included a comment to clarify.
Admin
You know that a culture is in serious decline when they start bragging about how they number floors.
Their ancestors created the Magna Carta, establishing the principle of constitutional limits on the power of the king. They invented calculus and vaccination. They pioneered the industrial revolution. They stood alone against Nazi Germany and saved democracy. And today, modern Britons carry on this proud tradition with ... a better system for numbering floors in a building.
Admin
Still more than Americans...
Admin
So does Clapham Junction, although the new platform 0 is still under construction at the moment.
Admin
Hmm. Its time to feed the troll.
You should not assume that "a culture" is bragging about something merely because one person describes it on a forum. That would be like saying that all americunts are fucking retarded because just one of them lacks reasoning skills.
And has a poor grasp of history! Lets enumerate:
Granted, though this was perhaps not so much the high-minded democracy-building enterprise that it is sometimes represented as, as a self-interested power-grab.
(Special on hyphens this week only.)
Nope, that was the germans. The brits independently developed an inferior version that they somehow browbeat everyone into using. Presumably out of sheer malice.
That would be the french youre thinking of.
Scotland. Though technically part of britain. Until 2014.
Granted that one. Did a fucking good job of it as well.
That was the US (in spite of what the brits claim).
That system has always existed. It isnt "carrying on" anything.
Anyway, everything will be just like America soon, and all these quibbles over minor cultural differences will just go away and you can be happy.
HTH.
Admin
Oh man... I had to work on an insurance quote system a while back. We were trying to convert an old mainframe app to a sweet new enterprisey Java/Oracle web app. The answer to most of our mainframe questions was "that's just how it works". So we just stopped asking.
Admin
And then there's the special code on input data line 1824 that says "oh by the way this was supposed to be tacked on to the end of line 1823 that you already processed."
Admin
My definition of "Ground Zero": finely-chopped Japanese fighter plane.
Admin
Yeah, I'm sure I've created a few of these myself, being an old programmer. :-)
The insurance company did track the dependents by birthdate and SSN. This nonsense had to be done for the electronic file interface...and is one of those WTF rules which I'm sure originated in some crufty old punch card system.
("Why? Well, because we've ALWAYS done it that way...")
Admin
this is actually a very good way to solve a problem with stupid busyness logic
Admin
var commentIndexes = { "1" : 0, //...snip... //don't ask //...snip... "392443" : 1, } var first = comments[commentIndexes[392443]];
Admin
Admin
As for 'floor' indices, it is pretty simple...
Us crazy Americans program in Fortran, while the silly people on the other side of the pond are programming in C. Makes perfect sense to me!
The table in this instance is an attempt to reconcile all the differences that have crept in over the years. Like accommodating the fact that there is rarely a 13th floor indicated in an elevator. It always goes from 12 to 14. I even had an apartment building I lived in that had apartments numbered 11, 12, 12A, 14, 15. Oh well, lots of things have discontinuous numbering for various political reasons, which often yield the "Don't Ask!" comment upon their implementation.
Admin
Admin
This is probably some cumbersome way of implementing tab-indexes (indices?) or something, and we don't ever wnat the user to go to #9....
Admin
Incidentally, do people really think arbitrary numbering is so wierd? When I was at Uni we had (at least one) lecturer who used to give random times for due dates (usually after 5PM) eg - Due 17:13 October 23rd - He used to point out that if he puts 17:00 everyone tries to argue several minutes late, but by putting a time people consider more exact they argue less.... Back to the point: I think starting platform numbering at 43 shows great foresight as it allows expansion in either direction
Admin
Touchy!! Eh yankee?
Admin
Reading station has 4a and 4b, for the Bracknell/Waterloo and Guildford/Gatwick lines. Lines 4-8 are the main line stuff from Paddington to most of the country, while 1-3 is for the branch lines to Hungerford, Bedwyn, Basingstoke and all that. Apparently it was originally 3 stations that got joined together piecemeal.
Oh yeah, and there's a 9 and 10 as well, nobody gets on there.
Admin
When you are in a 2 story building, you have 2 floors. The First floor, and the Second floor.
Then Elevators were invented, and someone kept with tradition.
Personally, I think the way the french do it (according to someone else on this forum) with negative numbers for below ground is a pretty slick way to do it. Simple, easy to understand, scalable... So now I can start my list of things I like about the french:
Admin
Admin
No, when you are in a two-storey building, you have 2 floors: the ground floor and the first floor. Unless you live in a superstitious benighted land where you don't dare to admit you don't believe in fairies, of course.
Admin
You have a two-story building. You walk in the front door. It's the first story. There's a floor. It's the first floor.
Admin
In Utah our highway exits are numbered by the mile marker. If two or more exits fall in the same mile, the exit has "A" ... "Z" appended.
Admin
Octomom had a few other 98th children who were born before the big eight, so their birthdates might actually work.
Admin
Tachikawa station's platforms used to be 2-based but they were renumbered a few years ago.
Admin
Admin
In the case of the last item in the ist, the coding in my example is reminescent of this type of approach. Think in terms of an application designed with the idea of selecting all children by '2' in position 2: 02, 12, 22, 32 ....
...not to mention, of course, designing for two kids (because we can always go back and add more next week if some idiot should have more than 2 kids insured).
Some people continued to design for cards long after they were dead and buried.
And those, of course, would be the old programmers...
Admin
Admin
"13" : 13 //Don't tell anyone I code for a living
Admin
Admin
Catherine Deneuve. Seriously, even when she's 130 years old she'll still be smoking hot.
Back to the elevators. Used to be a hoity-toity shopping center smack in the middle of Scottsdale called the Galleria. And I do mean "smack in the middle". There were three lanes going south on Scottsdale Road, and to enter the ramp to the underground parking garage you had to be in the middle lane. If you were going north instead, there not only was no access ramp, there weren't even signs to indicate that the center existed as a possible destination.
Elevator buttons for the seven floors in the center had the labels (roughly top to bottom, from memory): T, M, G, L, S, P1, P2. Those last two were for the parking lot; for the actual shopping levels you had to remember whether the "Terrace" level was above or below the "Mezzanine", and whether "Ground", "Lobby" or "Street" was the one on the same level as the sidewalk outside.
The place is still there, but it's long since been turned into an office park, and the access ramp to the "batcave" has been closed off and disguised.
Admin
The other day, I looked up a description of how to make wine from oranges (since we have three orange trees in what passes for our front and back gardens, using the word loosely). All the measurements were Imperial, and my brain just kind of switched off.
Don't get me wrong, it must be equally baffling for Americans, all this metric nonsense, but it's just so damn inconvenient when a country decides to do it a different way from everybody else, minus the Liberians and the Burmese.
The Brits managed. Took one or two generations, and in a few years time nobody will care about ounces and pounds (other than sterling) and yards any longer.
You just need to teach kids metric units in school, but with the crazily fractured and devolved government in the USA, chances of that are poor at best.
Admin
My guess: when you extrapolate the spacing of the platforms across the streets from Lille Flandres, you get to 43 when you reach Lille Europe. A quick look at Google maps seems to confirm this theory.
Admin
On the other hand, the next big station is Eindhoven, and there the shunting yard is on one side (the '0' side) of platform 1, with platforms 2 to 6 on the other side.
My theory is that the railway companies do this purely out of spite, to confuse travellers.
Admin
Admin
Admin
The advantage of 1-based systems is that you can use 0 as something like "not assigned". In a language where unassigned integers default to zero, this is very useful.
Admin
Working with the various computer languages I learned that array numbering seems to fall into three categories:
(1) Array indices always start with zero. This is most comfortable for assembler programmers first learning a compiled language. It also simplifies coding for multidimensional arrays if the compiler doesn't handle them.
(2) Array indices always start with one. This feels natural and comfortable at first, but it fools many people into thinking they are programmers when they are not.
(3) Array indices can start with any integer. This flexibility comes at a small cost -- every time you declare an array, you must declare its starting index. Usually you must declare its final index also.
The basing of array indices is one of the best interview discussion topics. For example, a candidate who looks at the three categories above and says that (2) is a special case of (3) is probably a keeper.
-Harrow.
Admin
How far do you want to go back?
Babbage invented the concept of a computer. Turing invented the modern computer. Spectrum, BBC Micro, Acorn, ARM all came out of making computers that real people can afford. As a consequence, in the 80s, we we're all writing software, whilst you played on your NES. Almost everyone in the UK was taught programming at school. As a consequence of that, most of the most groundbreaking games produced between 1985 and 2000 were made in Britain, by British programmers. Elite, Dizzy, Lemmings, Worms, Wipeout, the entire GTA series, Tomb Raider, Hitman, Deus Ex all built by visionaries like Jeff Minter, Peter Molyneux, The Bitmap Brothers leading to still world leading studios like Codemasters, Lionhead, Llamasoft, EDGE, Eidos, CORE, Bullfrog, et al. Next time you play a game, have a look, it was probably written in Britain.
I'm also basing this upon my experiences working in the US With US programmers.. some of my classmates from primary school (sorry, 'grade school'?) could program better than these guys.
Admin
Oh yes, and totally trolling you.
Admin
And the "allows for expansion" theory is all well and fine, except that such expansion would be prohibitively expensive owing to both sides being adjacent to the foundations of some large buildings.
Admin
The Brits also perfected the procedure of hanging a condemned prisoner, and were much better at it than the Americans. And don't even get me started on hanging, drawing and quartering.
Admin
There are two types of people:
Admin
Admin
(4) APL. Arrays may begin with one or with zero, but not with any other values. Which starting point is in effect at any given moment is determined by the setting of a particular system variable, which also affects such tangential matters as random-number generation and the calculation of factorials.
Admin
All right! Another pointless, irrelevant, pedantic argument! My favorite kind!
Hmm, perhaps you didn't grasp that my post was intended as a joke. Yes, obviously I'm talking about the comments of one person, and hopefully-humorously ascribing this one person's comments to the nation as a whole.
Okay, one for me!
Yes yes, the Newton/Leibniz debate. Regardless of who got there first, there is every reason to believe that the two men each invented calculus independent of the other. If we're talking about the intellecutal prowess of a culture, I don't think the fact that someone else accomplished the same thing at about the same time detracts from the impressiveness of the achievement. If a man with no legs manages to crawl 100 miles across a desert, that's an impressive achievement, even if another man with no legs did the same thing the week before.
Umm, no, I was thinking of Edward Jenner, the British physician who developed a smallpox vacine in 1796. Of course like any great invention, there were precursors who deserve a share of the credit. But I believe that Jenner is generally credit with "inventing vaccination".
And so your objection is ... ?
The original post I replied to said "UK". I said "Britons". Last I checked, Scotland was part of both the UK and Britain. In any case, England was clearly a "pioneer" in the industrial revolution.
So your objection is that when I say that group A was among the first to do X, that that statement is false because someone else, who is also a member of group A, was also among the first to do X. Umm, right.
My point was that by holding off the Nazis alone (until the US got involved), the British saved democracy. Of course one could always debate hypothetical cases, but if Britain had fallen to Operation Sealion, it's quite plausible that the war would have been over and the U.S. would have stayed out.
What? (a) You can only "carry on" something that has existed in the past, so your last two sentences make something of a paradox. (b) In any case, I didn't say that Britain was carrying on this system of numbering floor, but that they were carrying on the great list of past achievements. (c) In any any case, I'm sure that this system hasn't "always existed". Like, what, are you saying that this is how God numbered floors in Heaven before he created people? I'm sure someone invented the system. I don't know who or when. The whole point of the joke was to make fun of it as a great invention made by modern Britons comparable to the great achievements of their past.
So let's see, I referenced 5 historical events: 1. Magna Carta, 2. calculus, 3. vaccination, 4. industrial revolution, 5. WW2. You agree that I'm correct on 1 & 5. Your objections to 2 is that Newton had a rival. So? I don't know what your objection to 3 is: I think most science historians credit Jenner for vaccination. Your objection to 4 is incoherent.
I think I win at least 4 1/2 out of 5. I'll concede somewhat on Liebniz.
Admin
Because they're in Hell. What kind of input devices do you think they'd have in Hell? Punch cards and paper tape, of course. And they have to code in COBOL.
Admin