• SomeCoder (unregistered) in reply to protected static
    protected static:
    How often are you calling them? Every layer of abstraction introduces a little more lag into response time, as well as the chance for badly written code (because the abstraction keeps you from having to understand what you're doing).

    This is very true and one of the biggest problems I have with VB. Unless you really know what it's doing under the covers, your chances for WTF code skyrocket. VB hides it so well that WTF code is almost inevitable.

  • Fraggle My Rock (unregistered) in reply to KattMan
    KattMan:
    Don't blame VB.net for being slower, recognize that it is your lack of comfort with that syntax.

    Silly human, everyone knows that VB is of the Devil and causes tooth decay, communism, and the desire to kick puppies.

  • kaellinn18 (unregistered) in reply to TakeASeatOverThere
    TakeASeatOverThere:
    You don't want to know what happens on the 6th level, although I'm pretty sure someone here will say.

    Homeland Security Advisory System Threat Level Red (Severe) Panic Mode:

    All non-nuclear United States intercontinental ballistic missiles are launched in a coordinated strike on Siberia. The data is exploded into the Russian countryside in crude binary (crater = 1, regular surface = 0). Several satellites in geosynchronous orbit around this area are used to photograph said data. Said photos are printed out at corporate headquarters, placed on a wooden table, photographed, scanned in to the reporting server, and analyzed in real time to display the data for the corporate report.

    (You know, if they hadn't spent 99.9999% of their budget on this error handling code, the main code might have turned out better.)

  • matt (unregistered) in reply to DropDeadThread

    Quintuple panic: data is printed on a dot matrix printer, shipped by conveyor belt onto a wooden table where a picture of it is taken with a digital camera and sent as a BMP to everyone in the company.

  • matt (unregistered) in reply to Anon

    Solution: fire everyone except Jim.

  • (cs)

    OP here. A couple of comments...

    • The system is different than what I described, though a similar level of complexity. Probably something a good developer could create in a couple weeks. The number of special cases would be very low.

    • The development server they use in their office runs MSDE. I'm not sure they knew a trace could even be created.

    • I know enough sql to write some basic DB driven web pages, but troubleshooting deadlocks is beyond me. The stored procedures were actually pretty simple, I don't know why they caused problems. But I wasn't being paid to know either.

    • Originally I think VB5 or VB6.

    • We outlined a couple issues early on and offered to re-write the application, but these developers have been doing odd programming jobs like this for many years, the client likes them. I think the client would pay to have it rewritten, but I'm not sure they want to.

  • Salami (unregistered) in reply to Jay
    Jay:
    Erm:
    Forgot to mention 3 other important columns. A credit card type, expire date, and cc number.
    What if the donor wants to pay by check or bank draft?

    Do we send donors a tote bag or some other token gift? If they have a choice -- and surely they have at least "yes I want the tote bag or no I don't" -- then we have to record their selection.

    Do we send them a membership card? If a married couple makes a donation, do they get two membership cards or one? If two, is each in their own name or do both say "Mr & Mrs Jones" or "Fred and Mary Jones" or what?

    Surely we send some sort of confirmation letter. Where does the text of that letter come from? Does it vary between donors or is it always the same?

    Does this system have to interface to our general accounting software? How is that done?

    What reports do we produce? Surely someone wants to know how much we raised, probably with breakdowns based on some characteristics of the donor. What characteristics are those? How do we collect and record that information?

    I believe you could produce a piece of unusable junk that resembled a solution to this problem in a week. So could I. But a quality product? No. It would surely take at least several weeks just to interview the users and get the basic requirements together. I was about to write "nail down the requirements", but that would take even longer, because in real life it isn't until you show the users version 1 that they suddenly remember all the additional little details that they forgot to mention earlier.

    Usually at this point they express amazement that the ignorant programmer didn't realize that OF COURSE there are special rules for donors from California and Nebraska and any county in Massachusetts with a population of more than 5000 because of special laws in those states. And, oh, we have donors who prefer to remain anonymous, if we enter a bunch of donations with a name of "Anonymous" your program won't assume those are all the same person and add them together, will it? Etc.

    And they will want everything documented in a nice manual (which will never be read - except the parts that changed since it was written).

  • Franz Kafka (unregistered) in reply to kaellinn18
    kaellinn18:
    TakeASeatOverThere:
    You don't want to know what happens on the 6th level, although I'm pretty sure someone here will say.

    Homeland Security Advisory System Threat Level Red (Severe) Panic Mode:

    All non-nuclear United States intercontinental ballistic missiles are launched in a coordinated strike on Siberia. The data is exploded into the Russian countryside in crude binary (crater = 1, regular surface = 0). Several satellites in geosynchronous orbit around this area are used to photograph said data. Said photos are printed out at corporate headquarters, placed on a wooden table, photographed, scanned in to the reporting server, and analyzed in real time to display the data for the corporate report.

    (You know, if they hadn't spent 99.9999% of their budget on this error handling code, the main code might have turned out better.)

    Who would ever build an ICBM and not put a nuke on top?

  • JohnFx (unregistered)

    Other WTFs aside on this article. Why is it that programmers never consider the most obvious backup system that has a zero chance of failing? That backup system is a pad of paper and a pencil.

    The panic modes seem like the equivalent of the guy I once knew who backed up his hard drive to a "c:\backup" directory on the same hard drive. I suppose a single point of failure might be the electronic pencil sharpener breaking. Good thing redundant pencils are inexpensive.

    Absolute worst case they could spend a few weeks to get the DB system working again and then pay some data entry people to re-enter it later. At least the information would be captured.

  • JohnFx (unregistered) in reply to matt

    Quintuple panic: The source code is automatically zipped up and sent via a web-service to WTF.com.

  • Alan (unregistered)

    It sounds like "panic mode" was the solution they should have gone with in the first place. Clean, reliable, obvious audit trail, and all the database work can be done as a batch process from the input without any risk of losing data. Text files never deadlock.

  • Poltras (unregistered) in reply to TakeASeatOverThere
    TakeASeatOverThere:
    DEFCON 5 PANIC MODE: The monitor explodes, sending glass shards into the face of the person looking at it, cutting all the information into the skin on their face.

    You don't want to know what happens on the 6th level, although I'm pretty sure someone here will say.

    Something that involves writing the logs as an anagram written in blood by the curator of a certain museum, maybe?

  • ummm (unregistered) in reply to MindChild

    oooh, awkward....and we were having such a good time talking about programming.

  • (cs) in reply to DeLos
    DeLos:
    Anon:
    We discovered their system stored a unique value for each user containing the PC name concatenated with the username. The database field for that value was only 15 characters. Our PC names were 12 characters. The developer’s name was Bob.

    I love that one!

    Stupid edge cases!

    So have everyone log in with their initials.

  • Matt (unregistered)

    I love a good religious war...watched many a fine one over the years, and I never get sick of them.

    I come down firmly in the VB camp - both VB6 and VB.NET. The reason is simple - I'm a commercial software engineer and I have to eat. In this modern day and age, a few clock cycles here and there in a business app makes sweet FA difference, but the speed of application development is critical. So 12 years ago, I sat down and decided to use VB for our core development, over C++, Ada, Assembler or anything else (and that was when I was far more familiar with ADA and C). The reason was simply that we could deliver a product on time and on budget...

    VB suffers from having a lot of cowboy coders - untrained developers who thought programming meant drawing buttons on a form. The language itself is fine (ok, VB6 lacked any sort of OO, but that was never a deal breaker for us), and you can do pretty much anything you want in VB (6 and .NET). Does it have flaws - of course, but so do all languages (nothing like the joy of debugging pointers in C/C++ for hours), but in the end, it gets the job done, and it does it well.

    It all comes down to speed of development and maintainability. You can write an abomination in any language, and god knows i've picked up after enough of those over the years, but VB is really no better or worse than anything else from a language perspective. It just has a higher cowboy developer ratio.

  • Barf 4Eva (unregistered) in reply to Matt
    Matt:
    VB suffers from having a lot of cowboy coders - untrained developers who thought programming meant drawing buttons on a form.

    Bingo, I think you nailed it.

    Matt:
    It just has a higher cowboy developer ratio.

    lol, exactly. Definitely a ratio, as I'm sure you have cowboy coders in EVERY camp. They certainly don't fare so well in the SQL camp though...

  • Barf 4Eva (unregistered) in reply to protected static
    protected static:
    Each release of VB.NET seems like it has reintroduced many of the concepts that made it so easy to write the same kind of bad (or lazy) code that gave VB a bad rap in the first place. IMO, C# forces you to have a better understanding of your platform, and to be more aware of your resource use.

    That's a fair enough rationale I think. However, maybe it's more rooted in the general culture found among C# developers versus the general culture found among VB.NET developers. Although I definitely believe there is also a tendency by those in the C# camp (of which I'm proud to be a member) to just dismiss VB.NET altogether without understanding that the only problem with the language is that it's ugly as hell.

    IMO, C# is aesthetically pleasing. I just don't get that feeling with VB.net.

    I will also take your other points in to consideration on future projects regarding system hooks. Sounds sensible if you have a rather repetitive process that has to make win 32 calls frequently, religiously... However, in my development, I haven't run in to that situation or a need for such a situation.

  • immibis (unregistered)

    The 6th level panic mode: The computer short circuits the power, and if you capture the pattern of short circuits, you get the data in binary form.

    Btw, is the new name an April Fools joke? (The Daily What The Hell)

  • AdT (unregistered) in reply to Barf 4Eva
    Barf 4Eva:
    I don't believe there is a big difference. At all. Except that VB.NET syntax is ugly as hell. It's almost as hot as C# when you put the paper bag over VB.NET.............

    Why are you talking about Visual Fred? What does Visual Fred have to do with VB? All similarities between the two are purely coincidental.

  • AdT (unregistered) in reply to Franz Kafka
    Franz Kafka:
    Who would ever build an ICBM and not put a nuke on top?

    The Russians. They built an ICBM and put Sputnik on top.

  • Godot (unregistered)

    they switched to a real database: Microsoft Access

    My irony-detector exploded here...

  • CircleOfFifths (unregistered) in reply to Bill Curnow
    Bill Curnow:
    Stored Procedures improve performance, maintenance and security.

    That statement is so 1980. Good design improves performance, maintanence and security, and stored procedures may or may not be a part of that. Are you a DBA maybe?

  • m (unregistered)

    Both Mr. Daily's eyes are fully open. And he staring. STARING AT ME. STARING INTO ME. NO! LEAVE ME BE!

  • Neeek (unregistered)

    Duoquadragintatuple panic mode: A little door in the side of the computer case opens, which releases a trained hamster, which runs a maze and flips a switch. That releases a bowling ball which rolls down a slide, breaks through a glass box which has a pen and paper stored inside.

  • JimM (unregistered) in reply to SomeCoder
    SomeCoder:
    This is very true and one of the biggest problems I have with VB. Unless you really know what it's doing under the covers, your chances for WTF code skyrocket. VB hides it so well that WTF code is almost inevitable.
    I may be misconstruing your meaning, but it sounds to me like you're saying that using provided system libraries is a WTF? How do you know what all your code is doing "under the covers"? Do you write all your own library code as well? And isn't reinventing the wheel just because you think the current one is too heavy and doesn't roll fast enough just as much of a WTF in its own right?
  • JimM (unregistered) in reply to SomeCoder
    SomeCoder:
    Also, with Visual Studio 2005, the IDE writes 99% of the code for you...
    When I first read this I thought it was a WTF in its own right, but now I realise it was written by a guy who doesn't think you should write code unless you know what's going on under the hood...?

    Seriously, in my experience all automatically generated code, and particularly that of a Micro$cum nature, is WTF worthy...

  • m (unregistered) in reply to Neeek
    Neeek:
    Duoquadragintatuple panic mode: A little door in the side of the computer case opens, which releases a trained hamster, which runs a maze and flips a switch. That releases a bowling ball which rolls down a slide, breaks through a glass box which has a pen and paper stored inside.

    Bonus points if it goes 'pitagora suiichi' at the end.

  • Oh the irony (unregistered) in reply to Godot
    Godot:
    >they switched to a real database: Microsoft Access

    My irony-detector exploded here...

    If your sarcasm-detector was working your irony-detector would be fine.

  • (cs) in reply to AdT
    AdT:
    Barf 4Eva:
    I don't believe there is a big difference. At all. Except that VB.NET syntax is ugly as hell. It's almost as hot as C# when you put the paper bag over VB.NET.............

    Why are you talking about Visual Fred? What does Visual Fred have to do with VB?

    Plenty syntactically.

    AdT:
    All similarities between the two are purely coincidental.

    I don't think it's coincidental that MS developed VB.NET to retain the similarities in syntax. Trying to keep look and feel while changing semantics, why not? Besides, the OO implementation in old VB sucks.

  • James (unregistered) in reply to DropDeadThread
    DropDeadThread:
    Quadruple panic mode: data is sent to a dot matrix printer guarded by a crocodile infested moat?

    Dude, don't knock the dot-matrix printer as a failsafe. It's especially handy if the system you're working on has no permanent storage.

  • RaV (unregistered) in reply to TakeASeatOverThere

    6th panic level? probably reality rollback.

  • TKDude (unregistered)

    This reminds me of Electronic Voting Machines. rarely used multiple failure modes, too many to know them all insecure probably over priced

  • (cs) in reply to m
    m:
    Neeek:
    Duoquadragintatuple panic mode: A little door in the side of the computer case opens, which releases a trained hamster, which runs a maze and flips a switch. That releases a bowling ball which rolls down a slide, breaks through a glass box which has a pen and paper stored inside.

    Bonus points if it goes 'pitagora suiichi' at the end.

    Y'know, there's a board game in here somewhere...

  • (cs) in reply to Jay
    Jay:
    Erm:
    That's sad, I could probably write something that did that in less than a week using php, xajax, mysql, and apache.

    Not to ridicule the poster, but I don't know how many times I've heard some student or new programmer respond to a discussion of a problem-filed app by saying, "Hey, I could write a program to solve that problem in a week." From a simple statement of the problem -- "record gifts from donors", "count the number of votes for each candidate", etc -- it might sound like an easy problem that could be quickly solved. But real life is rarely that easy.

    Like, a few weeks ago I was working on converting a customer address list and sales information from an old system to a new system. How hard could it be?, you might wonder. An address is an address, a payment is a payment, etc, right? Just read the date, reshuffle the format, and you're done. Except ... except for all the tedious details. Like in the old system returns were recorded as a new transaction, while in the new system they are attached to the original sale. The new system uses a different format stock number, and we had to generate that from available information in the old system. In the old system sales of products from certain suppliers were all under a single "vendor code", but in the new system we have different vendor codes for different divisions of the same company, and we had to figure out which division it was by various characteristics of the product. Etc etc.

    The difference is that in school, the instructor typically creates a problem with no special cases. He'll say, for example, "write a program to read in these sales records and calculate total sales by division". Then all the records have the same format, all the data is valid and consistent, etc. Maybe he creates one or two special cases to throw at the students. But he isn't going to bog the students down in all the complexities that typically arise in the real world. Normally that's a good thing, because he wants to create a problem that can be solved in a week or two, make sure that the student learns how to use hash tables or SQL group-by clauses or whatever the current lesson is, and move on.

    But some students seem to come out of school assuming that all problems in the real world are as clean and neat as their textbook problems, and that a programmer who takes two months to write a "simple total-the-sales program" must be a real incompetent.

    Well,, that's all very instructive, but how hard could it be?
  • (cs) in reply to Schnapple
    Schnapple:
    xtremezone:
    Alex:
    The WTF is the fact that real database: Microsoft Access, doesn't have quotes around "real".
    For truth.
    I just wonder what they were using before that, comparatively, was a fake database.

    Excel, "queried" by VBA moving data in and out of temporary flatfiles. Not that I've ever seen code that did something like that... oh no... my god, the memories.

Leave a comment on “Flirting With Disaster”

Log In or post as a guest

Replying to comment #:

« Return to Article