- 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
The most important is carry_on(). That one actually does something before returning. It adds 60's and 70's British comedy to your code.
Admin
I guess he never heard of cygwin...
Still, MS behavior irritates me, but it isn't worth that sort of hassle.
Admin
Admin
VB is already an ugly syntax with its insistence of using words as code block delimiters. But it seems like whoever did this code didn't think that was enough, as it seems like begin() works basically as a code delimiter.
Or maybe, just maybe, begin() is actually the Call of Codethulu
Admin
Admin
The BallRog giveth and the BallRog taketh away.
Sometimes I wonder what goes on inside Steve's sweaty little Marketing Guru head.
Admin
Oh, wait ... there's no difference, is there?
Admin
Nah. It needs to be the other way:
Then 19 can be defined on 20:
Then the in_(18) function:
See? That way there's only one actual expression to maintain, in the in_(20) function. Everything else gets defined on the 20 parameter version.
Greatly reduces the potential for bugs in the system.
Admin
A lot of us work on multiple systems. I work on multiple systems. Windows, Mac, Linux, SCO Unix. I don't alias the commands.
It sounds harsh but it's always just seemed to me to be a redneck way of doing things. They only help in the most basic situations. Even 'ls' does not behave like dir, and they do not support the same switches. The syntax for creating loops is fairly different. So you'd need a lot of aliases. Why go that far for what amounts to putting matching lipstick on a variety of pigs?
I really wouldn't call it snobbery. It's not like the practice hurts anyone, but you shouldn't be above getting ribbed for it a little, given its hackish nature.
Admin
If a constructor for a class is good thing, then a constructor for each method must be even better, right? The only downside is that you have to roll it yourself.
On top of that he is promoting code reuse by having all the method constructors call the same block. He just hasn't written the massive case statement that uses reflection to determine which block called it and execute the appropriate intialization code.
And you guys were skeptical. Sheesh. This guy is a pioneer!
</sarcasm>Admin
Well, we're about fifty-odd posts in, and AFAIK, nobody has yet mentioned the oddity of naming a file (with any extension) "CustomerClass."
"Class"?
I first realised that I was sickening for something, possibly a gin and tonic, when it occurred to me that I actually understood the VB.NET. This will never do.
I then started to think about the naming convention. What is this? Is there a "CustomerObject.vb"? And, if not, what's the purpose of adding "Class" to anything? (Not that there is any.) I mean, it's not as if there's any useful-type Hungarian notation prepended to the file name to let us know whether or not it's NQOT ("Not Quite Our Type").
Maybe it uses .NET reflection to automagically generate a CustomerObject.mdl file. Yes, that would be it. It's VB.NET masquerading as Smalltalk! First Class!
However, on reflection, you could have a point here. It's more likely to be VB.NET masquerading as a true functional language that relies entirely on recursion (good luck on avoiding the side-effects of ON ERROR RETURN NEXT, but I assume that's an exercise for the reader.)
Finally, VB.NET embraces Greenspun's Tenth Law!
PS. What are the other nine?
Admin
Doesn't solve the issue of being a massive WTF, but it works.
Admin
This has actually gone through several revisions of 'optimization'. The begin() method used to contain 'sleep(5)', and has since been optimized 5 times.
Admin
My guess is that he uses the context menu to right-click on the function and then clicks "Definition", that way if the "Begin()" function is at the "beginning" of the document, the cursor goes up there and he is at the top. So that shows another WTF, he didn't know of the "Ctrl+Home" key combo to do that.
Admin
This joke is getting more annoying than good ole' fist, because at least the fist people know they're being stupid.
Admin
myArray.Length == Array_Length(myArray.Length) + 1
Or you could replace "while(i < myArray.Length)" with "while (i <= Array_Length(myArray.Length))". Whee?
Admin
No they aren't, that's what the Overridable keyword is for. Before you jump on others' VB knowledge, you may want to check your own.
Admin
how about go_to() and come_from() ?
Admin
Um, the overridable keyword does not make a method virtual or not, it just determines whether it can be overridden.
Unlike other languages (that are inferior to VB), in VB you do not have to specify virtual in the declaration in order to get the virtual behavior.
I bet my little finger has forgotten more VB than you will ever know.
By the way, I have passed THREE BrainBench assessments in VB, and scored over 90% on a MeasureUp assessment. My company will be paying for me to pursue the MCAD next year, so I think that tells you all you need to know about by qualifications.
Admin
We should all learn a lesson from this. Maybe THREE lessons.
Admin
or, use the params keyword. I know C# has it, and i'm just assuming vbnet has it too.
then loop through all of the items ...
Admin
Okay it is clear that the author comes from a Pascal or Delphi background.
What would be really the icing on the cake would be if they went back to using Delphi and then made that look like VB!
Admin
CEE probably stands for Customer ENTERPRISE Engagement.
Admin
Admin
Admin
Eek!
Well it's still damn ugly :D
Admin
Admin
This must be the most evil code I have ever seen. Why should an odd number of parameters cause an exception?
In VB6, we don't need all that horrible overloading nonsense, we have variants!
Admin
Perhaps he needed somewhere to put breakpoints.
Admin
Admin
One can only assume that he was paid according to the amount of code he wrote, what other logical conclusion can you draw about a man who creates functions that do nothing, and the proceeds to call them from absolutely everywhere?
And I can just imagine that once he finished, they had a guy review his code, note the dishonesty and promptly fire him with no payment.
Admin
Plz send me teh codez
Admin
Absynth Oriented Programming.
FTFY
Admin
You must be new here? Codethulhu predates MFD.
Admin
I wanna feel what begin() does I know you can show me
Now this vb I must fix Feels like a world upon my shoulders Through the goggles I see these horrors It makes me die inside a little more
In my code theres been end_block() and none() I dont know if I can face block() again Cant stop now, I've travelled so far To fix this CEE system
I wanna know what true_() is I want you to show me I wanna feel what true_() is I know you can show me
etc.
Admin
You are all fools! He was using this project to create artificial intelligence. He needed to teach the code every possibility so the computer will gain awareness.
Admin
They should not be allowed to touch computers.
Admin
Admin
They're not liked pairs, it's just checking if the others match the first one.
linq will make same values share the same index, so if something matches (0), it will be omiited.
Admin
Why not add some goto's too...
Admin
Note to the editor:
It's slightly odd that the name of the software changes from CEE to ECC after the submitters' romp through the madness.
:).
Admin
Why not just the "Of" keyword
Admin
My best guess is that it allowed him to drop in checkpoint and trace routines on demand without going straight to the code in question. Not saying that's the best way to do it, but, if the guy was a converted Microsoft Basic programmer, it may well have been a technique holdover from those days.
Set a global variable, write an alteration to the begin() code which only printed out location and/or variable states when the global was set (multiple values, too, if you wanted to be more subtle), then run it. Voila. Code tracing and desired variable dumping made easy. The biggest flaw would be his lack of comments to that effect, so someone else would understand the otherwise absurd behavior.
Admin
This looks like generated code.