• (cs) in reply to anonymous
    anonymous:
    What's the & in front of FindAndFixBrokenDBStuff for? Does one have to precede function call with ampersand in Perl?

    Per perlsub,

    &FindAndFixBrokenDBStuff;
    means
    FindAndFixBrokenDBStuff(@_);
    , that is, the callee is passed the same parameters that were given to the caller.
  • (cs) in reply to Eeve
    Eeve:
    Ooo, I love the twist ending! Josh wasn't such a dufus after all! Great wtf.

    Me too. I demand more Hitchcockian WTFs! :)

  • Roy (unregistered) in reply to anonymous

    The ampersand denotes code as an argument type. Thus the "&Find..." is a named chunk of code, usually called a 'sub' (subroutine) in Perl.

  • Corporate Cog (unregistered) in reply to akatherder
    akatherder:
    I was interviewing for a job and the tech lead told me "Primary keys place unnecessary constraints on you that can better be handled with your code." I laughed at his joke. But he wasn't joking.

    I was unfortunate enough to have to work with Paradox. I couldn't figure out how to create relationships. I had occasion to run into the author of an old Paradox book who told me the same thing.

  • D (unregistered)
        #/usr/bin/perl
        $ActivateJoshsWorkarounds = 0;
    

    As we’ve all seen, such variable names are rarely a good sign.

    Hmm, I thought such veriable names are a relatively good sign. Now:

    $special = 3;
    That spells trouble!

  • domm (unregistered) in reply to anonymous

    The & in front of the function call is very Perl4ish (i.e. outdated for at least 10 years).

    In modern Perl, you'd say

    FindAndFixBrokenDBStuff();

    note the parens after the function name.

  • Sigivald (unregistered)

    Developers who do not realise that in all cases a SEGV indicates a program bug? Brillant!

    Well, all cases where the hardware is good...

  • Mr. Black (unregistered) in reply to Rick
    Rick:
    In older versions of perl the & was used to denote a function call. If you use parenthesis today, the & is optional. Personally, I abhor the old usage.

    That's only because you can't find SHIFT+7 when you're drunk.

  • Jon (unregistered) in reply to Brian
    Brian:
    I'm a different 'Brian' than the one in the story... but I feel like my current project could have taken the place. I've been asked to help people do C++, but they insist on doing C+ - and doing it badly.
    Why "C+"? "C with Classes" is a more appropriate name.
  • Bruce (unregistered) in reply to Andrew

    I've also been Josh before.

    Was asked to fix a bug in a particular input screen, and found that the bug was actually traced to a base level library and fixed it....also fixing ~40 bugs that the testers hadn't found yet.

    I was promptly chastised by the Lead programmer for 2 weeks for going outside the particular screen code.

    I left a month later and the rest of that team was jealous of me.

  • Nerigazh (unregistered)

    Hmm, seems like the question about the perl ampersand got answered in about 6 different ways... makes me scared to learn that language

  • (cs)

    Process failure, development failure, or just a bunch of ID-10-Ts with their heads jammed too far up their asses to be able to read fault reports, and too arrogant to listen to a lowly installation tech? You make the call!

    While I can appreciate that most field circus reps aren't qualified for their own job, never mind programming and DB (naturally, the same applies in reverse to most developers, but anyway), it seems to me that if an installation tech is frustrated enough with the situation that he went to the trouble to get into the CVS system and dig around making changes, you'd think that you would at least take the time to figure out a) what it is that's got his panties in a bunch to begin with, b) whether ther really is a problem with the existing code (at the very least ask the other installation techs about it ) c) what the hell his attempted changes were supposed to do (face to face if possible), and d) whether the changes he added actually worked better than the existing code or not.

    Perhaps the answer is to send the developers out on a few support calls. I doubt it would help, though, since they obviously aren't literate enough to read either a bug report or a book on relational database design...

  • Trix (unregistered) in reply to Nerigazh

    seems like the question about the perl ampersand got answered in about 6 different ways... makes me scared to learn that language

    That's because the language has gasp evolved a bit in the last couple of decades. Anyways, as has been pointed out more than once, the (current) Perl 5 and up way of calling a function is simply

    FunctionName();

    The "old" way will still work, though. You have to remember the first principle of Perl: http://en.wikipedia.org/wiki/There_is_more_than_one_way_to_do_it

  • (cs)

    You spun the story wrong. The way it sounded, I kept looking for the big idiocy this Josh moron put into source for which he was forever banned from CVS.

    What horrendously hilarious "fault" he found in their database.

    Now it turns out to be "you don't enforce unique primary keys".

    WTF? If I were Josh, I'd be glad to be out of there too.

  • Adam (unregistered) in reply to TheRubyWarlock

    I dunno if I agree with that. It's never a good thing to patch a bunch of bug fixes in something labeled "workaround".

    Maybe the developer should have fixed the bugs at the source instead of creating an ever expanding bandage for the problems in the system. I would have deleted it too, but only after properly fixing the bugs in the system at their source.

    Also, the devs who deleted it were morons as well, obviously.

  • Mr Steve (unregistered) in reply to Raedwald
    Raedwald:
    Developers who do not realise that in all cases a SEGV indicates a program bug? Brillant!

    Maybe josh was a socially retarded cockface who know one liked, hence no one listened to him, banned him from touching code, etc

    Not necessarily the case, but if he was just plain smelly then you can't really blame the devs for not wanting anything to do with the guy

    Captcha: onomatopoeia - wtf??

  • Gosh (unregistered)

    I kinda had a feeling that Josh was the hiro in this story right from the start. All conversation suggesting the possibility that he stepped out of his bounds shall diminish now and be banned from ever re-occurring in this house! Hail Josh!

  • dkf (unregistered) in reply to Gosh
    Gosh:
    Josh was the hiro
    No, Hiro is someone else entirely.
  • Thijs (unregistered) in reply to anonymous
    anonymous:
    Daniel Migowski:
    Don't you all realize that Josh just modified live data in databases just to get his poorly programmed update running? He add's "receivedDate"s for stuff not yet received just to do his stupid update, and just because he is not able to code correct update scripts.

    You might actually want to reread the story...

    Josh was not a developer, he was merely there to support the installation and upgrade of the software by technicians.

    Besides, his fixes are perfectly reasonable from the looks of it. "valid date" and "no date" are two completely different things. An invalid date could be 25/25/1000 which is obviously impossible.

    They probably stored dates in varchar columns, so they could contain all kinds of garbage.

  • Nick Naylor (unregistered)

    This is the best WTF ever read, honestly! First you think Josh was an idiot but then you realize that the other developers actually are the idiots.

  • (cs) in reply to Brian
    Brian:
    I'm a different 'Brian' than the one in the story... but I feel like my current project could have taken the place. I've been asked to help people do C++, but they insist on doing C+ - and doing it badly. Worse, they *really* only want me to tell them they're doing fine. And I'm not a consultant, I'm an employee hired as a programmer.
    I think you and I should form a self help group :)
  • Vincent de Phily (unregistered) in reply to akatherder
    akatherder:
    I was interviewing for a job and the tech lead told me "Primary keys place unnecessary constraints on you that can better be handled with your code." I laughed at his joke. But he wasn't joking.
    I expect he meant foreign keys ? Even simple ones can be performance killers. I once tried adding fkeys to our product (clean schema, big datasets) and performance was a no-no (more than a day to process a day's data). So yes, we do the work in the softwre instead of the database, and no, it's neither a joke nor a missinformed decision.
  • (cs) in reply to Bruce
    Bruce:
    I've also been Josh before.

    Was asked to fix a bug in a particular input screen, and found that the bug was actually traced to a base level library and fixed it....also fixing ~40 bugs that the testers hadn't found yet.

    I was promptly chastised by the Lead programmer for 2 weeks for going outside the particular screen code.

    I left a month later and the rest of that team was jealous of me.

    Typical for a project that has insufficient testing and most likely no automated unit testing at all. Getting paranoid about any change that is not local is normal under those circumstances.

  • (cs) in reply to Mr Steve
    Mr Steve:
    Maybe josh was a socially retarded cockface who know one liked, hence no one listened to him, banned him from touching code, etc

    Not necessarily the case, but if he was just plain smelly then you can't really blame the devs for not wanting anything to do with the guy

    Ignoring valid (and very obviously correct) criticism because of personal dislikes is called "being unprofessional" and someone the devs can very much be blamed for. Also for having no clue at all about databases. I guess they do deserve some credit for the honesty of explicitly admitting that "we have no clue".

  • rumpelstiltskin (unregistered) in reply to Nerigazh
    Nerigazh:
    Hmm, seems like the question about the perl ampersand got answered in about 6 different ways... makes me scared to learn that language

    Perl is not a language. It's best described as a thing; sort of like a Mr. Potato Head with one eye shoved into the hat socket, the other into a leg socket, and a limp french fry sticking out of an ear hole.

  • wtf (unregistered) in reply to akatherder
    akatherder:
    SomeCoder:
    That said, it's nice to have a DBA whose job it is to do those kind of things and regular stored procs, access, etc.

    After years of dealing with crummy DBAs, I just regarded them as bottlenecks and did whatever I could to work around them. A competent DBA is invaluable though. I can tell someone "Here is the information I'm passing to you and this is what I need back". I go write the code around it and they give me a black box that does it.

    You need to know what's going on behind the scenes but you don't have to do it.

    Are you kidding? Writing stored procedures and even the table design is development. All that a DBA should be doing is backups/restores, setting up the eventual new databases, access permissions and that's that.

  • Blort (unregistered) in reply to Nerigazh
    Nerigazh:
    Hmm, seems like the question about the perl ampersand got answered in about 6 different ways... makes me scared to learn that language

    Good. The less Perl developers in the world, the more sane the world will become.

    This goes for Python, too. Honestly, syntactic white space? You're having me on. Is column 79 special, too?

  • Ivo Vodanovic (unregistered)

    Very interesting article. I invite everyone to visit my Blog magazine about Chile. www.chilemade.com

  • (cs) in reply to wtf
    wtf:
    All that a DBA should be doing is backups/restores, setting up the eventual new databases, access permissions and that's that.

    I'd add to that background performance monitoring, which can include identifying hot-spots that have developed as the usage/data have evolved over time... and hopefully some knowledge how to fix them; this might be DBA-centric (for instance, shuffling the data between drives if IO is unbalanced), may involve suggesting specific query changes, or may just be "this is too slow; fix it please, Jo Dev".

    Of course, this works best if your friendly DBA is also involved in the original design (in a consultancy role) so that they have at least bought into the architecture, and fixed any glaring FUs before it even gets into dev, let alone production.

    In general, giving due consideration to PK/FK/identity etc would be part of this!

  • PeriSoft (unregistered) in reply to Ivo Vodanovic
    Ivo Vodanovic:
    Very interesting article. I invite everyone to visit my Blog magazine about Chile. www.chilemade.com

    Looks like it's time to upgrade the ol' captcha.

  • Cloak (unregistered)

    BTW where did all this garbage come from in the first place? Poor interface design + poor database design.

    So that was a bunch of people who might know how to program an alarm clock but not more. And because the system is in production for some years (I guess) ther's no help to get that clean some day.

  • mikko (unregistered) in reply to rumpelstiltskin
    rumpelstiltskin:
    Nerigazh:
    Hmm, seems like the question about the perl ampersand got answered in about 6 different ways... makes me scared to learn that language

    Perl is not a language. It's best described as a thing; sort of like a Mr. Potato Head with one eye shoved into the hat socket, the other into a leg socket, and a limp french fry sticking out of an ear hole.

    Obviously, you are a member of the dev team that got Josh to leave - In your world, if you don't understand it, it must be bad - I pity your coworkers, having to put up with an arrogant asshole like you...

  • LKM (unregistered) in reply to dummy
    dummy:
    I like the way we feel, getting closer and closer to Josh's brillant WTF.. just to discover HE seemed to be the only sane guy around.

    Yeah, the post felt like The Sixth Sense all over again! :-)

  • Macxdmg (unregistered) in reply to T $
    T $:
    The only thing I didn't like about what he did was:
    print "Call Josh at 440-555-0221 and tell him what the following output says...\n";
    He probably would have had an easier time showing them the errors of their ways if he had written the output to a log file (say for a given day) and then showed them the results of the log. Even so, this approach does allow for the end users to know who to contact, so it can't be all that bad.
    you have to remember that he was a contractor, if they called Josh, instead of him just writing stuff to a file, he got to charge the time. Even only 20 min as a contractor could mean a minimum of 2 hours pay, depending wholly upon the contract of course, not to mention drive time if he had to "come into work".
  • Edward Royce (unregistered)

    Hmmmm.

    Frankly I'd suggest we all call it the "Seventh Sense".

    You know. The sense that it's time to leave for a new job.

  • (cs)

    Josh's mistake was in creating the work-around in the first place. In so doing, he covered the developers' asses from their own stupidity. He should have instead had all upgrades halted and bounced the whole thing back to the developers to fix. Would have given him less work and maybe some of the WTF developers would have disappeared...

  • Andrew (unregistered) in reply to LKM
    LKM:
    dummy:
    I like the way we feel, getting closer and closer to Josh's brillant WTF.. just to discover HE seemed to be the only sane guy around.

    Yeah, the post felt like The Sixth Sense all over again! :-)

    I see stupid people; they're everywhere. They just don't realize they're stupid.

  • Goldie (unregistered)

    Dang, it is my area code... now I've got to find out what the "company" name is, so I don't end up taking a job there. My solution to the problem would be to put every single doofus in "Development" on a 24x7 rotation supporting their own godforsaken applications until they learn to write them properly. A few 3AM calls will set them straight.

  • AdT (unregistered) in reply to Vincent de Phily
    Vincent de Phily:
    I expect he meant foreign keys ? Even simple ones can be performance killers. I once tried adding fkeys to our product (clean schema, big datasets) and performance was a no-no (more than a day to process a day's data).

    Ha ha ha! Either you forgot to add the appropriate indices or you are using a crummy RDBMS. In either case, that would be the Real WTF.

  • Andrew (unregistered) in reply to Goldie
    Goldie:
    Dang, it is *my* area code... now I've got to find out what the "company" name is, so I don't end up taking a job there. My solution to the problem would be to put every single doofus in "Development" on a 24x7 rotation supporting their own godforsaken applications until they learn to write them properly. A few 3AM calls will set them straight.

    Nope that doesn't work either. They'll just check it back in after commenting out the offending code. Then they'll spend the next few hours surfing the 'Net and say they're done. (You can't cure stupid.)

  • rumpelstiltskin (unregistered) in reply to mikko
    mikko:
    rumpelstiltskin:
    Nerigazh:
    Hmm, seems like the question about the perl ampersand got answered in about 6 different ways... makes me scared to learn that language

    Perl is not a language. It's best described as a thing; sort of like a Mr. Potato Head with one eye shoved into the hat socket, the other into a leg socket, and a limp french fry sticking out of an ear hole.

    Obviously, you are a member of the dev team that got Josh to leave - In your world, if you don't understand it, it must be bad - I pity your coworkers, having to put up with an arrogant asshole like you...

    I wasn't saying Perl "is bad"; I merely described it. If you feel that my factual description implies some sort of value judgement, that is your problem.

  • Tei (unregistered)

    Programming is a social thingie. If you are very smart, and make really amazing code, but code that is hard to understand because you use all the sintaxy sugar of the language, and all tricks, and even new tricks you invented. You will make your coworkers live in hell. is bad.

    So having somewhat simple, somewhat boring, somewhat lame code is good.

    Theres a limit. Of course. Where the social idioticy is so looow, that code is soo lame that able problems like no unique "identifiers". You must run, and go everywhere else. As some comments on the thread say.

  • Chad (unregistered) in reply to Someone You Know

    867 5309(eeeine)!!!

    ;)

    captcha : vern... I think they meant Jenny

  • Chad (unregistered) in reply to Chad
    Someone You Know:
    mattman206:
    440-555-0221?

    I used to live in Cleveland and recognize the 440 area code. Perhaps this is Alex's number?

    Can't be; it's not a real phone number. No real phone number in the U.S. has the 555 exchange; it's reserved for use in films and TV and the like so that viewers don't call the numbers they see or hear in movies and harass people.

    Chad:
    867 5309(eeeine)!!!

    ;)

    captcha : vern... I think they meant Jenny

    I'm retarded, ignore me pls.

  • (cs) in reply to BlueEagle

    Ahh, CVS version history...the ultimate "I told you so!"

  • Arctic (unregistered) in reply to anonymous

    Maybe someone should give Josh a call - does the number work ?

  • Rev. Spaminator (unregistered)

    I think this tells all:

    "Honestly do we tell him his stuff is broken?\n"

  • chaboud (unregistered)

    If this number (not the fake number, but the one that "Brian" saw) was Josh's cell number, give the dude a call and ask where he works.

    At least you'd be working with one problem-solver.

    captcha: pirates...

  • Iceman (unregistered) in reply to It's a Feature
    It's a Feature:
    Josh's mistake was in creating the work-around in the first place. In so doing, he covered the developers' asses from their own stupidity. He should have instead had all upgrades halted and bounced the whole thing back to the developers to fix. Would have given him less work and maybe some of the WTF developers would have disappeared...

    This post has my vote as the official solution for this WTF

  • Josh (unregistered)

    hahahahah this is too funny.. My name is Josh, and I've actually had to face this sort of battle before. LOL

Leave a comment on “The Josh Workaround”

Log In or post as a guest

Replying to comment #:

« Return to Article