| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Page 5 | Next » |
wow. there goes a real asshat. |
|
WTF is with these asshats programmers and their IsTrue, IsEqual, what moron would USE these, let alone WRITE them.
People like JED should be exported to india. |
|
Ohh my f***ing god !
I just love this part:! // need to set the result if it hasn't been set yet, we'll randomly decide true or false |
Re: Happy (Belated) Jed Day!
2005-09-09 14:15
•
by
John Smallberries
|
|
OMFG.
This guy is just a monumental waste of carbon. |
But why would you want to give people like Jed our jobs? :D |
|
wow. I've seen stuff like this in the wild... and given I can read, but not write delphi code... WOW. I dont think his implementation of his homebrew exceptionhandling is where the WTF ends... looks like a huge cluster. |
|
It's obvious that the functions he wrote were meant to be humerous and to waste his time.
|
|
Methinks Jed needed to lay off the cough syrup a bit.
|
|
My favourite line:
// count the number of true expressions (WARNING: COMPLEX CODE AHEAD!!) |
|
Having been a Delphi developer for years, since version 1.0 came out
for Windows 16-bit, I can tell you this guy doesn't represent the vast majority of Delphi programmers out there who do know OO basics and certainly would never pull shit like that. That being said, this guy is probably on the same wavelength as the crakz and hax0rs who use Delphi to write the single-exe cracking utilities I've seen proliferating here and there on the web; most of whom believe in their little hearts that because they have a grasp on how to write procedural Pascal within OO-Pascal programs and can drop to assember with the ASM keyword, they are "leet". Of course, there are a bunch of bad Delphi programmers out there... if you ever use an application and see an "Access Violation at address 0xDEADF00D" while doing something in the app, 99% of the time it's an inexperienced Delphi coder. |
|
upcomming jed methods... MostlyTrue and for those who still get confused by the concept of negating a value NotTrue |
|
I don't know Delphi but wtf? TrueCount:=(1-1); // get 'real zero' Is 0 not 0? There HAS to be some logic behind this madness.
|
|
On further reflection, the company I work for now "strongly encouraged"
my predecessor to leave the firm... who also was very adamant about not ever raising exceptions (in VB) and using what I like to call a magic variable called "bContinue", which another nameless soul who also was terminated used in his C++ code to track errors through the course of method execution. /* sigh */ |
|
My guess is that guy liked to goof off a lot, and found it more
interesting to f*ck with the heads of future maintainers of his code than do real work. What's sad is that if he had so much time to write satirical functions, why didn't he use more subtle humour and REALLY mess with the poor saps that would have to read his code? Ah well. |
Yeah, you don't want your code to be politically incorrect. The ACLU may come down on you. "Equal treatment for true AND false! Equal treatment for true AND false!" |
|
I tihnk this guy is most closely the Alex Chiu (http://alexchiu.com/) of programming. That is, apparent ability to be prolific (in the sense that he can write a lot) while having almost no idea about real patterns, methodologies, etc.
Also, lines like "WARNING: COMPLEX CODE AHEAD!!" indicate he thinks most people won't be able to understand his, ahem, brillance. A couple helpings of humble pie and a real computer science education might turn him into a decent coder. |
|
My favorite line:
4 possible outcomes?!??! Good thing he numbered them. I would have lost track had he not! |
|
Re: Happy (Belated) Jed Day!
2005-09-09 15:01
•
by
Disgruntled DBA
|
// if the auto-breakout feature hasn't kicked in yet then "there is a serious problem"... |
|
"Jed" often used constructs like the following:
case IsPositive of True: begin // ... end; False: begin // ... end; end; Where 'IsPositive' is a method parameter of type Boolean. This works as long as the caller always passes a 'real' boolean, something where the ordinal value is 0 or 1. As soon as some joker passes in something like Boolean( 3 ) the case will drop through without matching either True or False. An IF statement tests the ordinal value of the variable against zero (effectively), so it will never fail under these conditions. When I pointed this out to "Jed", he saw the error of his ways. Thereafter he always wrote this: case (IsPositive=True) of True: begin // ... end; False: begin // ... end; end; |
|
I'm sure he was just laughin his ass off. Reminds me of a brilliant
friend who wrote a 370 assembler macro that chose registers at random so as not to wear one out by overuse. |
|
I find one thing odd about all the people I have encountered who prefer HResults and reference paramters in languages that support exceptions: They don't emulate a specific well-know system like C (HResult), they do something different. And most of them ignore the result.
|
|
<sarcasm>I don't think I could have understood his code w/o his helpful comments</sarcasm> This has to be debugging code. No one would create a moretrue function would they? I think my favorite comments are: What's up with all the quotes? |
Glad he included the "4". Here I was thinking that 2^2 == 0. |
|
whoever wrote this code deeeeeefinitely realized how assinine it was. not a true wtf....... |
|
U Think Jed talks to Obi-Wan Knobi?
|
There are some people even we tolerant Indians won't accept 8-) |
Agreed. There are so many true wft's in his code that I couldn't decide which one to submit first. It is also difficult because many of them are architectural in nature and difficult to convey in a code snippit. I thought that this would be an entertaining introduction. I will endeavor to extract the more compact WTF's and submit them. |
|
"ShowMessage('there is a serious problem');" Whew. Almost lost my lunch there... |
|
Ah, before this I forgot that Delphi had goto. Thank you Jed, for opening my eyes to a whole new world of possibilities. ;)
|
|
I hope it wasn't this JED http://www.jed-software.com/
He contributes a lot to the Delphi community. |
// need to set the result if it hasn't been set yet |
What do you mean? How else are you going to ensure your 500 line method has a single exit point? |
|
Anyone noticed that IsTrue - and therefore the other functions - don't
work at all? IsTrue looks like an infinite recursion to me. So it's not only a stupid joke, it's also dangerous - a coworker might be tempted to use MoreTrue if he needs it for some reason. |
Re: Happy (Belated) Jed Day!
2005-09-09 15:44
•
by
Michael Casadevall
|
|
This looks like Pascal more then Delphi (although I haven't use either language that much).
If this guy just learned some coding shortcuts, he could write some good code. |
I find it interesting that the IsTrue function is potentially recursive. Not that this will actually ever happen, but... It is also intersting that Result is initialized to a random(!) true/false value and then later checked to see if it was set and if not, set to another random true/false value. This is one of the most beautiful things I've seen in a while. It mean that I should have no trouble finding work when the need arises. |
Use a *heavenbeware* GOTO? Throw the same exception at the end of every possible execution path? BTW: What's the reason for trying to have a single exit point? It kind of forces you to write smaller methods, which is mostly a good thing; but if you keep your large methods and fill them with lots of nested ifs, magic bContinues or similar your code will hardly be more readable. |
|
Damn it, I've got a lot of work to do this afternoon and this post just made me dumber, thanks alot thedailywtf.com
|
Oh, I see the WTF now. Jed only needed to get one random number and compare that to a non-random number like this:
He's wasting a call to Random! |
|
OMFG! This is the worst code ever. It's even worse than the code I saw in the Hotel Reservation System from Hell. The entire design was terrible but the guy's mind who actually wrote it wasn't even as half as twisted as Jed's. Unbelievable. I couldn't imagine someone could write such a masterpieces. Numbering your variables and adding comments what are they about could be a bad habbit from the old days of Applesoft Basic or some other ancient machine where you can't have more than 2 letters and a number for your variables, but what I see here ... are you sure you didn't alter his functions intentionally? That looks like a result from a competition "Who will write the worst code about operators and simple functions". Any chance to see something more complex from this guy? Like a function to sort 2 arrays for example, hmm?
Actually Delphi is the name of the RAD (rapid application development) product from Borland using ObjectPascal to write the code. And object pascal on it's turn is actually pascal with a number of additions like classes and properties (the list is long actually)
No way! I wouldn't hire anyone like him - it's a terrible waste of time - he needs close guidance for at least a year until he un-learns his bad habbits and figures out how to write normal code. Now I see why 3/4th of the people who apply for a position don't even bother responding after I ask for some code they wrote. |
great and how will you call yourself for defending the person who wrote the original code? May I suggest a five-letter word starting with "m" and ending with "n"? in my company a person like Jed would not only be fired, but I would charge him for the extra time, other developers would need to clean his crap. |
Gotos are bad. Returning from the middle of a method is a goto. QED. |
|
"bContinue"? And you're from the philadelphia area? Please, PLEASE give me this person's initials! I worked with a bunch of incompetent morons about 5 years ago whose code was riddled with "bContinue".
|
Delphi is, essentially, Object-oriented extensions to Pascal called "Object Pascal". Recently, Borland decided to just call the language "Delphi". |
Correct. You will need the following to compile and test it: type TExpression = Boolean; Running it will get a 'Stack overflow' exception. It would have been more entertaining if it would recurse to random depth I think. |
'Pon my honor, this is as-written.
I'll see what I can find in the utlitity libraries he wrote. Most of that code is quirky, but not terribly WTFish. Most of what he produced is in the screwy overall architecture of the application. It's very difficult to modify and produces some devilish bugs, but the errors are so widespread that its hard to point at a particular piece as an example. |
i can see how my quoting was a little confusing. i meant to trim most of the HUGE post, and in retrospect, i should have chosen a better portion. i wasn't really paying attention. i think we are in agreement that JED is the asshat. |
Re: Happy (Belated) Jed Day!
2005-09-09 16:38
•
by
Gene Wirchenko
|
"Equal treatment for true AND false! Equal treatment for false AND true!" Sincerely, Gene Wirchenko |
Re: Happy (Belated) Jed Day!
2005-09-09 16:40
•
by
Gene Wirchenko
|
I hope you are not serious. Sincerely, Gene Wirchenko |
Re: Happy (Belated) Jed Day!
2005-09-09 16:41
•
by
Rudy Velthuis
|
|
> I hope it wasn't this JED http://www.jed-software.com/
> > He contributes a lot to the Delphi community. Very unlikely. Jeremy North is in Australia. |
| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Page 5 | Next » |