• Tim Ottinger (unregistered)

    I like that it actually provides a copy of "i".

  • The Fake WTF (unregistered)

    Someone should tell them that that's like saying, "The food here is awful and their kitchen is filthy, but it's really cheap and if we don't like it we can get second helpings for free!"

  • Edward Royce (unregistered) in reply to Sanjay Kumar
    Sanjay Kumar:
    Anonymous Cowardly Lion:
    ... I believe that the phenomenon is called 'brain-drain,' and it explains that while India has one of the lowest GDP's per capita in the world, ...

    This is the shallowest analysis ever. One has to go slightly deeper than that. One cannot simply attribute India's low per capita GDP to brain-drain. I'll leave you with a few reasons. (1) high rate of population growth (2) socialist policies founded in the past (3) diversion of India's resources, raw materials, etc to England in the 200 years of British rule causing India's GDP share in the world to lower from 25% when they arrived to less than 1% when they left; to enrichment to England and improvishment of India.

    With such attitudes and ignorance prevailing, is it any wonder that the author of this blog can make generally disparaging statements about an entire nation and get away with it?

    Sorry but the most recent analysis I've seen of the British Raj is that the Brits lost money. In fact most colonial efforts were money losers. Which is why so many countries abandoned colonialism ASAP after WWII.

    The fact is that if the Brits hadn't taken over India, built the railroads, road network, established a common civil service and a legacy of the rule of law, India today would be just like Africa.

  • Sanjay Kumar (unregistered) in reply to Edward Royce
    Edward Royce:
    Sorry but the most recent analysis I've seen of the British Raj is that the Brits *lost money*. In fact most colonial efforts were money losers. Which is why so many countries abandoned colonialism ASAP after WWII.

    The fact is that if the Brits hadn't taken over India, built the railroads, road network, established a common civil service and a legacy of the rule of law, India today would be just like Africa.

    This is preposterous. India was never like Africa. India was one of the most prosperous countries in the world. I can imagine that there would have been several states where there is now one, but most of them would have been amongst the most prosperous nations of the world.

    Your claims that India wouldn't have this or that without the British assumes that Indians can't do anything - the same mistake that the author of this blog is making.

    As for your money losing myth, a few years ago, the Indian High Commissioner to England (you know that Commonwealth nations don't have ambassadors) saw the basement (or dungeons) of Buckingham Palace. He reports that the treasures looted from India were placed haphazardly for there was no room to properly arrange them. There were so many of them.

    The reasons that the British left India are many, but the primary ones were that the World War had drained them; the sun was setting on the empire; the Indian civil society was in no mood to accept them any longer and after Lord's Macaulay's success (see http://bp3.blogger.com/_5q7DIsGBCjw/R5hvnLqF85I/AAAAAAAAABc/J2SyTQQ4BFI/s1600-h/INDIA_1835-780841.JPG), they couldn't justify suppressing people who they had made like themselves.

  • pradesh silvansemhuttu (unregistered) in reply to CapitalT

    no our indian universities are most responsible for the problematic qualities of our code. we are taught naught but microsoft windows and microsoft .net, the two products we use most and best. when all we know is vb.net and windows, every problem look but like a user of those technologies. we have heard of linux but it is not from microsoft do we most assuredly disregard it.

  • Burned Once Too Many Times (unregistered) in reply to Sanjay Kumar
    Sanjay Kumar:
    As for your money losing myth, a few years ago, the Indian High Commissioner to England (you know that Commonwealth nations don't have ambassadors) saw the basement (or dungeons) of Buckingham Palace. He reports that the treasures looted from India were placed haphazardly for there was no room to properly arrange them. There were so many of them.

    That sounds like an outright fabrication to me. It's the same sort of fabrication I've heard in the past from off-shore developers. Namely, the fabrication of their ability to perform even trivial programming tasks.

  • Sanjay Kumar (unregistered) in reply to Burned Once Too Many Times

    [quote user="Burned Once Too Many Times That sounds like an outright fabrication to me. It's the same sort of fabrication I've heard in the past from off-shore developers. Namely, the fabrication of their ability to perform even trivial programming tasks.[/quote] For one who is unfamiliar with treasures that Indian temples and palaces had, this is how Kuldip Nayar's statement would come across as.

    Did you know that the world biggest diamond (then) was Kohinoor and the British took it from India and then cut it in two?

  • (cs) in reply to dpm
    dpm:
    "Have you tried rebooting, ma'am?"

    I think you mean: "Hello; IT. Have you tried turning it off and on again?"

    For best results use a large reel-to-reel tape recorder

  • (cs) in reply to I walked the dinosaur
    I walked the dinosaur:
    loe:
    Perhaps it was providing a copy to someone named Deep?

    Of course...everyone over there is named Sandeep.

    And of course, everyone over here is named "Bush" as in "bush-whacked"... (I know what you are thinking and I like it... :P)... Bunch of losers... living in a strange country where the president has the IQ of a leech and half the country has the combined IQ of that leech.

  • teh_n1gz (unregistered) in reply to conservajerk
    conservajerk:
    I think the point of the article is a company cannot simply outsource to the lowest bidder and expect quality. You know the lowest bidder will cut corners to make his profit. I'm sure that cutting corners includes hiring less than experienced people and expecting them to produce.

    I've seen plenty of garbage like this in my career. Most of it was introduced by new grads/interns who were tasked with developing something beyond their abilities and experience by a company that wanted to save a couple bucks. The problem here is the belief by management that all programmers are created equal (ignoring experience) and that employee self-development/mentoring is not important.

    Sounds like my first job tbh, company hired me fresh out of college gave me this huge chunk of a project to do that used their internal libs (very well undocumented) in a six week deadline.... aah fun times.

    Still trying to figure out after that intro why i still do this for a living 9 years later :P

  • v.dog (unregistered)

    I'm surprised that they didn't take the logic all the way to a thousand monkeys. After all, if they can produce the works of Shakespeare, they can surely write code.

  • dkf (unregistered) in reply to Dirk
    Dirk:
    <rant> What's with the excuse that a grad can't be expected to do anything? I've seen time and time again just how useless a degree is. At one job a grad came on board as an intern and all he did was sit by himself working through a beginners C# book. WTF was he doing for the last 3 or 4 years? Why can't Universities actually teach kids to code so that they can hit the ground running?

    It just seems mind boggling that kids spend thousands on degrees to become programmers only to graduate and have to turn around and actually learn to program. WTF? </rant>

    FYI, no school of computing (whether styling itself as doing CS or EE or any of the other possibilities) is really about programming. Programming is just something that you have to be able to do in order to boss a computer about; there's a lot of other more interesting (and important) stuff that students have to learn about as well (e.g. compilers, parallel systems, complexity theory, language theory, network theory). And of course, some students are just flaming useless despite being able to pass exams. That happens in other fields too.

    If you just wanted a programmer, you'd get someone out of a trade school. They'd be able to bash keys to churn out stuff within strictly delimited guidelines, but probably wouldn't know dick about designing a whole program (let alone a full application system). It's the difference between a brick-layer and an architect!

  • (cs) in reply to teh_n1gz
    teh_n1gz:
    Sounds like my first job tbh, company hired me fresh out of college gave me this huge chunk of a project to do that used their internal libs (very well undocumented) in a six week deadline.... aah fun times.
    Now I'm curious: what's the difference between a well-undocumentend and a badly-undocumented library?
  • Redeemer (unregistered) in reply to Burned Once Too Many Times

    Just to clarify, i am an indian, by no means am i patriotic or nationalistic. And the only reason why i am replying here is cause it seemed interesting and i got nothing better to do this afternoon

    Edward Royce:
    Sorry but the most recent analysis I've seen of the British Raj is that the Brits *lost money*. In fact most colonial efforts were money losers. Which is why so many countries abandoned colonialism ASAP after WWII.

    The fact is that if the Brits hadn't taken over India, built the railroads, road network, established a common civil service and a legacy of the rule of law, India today would be just like Africa.

    The British lost money on the indian colonies? you mean they went about capturing colonies as a social service to improve them? like america is currently liberating iraq? Unless i am misunderstanding your point, in which case it would be nice of you to point out what exactly i am misunderstanding.

    As Sanjay said, even without British influence, India would still be a prosperous place. And another point Sanjay missed was, along with the art and other treasures, they did collect a huge amount of tax which went to england.

    Burned Once Too Many Times:
    Sanjay Kumar:
    As for your money losing myth, a few years ago, the Indian High Commissioner to England (you know that Commonwealth nations don't have ambassadors) saw the basement (or dungeons) of Buckingham Palace. He reports that the treasures looted from India were placed haphazardly for there was no room to properly arrange them. There were so many of them.

    That sounds like an outright fabrication to me. It's the same sort of fabrication I've heard in the past from off-shore developers. Namely, the fabrication of their ability to perform even trivial programming tasks.

    Hmm... i dont even see how your reply is related. It appears, to me, that you are just trolling.

  • (cs) in reply to Andy
    Andy:
    Sorry to get serious here, but I am courious. The code:
      int j = int.Parse(i.ToString()); // provides deep copy of j 
    

    Is not valid java, it shouldnot compile for two separate reasons. Since I don't know c#, can someone tell me if this is actually valid code in any language?

    int j = int.Parse(i.toString()); is valid Java, so it could just be typo in the article.

    Addendum (2008-04-17 07:52): sorry, didn't notice that it said int.Parse(), not Integer.parseInt().

  • (cs) in reply to Anonymous
    Anonymous:
    Not exactly similar, but I recently saw some code along the lines of:

    if (i * 0 == 0) {i = j;}

    This would check if i = NaN, which could be useful, so it is not quite if(true).

  • teh_n1gz (unregistered) in reply to brazzy

    Badly undocumented alludes to the fact that their may be documentation somewhere... as to well undocumented which is well, just plain old undocumented, and the programming team are proud of that fact

  • NiceWTF (unregistered) in reply to Math is hard Barbie
    Math is hard Barbie:
    Just like the major antivirus company I used to work for, I pointed things like this out to a VP, and his response was that the off-shore (not contracted, they were employees..) had added over 500k lines of code. I tried to say that LOC/SLOC is no way to measure quality or progress, but that fell on deaf ears.

    I'd actually argue the opposite: it can be used as a way to measure quality or progress, by taking the inverse: the more lines of code, the less progress will be possible from this point on, and the lower the quality is likely to be.

    If time was spent trying to come up with a decent architecture rather than "copy-paste" coding that generates massive LOC counts, you'd probably end up with a better solution.

    But yeah, good luck explaining that to your manager...

  • Elgsdyr (unregistered)

    Except it copies i not j as written in the comment.

  • (cs) in reply to olm
    olm:
    snoofle:
    for (int i=0; i<MAX_MEMORY; i++) {
        for (int pass=0; pass<3; pass++) { // required by mil spec
            memory[i]=0xa5a5; // dump pattern
            memory[i]=0x5a5a; // invert all bits
            ...
        }
    }
    </pre>
    The funny thing is that if the compiler uses any optimizations, the compiled code would probably not be according to specs :o)
    Even ignoring the compiler, this code is likely to completely erase all trace of the old data from the cpu cache, leaving the ram alone until the cpu gets around to updating it with the contents of the cache. Then it will only get written once, with the final value. Not what the code's intended to do, I'm sure.

    If you want to properly clear ram, you need to do the loops the other way round (so it clears the whole buffer to the same value, then does it again with the opposite, repeated as needed), making sure to flush the cache in between passes.

  • Avi (unregistered)

    We have a better solution:

    Thread.sleep(20); int j = i;

    :)

  • (cs) in reply to Math is hard Barbie

    I'll never forget how a previous boss was a little disappointed in us, his team, that our 2.1 version of the software had couple thousand less SLOC than version 2.0.

    Never mind that it worked faster and with less bugs; we had failed one of his metrics.

  • daniel c w (unregistered) in reply to Avi
    We have a better solution:

    Thread.sleep(20); int j = i;

    :)

    and you can actually enhance the performance of trhis code stepwise for the next 21 versions.

  • Chris Ovenden (unregistered) in reply to blarb
    blarb:
    Chris Ovenden:
    You're not thinking big enough: cast it to a string, wrap it up in a SOAP request, post it to a web service, which writes it to a database, then read back using another web service (via another SQL query), parse the returned XML, extract the required field, and run int.Parse() on that.

    Use the IntParse in Utils.cs instead. It leverages public static double Add(double[] valueArray) to build the integer one digit at a time with minimal rounding error.

    Yep. Gotta cope with those rounding errors on integer fields.

  • Barf 4eva (unregistered)

    Hope this doesn't happen to my former employer...

  • Edward Royce (unregistered) in reply to SnapShot
    SnapShot:
    I'll never forget how a previous boss was a little disappointed in us, his team, that our 2.1 version of the software had couple thousand less SLOC than version 2.0.

    Never mind that it worked faster and with less bugs; we had failed one of his metrics.

    I'll never forget a project manager I worked for who was bitterly angry at the QA tester, who he later fired. He continually compared her work with the previous QA guy. Evidently she found thousands more bugs than the previous QA guy, something he just refused to accept.

    How did this happen?

    The new QA person actually put in testing code in where the Windows GUI testing tool said "Put testing code here". Evidently the previous QA tester created a bunch of empty test cases, ran them regularly and told the PM that everything was great!

    Amazing.

  • Edward Royce (unregistered) in reply to Sanjay Kumar
    Sanjay Kumar:
    Edward Royce:
    Sorry but the most recent analysis I've seen of the British Raj is that the Brits *lost money*. In fact most colonial efforts were money losers. Which is why so many countries abandoned colonialism ASAP after WWII.

    The fact is that if the Brits hadn't taken over India, built the railroads, road network, established a common civil service and a legacy of the rule of law, India today would be just like Africa.

    This is preposterous. India was never like Africa. India was one of the most prosperous countries in the world. I can imagine that there would have been several states where there is now one, but most of them would have been amongst the most prosperous nations of the world.

    Your claims that India wouldn't have this or that without the British assumes that Indians can't do anything - the same mistake that the author of this blog is making.

    As for your money losing myth, a few years ago, the Indian High Commissioner to England (you know that Commonwealth nations don't have ambassadors) saw the basement (or dungeons) of Buckingham Palace. He reports that the treasures looted from India were placed haphazardly for there was no room to properly arrange them. There were so many of them.

    The reasons that the British left India are many, but the primary ones were that the World War had drained them; the sun was setting on the empire; the Indian civil society was in no mood to accept them any longer and after Lord's Macaulay's success (see http://bp3.blogger.com/_5q7DIsGBCjw/R5hvnLqF85I/AAAAAAAAABc/J2SyTQQ4BFI/s1600-h/INDIA_1835-780841.JPG), they couldn't justify suppressing people who they had made like themselves.

    Hmmmm.

    1. If the British were making money hand over fist, they would never have left. If ruling India was worth that much money, China would've invaded with it's 50+ million man army.

    2. You must be joking! India was divided into an incredible number of minor princedoms. The idea that they, or any considerable number, would've all agreed to the construction of the Grand Trunk or a complete railroad network, both of which are incredibly expensive, is a fool's paradise.

    Plus there wasn't an established bureaucracy in India prior to the Raj. Without the Brits there never would've been one at all. And without an established bureaucracy you simply cannot have a modern nation-state. You can have a multitude of corrupt, inept minor states all involved in factional infighting.

    Are you seriously suggesting that an India divided into numerous small states would've all agreed to the construction, and funding, of a continental rail system?

    So what if the Brits kept some knick-knacks. The real money was sunk into the nation.

    1. "Your claims that India wouldn't have this or that without the British assumes that Indians can't do anything - the same mistake that the author of this blog is making."

    Then why don't you point out what Indian princes accomplished during the Raj? What was built? Made? Accomplished?

    Individual Indians accomplished many things in art, science, mathematics, etc. But build a country? Not a chance. And look at what India has done since. It's only in the last decade or so that there's been anything remotely close to success.

    "The reasons that the British left India are many, but the primary ones were that the World War had drained them; the sun was setting on the empire; the Indian civil society was in no mood to accept them any longer and after Lord's Macaulay's success (see they couldn't justify suppressing people who they had made like themselves. "

    The primary reason was that WWI and WWII killed off millions of British men. And after the financial drain of WWI and WWII the idea of sinking even more money into India simply wasn't worth it.

  • Edward Royce (unregistered) in reply to dkf
    dkf:
    Dirk:
    <rant> What's with the excuse that a grad can't be expected to do anything? I've seen time and time again just how useless a degree is. At one job a grad came on board as an intern and all he did was sit by himself working through a beginners C# book. WTF was he doing for the last 3 or 4 years? Why can't Universities actually teach kids to code so that they can hit the ground running?

    It just seems mind boggling that kids spend thousands on degrees to become programmers only to graduate and have to turn around and actually learn to program. WTF? </rant>

    FYI, no school of computing (whether styling itself as doing CS or EE or any of the other possibilities) is really about programming. Programming is just something that you have to be able to do in order to boss a computer about; there's a lot of other more interesting (and important) stuff that students have to learn about as well (e.g. compilers, parallel systems, complexity theory, language theory, network theory). And of course, some students are just flaming useless despite being able to pass exams. That happens in other fields too.

    If you just wanted a programmer, you'd get someone out of a trade school. They'd be able to bash keys to churn out stuff within strictly delimited guidelines, but probably wouldn't know dick about designing a whole program (let alone a full application system). It's the difference between a brick-layer and an architect!

    "compilers, parallel systems, complexity theory, language theory, network theory"

    shrug I've been programming for decades and I can't remember if I've ever used any of those. Seriously. How many times have any of you been asked to write a compiler?

    Has anybody seen a set of requirements that included:

    1. Design compiler
    2. ??
    3. Profit!
  • Edward Royce (unregistered) in reply to Redeemer
    Redeemer:
    Just to clarify, i am an indian, by no means am i patriotic or nationalistic. And the only reason why i am replying here is cause it seemed interesting and i got nothing better to do this afternoon

    shrug your rupee.

    Redeemer:
    The British *lost* money on the indian colonies? you mean they went about capturing colonies as a social service to improve them? like america is currently *liberating* iraq? Unless i am misunderstanding your point, in which case it would be nice of you to point out what exactly i am misunderstanding.

    It was all about national pride, dividing the world, gaining dominance and beating the French and Germans. Oh sure the colonial powers thought they'd make a lot of money from their colonies. But really the only one who did was the King of Belgium who ruled the Belgian Congo like it was a concentration camp. Even they gave up eventually.

    And yes, if you weren't completely blind to reality and dumb to what's right in front of you, you would realize that America is fixing Iraq. America has pumped half a trillion dollars into Iraq and rebuilt much of it's infrastructure. Frankly in most cases America has built infrastructure that has never previously existed.

    Redeemer:
    As Sanjay said, even without British influence, India would still be a prosperous place. And another point Sanjay missed was, along with the art and other treasures, they did collect a huge amount of tax which went to england.

    And just WHO would've been "prosperous"? India was entirely and completely feudal. Are you trying to tell me that this feudal system would've been overthrown without the influence of the Brits? By whom? How?

    And are you trying to tell me that the Indian princes would've accepted being deposed? That without being deposed that an average, I assume, Indian like you would've become successful without having to curry favor?

    Feudal governments have always maintained their existence by oppressing the population to one extent or another. Look at China. For all purposes it's still a feudal society. And if you look closely almost all, if not all, of the successful people there are associated with the patronage system built by and within the Chinese government.

    Are you trying to tell me that these numerous princedoms would've worked together on anything? Because I'm not buying it.

  • ckelloug (unregistered) in reply to Anonymous
    Anonymous:
    Not exactly similar, but I recently saw some code along the lines of:

    if (i * 0 == 0) {i = j;}

    This could actually be code relying on IEEE 754 floating point behavior.

    The most fun is /C program/ if(i!=i) { /test for not a number/ printf("blah blah blah\n"); }

  • ckelloug (unregistered) in reply to Edward Royce
    Edward Royce:

    shrug I've been programming for decades and I can't remember if I've ever used any of those. Seriously. How many times have any of you been asked to write a compiler?

    Has anybody seen a set of requirements that included:

    1. Design compiler
    2. ??
    3. Profit!

    I once had to write the front end of a compiler to build a data parser to convert nasty binary data from an antique computer to enterprisey XML for a new system. On the same system, I also had to write software that could read the ancient SCSI disk on a different operating system after unplugging it from one system and plugging it into the other. I had to get the compilers books and teach myself the parsers section on travel in the middle of the night since I am an engineering grad, not C.S.

    Theory never hurts.

  • Johan (unregistered)

    The comment is clearly wrong... It is a deep copy of i!

  • MrCynical (unregistered) in reply to v.dog
    I'm surprised that they didn't take the logic all the way to a thousand monkeys. After all, if they can produce the works of Shakespeare, they can surely write code.

    Someone beat them to it (http://www.newtechusa.com/ppi/main.asp)

  • conservajerk (unregistered) in reply to Dirk
    Dirk:
    <rant> What's with the excuse that a grad can't be expected to do anything? I've seen time and time again just how useless a degree is. At one job a grad came on board as an intern and all he did was sit by himself working through a beginners C# book. WTF was he doing for the last 3 or 4 years? Why can't Universities actually teach kids to code so that they can hit the ground running?

    It just seems mind boggling that kids spend thousands on degrees to become programmers only to graduate and have to turn around and actually learn to program. WTF? </rant>

    I think you might be expecting too much. I think that being a good programmer takes time and practice, neither of which you will get in 4 years of overview courses. Think about this in terms of other professions.... Would you expect a civil engineer to build a skyscraper straight out of school? Why do doctors spend years in practicums before being allowed to practice on their own?

  • Bored Bystander (unregistered) in reply to Edward Royce
    Edward Royce:
    "Bulls**t"

    Before you keep spouting out rubbish and showing your clear ignorance, read this: http://www.globalresearch.ca/index.php?context=va&aid=3204

    Here are some quotes

    It should be noted that when the British forced Indian peasants to grow cotton and indigo on lands that were best for paddy, they also destroyed the system of fertility recovery, which caused collapse of winter crops.
    Agrarian distress starts with colonization of India by a British company, the East India Company [EIC] around 1760, their system of extortionate land tax, combined with forcing farmers to grow cash crops [chiefly indigo and cotton] on the best lands and not paying appropriate price for the produce. They systematically destroyed a sustainable agriculture system that’d fed millions for over 6,000 years and then introduced money lenders and rack renters to trap people in debt.
    Also: http://www.sos-arsenic.net/english/homegarden/indigo.html

    It is a fact that there were more famines in India during the British rule than before it.

    Here's one that's a bit deeper http://www.britishempire.co.uk/article/castesystem.htm

    As for the feudal crap you keep spouting, might I remind that Britain too had a feudal system in the past. India had its own law system before the British and would've refined it just like other countries.

    1. If the British were making money hand over fist, they would never have left. If ruling India was worth that much money, China would've invaded with it's 50+ million man army.
    Not everyone is as greedy as the British.
    2. You must be joking! India was divided into an incredible number of minor princedoms. The idea that they, or any considerable number, would've all agreed to the construction of the Grand Trunk or a complete railroad network, both of which are incredibly expensive, is a fool's paradise.
    The British are not responsible for the Grand Trunk Road. http://en.wikipedia.org/wiki/Grand_Trunk_Road.
    Plus there wasn't an established bureaucracy in India prior to the Raj. Without the Brits there never would've been one at all. And without an established bureaucracy you simply cannot have a modern nation-state. You can have a multitude of corrupt, inept minor states all involved in factional infighting.
    Rubbish. You're referring to the situation towards end of the Raj, and trying to use it to justify the 200 years before it?

    Thank god India was controlled by a country where the prime minister goes to war based on false information despite the majority of the population being against it.

  • Anonymous Cowardly Lion (unregistered) in reply to Sanjay Kumar
    Sanjay Kumar:
    Anonymous Cowardly Lion:
    ... I believe that the phenomenon is called 'brain-drain,' and it explains that while India has one of the lowest GDP's per capita in the world, ...

    This is the shallowest analysis ever. One has to go slightly deeper than that. One cannot simply attribute India's low per capita GDP to brain-drain. I'll leave you with a few reasons. (1) high rate of population growth (2) socialist policies founded in the past (3) diversion of India's resources, raw materials, etc to England in the 200 years of British rule causing India's GDP share in the world to lower from 25% when they arrived to less than 1% when they left; to enrichment to England and improvishment of India.

    With such attitudes and ignorance prevailing, is it any wonder that the author of this blog can make generally disparaging statements about an entire nation and get away with it?

    Well, to be totally precise, one cannot have a full, multifaceted debate, encroaching on every relevant detail of an issue within this forum. The subject of the economic history of a nation is a huge topic and I did not intend to present a complete explanation of the current state of India's GDP.

    What I did intend to demonstrate is the fact that a low GDP, (or more precisely, a lack of opportunities afforded by a low GDP,) can contribute to a loss of talent to more fortunate countries and exacerbate the situation. So, it would seem that it is quite possible that outsourcing companies in poorer countries are in fact of lesser quality merely because they are in a poorer country. There is more to it than that, but I don't exactly have time to write a book and post it here for your convenience, and I hope that anyone reading this will have the common sense to realize that any analysis you find in a chat room will be incomplete and technically incorrect if misread and misapplied, and will have the charity to realize that I'm not attempting to pin situation of a country to a single factor.

    Thank You.

    PS. "This is the shallowest analysis ever." Really? EVER!? Or are you just speaking in hyperbole? :)

  • (cs) in reply to brazzy
    brazzy:
    dude:
    What's wrong? It just wastes some processor cycles, casting something as a String, then recasting it as a int...
    It only shows, as does your comment, a fundamental lack of understanding of the mechanics of the programming environment they're using. While this line is not outright erroneous, it allows us to extrapolate that the rest of the code is going to be chock full of idiotical cargo cult programming with hidden bugs - and, of course, a nightmare to maintain.
    C'mon: who the hell cares about maintenance programmers?

    Except, of course, us maintenance programmers. Obviously, we know too much, and must be eliminated.

  • (cs) in reply to Edward Royce
    Edward Royce:
    Sanjay Kumar:
    Edward Royce:
    Sorry but the most recent analysis I've seen of the British Raj is that the Brits *lost money*. In fact most colonial efforts were money losers. Which is why so many countries abandoned colonialism ASAP after WWII.

    The fact is that if the Brits hadn't taken over India, built the railroads, road network, established a common civil service and a legacy of the rule of law, India today would be just like Africa.

    This is preposterous. India was never like Africa. India was one of the most prosperous countries in the world. I can imagine that there would have been several states where there is now one, but most of them would have been amongst the most prosperous nations of the world.

    Your claims that India wouldn't have this or that without the British assumes that Indians can't do anything - the same mistake that the author of this blog is making.

    </snip>

    The reasons that the British left India are many, but the primary ones were that the World War had drained them; the sun was setting on the empire; the Indian civil society was in no mood to accept them any longer and after Lord's Macaulay's success (see http://bp3.blogger.com/_5q7DIsGBCjw/R5hvnLqF85I/AAAAAAAAABc/J2SyTQQ4BFI/s1600-h/INDIA_1835-780841.JPG), they couldn't justify suppressing people who they had made like themselves.

    Hmmmm.

    1. If the British were making money hand over fist, they would never have left. If ruling India was worth that much money, China would've invaded with it's 50+ million man army.
    Let's just stop right there, shall we? To put it politely, Edward, you are sadly misinformed. With my historian's hat on, I'd like to point out that the Raj came to be created precisely because of the money generated. I'd start with the East India Company (English, not French or Portuguese or Dutch, although those existed as well) -- not a government organisation until it was wound up in the 1850s for financial incompetence -- and go on to point out that, in the 17th and 18th centuries, India accounted for around 20% of world GNP.

    In other words, you have the top end of your body inserted into the bottom end of your body. This is not healthy. Do not, under any circumstances, breathe in.

    Sanjay Kumar:
    "The reasons that the British left India are many, but the primary ones were that the World War had drained them; the sun was setting on the empire; the Indian civil society was in no mood to accept them any longer and after Lord's Macaulay's success (see they couldn't justify suppressing people who they had made like themselves. "
    Well, this isn't quite right either, but it's a good Mills and Boon version of history. The main reason, as far as I can see, is that Britain had spent fifty years fucking up, and the Americans weren't prepared to bankroll it any more. See the Suez crisis for the gory details.
    Edward Royce:
    The primary reason was that WWI and WWII killed off millions of British men. And after the financial drain of WWI and WWII the idea of sinking even more money into India simply wasn't worth it.
    To be as precise as I can be, around 1.75 million military and civilian deaths between the two (including women, children, and goatses). I suppose that qualifies as "millions." I have yet to see a balance-sheet that says something like "Yes, we've continuously lost money hand over fist for the last two centuries, but that's all right as long as the breeding population keeps up."

    I mean, what the fuck are you on about?

    And all of this has nothing to do with off-shoring (to India or to elsewhere). I'm getting extremely sick of the bleating. Do your own god-damn job right, watch companies that off-shore go bust, and laugh.

    It's not about imperialism (good or bad), it's about competency and culture. The problems that most Indian programmers off-shore have, in my experience, is that they're conditioned (particularly through the otherwise excellent Indian educational system) to work in a hierarchical, PHB-dominated environment, and not to ask questions. This has very little, if anything, to do with the Raj.

  • Emil (unregistered)

    I can see that the comment got it wrong, it's of course i that is being deep-copied into j, but surely all of us must have made that kind of swap of a single-letter name at least once? Not quite reason enough to make fun of this code, in my opinion.

  • Tom (unregistered)

    Ah, some racist crap. I wondered how long it would be before that crept into an otherwise excellent site.

  • Barf 4eva (unregistered) in reply to Tom
    Tom:
    Ah, some racist crap. I wondered how long it would be before that crept into an otherwise excellent site.

    I don't know if people on here are pushing to be racist... Perhaps they are just a little ignorant of their prejudices.

    I am happy to know that technology is booming in India and they have a blossoming workforce. I'm also lucky to have worked with some really wonderful people in India, all very nice.

    In fact, from what I hear... The market is getting a lot better in India, to the point that supporting the software needs of business internal to India, NOT in the U.S., are quickly becoming a growing revenue factor.

    hell just google for an article... http://mashable.com/2008/03/01/india-outsourcing/

    Honestly, we are all developer noobs compared to what our children's children will be.. So we might as well stop any bickering about "where the CRAPPY code is written" because right now? We're all writing garbage our kids will have to read about in history books, while they write programs in their minds by just giving pre-conditions and post-conditions. :P

    JK?

  • facilisis (unregistered)

    Doesn't .NET actually have a "DEEP" copy technique though? Take this example:

    string myString = "This is my String"; string another1 = myString;

    another1 just gets pointed to the "myString" object referance...

    To "deep" copy means to make two distinct objects, that is unless I'm mistaken. yet the example in this WTF doesn't really have anything to do with "deep" coping, I'm just pointing this out to the people making fun of the source code comment pertaining to the term 'deep copy.'

  • Huh! (unregistered) in reply to Edward Royce

    This is neither here nor there. Just because you did not like it does not mean it was incorrect. It depends on the problem at hand. There are scenarios when hierarchical data is forced into a relational schema which is also pretty brain dead. From a design point of view, it actually shows initiative on part of the offshore team. And why did you guys not review design documents, code as it was being written and even the overall plan if you have such strong views about "how" things should be done. Think - would you wait for the entire house to be completed before complaining to the contractor or are you better off monitoring the work as its being done? I have my horror stories of outsourcing but this specific one has nothing to do with outsourcing, its just easy to point your finger at something that was not done "here".

  • Huh! (unregistered) in reply to Edward Royce
    Edward Royce:
    Well this kinda reminds me of my last job, which ended when the work got moved to India. The dev team in India decided instead of having all these pesky data tables they'd just format all the data into XML and then mash everything together into an enormous table with essentially 1 XML column.

    Yeah ugly isn't the word for it.

    This is neither here nor there. Just because you did not like it does not mean it was incorrect. It depends on the problem at hand. There are scenarios when hierarchical data is forced into a relational schema which is also pretty brain dead. From a design point of view, it actually shows initiative on part of the offshore team. And why did you guys not review design documents, code as it was being written and even the overall plan if you have such strong views about "how" things should be done. Think - would you wait for the entire house to be completed before complaining to the contractor or are you better off monitoring the work as its being done? I have my horror stories of outsourcing but this specific one has nothing to do with outsourcing, its just easy to point your finger at something that was not done "here".

  • Huh! (unregistered) in reply to Edward Royce
    Edward Royce:
    dkf:
    Dirk:
    <rant> What's with the excuse that a grad can't be expected to do anything? I've seen time and time again just how useless a degree is. At one job a grad came on board as an intern and all he did was sit by himself working through a beginners C# book. WTF was he doing for the last 3 or 4 years? Why can't Universities actually teach kids to code so that they can hit the ground running?

    It just seems mind boggling that kids spend thousands on degrees to become programmers only to graduate and have to turn around and actually learn to program. WTF? </rant>

    FYI, no school of computing (whether styling itself as doing CS or EE or any of the other possibilities) is really about programming. Programming is just something that you have to be able to do in order to boss a computer about; there's a lot of other more interesting (and important) stuff that students have to learn about as well (e.g. compilers, parallel systems, complexity theory, language theory, network theory). And of course, some students are just flaming useless despite being able to pass exams. That happens in other fields too.

    If you just wanted a programmer, you'd get someone out of a trade school. They'd be able to bash keys to churn out stuff within strictly delimited guidelines, but probably wouldn't know dick about designing a whole program (let alone a full application system). It's the difference between a brick-layer and an architect!

    "compilers, parallel systems, complexity theory, language theory, network theory"

    shrug I've been programming for decades and I can't remember if I've ever used any of those. Seriously. How many times have any of you been asked to write a compiler?

    Has anybody seen a set of requirements that included:

    1. Design compiler
    2. ??
    3. Profit!

    Then you obviously have been doing the kind of programming that gets outsourced very easily (and then you guys complain why you lost your job!). You may not have to write a compiler but the fundamentals learned are used all the time if you are doing anything challenging and interesting - the kind of work for which employers are willing to pay US wages.

  • Daniel (unregistered)

    Where is the problem with the code ???? Ah I see the programmer doesn't catch the FormatException and the OverflowException.

  • abbas (unregistered)

    India is a good country.

  • dargor17 (unregistered) in reply to David
    David:
    > Oh no! now I understand, this is code from the southern hemisphere, there lhs and rhs are reversed!

    No buttwad, India is in the Northern hemisphere on the other side of North America - the Southern Hemisphere contains Africa, a very small part of South East Asia, Australia, New Zealand and South America (I've excluded Antarctica, but hey, maybe that's where you were suggesting this code was written).

    If you're going to make an insult get it right... either you are insinuating that this code was written by India/China/Vietnam/??? or it was written in one of the above mentioned areas - and apart from Malaysia or a dodgy con job in Nigeria, not too much gets outsourced to this direction.

    Sigh, let me explain it to you, idiot.

    The joke was on the fact that the line of code actually copies i into j and the comment says the opposite, hence he guesses it's because left-hand side and right-hand side are reversed in the southern emisphere. Not really correct from a physical point of view, but whatever...

    Now, what is racist in this or the other comments?

    BTW, I think you're in idiot for getting angry at that comment, not because of where you're from

    captcha: nulla (that is, nothing...)

  • Martin (unregistered)

    This code is rubbish!

    What is the solution?

    Buy more of the same!

  • Gentry (unregistered) in reply to Math is hard Barbie

    Funny... Symmantec just announced a huge code refactoring to speed up the bloated PoS that their product has become...

    I wonder if that VP is still there.

Leave a comment on “Deep Copy”

Log In or post as a guest

Replying to comment #:

« Return to Article