Comment On modHmm

"I was put on a new Microsoft Access project recently," Stuart A writes, "and I've slowly been finding my way around the system as the need arises (read: as bugs are reported). As my eyes drifted over the numerous modules, one stopped me in my tracks. It was a module named 'modHmm'. I guessed the programmer was in a ponderous mood?. So naturally, I had a look inside..." [expand full text]
« PrevPage 1 | Page 2Next »

Re: modHmm

2009-11-18 09:08 • by anon (unregistered)
dude, access rules!

Re: modHmm

2009-11-18 09:09 • by Steve (unregistered)
I do mind, the Dude minds. This will not stand, ya know, this aggression will not stand, man.

Re: modHmm

2009-11-18 09:09 • by hhhhsdnjwnjwnnjkwjk (unregistered)
Poorly named? Well, that's just, like, your opinion, man.

Re: modHmm

2009-11-18 09:10 • by Kermos
void ashlhqwknhsdrhqawer()
{
wtf::comment << "Hmmm...";
}

Re: modHmm

2009-11-18 09:13 • by Joe (unregistered)
What's up with all the hard-coded values? Is this just someone's personal test code they were using and never removed or what? I find it hard to believe it's an integral piece of the project.

Re: modHmm

2009-11-18 09:15 • by Drew (unregistered)
Hmm...

Re: modHmm

2009-11-18 09:15 • by Dude (unregistered)
Every application should have a function called dude().

Re: modHmm

2009-11-18 09:17 • by md5sum
Reminds me of someone I knew naming their variables and methods after movie titles and actors/actresses... You know who you are.

Re: modHmm

2009-11-18 09:18 • by highphilosopher (unregistered)
290920 in reply to 290916
Joe:
What's up with all the hard-coded values? Is this just someone's personal test code they were using and never removed or what? I find it hard to believe it's an integral piece of the project.


The you probably missed that it's an ACCESS project.

captcha: ingenium -- secret society of geniuses (charter member).

Re: modHmm

2009-11-18 09:18 • by Big Guy Surprise (unregistered)
#DEFINE dude() main()

Re: modHmm

2009-11-18 09:20 • by BurntNose (unregistered)
290922 in reply to 290914
You've successfully made me snort coffee onto my desk. Gonna be a good day.

Re: modHmm

2009-11-18 09:20 • by highphilosopher (unregistered)
290923 in reply to 290919
md5sum:
Reminds me of someone I knew naming their variables and methods after movie titles and actors/actresses... You know who you are.


Hey it wasn't just actors and actresses, it was names of Iraqi terrorists too.

captcha: suscipere - latin for "I always take up, acknowledge, or undertake. So there, I took the blame. I suscipere.

Re: modHmm

2009-11-18 09:21 • by Mike H
290924 in reply to 290916
Joe:
What's up with all the hard-coded values? Is this just someone's personal test code they were using and never removed or what? I find it hard to believe it's an integral piece of the project.


Yes, it seems this module is for ad-hoc data updates. Obviously this developer hasn't heard of SQL.

The UpdateThing() method could simply be rewritten in SQL as


UPDATE view91
SET Transaction_GLAccount_Code = '12056'
WHERE Transaction_GLAccount_Code = '12055'


Re: modHmm

2009-11-18 09:23 • by NetBiter (unregistered)
Either those methods are there to throw you off and are not being used or he's using Intellisense. I am happy to see all the frists are out of the feedback, lately. Thanks.

Re: modHmm

2009-11-18 09:25 • by Will D Beast (unregistered)
Back in my COBOL days, I remember seeing a program with a section called GENERAL-UPDATING.

It also had a section called MAJOR-PONSONBY-SMYTHE.

Re: modHmm

2009-11-18 09:25 • by Alargule (unregistered)
Must've been interesting conversations:

"Hey Dude, could you Update that Thing?"

- "Hmm..."

Re: modHmm

2009-11-18 09:25 • by md5sum
290928 in reply to 290924
Mike H:
Joe:
What's up with all the hard-coded values? Is this just someone's personal test code they were using and never removed or what? I find it hard to believe it's an integral piece of the project.


Yes, it seems this module is for ad-hoc data updates. Obviously this developer hasn't heard of SQL.

The UpdateThing() method could simply be rewritten in SQL as


UPDATE view91
SET Transaction_GLAccount_Code = '12056'
WHERE Transaction_GLAccount_Code = '12055'




considering that the programmer (?) wrote a function to perform this operation, the said SQL statement would have probably ended up running in a job with a cursor in it. Like the 1200 line stored procedure we replaced with a single select statement one time where I used to work.

Re: modHmm

2009-11-18 09:25 • by TheStandardWay (unregistered)
You could have stopped this WTF at "I was put on a new Microsoft Access project recently"...

Re: modHmm

2009-11-18 09:28 • by djskalfdkldjakd;da;afdk;ajsdl (unregistered)
You haven't heard? It's one of Windows 7's best features: http://2.media.collegehumor.com/collegehumor/ch6/9/4/collegehumor.38e5aee96286c4afaacc4114d58b9f8b.gif

Re: modHmm

2009-11-18 09:30 • by Mike (unregistered)
Surely the rational explanation is that this is a dumping ground / scrapbook for "one off hacks" to fix specific data problems or answer specific queries?

Sadly, I've seen plenty of these in my time.....

Re: modHmm

2009-11-18 09:37 • by ubersoldat
290932 in reply to 290916
Joe:
What's up with all the hard-coded values? Is this just someone's personal test code they were using and never removed or what? I find it hard to believe it's an integral piece of the project.


It's made in Access, the whole project _is_ a personal test.

Re: modHmm

2009-11-18 09:42 • by asdfhlk (unregistered)
while lkjh(fgfh, tweyt)
'as;ldhfeia
Let vbncxbj = ncxzvbl.hkhj
wend

Re: modHmm

2009-11-18 09:44 • by Dude (hhasssdjhh23) (unregistered)
Let me be the frist to say - it's been a long time since I have gone WTF??????? like that!!

Re: modHmm

2009-11-18 09:47 • by SomeWhiteguy (unregistered)
Had a few functions and variables at my last job similar to that. My favorite was:
bool KenIsaJackass = true;

Never used... never set to anything else but true :-D

Captcha: luctus- small insects who slowly eat at your horshoes, 4-leaf clovers, rabbits foot, etc.

Re: modHmm

2009-11-18 09:54 • by a different phil (unregistered)
So, was this module's author using the company to pay off his Diner's Club card? And making stock disappear from the warehouse? Hmmmm indeed.

Re: modHmm

2009-11-18 09:54 • by J (unregistered)
The Public Dude abides.

Re: modHmm

2009-11-18 09:57 • by fffdskgt (unregistered)
Console.WriteLine("ddskgdf 1");
I would hope its just bad random debug code.
Console.WriteLine("ddskgdf 2");
That they only indended to use in a one off for a second.
Console.WriteLine("ddskgdf 3");
To catch a random bug that they just couldnt figure out.
Console.WriteLine("ddskgdf 4");
But they forgot to delete it strait after.
Console.WriteLine("ddskgdf 5");
Prolly cos their bad debug code didnt help at all.
Console.WriteLine("ddskgdf 6");
So they had to go debug it in a proper fashion.
Console.WriteLine("ddskgdf 7");



Capcha:

An Error Occured

Not sure what it was, but it was logged. A human will eventually look at it. If the problem persists, please Contact Us. If the problem is on the contact form, then ... well ... that pretty much sucks. You can email instead: alexp-at-WorseThanFailure.com.

Re: modHmm

2009-11-18 10:00 • by silent d (unregistered)
290940 in reply to 290938
The Public Subdude abides.

FTFY.

Re: modHmm

2009-11-18 10:39 • by SR (unregistered)
290964 in reply to 290938
J:
The Public Dude abides.


+1, Funny

Hmmm......

2009-11-18 10:42 • by Loren Pechtel (unregistered)
Embezzlement, perhaps?

Re: modHmm

2009-11-18 10:46 • by dtaylor84
Well, he wasn't going to call it

Public Sub EmbezzleMoney()

or

Public Sub HideStolenStock()

was he?

Re: modHmm

2009-11-18 10:50 • by Robb (unregistered)
Maybe

Public Sub NothingToSeeHereMoveAlong()

??

Re: modHmm

2009-11-18 10:53 • by Capndan (unregistered)
I think this is one of the first WTFs that really made me lol. I want to see the part of the program where all these functions start getting called...

If (hhdjashjdajsdhasd() == ggggggg()) then llllllllllllll();

Re: modHmm

2009-11-18 11:29 • by RG3 (unregistered)
That looks like the perfect place to hide your elaborate embezzlement scheme...

Re: modHmm

2009-11-18 11:29 • by Jakob (unregistered)
I believe those functions were all named after friends of Fhqwhgads.

[OT] Re: modHmm

2009-11-18 11:33 • by RG3 (unregistered)
290993 in reply to 290930
I know that image is supposed to be silly, but my email client (KMail) has had the attachment feature for years now...

Re: modHmm

2009-11-18 11:41 • by Steve the Cynic (unregistered)
It makes me think of some code I worked on many moons ago (in fact it was 1990-1993).

It was an embedded system with a proprietary multithreading system. The guy who originally wrote it wanted to celebrate buying a new car, so the central control variable of the scheduler was "golf_gti". Sad to say, neither I nor the guy I worked with cared enough to change it.

Nor the joke buried in the gas compressibility calculations. The equations themselves feature Greek letters pi and tau, but because of the common pronunciation of the latter as "tor" and some time adapting the code from a dialect of BASIC, the C variable holding the pi value acquired an e to become pie, and tau, misspelled tor, was rejected by the BASIC and became, in C, apple.

double apple, pie;

Fist Of Death online, armed and ready.

Re: modHmm

2009-11-18 11:49 • by Chris (unregistered)
290996 in reply to 290938
not even a public dude. It's a public sub-dude. ;))

Re: modHmm: smell likes.

2009-11-18 12:01 • by pruneau (unregistered)
test code.
Furiously like test code, left on the side of the path for better methods of testing.

captcha: genitus

Re: modHmm

2009-11-18 13:07 • by Puddin' (unregistered)
This is what happens when you code while pissed off.

Re: modHmm

2009-11-18 13:07 • by Mike (unregistered)
That's going to take a lot of BOC's to correct.

Re: modHmm

2009-11-18 13:19 • by Populus (unregistered)
This is obviously some temporary code written for one-time use and never deleted. I do the same thing, but my function names are things like go(), doit(), and doitNOW().


Wow, the captcha is my name. Weird.

Re: modHmm

2009-11-18 13:35 • by Medezark (unregistered)
Looks to me like a bunch of one-off modifications that were written in VB because the developer didn't know how to write a query?

Re: modHmm

2009-11-18 14:23 • by KeithJM (unregistered)
291024 in reply to 290996
not even a public dude. It's a public sub-dude. ;))


I try to keep my sub-dude private when possible.

Re: modHmm

2009-11-18 16:04 • by Ramses So let it be written so let it be done (unregistered)
That's just funny. First time one of these WTFs made me laugh.

My guess is it was just a test module but then again maybe the guy knew he was on his way out and wanted to mess with those to follow. I usually put the humorous stuff in the comments, if I did that with my procedures and had to go back and look at something 6 mos later I would laugh and then say WTF!!!

Re: modHmm

2009-11-18 16:25 • by Foobar (unregistered)
291042 in reply to 291024
KeithJM:
not even a public dude. It's a public sub-dude. ;))


I try to keep my sub-dude private when possible.


It's also good to try to keep your private subdued.

Re: modHmm

2009-11-18 16:30 • by SarahE
291043 in reply to 291042
Foobar:
KeithJM:
not even a public dude. It's a public sub-dude. ;))


I try to keep my sub-dude private when possible.


It's also good to try to keep your private subdued.

Unless, of course,
Option Explicit
is set.

Re: modHmm

2009-11-18 17:04 • by kj (unregistered)
This dude() looks like a manual transaction entered by a coder. modHmm - maybe mod'divert cash to my account'Hmm

Re: modHmm

2009-11-18 17:16 • by aydh (unregistered)
Did you check for fraud - looks distinctly dodgy...

Re: modHmm

2009-11-18 19:48 • by Anonymous (unregistered)
Looks like test / debug / adhoc requirement ("could you quickly put together a demo account with some transactions in??") code to me. Run once, never use again. Why call them things like checkThatTransactionsAreMakingItThroughToTheDBOk() or setUpACoupleOfDemoAccountTransactionsForMikeInMarketing() when a) they'll never be called from anywhere in the live code, and b) calling them things like 'dude' is way more fun, dude?
« PrevPage 1 | Page 2Next »

Add Comment