• addys (unregistered)

    That module was obviously a container for various throwaway one-off data maintainance tasks such as "hey someone fat fingered the company ID on transaction 2003CD1182, can you please manually fix it up in the production database". The old tasks then are kept around for quick reference and/or copy-paste. Since they aren't officially part of the system and were intended to be erased anyway it even kinda sorta makes sense (in a twisted sick sort of way) to give them horribly temp names.

    It is certainly not a paragon of best-practiceness, but not as horrible as the article makes it out to be.

    And yes, anyone on my team caught doing this would be shot.

  • suspicious (unregistered)

    Is it just me, or does code in strangely named functions that appears to insert hardcoded transactions into the accounting ledger and make stock disappear sound kind more than a little fishy?

  • Chewbacca (unregistered)

    I've seen this a bunch of time.

    1. Weapons-grade moron writes silly code with silly variable/function names.
    2. Someone sliiightly more competent comes along and tries to re-factor the code.
    3. All the unidentifiable functions get put in the "unidentified" or, in this case, the "Hmmm" module.
    4. Someone else is stuck identifying them and renaming them.

    (Notice there is no "???" line, and certainly no "Profit" one)

  • iMalc (unregistered) in reply to hhhhsdnjwnjwnnjkwjk

    It could perhaps be somewhat sensible in some context! I work on code where the Time Manager is called MrWolf

  • pbean (unregistered)

    Uhm LOL I actually recall a few years back I worked on some MS Access and VB projects and used names almost exactly like those (in my defense I was very young and very new to the world of coding).

    I really, really hope this is not a WTF to come from my hand. xD

  • ullamcorper (unregistered) in reply to Steve the Cynic

    Tau isn't pronounced tor. It's pronounced like brow.

  • Elvis (unregistered)

    I'll bet it's some sophisticated method of code obfuscation which a mere mortal like myself could never hope to understand..... or it's just crap in an access project. Hmmmm....

  • Elvis (unregistered)

    I'll bet it's some sophisticated method of code obfuscation which a mere mortal like myself could never hope to understand..... or it's just crap in an access project. Hmmmm....

  • Elvis (unregistered)

    I'll bet it's some sophisticated method of code obfuscation which a mere mortal like myself could never hope to understand..... or it's just crap in an access project. Hmmmm....

  • Elvis (unregistered)

    I'll bet it's some sophisticated method of code obfuscation which a mere mortal like myself could never hope to understand..... or it's just crap in an access project. Hmmmm....

  • Elvis (unregistered)

    I'll bet it's some sophisticated method of code obfuscation which a mere mortal like myself could never hope to understand..... or it's just crap in an access project. Hmmmm....

  • DJ Maze (unregistered)

    Do Dude() ? hmmmm, mod Do Girl()

  • Aziz (unregistered)

    Public Sub dude(). Haha, at least he has a sense of humor.

    So we was walkin' around tha hood. My homey walked up and said "Ey Yo, sub dude()"

    Why do people mention their captcha? Mine is aptent : (pronounced AP-tehnt, compounded from 'application' and 'content') is the combination of computer program applications with textual and graphic content on the Internet. http://searchsoa.techtarget.com/sDefinition/0,,sid26_gci213515,00.html

    That's really boring

  • Jesse (unregistered)

    How do people like this even become programmers? Is it really so hard to come up with a descriptive function name?

  • dude (unregistered)

    This is not the first time I've seen badly obfuscated fraud code. You want to see something hairy... look at the code for the various private payment system modules floating around the web being flogged by fly-by-nights. Last time I looked (2004) they were ALL the same product but each vendor had added their own obfuscated fraud (default passwords, stored transactions that skipped authentication and logging if you referenced a particular URL or passed a certain cookie, etc)

  • Anonymous Cow-Herd (unregistered) in reply to ullamcorper
    ullamcorper:
    Tau isn't pronounced tor. It's pronounced like brow.

    It's actually pronounced "taff".

    Currently feeling in a modHmm mood ...

  • Franz Kafka (unregistered) in reply to dude
    dude:
    This is not the first time I've seen badly obfuscated fraud code. You want to see something hairy... look at the code for the various private payment system modules floating around the web being flogged by fly-by-nights. Last time I looked (2004) they were ALL the same product but each vendor had added their own obfuscated fraud (default passwords, stored transactions that skipped authentication and logging if you referenced a particular URL or passed a certain cookie, etc)

    I heard that ccbill actually got so popular because they were the first bunch of guys that didn't do this.

  • Zach (unregistered) in reply to Loren Pechtel

    That was what I was thinking. I think this dude() is skimming cash off of some other dudes with this thing() he wrote..

  • JJ (unregistered)

    The real WTF is that the author only noticed/mention the odd naming... what about the hardcoding, the scrolling through an entire resultset to do a meaningless update, etc., etc.

  • (cs)

    That module really tied the program together.

  • monkeyPushButton (unregistered) in reply to Anonymous Cow-Herd
    Anonymous Cow-Herd:
    ullamcorper:
    Tau isn't pronounced tor. It's pronounced like brow.
    It's actually pronounced "taff".
    Actually, it's pronounced "throat-warbler mangrove."
  • (cs) in reply to hhhhsdnjwnjwnnjkwjk
    hhhhsdnjwnjwnnjkwjk:
    Poorly named? Well, that's just, like, your opinion, man.

    I agree ... so long as I don't have to tell the difference between functions hhhhsdnjwnjwnnjkwjk() and hhhhsdnjwnjnwnjkwjk() during the wee hours of some dark (both senses of the word) night.

  • Gaspar (unregistered)

    This sounds like someone's test module. Where you just wrote one off tests that were never intended for actual use.

    Usually I name mine either test.X (.c, .bas, .cpp ...) or foo.X (again pick your language).

    CAPTCHA: jumentum, sounds like one of our articles' functions...

  • (cs) in reply to Puddin'
    Puddin':
    This is what happens when you code while pissed off.
    When I first read this comment I thought it said "This is what happens when your code is pissed off."
  • Bobby Jo (unregistered)

    My theory as to why the code is crap in two words: Job Security

  • ObiJohn (unregistered)

    Looks pretty obvious to me... seriously!

    Yes, the code is poorly named, commented, etc., but it's fairly straightforward.

    Looks like the first function was fixing a series of bad entries in a database (updating the account #s). The second was similarly fixing an entry (or creating an entry... I forget which and I can't see the OP while commenting [BAD UI design]), and the third was evidently updating a bunch of inventory records.

    In other words, the stuff written as a quick and dirty way to 'automate' fixing the records by hand (if they could be fixed by hand, i.e., bringing up a table/query and editing the records).

    However, the original programmer should have at least put a comment above each function as to its actual purpose, and if they were no longer needed then they should have been deleted.

  • Dave (unregistered) in reply to Steve the Cynic

    Apart from the daft naming conventions I also wonder why the update of the account code wasn't done in a single UPDATE statement.

    I seem to remember that Microsoft's uncrackable media code was cracked with a utility with an expletive in its name as in Un{Expletive}.

    My first boss was a bit of a lecher and described a female contractor as a "sack of spuds". From that moment on her suite of code became known as "the sack of spuds suite". A boardroom discussion took place on the budgetary requirements to extend the sack of spuds suite!

  • just another observer (unregistered)

    And I had been in a Java project where this 'dude' had a variable 'boolean todayTheDogArrived'.

  • Jim (unregistered)

    That...is...AWESOME!

  • Jim (unregistered) in reply to kindall

    rofl

  • hannes (unregistered)

    public sub dude, we heard you like identifiers, so we included the set of meaningless ones, so you can guess while you review.

  • dolor (unregistered) in reply to Coyne
    Coyne:
    hhhhsdnjwnjwnnjkwjk:
    Poorly named? Well, that's just, like, your opinion, man.

    I agree ... so long as I don't have to tell the difference between functions hhhhsdnjwnjwnnjkwjk() and hhhhsdnjwnjnwnjkwjk() during the wee hours of some dark (both senses of the word) night.

    I don't care if it's dark. You should see a doctor, if it takes hours hours to wee.

  • The public we (unregistered) in reply to hhhhsdnjwnjwnnjkwjk

    This is a very complicated case, hhhhsdnjwnjwnnjkwjk. You know, a lotta ins, lotta outs, lotta what-have-yous. And, uh, lotta strands to keep in my subroutine, man. Lotta strands in old Duder’s function.

  • panzi (unregistered)

    'sup, dude?

  • Anonymous Coward (unregistered)

    I once wrote a class named YourMom. All of the attributes and methods were named accordingly.

  • RemusP (unregistered)

    It seems that the one who named those functions like did complete "The Guide of Writing Unmaintainable Code"

  • eric bloedow (unregistered) in reply to Steve the Cynic

    reminds of when i wrote a simple game in Basic: i tried to name a variable "score", but "OR" is a restricted word...but instead of simply telling me that, it kept converting "score" to "sc OR e" and giving weird errors...

Leave a comment on “modHmm”

Log In or post as a guest

Replying to comment #:

« Return to Article