- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I enjoy the simplicity in that no comments exist except this one. But that doesn't count.
Admin
Please don't blame me. Code written below is not mine.It was written against me.
Admin
I don't see the big deal with the JVM error. Maybe Dominic doesn't know about Java development debugging. Lucky for him, he hasn't seen an Spring stack trace.
Admin
Reminds me of a function I found somewhere deep down in our code base:
procedure DoNothingWithDate (const aDate: TDateTime) begin ; // do nothing end;
And it was called like this:
DoNothingWithDate (validDate); // Make compiler happy
It seems to still exist, but isn't used anymore.
Captcha: decet. Detect a decent defect?
Admin
I think the "deal" witht the JVM Error is that the error is "ShouldNotReachHere", which apparently it did :-)
Admin
5368686868212050656f706c6520617265206c697374656e696e672e
Admin
I don't need a Society Decoder ring. It's hexadecimal ASCII. Just split it up in groups of two chars and look it up on an ASCII table.
Admin
The 80's called, they want FRISTers back.
Admin
Stephen's submit:
This is certainly one of the finer wtfs, this takes dedication!
A lot of people don't change the auto-generated names provided by Visual Studio when you click together your ui. This is a wtf but a common one.
Adding a comment in the declaration part nobody usually looks at when using Visual Studio: another minor wtf.
But with the knowledge that the name of the form is non-descriptive and in need of explanation just to edit the generated source file to add a comment but not to change the name of the form in the editor: priceless! :-)
Admin
I suspect this is to stop an over-eager optimiser from throwing validDate away. I've had to do similar hacks in the past, but not for a long while....
Admin
If it was "CANNOT...." then I would agree. But putting an exception in code where all known/expected conditions should have cause a previous change in execution path seems quite reasonable to me...
Admin
What's wrong with globals?!
I'll have none of that fancy encapsulation malarkey around here thank you very much!
Admin
Admin
Admin
I did once work on a project whose leaders thought that there was something wrong with an if that lacked its else, and the official coding standard required an else for every if. In this case, the main compiler that the company used didn't accept empty code blocks, not even a standalone ";", so every else had to have a non-empty instruction. For some (a)esthetic reason, things like "i = i;" tended to offend the group's leaders and led to lots of wasted time explaining why the code included something so obviously stupid.
We did verify that the compiler's optimizer deleted such instructions, but that wasn't good enough, so most of us adopted the minor game of inventing cute code chunks that weren't obviously just fancy no-ops. All this did sometimes cause wasted time during debugging and/or adding newly-required tweaks, and sometimes the compiler wasn't clever enough to optimize them out. But mostly it just gave us one more source of geek humor as we found new ways of subtly insulting the intelligence of the people who impose such coding "standards".
Admin
And you call yourself an IT professional!
Admin
I can't quite see a use for this. Also any decent compiler would just throw the lot away in any case.
Admin
Admin
I am indeed an IT professional. That is why I wrote a PHP script that does the work for me.
Admin
Admin
Functions like that are used in functions which are called by a framework, and hence the framework defines the called methods signature. So, we may have something like:
Now, most compilers will give a warning, saying validDate is unused and can be removed. However, it can't be removed, as the framework is going to pass it when it call MyCallBack. So, they add the DoNothing function, just to keep the compiler thinking both parameters were used.
Admin
Those people are usually known as elitist wankers, and they say the same thing about VB and any other language they once saw used badly.
It's not the language's fault that idiots with hammers will try to treat everything as a nail.
Admin
No, but it is the languages fault that it's syntax is badly thought out, unreadable shite.
The symptom of lots of bad PHP code results from the morons unable to see just how badly designed it is, and thereby not steering clear.
Admin
In B4 grammar people succeed in not being funny, yet again.
Admin
public void ShouldNotReachHere() { // Uh oh }
Admin
the encoded message is "Please don't blame me. Code written below is not mine.It was written against me."
50,6C,65,61,73,65,20,64,6F,6E,27,74,20,62,6C,61,6D,65,20,6D,65,2E,20,43,6F,64,65,20,77,72,69,74,74,65,6E,20,62,65,6C,6F,77,20,69,73,20,6E,6F,74,20,6D,69,6E,65,2E,49,74,20,77,61,73,20,77,72,69,74,74,65,6E,20,61,67,61,69,6E,73,74,20,6D,65,2E
http://textmechanic.com/ASCII-Hex-Unicode-Base64-Converter.html
Admin
That "80s code" has been working bugfree for 25 years (most likely). These young programmers are always changing things, sometimes for no good reason, and are always introducing bugs.
Admin
I haven't been in the comments section for a couple of weeks ago, and everything has gone to hell.
Admin
Hey, now, that's different. A singleton is allocated on the heap rather than in the static data segment the way a global is, so you're much more likely to overwrite a singleton's data with bullshit when you screw up clever pointer tricks than you are an ordinary global.
That makes it much more bettar, right?
Also, a singleton requires much more boilerplate code than a global, increasing your SLOC metrics that the process team is looking at!
Admin
MOV AX, CS MOV DS, AX XOR DL, DL MOV AH, 08 XOR BH, BH INT 10 MOV BL, AL MOV AH, 08 INT 21 CMP AL, 1B JZ 0174 CMP AL, 1A JZ 0174 MOV AH, 0A MOV CX, 0001 INT 10 CMP AL, 41 JB 0133 CMP AL, 7A JA 0133 CMP AL, 5A JBE 0131 CMP AL, 61 JB 0133 AND AL, DF MOV DI, 01A6 MOV CX, 0010 REPNZ SCASB JZ 0146 MOV AL, 20 MOV CX, 0001 INT 10 JMP 010E SUB DI, 01A7 MOV AX, DI XOR DL, 01 JZ 0159 MOV CL, 04 SHL AL, CL MOV DH, AL JMP 010E MOV AH, 0A XCHG AL, BL MOV CX, 0001 INT 10 OR BL, DH MOV AH, 02 MOV DL, BL INT 21 XOR DL, DL MOV AH, 08 INT 10 MOV BL, AL JMP 010E XOR DL, 01 JNZ 0182 MOV AH, 0A MOV AL, BL MOV CX, 0001 INT 10 MOV AH, 03 INT 10 MOV AH, 08 INT 10 MOV AH, 02 MOV BL, AL MOV CX, DX MOV DL, 1A INT 21 MOV DX, CX INT 10 MOV AH, 0A MOV AL, BL MOV CX, 0001 INT 10 MOV AX, 4C01 INT 21 DB "0123456789ABCDEF"
Admin
(Fires up LINQPad)
Admin
Admin
Oh, great. You guys make it too complex. Simple Perl one-liner can make decoding that very easy.
Admin
Oh, and great. I was by beaten by voidptr in terms of speed. WTF?
Admin
Why is everyone writing programs when tools already exist to do this? Just paste the comment as input to "xxd -r -p" to get the answer. Real IT professionals know their tools!
Admin
There is more unix nature in one line of shell script than there is in ten thousand lines of PHP.
Admin
Here it is in the Lua interpreter console (very handy to keep open in a terminal for such quick calculations):
Admin
Poor documentation is a crime.
Admin
... and even worse: Zunesis!
Admin
Admin
Admin
Admin
If only there was some sort of manual which could be the correct place to put documentation. Perhaps it could look something like this:
Nah, it would never work. People would complain that the command name was sexist.
Admin
BASH anyone?
(why is this automatically double-spaced?)
Admin
Now I'll just have to assume it means that the add-in mentioned isn't ready for production use.
Admin
Leftist Linuxhandbuch (PDF)
The word root does not even exist in german language.
Admin
Fair enough moz... that sentence is really odd.
Admin
most people don't seem to realize PHP has a pack function...
php -r 'print pack("H*", "506C6561736520646F6E277420626C616D65206D652E20436F6465207772697474656E2062656C6F77206973206E6F74206D696E652E497420776173207772697474656E20616761696E7374206D652E");'
Admin
You shouldn't need to create a dummy function. (I've actually had to do this in some of our code. Yay MISRA compiler rules.)
Admin
Oh, here we go again.
There seems to be a regular cycle in the IT business. We regularly go through conversations like this:
Astute person: Hey, X is being used in ways that cause trouble. We should think carefully before using X, and make sure that we only use it in those cases where it is appropriate and helpful.
Simplistic person: You should never use X.
Authoritarian person; As the experts agree that X is bad, we have established a standard that we will not allow the use of X in programs written by this company.
Frustrated person: I can think of many cases where X is good. This is a stupid rule. There are some things that are very difficult to do WITHOUT using X.
Other simplistic person: Yeah, Frustrated has shown that X isn't bad at all. We should use it for everything.