• gizmore (unregistered)

    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.

  • Herr Otto Flick (unregistered) in reply to no laughing matter
    no laughing matter:
    Herr Otto Flick:
    In the US, the ground floor is '1', where as in any sane system it is '0' or 'Ground floor', and the first floor is what your average american would call the second floor.
    In the US, you immediately sense impending danger when you have reached ground zero.

    Also google search "ground zero" for a bit more recent meaning of the term (although the fight club end scene is an uncanny forebode).

    Which is why I never said "ground zero". Score 1 for reading skills!

  • jay (unregistered)

    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.

  • jay (unregistered) in reply to Herr Otto Flick
    Herr Otto Flick:
    I think part of the reason that traditionally the UK has had better intrinsic programming skill than the US is that we are 0-based on most things, eg floors. In the US, the ground floor is '1', where as in any sane system it is '0' or 'Ground floor', and the first floor is what your average american would call the second floor.

    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.

  • Web Developer (unregistered) in reply to jay

    Still more than Americans...

    jay:
    Herr Otto Flick:
    I think part of the reason that traditionally the UK has had better intrinsic programming skill than the US is that we are 0-based on most things, eg floors. In the US, the ground floor is '1', where as in any sane system it is '0' or 'Ground floor', and the first floor is what your average american would call the second floor.

    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.

  • (cs) in reply to Lockwood
    Lockwood:
    Kings Cross station has a Platform 0.

    So does Clapham Junction, although the new platform 0 is still under construction at the moment.

  • David (unregistered) in reply to jay

    Hmm. Its time to feed the troll.

    jay:
    You know that a culture is in serious decline when they start bragging about how they number floors.

    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:

    jay:
    Their ancestors created the Magna Carta, establishing the principle of constitutional limits on the power of the king.

    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.)

    jay:
    They invented calculus

    Nope, that was the germans. The brits independently developed an inferior version that they somehow browbeat everyone into using. Presumably out of sheer malice.

    jay:
    and vaccination.

    That would be the french youre thinking of.

    jay:
    They pioneered the industrial revolution.

    Scotland. Though technically part of britain. Until 2014.

    jay:
    They stood alone against Nazi Germany

    Granted that one. Did a fucking good job of it as well.

    jay:
    and saved democracy.

    That was the US (in spite of what the brits claim).

    jay:
    And today, modern Britons carry on this proud tradition with ... a better system for numbering floors in a building.

    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.

  • (cs) in reply to Coyne
    Coyne:
    That looks something like that "dependent" coding in an insurance system I worked on one time (best recollection):

    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.

  • Frank (unregistered) in reply to lizardfoot
    lizardfoot:
    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.
    One of my favorite mainframe anti-patterns was the one where the first three digits of the record tell you how to parse the rest of the record -- including how long it is going to be, in case you foolishly thought you could allocate buffer first, read string into buffer second, parse third.

    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."

  • (cs) in reply to Herr Otto Flick
    Herr Otto Flick:
    no laughing matter:
    Herr Otto Flick:
    In the US, the ground floor is '1', where as in any sane system it is '0' or 'Ground floor', and the first floor is what your average american would call the second floor.
    In the US, you immediately sense impending danger when you have reached ground zero.

    Also google search "ground zero" for a bit more recent meaning of the term (although the fight club end scene is an uncanny forebode).

    Which is why I never said "ground zero". Score 1 for reading skills!

    My definition of "Ground Zero": finely-chopped Japanese fighter plane.

  • (cs) in reply to inhibeo
    inhibeo:
    Old programmers are really retards. Why code each case, when you clearly have data that you can use to sort these things (e.g. birth date). In addition to that, transitions between child to adult (e.g from 02 to 11) isn't going to be automatic in that system.

    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...")

  • anonymous (unregistered)

    this is actually a very good way to solve a problem with stupid busyness logic

  • anonymous (unregistered)

    var commentIndexes = { "1" : 0, //...snip... //don't ask //...snip... "392443" : 1, } var first = comments[commentIndexes[392443]];

  • C-Derb (unregistered) in reply to anonymous
    anonymous:
    var commentIndexes = { "1" : 0, //...snip... //don't ask //...snip... "392443" : 1, } var first = comments[commentIndexes[392443]];
    You got my vote!
  • (cs)

    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.

  • Abico (unregistered) in reply to inhibeo
    inhibeo:
    Coyne:
    That looks something like that "dependent" coding in an insurance system I worked on one time (best recollection):

    01 - spouse 02 - first child 11 - first adult dependent 12 - second child 21 - second adult dependent 22 - third child 23 - fourth child 24 - fifth child 98 - any additional children

    I think this is also a, "Don't ask."

    But it's interesting to make a system count 02, 12, 22, 23, 24, 98, 98, 98 for children because the requirement was that these could not be used out of order.

    So if the user just put in a 12 for a single child, it would get rejected because there was no 02 coding. So we either had to edit for that or else compute the numbering; moreover, the rows had to be re-coded if a child was removed.

    Old programmers are really retards. Why code each case, when you clearly have data that you can use to sort these things (e.g. birth date). In addition to that, transitions between child to adult (e.g from 02 to 11) isn't going to be automatic in that system.

    I'm wondering where "old programmers" come into the story.

  • Flink (unregistered) in reply to Andrew
    Andrew:
    What about "9"? Superstitious, perhaps?
    Invisible panel - never need to get to it....

    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....

  • Macca (unregistered) in reply to Steve The Cynic
    Steve The Cynic:
    lmm:
    The question is not why KGX has a platform 0, but why lesser stations don't.
    I don't know whether it counts as a lesser station or not (but it hosts TGVs, so it can't be all bad), but the Lille Flandres station in Lille (France) has platforms numbered 0 to 15. Boringly, though, they left them in decimal rather than changing to 0-to-F.

    Curoiusly, the other main station in Lille, Lille Europe, has platforms numbered 43 to 46, for no particularly obvious reason.

    Perhaps so you can easily tell which station you have to go to just by looking at the platform number - with room for expansion.

    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

  • sdrh (unregistered) in reply to C-Derb
    C-Derb:
    Herr Otto Flick:
    I think part of the reason that traditionally the UK has had better intrinsic programming skill than the US ....
    Really? I know I'm going to come across as a thin-skinned defensive US programmer, but I've never, ever heard anything about the "traditionally" superior talent on the other side of the pond. Care to support this? Or maybe I'm just getting trolled....

    Touchy!! Eh yankee?

  • (cs) in reply to Lockwood
    Lockwood:
    Kings Cross station has a Platform 0.

    First Hampshire are renumbering their bus routes soon, with them going to a sequential number system rather than grouping numbers based on route (Waterlooville being 4x, Gosport being 8x, etc). These numbered routes are, of course, starting with the number zero service.

    (Kings Cross got an extra platform added next to Platform 1, so it made sense for that to become P0, with them doing a renumber once all the station works are completed. Didn't stop me making a load of "Platforms are both 0-based and 1-based! The memories are returning!!!" jokes. First changing to a zero based system is just retarded.)

    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.

  • (cs)

    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:

    1. Building Elevator numbering system.
  • Jjjahn-loooque (unregistered) in reply to PiisAWheeL
    PiisAWheeL:
    list of things I like about the french:
    1. Building Elevator numbering system. 2.
    2. Most of them are in France, not here.
  • (cs) in reply to PiisAWheeL
    PiisAWheeL:
    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:

    1. Building Elevator numbering system. 2.

    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.

  • (cs)

    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.

  • JAPH (unregistered)

    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.

  • Norman Diamond (unregistered) in reply to inhibeo
    inhibeo:
    Coyne:
    "dependent" coding in an insurance system

    98 - any additional children

    Old programmers are really retards.

    Well sure, just like young programmers. That's why this site exists. Smart people choose other professions.

    inhibeo:
    Why code each case, when you clearly have data that you can use to sort these things (e.g. birth date).
    Octomom's 98th child says: you're right. Octomom's 98th child says: you're right. Octomom's 98th child says: you're right. Octomom's 98th child says: you're right. Octomom's 98th child says: you're right. Octomom's 98th child says: you're right. Octomom's 98th child says: you're right. Octomom's 98th child says: you're right.

    Octomom had a few other 98th children who were born before the big eight, so their birthdates might actually work.

  • Norman Diamond (unregistered) in reply to Lockwood
    Lockwood:
    Kings Cross station has a Platform 0.
    Anyone know the station closest to Stan Kelly-Bootle? That one deserves to be 0.5-based.

    Tachikawa station's platforms used to be 2-based but they were renumbered a few years ago.

  • Norman Diamond (unregistered) in reply to da Doctah
    da Doctah:
    Leave us not forget that there is a context in which we learned to count 1, 2, 3, 95, 98, 2000, Me, XP, Vista, 7, 8.
    var panelIndexes = {
       "7" : 6.1, // don't ask
       "3.1" : 3,  // don't ask again
       "3.11" : 3,  // tell your whole workgroup not to ask
       "3.12" : 3,  // you don't dare ask
    };
    /* snip */
    
  • (cs) in reply to Abico
    Abico:
    I'm wondering where "old programmers" come into the story.
    This shows signs of what used to be called "punch card thinking" or "punch card mentality". As in:
    • All files or records are 80 characters
    • If there is more than 80 characters of data, use multiple records identified with type 1, type 2, and so on
    • Codes chosen for selection or sorting (by unit record equipment)

    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...

  • Norman Diamond (unregistered) in reply to Frank
    Frank:
    One of my favorite mainframe anti-patterns was the one where the first three digits of the record tell you how to parse the rest of the record -- including how long it is going to be, in case you foolishly thought you could allocate buffer first, read string into buffer second, parse third.
    I wish Windows programs had such luxuries. The MFC source code for LoadString is publicly available, you can see how Microsoft had to code the same WTF to surmount Microsoft's other WTF as the rest of us have to do, and they still never fixed it. Then there's some of the networking APIs, device setup APIs, etc.
  • Gary Olson (unregistered)

    "13" : 13 //Don't tell anyone I code for a living

  • Yoshi (unregistered) in reply to Coyne
    Coyne:
    Abico:
    I'm wondering where "old programmers" come into the story.
    This shows signs of what used to be called "punch card thinking" or "punch card mentality". As in:
    • All files or records are 80 characters
    • If there is more than 80 characters of data, use multiple records identified with type 1, type 2, and so on
    • Codes chosen for selection or sorting (by unit record equipment)

    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...

    I call shenanigans - how can you keep designing for cards when you're dead and buried?

  • (cs) in reply to PiisAWheeL
    PiisAWheeL:
    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:

    1. Building Elevator numbering system. 2.

    • 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.

  • (cs) in reply to David
    David:
    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.
    Yeah, like the Imperial measurements...

    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.

  • Planar (unregistered) in reply to Steve The Cynic
    Steve The Cynic:
    lmm:
    The question is not why KGX has a platform 0, but why lesser stations don't.
    I don't know whether it counts as a lesser station or not (but it hosts TGVs, so it can't be all bad), but the Lille Flandres station in Lille (France) has platforms numbered 0 to 15. Boringly, though, they left them in decimal rather than changing to 0-to-F.

    Curoiusly, the other main station in Lille, Lille Europe, has platforms numbered 43 to 46, for no particularly obvious reason.

    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.

  • (cs) in reply to Planar
    Planar:
    Steve The Cynic:
    Curoiusly, the other main station in Lille, Lille Europe, has platforms numbered 43 to 46, for no particularly obvious reason.
    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.
    It probably has to do with tracks numbers. If you look at the railway station in Weert, the Netherlands, there's a track bypassing the station, then there's platform 2, then platform 3, and what remains of the shunting yard. This station never had a platform 1.

    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.

  • (cs) in reply to JAPH
    JAPH:
    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.
    But what happens when you have more than 26 exits in a particular mile?
  • (cs) in reply to dkf
    dkf:
    JAPH:
    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.
    But what happens when you have more than 26 exits in a particular mile?
    Not much of a highway if you have an exit every 70 yards. More like a parking lot.
  • (cs)

    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.

  • Harrow (unregistered)

    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.

  • Herr Otto Flick (unregistered) in reply to C-Derb
    C-Derb:
    Herr Otto Flick:
    I think part of the reason that traditionally the UK has had better intrinsic programming skill than the US ....
    Really? I know I'm going to come across as a thin-skinned defensive US programmer, but I've never, ever heard anything about the "traditionally" superior talent on the other side of the pond. Care to support this? Or maybe I'm just getting trolled....

    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.

  • Herr Otto Flick (unregistered) in reply to C-Derb
    C-Derb:
    Herr Otto Flick:
    I think part of the reason that traditionally the UK has had better intrinsic programming skill than the US ....
    Really? I know I'm going to come across as a thin-skinned defensive US programmer, but I've never, ever heard anything about the "traditionally" superior talent on the other side of the pond. Care to support this? Or maybe I'm just getting trolled....

    Oh yes, and totally trolling you.

  • (cs) in reply to Macca
    Macca:
    Steve The Cynic:
    lmm:
    The question is not why KGX has a platform 0, but why lesser stations don't.
    I don't know whether it counts as a lesser station or not (but it hosts TGVs, so it can't be all bad), but the Lille Flandres station in Lille (France) has platforms numbered 0 to 15. Boringly, though, they left them in decimal rather than changing to 0-to-F.

    Curoiusly, the other main station in Lille, Lille Europe, has platforms numbered 43 to 46, for no particularly obvious reason.

    Perhaps so you can easily tell which station you have to go to just by looking at the platform number - with room for expansion.

    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

    The main problem with the "station identification" theory is that your ticket doesn't identify the platform, only the station (exception: if it's a TGV, where in the train your seat is).

    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.

  • (cs) in reply to Herr Otto Flick
    Herr Otto Flick:
    How far do you want to go back?

    Babbage invented the concept of a computer. Turing invented the modern computer.

    Lady Ada Lovelace (daughter of Lord Byron) was arguably the first computer programmer.

    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.

  • Leo (unregistered)

    There are two types of people:

    1. People who start arrays at 1.
    2. People who start arrays at 0.
  • anonymous (unregistered) in reply to Leo
    Leo:
    There are two types of people:
    1. People who start arrays at 1.
    2. People who start arrays at 0.
    :D
  • (cs) in reply to Harrow
    Harrow:
    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.

    You missed one:

    (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.

  • jay (unregistered) in reply to David

    All right! Another pointless, irrelevant, pedantic argument! My favorite kind!

    David:
    jay:
    You know that a culture is in serious decline when they start bragging about how they number floors.

    You should not assume that "a culture" is bragging about something merely because one person describes it on a forum.

    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.

    David:
    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:

    jay:
    Their ancestors created the Magna Carta, establishing the principle of constitutional limits on the power of the king.

    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.

    Okay, one for me!

    David:
    jay:
    They invented calculus

    Nope, that was the germans. The brits independently developed an inferior version that they somehow browbeat everyone into using. Presumably out of sheer malice.

    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.

    David:
    jay:
    and vaccination.

    That would be the french youre thinking of.

    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".

    David:
    jay:
    They pioneered the industrial revolution.

    Scotland. Though technically part of britain. Until 2014.

    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.

    David:
    jay:
    They stood alone against Nazi Germany

    Granted that one. Did a fucking good job of it as well.

    jay:
    and saved democracy.

    That was the US (in spite of what the brits claim).

    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.

    David:
    jay:
    And today, modern Britons carry on this proud tradition with ... a better system for numbering floors in a building.

    That system has always existed. It isnt "carrying on" anything.

    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.

  • jay (unregistered) in reply to Yoshi
    Yoshi:
    Coyne:
    Some people continued to design for cards long after they were dead and buried.
    I call shenanigans - how can you keep designing for cards when you're dead and buried?

    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.

  • (cs) in reply to Severity One
    Severity One:
    David:
    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.
    Yeah, like the Imperial measurements...

    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.

    Exactly. Did tha Lawd Jeezus Kraahst measure in metres, litres and kilogrammes? I think Naht.

Leave a comment on “Ask the Index”

Log In or post as a guest

Replying to comment #:

« Return to Article