• Swedish tard (unregistered)

    Ouch. I've seen som rancid scripts, but that really takes the cake. Rather belongs in IOCCC or similar.

  • Warren (unregistered)

    They need to test that no-one's checked this bit of code back in. So now they need a test script that runs svn....

  • mz001 (unregistered)

    Sounds kinda familiar. I recently inherited an application where the previous guy screwed up so badly that the only solution is to keep the basic idea and to a complete rewrite. On the bright side, the guy's now working at a younger competitor and will probably have run them into the ground in less than a year.

  • (cs)

    Simple rule with regex, if it's more than the old terminal width of 80 characters, you're doing it wrong. Hell, even that's pushing it.

  • (cs)

    If your code does not look like your rolled your face over the keyboard you're not doing regular expressions right.

  • (cs)

    "Like snakes and mongooses , QA and developers are natural enemies."

    Best quote ever. Putting on my whiteboard

  • (cs) in reply to Kushan
    Kushan:
    Simple rule with regex, if it's more than the old terminal width of 80 characters, you're doing it wrong. Hell, even that's pushing it.
    Thank FSM, I thought you were going to roll out that tired old "Now you have two problems" bit.
  • (cs) in reply to @Deprecated

    A developer wants to make a joke about regexes, so they trot out the "two problems" bit. Now they have two jokes.

    ... I'm not sure that worked.

  • El Dorko (unregistered)

    What I've been saying all the time to my team: you can write all the regex you want to save some typing or characters or whatever, but you'll end up writing way more documentation to go with that. Here, there is no undocumented regex (yes they still use it for some tasks and that's fine by me). And I check that the documentation makes sense. And I snap at the culprit when it doesn't.

  • NameNotFoundException (unregistered)

    Why, oh why did they let the other guy go? My job security dreams just vanished...

  • (cs) in reply to Remy Porter

    http://ars.userfriendly.org/cartoons/?id=20070628&mode=classic

  • Bongo (unregistered)

    No unicorns :(

  • (cs)

    The idea of a script reading itself reminds me of Mortran, a 'structured FORTRAN preprocessor', developed (IIRC) at U of Waterloo. The preprocessor was a quite simple macro processor. The key to the preprocessor was an initial macro, which expanded to become the de facto processor, which processed the macros that implemented the language structures. (All of this IIRC). In essence, that original 'rule' (macro) defined the direction of construction of the language.

    This bootstrap process gave me to think about creation and evolution, in the following manner. It's one thing to create something out of whole cloth - a butterfly, for instance. But it's an entirely different and much more interesting thing to create something by merely defining a set of rules by which an entire universe constructs itself, that evolves resulting in, of course, (and among other 'things'), us. :) It's sort of like aiming a gun by growing a tree to support the barrel. So since then I have never seen any essential conflict between this sort of original 'creation' (by whatever means) and 'evolution'.

    Of course, it is also useful to add one element from systems science - the principal that a controller of a system must have more complexity than the system, else it is not a controller. This means that no member of the system can determine whether there is a controller or not. So the whole creation/evolution argument is undecidable. In any case, it's fun to think that a programming language is a metaphor for evolution!

  • Ron (unregistered)

    Note that the comment says "I forget what this does", not "I forgot what this does".

    Sounds more like a declaration of intent: "I will forget what this does". I can understand why. I wouldn't want to remember this, either.

  • AGray (unregistered)

    So, a true story on this note, but heavily sanitized to protect the innocent.

    I recently moved into a developer postion, from automated QA. The problem? On my team, I'm the only person with that skillset left.

    Enter a series of Ranorex/C# programs written by my predecessors. Some of these scripts are bad in the simplest sense - they sometimes work in theory (often not), but rarely work in practice. My last week since originally being tasked with maintaining these functional tests has been mostly rewriting, since the previous contributors weren't exactly clear on things like a 'Common' library being...well, common. Or, that whitespace does wonders to make code legible. Or the difference between bitwise OR and short-circuit OR in C#.

    Long story short...I feel this possibly fictionalized programmer's pain. I'm just glad my pain is not the equal of that.

  • atk (unregistered)
    Like snakes and mongooses , QA and developers are natural enemies.

    I've heard that bu11$#!t before, and it's still BS - even with the possibility that it's here only for humor. You'd expect to see attitudes like this from immature, fresh-out-of-school programmers. But sadly, we see it from many experienced developers, management, and even college professors. It's attitudes like this that create unnecessary tension between teams whose joint purpose is to deliver a product to market that people will buy.

    All quality and all bugs come from development. Development is fully responsible for the quality (or lack thereof) in a product. Nobody else writes the code. Nobody else creates the bugs. (For the pedants, product management is responsible for requesting a product that customers will want, but they're still not the ones that do or do not build in quality.)

    If the product is lacking in quality, either customers won't buy it, or they'll demand support. If they don't buy it, the company doesn't make money and nobody gets paid. If customers demand support, that costs the company money. If it costs the company too much money, and support is equally or more expensive than profits, the company loses money and nobody gets paid. And the second order issues like low quality risking the company's reputation (other potential customers may not buy the product of a company with a bad reputation) and customer good will (lack thereof leads to loss of future sales and sometimes customers demanding their money back or expensive freebees).

    QA exists to identify the level of quality in a product before it ships so that a decision can be made as to whether it will make the company money or cost the company money.

    So that they company can make money.

    Whether developers, professors, or anyone else realize it or not, this is the same goal as development has - to make the company money and get paid.

    BTW, I'm a developer.

  • Bubbles (unregistered)

    What's with the dev/QA hate? I love our QA team, they're very good and they help us devs a ton. And we go out for beers together too.

  • Chris (unregistered)

    Bridget is obviously not a Real(tm) developer.

    Any developer worth their salt wouldn't spend more than about 30 minutes tracing through a pile of unused crap before declaring that it is indeed crap.

    This is always quickly followed by the developer starting over with the given code. Usually leading to another pile of unused crap that needs to be replaced.

  • Foo (unregistered) in reply to Remy Porter
    Remy Porter:
    A developer wants to make a joke about regexes, so they trot out the "two problems" bit. Now they have two jokes.

    ... I'm not sure that worked.

    how about "a dev wants to make a joke about regexes, so they trot out the "two problems" bit. Now they have two memes.

  • Foo (unregistered)

    This kinda stuff probably comes from an automated script which tries to update itself. If you've got a few machines in a cupboard somewhere churning a large regression set, you want them to auto-update... and I can't say I've ever seen a neat solution to auto-update. This sounds like it attempted to get the latest version of itself and everything it needed from source control, which is a great concept, but sucky implementation.

  • dkallen (unregistered) in reply to Remy Porter
    Remy Porter:
    A developer wants to make a joke about regexes, so they trot out the "two problems" bit. Now they have two jokes.

    ... I'm not sure that worked.

    A commenter wants to make a joke out of a comment, so he trots out the quote/comment/joke meme. Now he has two comments, and no jokes.

  • dkallen (unregistered) in reply to atk
    atk:
    Like snakes and mongooses , QA and developers are natural enemies.

    You'd expect to see attitudes like this from immature, fresh-out-of-work trolls.

    If the product is lacking in quality ship it [s]o that [the] company can make money before laying off the developers.

    ...this is the same goal as development has - to take the company's money and get laid.

    BTW, I'm a troll

    There, FTFY.

  • (cs)

    Shouldn't the plural of "mongoose" be "mongeese"?

  • (cs) in reply to RichP
    RichP:
    Shouldn't the plural of "mongoose" be "mongeese"?

    It's mongooses. Or mongui, if you prefer.

  • Anon') or 1=1 (unregistered) in reply to RichP
    RichP:
    Shouldn't the plural of "mongoose" be "mongeese"?

    You didn't read the HTML comments, did you?

  • JC (unregistered)

    Devs can hate QA as much as they like. Trust me, you'll hate it much more when you dont have a QA team and you have to DIY.

  • (cs) in reply to JC

    I'm in a situation where the BA writes the test cases (poorly, usually), and then the developer executes the test cases (also poorly). But the customers refuse to pay for QA.

  • neminem (unregistered) in reply to DCRoss
    DCRoss:
    RichP:
    Shouldn't the plural of "mongoose" be "mongeese"?

    It's mongooses. Or mongui, if you prefer.

    No, a mongui would be a (slightly racially insensitive, if you track down the etymology) derogatory term for a really terrible user interface.

    I like "mongeese". Totally incorrect, but I still like it.

  • Nemo (unregistered)

    Bah! Developers and QA get along great! The real fight is between the developers and the admins.

  • justsomedudette (unregistered) in reply to neminem
    neminem:
    DCRoss:
    RichP:
    Shouldn't the plural of "mongoose" be "mongeese"?

    It's mongooses. Or mongui, if you prefer.

    No, a mongui would be a (slightly racially insensitive, if you track down the etymology) derogatory term for a really terrible user interface.

    I like "mongeese". Totally incorrect, but I still like it.

    I like mongeeses which is even worse, but I still like it.

  • Neil (unregistered) in reply to Anon') or 1=1
    Anon') or 1=1:
    RichP:
    Shouldn't the plural of "mongoose" be "mongeese"?
    You didn't read the HTML comments, did you?
    I just wanted to note that the space before the comma is a dead giveaway.

    CAPTCHA: sagaciter - someone who cites sagas.

  • (cs)

    Jeez, me and the QAs, and the admins, and the PMs are all down.

    It's the SALES folk who are sworn enemies at DNA level. Get it right.

  • Ralph (unregistered) in reply to atk
    atk:
    If the product is lacking in quality, ... customers won't buy it
    OK, I know I'm evaluating one half of an "or", but clearly this has a vanishingly small probability and therefore should be optimized out. Consider:

    Microsoft Oracle Adobe SAP HP ... Members of Congress ...

  • Jack (unregistered) in reply to Remy Porter
    Remy Porter:
    I'm in a situation where the BA writes the test cases (poorly, usually), and then the developer executes the test cases (also poorly).
    Test cases? I envy your luxurious life in a mature organization. Here's how it works here:
    1. Internal customer describes what they want.

    2. Development builds whatever they feel like making, spending countless hours obsessing over exactly how round the corners should be, but giving no thought to data structures.

    3. Customer is responsible for testing; documents 100 bugs.

    4. Developers give up and go on to another project.

    5. Rinse and repeat.

    6. ???

    7. Profit!

    We just hired our first QA guy. And this is in an IT organization with over 300 employees.

    P.S. We have never made it to step 7, perhaps because of the endless loop in 5.

  • Ozz (unregistered)

    I thought everyone knew that the plural of "mongoose" is "polygoose".

  • (cs)

    Nice Gir reference in the HTML comments.

    "I saw a squirrel!"

  • Sebastian Buchanan (unregistered)

    it would be cooler if the regex created an svn client

  • (cs) in reply to Sebastian Buchanan
    Sebastian Buchanan:
    it would be cooler if the regex created an svn client

    And that is how SourceSafe was created.

  • SunGoose (unregistered) in reply to Ozz
    Ozz:
    I thought everyone knew that the plural of "mongoose" is "polygoose".

    Good one.

    Another possible sequence is: "MonGoose", "TueGoose", "WedGoose"...

  • someone (unregistered)

    That actually sounds like a good way to check for typos/errors. Like the static type checking you had in a compiled language.

    The TWTF is that they deleted the function

  • Alin (unregistered) in reply to Yaos
    Yaos:
    If your code does not look like your rolled your face over the keyboard you're not doing regular expressions right.

    Made my day :)

  • Herp (unregistered) in reply to Chris
    Chris:
    Bridget is obviously not a Real(tm) developer.

    Any developer worth their salt wouldn't spend more than about 30 minutes tracing through a pile of unused crap before declaring that it is indeed crap.

    This is always quickly followed by the developer starting over with the given code. Usually leading to another pile of unused crap that needs to be replaced.

    Would politely disagree. Yes, some bad code is so bad that it is not salvageable. In many cases, though, the cost of refactoring is less than the cost of starting over from scratch.

  • (cs) in reply to mz001
    mz001:
    Sounds kinda familiar. I recently inherited an application where the previous guy screwed up so badly that the only solution is to keep the basic idea and to a complete rewrite. On the bright side, the guy's now working at a younger competitor and will probably have run them into the ground in less than a year.

    IT CANNOT BRING OPERATION TO STANDSTILL. THAT IS TRUTH OF MATTER.

  • Daniel (unregistered)

    Oh my. I'm laughing and crying at the same time. Wouldn't be funny or tragic if it weren't so terrifyingly accurate.

  • Hasse (unregistered)

    Any person that want to call himself a developer/programmer should work 2 years:

    1: as a system administrator 2: in QA 3: as a maintenance programmer

    Then they learn how badly maintainable programs could be. How horrible functionality a program can have How bad code looks like

  • eVil (unregistered) in reply to SunGoose
    SunGoose:
    Ozz:
    I thought everyone knew that the plural of "mongoose" is "polygoose".

    Good one.

    Another possible sequence is: "MonGoose", "TueGoose", "WedGoose"...

    WednesGoose surely?

  • lesle (unregistered)

    Collective Nouns for Mongoose

    A business of mongoose (most commonly cited) A band of mongoose A pack of mongoose A mongaggle of mongoose (probably made up, but nice!)

    A mongoose is a type of weasel.

  • (cs) in reply to Bongo
    Bongo:
    No unicorns :(
    But we got the usual slipshod editing, so there's that.
    ...she needed to know out what it was actually trying to do...
    Yes, let us all sally forth and know out the problem!
  • (cs) in reply to Bubbles
    Bubbles:
    What's with the dev/QA hate? I love our QA team, they're very good and they help us devs a ton. And we go out for beers together too.

    IWPTA as "go out for bears together".

    (Now, where's this Eskimo woman you want me to wrestle?)

  • Anonymous bastard (unregistered) in reply to Nemo
    Nemo:
    Bah! Developers and QA get along great! The real fight is between the developers and the admins.
    Specially the windows admins...

Leave a comment on “Psychic Code”

Log In or post as a guest

Replying to comment #:

« Return to Article