- 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
If coders were paid by the line, VBers would wear out ther _ key within the first month on the job.
But then if coders were paid by the line, we'd all be working for like 1,000 lines per penny, because upper management would say a secretary can fill those lines easily.
And then people in India would beat you out because they'll write 10,000 lines for 3/4th of a penny.
Admin
There used to be an effort to apply a technique Function Points as a metric. It was supposed to be a standard measure of productivity that was independent of language used and didn't care how many lines of code were produced; only the amount of functionality that was implemented.
I never met anyone that actually used the technique and haven't heard much discussion about it in a while. Has anyone else?
Admin
I can very nearly buy off on this argument.
If you're doing maintenance coding, it makes a lot of sense to make incremental changes, and test to see if there are any "Cthulu calls" lurking in the code.
That said, untidied incremental changes become excremental changes...
Admin
Can you post what you would have written in place of these three lines?
Thanks :)
Admin
There is an Oracle SQL function to launder this in the SELECT clause.
In MS Abcess, it's Nz(), and it's similar to that in Oracle, I just don't recall exactly.
Admin
While I personally can't say much about it, that method of measuring productivity seems to be the defacto standard in the military, or at least it seems to be that way where I'm stationed.
I rarely hear anything about how many lines of code I've written, but much more about how well a particular section of the project works, and how much faster the optimizations make the product.
I think the reason you haven't heard much about it is because those who think it's bunk threw it away, foolishly, IMO, and those that think it's a Good Thing took it to heart and roll along with it.
Admin
It used to be very common, especially in COBOL shops. It's almost unheard of today. IME, when KLOC are quoted as a productivity metric these days, it's usually part of some empire-building middle manager's attempt to boost their status with bogus 'statistics' that sound good on paper but are really meaningless.
Admin
For Oracle, you would be thinking of the NVL function.
Admin
Poor old Burleson's getting a mention just about every WTF, now, isn't he? I'm sure we're great for business :) Note that his consultants are required to dress to standards set by financial AND banking institutions...
Admin
If I had been in your shoes, I would have simply rolled back the source tree to the day I left and picked up from there.
OTOH, I've worked in far too many places which either had no source control (and refused to let us set it up), or mismanaged it so badly that they might as well not have. In such places, I took to the habit of manually snapshotting the source files periodically; it never works as well and doesn't solve the other source control issues such as merging, but it was better than the alternative.
Admin
There's a SQL-standard
[foo] = ISNULL(foo, '')
too.
Admin
At a previous company that I worked for, we implemented a system to count the lines of changed code as the productivity measure. Great, except we also had a custom tool that expanded out variable list into FORTRAN common blocks. I inserted a variable near the start which caused all of the memory locations within the common block to shift in the tool output. Needless to say, my two line fix appeared as an 8000 line change for less than a days work. A week later, management abandoned that approach.
Good times
Dave J.
Admin
I suspect that the guy realizes that the dress code game is so much bullshit, but that his clients don't think it's bullshit and will pay handsomely if he plays along.
I'd find that sort of dress code odious, myself, but if I were billing $300-$500 an hour, I imagine that I could get used to it.
Admin
Just for the record, the redneck seems to have his own vanity publishing company, too:
http://www.rampant-books.com/
Oracle books, IT books, job interview books and the inevitable GuideHorse books.
His wife's oddly human looking, compared to himself.
Admin
Ah okay, thanks for mentioning that. It puts my mind at rest, because where I work, there's very few & to be found [:-)]
Drak
Admin
OK, here's the low-down on &'s... The W3C HTML standards (some of them, I think 4.0/4.01 in particular) define the amperand as the marker for entities, just as it defines the angle bracket as the boundary of a tag, since it will be infinitely more efficient for the parsing engine to treat them as such than, say, attempting to figure out if an ampersand is the beginning of an entity or a stand-alone character by performing multiple passes or backtracking. Because of this, every single ampersand encountered in the HTML mark-up must (at least *should*) be translated into its entity (&) -- and this includes ampersands within anchor HREF URLs. The parsing engine of the browser is supposed to make the translation seamlessly, and it works reliably in modern browsers. There are a few exceptions, one of them being JavaScript, where the HTML parsing engine takes the entire <SCRIPT> section and hands it verbatim to the JavaScript interpreter; so no "&"'s go in there, unless of course, you know you need them for something.
Other exceptions are data not handled at all by the HTML parser, like POST data (the form tag values, since they are HTML must use entities, but the data itself is posted to the server as their translated characters.) And of course, the Response.Redirect code, which will be processed by the server-side ASP/VBScript interpreter, not the client-side HTML parser, and then submitted directly to the browser in an HTTP 301 response (or is it 302?).
I just realized that I have posted a serious and technical response to a funny forum used to poke fun at other programmers. Jeez its early....
-dZ.
Admin
For a while I was working for a guy who gauged programmer productivity by their network activity. I set up a background task to loop through greps of source code to become a hero in his eyes.
Admin
Bingo, DZ-Jay.
Only HTML-encode things that are HTML.
Things that are not HTML:
HTTP Headers like Response.Redirect (although meta http-equiv tags ARE HTML)
The insides of < !CDATA[[ ... ]] > blocks including:
The insides of comments (although this doesn't matter)
The insides of < script > ... < /script > tags with type="text/javascript"
The insides of < style > ... < /style > tags with type="text/css"
etc.
Admin
The best explanation - and I mean explanation, as this code obviously cannot be justified, at least not without more information than we have - is that the code originally did something (or the programmer originally expected it would) and after changing it, the coder either overlooked the fact that the two clauses were the same, or else decided to keep it this way 'just in case' it turned out to be different after all.
The former error is an easier mistake to make than most realize, and just about every programmer has made it at some point - but the good ones notice it and fix it. Most cases aren't as obvious as this one; more often, one will have two clauses (or functions) which are coded differently, but actually have the same result (or very nearly so). It may take a bit of observation and careful thought before it is realized that the 'unrelated functions' can be folded together. A dramatic example of this was in an early version of Scheme: the language was originally designed to study 'actors' (what would today be considered a form of object), but the developers eventually noticed that the code for supporting actors was almost exactly the same as the code for supporting closures. As a result, the language was redesigned to only support closures directly, and an idiom was developed for using closures to implement actors, drastically simplifying the language while also making it more general.
The latter error (leaving duplicate code in case it diverges again later) is a frequently used 'technique' of questionable value to avoid losing existing code after it has been changed. It is especially common in shops without effective source control - the code is retained because there is the possibility, however remote, that the current change will have to be undone . As such, it is a defensive adaptation to the poor development environment; other common ones practice of commenting out code code rather than removing it, and making multiple duplicate copies of the source tree. The solution is to fix the source control, or all too often, implementing it in the first place.
Finally this 'technique' also raises it's ugly head as an anticipation error - the programmers think that the code may have to handle the cases differently in the future, and so wrote it this way 'just in case' so that it will be 'easier to change in the future'. While this may seem reasonable at the time, it is really a double WTF, as it not only uneccessarily complicates the current code, it almost always incorrectly anticipates the changes that will be needed, with the result that the existing code most likely will have to be scrapped and re-written with the effort put into the 'pre-fixed' code being wasted. Having made this mistake myself, I can see how a novice programmer can do this - but I also see why it is an error.
Admin
Heh. Yep, no source control. I advocated sourcesafe, but they wouldn't buy it.
Admin
Subversion is free... Don't know if it's better than SourceSafe, but it has everything I need...
Admin
CVS could have been a better alternative, but the only thing I knew about at the time was SS. I should have backed everything up on CD and kept it in a safe-deposit box before I left. Ohh well.
Admin
Oracle to Pay $8M to Settle Suit over Training Fees
By Lisa Vaas
May 16, 2005
Oracle Corp. will pay the federal government $8 million to settle a whistle-blower suit that charged the company with overbilling
for software training. According to a statement issued on Friday by the United States Attorney's office for the District of
Massachusetts, the suit was set in motion by a whistle-blower who was once vice president of North American Sales for Oracle University. The whistle-blower will receive $1.58 million of the total settlement amount. In the case against the Redwood Shores, Calif., database company, the United States alleged that Oracle submitted false claims for payment from 1997 through 2003. The charges were billed to various government agencies, according to the statement, and related to a contract between Oracle and the General Services Administration. Specifically, Oracle was charged with billing to and collecting from the government in advance of providing training; of "expiring" (i.e., forfeiting to Oracle) millions of dollars paid in advance for training services that weren't used within a one-year period; and failing to comply with Federal Travel Regulations in billing the federal government for travel and expenses. Although the government's statement did not disclose which federal agencies were overbilled, it did list those that sent agents to investigate: the GSA's Office of Inspector General; the FBI; the Defense Criminal Investigative Service; the Department of the Air Force's Office of Special Investigations; the Department of the Army's Criminal Investigation Command; the U.S. Department of Agriculture's Office of Inspector General; and the U.S. Postal Inspection Service.
Oracle Can Kiss My Ass
Admin
Admin
I've used FPA. Like all attempts to make estimates rigid, it basically doesn't work terribly well. Doesn't stop it being pushed as an ISO standard, though = http://www.isbsg.org/isbsg.nsf/weben/ISO%20Std%20for%20Functional%20Size%20MeasurementAnd it's better than LOC.
Simon
Admin
Actually I believe he was saying this:
if( you were serious )
{
You're an idiot.
}
else
{
You're an idiot.
}
Admin
also, that will through an exception if the user chops off the querystring