- 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
FTFY
Admin
Public Function makeBoolean(ByVal b As Boolean)
End Function
Admin
But at least this manager realized the programmers were on to him. No more counting semicolons after that.
Admin
Admin
Amateurs. You're not checking for half the possible cases.
Admin
The generic version:
Admin
No, far better to be popular than be good at your job.
Admin
Admin
Admin
I see this as a failure of F#. If it was easier to grok, you wouldn't have so many horribad VB submissions. Instead, you'd get really funny attempts at "functional" programming.
Admin
Addendum (2011-04-21 11:09): Nevermind - it does return an object, since there is no "As T" at the end.
I hate VB.
Admin
They are still there in VB.Net and are still better than the WTF in the article. Of course, VB.Net now has CType to expand the old pattern to support any type and DirectCast which is analogous to C style casting. CType is a little different from a traditional cast in that it will attempt to perform an implicit conversion if a cast is not possible (for example, integer to string).
Admin
It's usually called a "complement sandwich" and a well known passive-agressive management technique for delivering criticism. I think QJ's is much more acurate, since I would never expect a real sandwich to be named by its bread only.
Admin
This is obviously done for logging purposes.
If you make sure that these functions are called for all variable initialisations and assignments, you can insert textfile logging into each function, thus ensuring that you have the best possible insight into why it runs so slow.
Admin
This is troll comment example I always tell people. If all programming in the world took place in java, we would be better off 100 times than before.
Admin
Excellent comment. I make note of this!
Admin
We have reviewed your units of software count for the previous month. Unfortunately, although your units of software are elegant and correct, your count is less than the units of software count of your peers. Therefore, this company no longer requires your services.
Admin
Admin
I made troll comment and you're first bite.
Admin
Obligatory askimet bait:
http://www.youtube.com/watch?v=ewIT_KAQQlU&feature=related
Admin
Admin
Your ability to troll is, without a doubt, exquisite.
Unfortunately, not a single person finds your tired act funny. For some special people, it's just a little more difficult illicit laughter from others. This is OK.
I can tell by the number comments you make that you are a very hard worker. I believe that if you applied yourself, you could achieve anything.
Admin
Okay, I think we can establish now for sure that hoodactius and nagesh are the same person.
Admin
Hrm. Maybe a different approach needs to be taken:
Admin
Wow!
Admin
Admin
Admin
You know, that is actually a very valid point. I once interviewed for a company that had absolutely no development environment. In fact, all of their developers (there were more than 5 at the time) would work on production files. When I asked if it were permissible to install and work off of a development environment (i.e., on the local work station), I was scoffed at as if this was some crazy idea. Thankfully, I never did get that job.
Admin
At least I know the difference between C++ and SQL.
Admin
50 % of your comment (line count) is redundant!
This was already clear when we read the line: If all programming in the world took place in Java, then you would not try to counterfeit an indian programmer.Your not so smart, are you?
Admin
I'm not so sure, I thought they were life partners. The real question is which one is the top and which is the bottom?
Admin
Admin
Anyway, are we allowed to talk about him here?
Admin
Admin
I, personally, am offended by the "makeUShort()" function.
And I get enough spam apparently generated by the "makeULong()" function.
Admin
Admin
Admin
Admin
This comment made me laugh so hard I got a few funny looks.
Admin
And drinking beer, drinking beer is very important when you're padding out company time.
Admin
If you delete a 2MB file of bad code, does that count negatively on your production?
"Well, I'm pleased you got that entire project finished in one week, but unfortunately it says here that you only wrote four lines of code." "... well, that's..." "In one week. Do you know how much code the other members of our 'TEAM' write in a week?" "But they..." "And this project only took four lines, I mean what were you doing the rest of the time? Should I have doubts about the other estimates you give me?"
Admin
If you want me to go on arguing, you'll have to pay for another five minutes.
Admin
MakeFloat is missing.
Admin
The idea might be similar but (from what I understand) this approach is really just silly wasted lines of code.
Depending on the types and your compiler setting, VB.Net will either allow an implicit conversion (in which case you wouldn't need to call any of these make* functions, the compiler would just let you use a double as an integer without calling makeInteger(myDouble). )
In the situation where the compiler will not allow it (either because of Option Explicit being set on or because the types don't support it), you'd need an explicit conversion. So, your call to makeInteger would have to take an Integer as input.
The code would end up looking like this....
Dim myDouble as Double Dim myInt as Integer
myInt = makeInteger(Ctype(myDouble, Integer))
When you could just do
myInt = Ctype(myDouble, Integer)
And in the implicit case; instead of
myInt = makeInteger(myDouble)
You could do
myInt = myDouble
Some people would argue that the last example is an invitation for bugs. But they'd probably tell you to turn Option Explicit on and the compiler would disallow it, or, if you want the code to be more readable, use the built-in conversion options CType or CInt()
If I'm understanding it correctly, it's just extra code that doesn't really accomplish anything. The person who wrote was either trying to inflate the line count/function count or (more likely in my opinion) wanted to avoid the implicit conversion and felt that his or her helper functions made things 'more clear'.
Of course, it wouldn't be the first time that I've completely missed the WTF.
Admin
Lines of code measurements never heard of writing in APL (Iverson, c1963). There you could do a WHOLE project in one line and take DAYS doing it. Even more time debugging it as well.
If you want a metric, try counting parenthesis in Lisp (Scheme), it gets quite a ratio!
The only true way of doing reasonable metrics (which are useless anyway) is wiring them into the compiler. It has to unwind all the junk people write anyway, so it has a better idea of what is going on.
Admin
Dim a a = 4.9 Dim b b = makeInteger(a)
Admin
ISWYDT...
Admin
It completely fails to account for the need to turn in large amounts of code in order to satisfy management's inane metrics (and thereby get paid / promoted)
Admin
In that context, I shudder to think what the makeUShort would entail.
Admin
It has nothing to do with the validity of code; I was simply thinking of a different way to count lines of code - with respect to developers trying to game the system by adding useless semi-colons and whitespace, etc.