• no u (unregistered) in reply to Anonymous
    Anonymous:
    Wow! Perhaps there would also be a market for an automated warning removal tool. Though I would be ashamed to write such a thing.

    How well do you think such a product would compete against a developer who knows about the /nowarn compiler option or the #pragma tags?

  • zunesis (unregistered) in reply to no u
    no u:
    Anonymous:
    Wow! Perhaps there would also be a market for an automated warning removal tool. Though I would be ashamed to write such a thing.

    How well do you think such a product would compete against a developer who knows about the /nowarn compiler option or the #pragma tags?

    In the eyes of a manager? Fairly well I'd guess.

    "Hmmm, well they're telling me there's too many compiler warnings.... I don't know what those are, so I'll ask Google..."

    First hit: "Want to get rid of those annoying compiler warngings?"

    "Yes! I do!"

    ...well, you see where this is going...

    "pragma? never heard of it. Look, I already spent good money on this Warn-Away, so let's just try that and see how it works.."

    "Look no warnings! No, we don't have time to "actually fix things" I'm moving you to a new project..."

  • (cs) in reply to Martin D
    Martin D:
    boog:
    Embarassingly enough, it eluded everybody that every error and exception would endure even after eliminating the pesky "e".
    [image]
    Evidently.
  • Ken B. (unregistered)

    We had a client who was reporting that, if the clerk were to press the Break key at "just the right time", our program would start reporting the wrong system date/time. (Only that instance of the program. It wasn't a system-wide thing.)

    Turns out that, under "just the right set of circumstances", our interrupt handler could cause a buffer overrun, and the memory following our buffer just happened to be where the runtime library stored the timezone info.

    That was a load of fun (FSVO), given that the compiler vendor didn't supply runtime library source, nor was the timezone info stored in a location visible outside of the library (so there wasn't anything like "look at the memory pointed to by the __TimeZone variable"), so we couldn't readily debug the call which returned the current time.

  • The Poop... of DOOM! (unregistered)

    This remidns me of a temp job I had as software tester for a company making hospital software. The parts in the testscripts involving modules that got removed versions ago (and nobody told me that they got removed) left aside, I followed the tests to the letter, including the general "check for GUI inconsistencies". I reported everything I found, going from testing steps that simply failed, blocking the rest of the tests, to buttons that did one thing on one form and then the same button doing something completely different and unrelated on the next one.

    At one point, the guy in charge came in to complain I shouldn't file so many bugs, since it meant "he had to close all of them." I didn't file any bugs since, so that guy was happy, and a few days later I was out of there. I'll never ever go to one of the hospitals using their bug-riddled software, though. Too dangerous.

  • (cs)

    "For some inexplicable reason, the system processed 91.4956% of the 341 receipts. Of the remainder, one is corrupted and the rest weren't processed at all. Why would that be?"

  • Ken B. (unregistered) in reply to HP PhaserJet
    HP PhaserJet:
    Martin D:
    boog:
    Embarassingly enough, it eluded everybody that every error and exception would endure even after eliminating the pesky "e".
    [image]
    I, for one, prefer to have jokes explained to me.
    I, for one, welcome our new joke-explaining overlords.
  • bill (unregistered) in reply to boog

    Mbarrasingly nough indd.

  • Timewarp (unregistered) in reply to frits
    frits:
    Britmaster:
    frits:
    All this talk about "e" is going to attract all of those discotheque-crazy Europeans from yesterday's comment thread.
    You mean American Trolls masquerading as Europeans, right?
    It hardly makes a difference to me.
    frits:
    All this talk about "e" is going to attract all of those discotheque-crazy Europeans from yesterday's comment thread.

    Eezer Goode, Eezer Goode He's Ebeneezer Goode

  • Henning Makholm (unregistered) in reply to zunesis
    zunesis:
    Starting with the .NET Framework version 2.0, a StackOverflowException object cannot be caught by a try-catch block and the corresponding process is terminated by default.
    I can see valid arguments for not making a stack-overflow condition catchable.

    However, is there then any point of having a StackOverflowException class at all? It will only ever be instantiated right before the process is terminated, and nobody will even get a chance to touch the SOE object.

    (It appears that you're allowed to construct a StackOverflowException object explicitly and pass it around in your code as long as you don't actually attempt to throw it. Good luck convincing anyone that such code belongs anywhere outside compiler/VM regression test suites, though).

  • Grey (unregistered)

    Burn, Java, burn in Hell. Easy for programmers means more morons in the industry. Mwa-ha-ha!

  • (cs)

    At least log the exception!!

    Anyone else cleaned up crap code like that by globally running regex replace statements in VS?

  • (cs) in reply to Grey
    Grey:
    Burn, Java, burn in Hell. Easy for programmers means more morons in the industry. Mwa-ha-ha!

    Du-uh. This is not java.

  • David Martensson (unregistered) in reply to RHuckster
    RHuckster:
    DoProcessReceipts() just looks like a long-ass 100+ line function that does SQL queries, array manipulation, and a ton of other operations that can be prone to all kinds of exceptions. I can't believe there isn't even a log entry for when something goes wrong.

    Unfortunately code like this do exist, I have cleaned up my share of it from an earlier colleague that used on error resume next in VB to handle errors in a software that ported customers from an old version of one of our systems to a new one.

    Any rows than did not get copied had to be replaced by hand afterwards, his reasoning was that that was faster than trying to fix the problems to begin with (problems being missing or bad formated data in the original database).

    Unfortunately some lines was usually forgotten causing problems during several months before the customer was fully operational again.

    Thats why you always should have code review, to catch the lazy errors.

  • David Martensson (unregistered) in reply to Matt Westwood
    Matt Westwood:
    Grey:
    Burn, Java, burn in Hell. Easy for programmers means more morons in the industry. Mwa-ha-ha!

    Du-uh. This is not java.

    No, its probably C# ,there you can write like that, even though you should not for obvious (you would hope) reasons.

  • Meh! (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    boog:
    Embarassingly enough, it eluded everybody that every error and exception would endure even after eliminating the pesky "e".

    You mean the exception would still happen, but would still be swallowed by the empty catch, right? The way I read your comment was that it would bubble up...

    The way I read the comment was as a demonstration of alliteration featuring today's letter.

  • London contractor (unregistered) in reply to Nagesh
    Nagesh:
    This is standard programming practice in Hyderabad

    Yes, because generally they can't speak English properly and have sub-standard education. The language barrier also means it is hopeless to read technical documentation / books because there is no real understanding. I have no idea how these people get into IT apart from the fact they are cheap. You get what you pay for!

  • hewes (unregistered)

    Of course, what they should have done is create a custom logging function which takes the exception as a parameter

    try {

    DoProcessReceipts();
    

    }

    catch (Exception e) {

    log(e);

    }

    of course, thats almost like doing nothing at all

    captcha: quibus, a group of arguments

  • hewes (unregistered) in reply to hewes
    hewes:
    Of course, what they should have done is create a custom logging function which takes the exception as a parameter

    try {

    DoProcessReceipts();
    

    }

    catch (Exception e) {

    log(e);

    }

    of course, thats almost like doing nothing at all

    captcha: quibus, a group of arguments

    of course, is that a natural function anyway?

    captcha: ratis, somehow related to rattus rattus?

  • rollt (unregistered) in reply to Britmaster
    Britmaster:
    You mean American Trolls masquerading as Europeans, right? Everyone in Europe is on Summer vacation for 3 months.

    TRWTF is American labour laws.

    Hehe.... I was actually going to take 3 whole months off, but now it will be 2½. Not just holiday though, parental leave also. I get 12 weeks parental leave (per child), plus 5 weeks holiday plus the 9ish public holidays. All with full pay.

    I am male btw

  • Anonymous Cow-Herd (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    Gone for a While:
    Hey, did Alex stop doing the blue comments or what?

    No, it's just that nobody here posts comments that are worth blueing.

    Feature that comment.

  • Chris Green (unregistered) in reply to gobes

    uuh, i've 4 weeks AND pay the dept of the states at the Mediterranean sea. awesome idea, germany...

  • (cs) in reply to Chris Green
    Chris Green:
    uuh, i've 4 weeks AND pay the dept of the states at the Mediterranean sea. awesome idea, germany...

    You're not paying it, you're lending it. Big difference.

    Addendum (2011-07-07 09:08): And at a higher interest rate than the interest rate your country pays to the markets, at that. So all in all, you're actually making money!

  • zunesis (unregistered) in reply to GFK
    GFK:
    You're not paying it, you're lending it. Big difference.

    Addendum (2011-07-07 09:08): And at a higher interest rate than the interest rate your country pays to the markets, at that. So all in all, you're actually making money!

    Free Money! No could possibly go wrong there!

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    hoodaticus:
    Severity One:
    hoodaticus:
    Yeah, I'm about as enterprisey as it gets. I've discovered that my code gets more maintainable when I have proper abstraction and domain models that describe my problems. And I've never seen non-enterprisey code that can read records from a database and package them into business objects, with exception logging, in a single line.
    Depends on how long you are prepared your lines to be.
    1920 pixels, dude!

    DbConnection.ForEach("SELECT * FROM blah WHERE key=@key", r=>{/do stuff to each record here/}, new SqlParameter("@key", key);

    Is the "do stuff to each record here" i++, because if it is, I think I've seen your work here before. :P

    LOL! Forgot about that one. No, it's more like:

    _collection.Add(new BusinessObject((MyType)r["FieldName"]));

    in the lambda statement.

  • Dsign Pattrn (unregistered) in reply to KattMan
    KattMan:
    ExceptionHandler:
    But if there is an error, dont you want to retry till it works?
    public void TheProcess() {
      try { 
          DoProcessReceipts();
      }
      catch (Exception e) { 
        MsgBox(e.ToString());
        TheProcess();
      }
    }
    
    ?

    But how do you get out of the never ending recursion? Stack overflow baby! Yeah!

    Not so fast, my enthusiastic apprentice!

    It turns out the CLR sometimes performs tail call optimization.

    So this code indeed implements the given specifications ("retry till it works"), but is very specific about the CLR and CLR configuration.

  • eVil (unregistered) in reply to Timewarp
    Timewarp:
    frits:
    All this talk about "e" is going to attract all of those discotheque-crazy Europeans from yesterday's comment thread.

    Eezer Goode, Eezer Goode He's Ebeneezer Goode

    Has anybody got any Veras?

  • (cs) in reply to hewes
    hewes:
    hewes:
    Of course, what they should have done is create a custom logging function which takes the exception as a parameter

    try {

    DoProcessReceipts();
    

    }

    catch (Exception e) {

    log(e);

    }

    of course, thats almost like doing nothing at all

    captcha: quibus, a group of arguments

    of course, is that a natural function anyway?

    captcha: ratis, somehow related to rattus rattus?

    If I were to define that function it would be base 10 (or not define it at all). Why can't languages simply use ln for natural?

    TRWTF is languages that deviate from normal math symbology on just small details, so unfamiliar people think they know it all...

  • (cs) in reply to Dsign Pattrn
    Dsign Pattrn:
    KattMan:
    ExceptionHandler:
    But if there is an error, dont you want to retry till it works?
    public void TheProcess() {
      try { 
          DoProcessReceipts();
      }
      catch (Exception e) { 
        MsgBox(e.ToString());
        TheProcess();
      }
    }
    
    ?

    But how do you get out of the never ending recursion? Stack overflow baby! Yeah!

    Not so fast, my enthusiastic apprentice!

    It turns out the CLR sometimes performs tail call optimization.

    So this code indeed implements the given specifications ("retry till it works"), but is very specific about the CLR and CLR configuration.

    The tail optimization goes through catch blocks? Tat it is quite an advanced compiler feature.

  • (cs) in reply to Sock Puppet 5
    Sock Puppet 5:
    C-Octothorpe:
    hoodaticus:
    Severity One:
    hoodaticus:
    Yeah, I'm about as enterprisey as it gets. I've discovered that my code gets more maintainable when I have proper abstraction and domain models that describe my problems. And I've never seen non-enterprisey code that can read records from a database and package them into business objects, with exception logging, in a single line.
    Depends on how long you are prepared your lines to be.
    1920 pixels, dude!

    DbConnection.ForEach("SELECT * FROM blah WHERE key=@key", r=>{/do stuff to each record here/}, new SqlParameter("@key", key);

    Is the "do stuff to each record here" i++, because if it is, I think I've seen your work here before. :P

    I'm pretty sure that both of these statements indicate why neither of you have a job.
    I'm laughing at that in my office right now.

  • zunesis (unregistered) in reply to boog
    boog:
    Embarassingly enough, it eluded everybody (in their eupathy) that every egregious error and exception would endure even after exsecting the ineffective and excessive "e".

    I admire your epeolatry, by the way.

  • Todd Lewis (unregistered) in reply to zunesis
    zunesis:
    Addressing compiler warnings was part of a general cleanup that involved address customer-reported problems that was prompted by customer-reported problems.

    You can approach this from both ends: reduce the number of compiler warnings, and reduce the number of users. Sounds like this strategy will accomplish both eventually.

  • boog (unregistered) in reply to hoodaticus
    hoodaticus:
    Sock Puppet 5:
    C-Octothorpe:
    hoodaticus:
    Severity One:
    hoodaticus:
    Yeah, I'm about as enterprisey as it gets. I've discovered that my code gets more maintainable when I have proper abstraction and domain models that describe my problems. And I've never seen non-enterprisey code that can read records from a database and package them into business objects, with exception logging, in a single line.
    Depends on how long you are prepared your lines to be.
    1920 pixels, dude!

    DbConnection.ForEach("SELECT * FROM blah WHERE key=@key", r=>{/do stuff to each record here/}, new SqlParameter("@key", key);

    Is the "do stuff to each record here" i++, because if it is, I think I've seen your work here before. :P

    I'm pretty sure that both of these statements indicate why neither of you have a job.
    I'm laughing at that in my office right now.
    That's quite a bit unlikely.

  • Pommefrite (unregistered) in reply to Britmaster
    Britmaster:
    frits:
    All this talk about "e" is going to attract all of those discotheque-crazy Europeans from yesterday's comment thread.
    You mean American Trolls masquerading as Europeans, right? Everyone in Europe is on Summer vacation for 3 months.

    TRWTF is American labour laws.

    You fool, I know a European masquerading as an American Troll masquerading as a European when I see him! Everyone knows real Americans eat deep-fried slices of hog fat and work 100 hours a week until they die with totally clogged arteries at age 49!

  • (cs) in reply to Pommefrite
    Pommefrite:
    Britmaster:
    frits:
    All this talk about "e" is going to attract all of those discotheque-crazy Europeans from yesterday's comment thread.
    You mean American Trolls masquerading as Europeans, right? Everyone in Europe is on Summer vacation for 3 months.

    TRWTF is American labour laws.

    You fool, I know a European masquerading as an American Troll masquerading as a European when I see him! Everyone knows real Americans eat deep-fried slices of hog fat and work 100 hours a week until they die with totally clogged arteries at age 49!

    Don't forget the "wearing sneakers and baseball cap" bit.

  • (cs) in reply to Pommefrite
    Pommefrite:
    Britmaster:
    frits:
    All this talk about "e" is going to attract all of those discotheque-crazy Europeans from yesterday's comment thread.
    You mean American Trolls masquerading as Europeans, right? Everyone in Europe is on Summer vacation for 3 months.

    TRWTF is American labour laws.

    You fool, I know a European masquerading as an American Troll masquerading as a European when I see him! Everyone knows real Americans eat deep-fried slices of hog fat and work 100 hours a week until they die with totally clogged arteries at age 49!

    Similar to the french who eat a block of heavy cheese deep-fried in butter wrapped in a crepe with chocolate spread stuffed in a croissant stuffed in a baguette followed by an entire bottle of cheap red wine and a pack of cigarettes.

    And add to that the stress of working 73 whole days a year with only 50 sicks days...

  • zunesis (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    Similar to the french ... working 73 *whole* days a year with only 50 sicks days...

    Somewhere I read that the french are, per hour, some of the most productive in the world. Makes sense, as they aren't there very long, they don't have time to goof off on the internet.

  • Dsign Pattrn (unregistered) in reply to Mcoder
    Mcoder:
    Dsign Pattrn:
    It turns out the CLR sometimes performs tail call optimization.

    So this code indeed implements the given specifications ("retry till it works"), but is very specific about the CLR and CLR configuration.

    The tail optimization goes through catch blocks?

    Why not? The recursive call is in tail-position, no arguments are passed or returned, no finally-block follows.

    (I guess a finally-block would indeed hamper TCO, so i conclude that using finally is a bad practice when you program for the CLR!)

    Mcoder:
    Tat it is quite an advanced compiler feature.
    It is as simple as:
    goto TheProcess();
    
  • Anonymous Cow-Herd (unregistered) in reply to Mcoder
    Mcoder:
    Tat it is quite an advanced compiler feature.
    Don't know about you, but I don't think I want my compiler inserting tat into my programs. (We have an intern to do that.)
  • (cs) in reply to zunesis
    zunesis:
    C-Octothorpe:
    Similar to the french ... working 73 *whole* days a year with only 50 sicks days...

    Somewhere I read that the french are, per hour, some of the most productive in the world. Makes sense, as they aren't there very long, they don't have time to goof off on the internet.

    Hell, I would be too if I got 30 days (that's 6 fucking weeks!) of paid vacation a year (by law)... Where I currently am, you max out at five weeks with 2 being the min. Even the C level management gets max five weeks (this varies I'm sure from company to company, but has been consistent from what I have seen).

  • zunesis (unregistered) in reply to Anonymous Cow-Herd
    Anonymous Cow-Herd:
    Mcoder:
    Tat it is quite an advanced compiler feature.
    Don't know about you, but I don't think I want my compiler inserting tat into my programs. (We have an intern to do that.)
    Interns are great, huh? Mine performs all sorts of insertions.
  • E. Pesker (unregistered)

    so, sadly- i'm on the verge or suggesting a cleanup like this, just so we can get past the "maximum number of warnings exceeded" warnings on a project or two.

    (but- why the hell isn't there an "empty catch block" warning, eh?)

  • zunesis (unregistered) in reply to E. Pesker
    E. Pesker:
    so, sadly- i'm on the verge or suggesting a cleanup like this, just so we can get past the "maximum number of warnings exceeded" warnings on a project or two.

    (but- why the hell isn't there an "empty catch block" warning, eh?)

    Maybe they do it all the time at Microsoft and it didn't occur to them that it should be considered a problem.

  • Jon Sagara (unregistered)

    Ah, the infamous try/swallow pattern.

  • zunesis (unregistered) in reply to Jon Sagara
    Jon Sagara:
    Ah, the infamous try/swallow pattern.

    My interns know that one too.

  • Ken B. (unregistered) in reply to Grey
    Grey:
    Burn, Java, burn in Hell. Easy for programmers means more morons in the industry. Mwa-ha-ha!
    "${LANGUAGE_X} is so easy, even an idiot could program in it. And many do!"
  • "Newman" (unregistered)

    Submitter here (obviously I used an assumed name). The article left out the fact that one of our "senior" developers (C# guy who writes code like it was VB6, including "C# Modules" - files with various classes that have all static modules) added a single commit to SVN that removed this, with the comment "Fixing compiler warning".

    It's indicative of many things wrong with this codebase. I could supply this site with many days worth of humor.

    As an added bonus I'll toss in my own "Representative Line". I found, in a 5000+ line "C# Module", something that sent shivers down my spine:

    goto Process;

    Yes, a goto statement in C# 3.5. In several places.

  • "Newman" (unregistered) in reply to "Newman"

    I should add said person has been with the company for about 5 years and was "instrumental" in building our e-commerce application. I thought it was quite.. disturbing that I'm seemingly the only person on the team who understands things like encapsulation and design patterns.

    Captcha: Vulputate. I wanted to vulputate my eyes after seeing this code. Vulputate.

  • zunesis (unregistered) in reply to Jon Sagara
    Jon Sagara:
    Ah, the infamous try/swallow pattern.
    Swallow or swallow not. There is no try.
  • Jay (unregistered) in reply to zunesis
    zunesis:
    The developers didn't make things messier by removing compiler warnings, they just though that removing the warning would fix the problem (maybe).

    It's more like the mechanic doesn't know what to do, so he just takes the vehicle to a car wash. ...

    That reminds me of a snippet of a conversation I overheard in the company cafeteria one day. A young lady was telling her friend that some red light kept coming on in her car, so she put a band-aid over it because it was bothering her.

    When you get a warning that something is going wrong, disabling the warning does not fix the problem.

    I'm guessing that a few days later she was telling her friend how her car mysteriously died with no warning.

Leave a comment on “The Pesky "e"”

Log In or post as a guest

Replying to comment #:

« Return to Article