- 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
"ingenium" - readers of the Daily WTF are members of the ingenium.
Admin
jaime, in C I remember we always are told to throw exception to the highest caller or was that C++? i m having memory trubles.
Admin
My god, with an eloquent response like that, we should obviously listen to you! Why don't you enlighten us all with the Right Way (TM) professor? I mean, clearly my years of experience cowers next to the intellectual prowess of someone who can only muster "I don't think"...
It is you who should try again.
Admin
Yes.
Admin
Your instructor is wrong. There are certain conditions when you do want to do that.
Admin
Win.
Admin
Your facts and logic are flawed. A person who writes good code will suddenly write bad code just because they get a degree?
Admin
Admin
I agree, moving to Delphi is a much bigger problem than lack of source control.
Admin
That wouldn't be a WTF.
Admin
if a lot of code has changed in the file, then even with diff it may well take 10+ minutes to find which particular change is responsible.
Admin
Name me any programmer and I will show bugs in their code.
Admin
Show bugs in their code I will if 4 programmers you name.
Admin
Admin
Something like this bit us on the ankles recently. Our in-house signature app uses a 3rd-party piece of s...oftware called "lex" or something which makes some stuff easier, apparently.
We recently upgraded to a new version of our in-house app. Ran it, it exited immediately (within the first few seconds). No error messages, no logs, no nothing to help us. Embarrassing as we were on the client's site at the time. Back in the office the software dev guys pondered it, then suggested we install a version of lex.jar from a few versions previous. This we did. Excellent - it sent a message to the log we'd been expecting to see something in to the effect that the jre was off kilter - and we could work out what had gone wrong from there.
The WTF, of course, is that this later version of lex.jar no longer writes out its helpful stack traces to the logger. We know now to include "lex.jar_old" to our environment so we can swap it in as needs be when the s...oftware hits the fan again.
Come on, say it, "the real WTF is using java". Sorry, but there we are, that's what we use, it's what I do to make money.
Admin
Oh we did, we did. Mind, the only thing British about BP is the name, we sold the company to the US a long time ago. But why should we care? It's not our beaches.
Admin
you are making use of even poorer gramer than I am.
Admin
Sorry,but java's superiority is unmatched and style is also good.
Admin
He is looking for starting flaming war.
Admin
With out project, it takes "The Vista Fix" a step further. There is a requirement that every user interaction, MUST be enclosed in a try/catch block that dutifly hides all errors from ever being shown to the user. We instead log the error to an internal table. Never mind that no one ever looks at the table. What caused the error makes no difference - corrupt data? Just trap and log it - then dutifly ignore it. We're not talking about a few error per week - we're talking several thousand a day. The end user must never be allowed to know that an error occurred. The end result is management is now entirely convinced that everything is working just fine. The fact that wee lose data every now and then is consistently blamed on applications that have been in place and operational without any issues for many years.
Admin
Admin
No, but everyone writes bad code. They may think it's good code at the time, but come back to it in a year's time, and they may think differently...
Admin
Admin
People who learn how to write code by getting immediate hands-on experience maintaining an existing system, learning to program by imitation, are frequently better at writing computer programs than those who have learnt in an academic environment where the examples of code being generated are perhaps artificial and divorced from real-world apps.
It is also often the case that graduates of computer software courses have handed in assignments which may have been the result of collaborative effort, thereby not providing a truly honest appraisal of the ability of the student.
When that graduate appears on the doorstep of a place of industry, it is more likely that the reputation of that graduate will be sufficient to ensure that the task he/she is initially assigned will be more demanding than that of the new starter mentioned above. Hence the chances of that new graduate making a less than successful job of the task assigned are that much higher.
Hence the reputation for CS graduates to be worth less than those who have learned their craft the hard way. Whether these things are generally true or not I can't say - but the colleagues of mine with the fanciest degrees and diplomas in computer-related disciplines have often been those whose code is of lowest quality.
Admin
Ah,
, the bane of competent programmers everywhere. I have nightmares of slogging through an absolute cesspit of Classic ASP w/VBScript where every one of the 1000+ pages had that blasphemy plastered across the top, allowing the "senior developer" to merrily hack his way through trial and error. Try something, whoops that didn't output, let's try something else... viola, instant application! Many cases removing said blasphemy would cause the page to stop functioning because there were several cases where the "senior developer" had been calling methods on objects before the object was actually instantiated. I still have nightmares thinking of that code because trying to fix it (not even rewrite the slop) would have taken, I estimated, about 3 years.Admin
Indeed. I love java, despite its perceived flaws. Never got on with C. Ho hum.
Admin
"... viola, instant application!..."
Another one for the orchestra pit, Igor ...
http://en.wiktionary.org/wiki/voil%C3%A0
now go and learn it.
Admin
Don Knuth?
Need to think of 3 others, though.
Admin
/captcha: minim ...um
Admin
Not the Orchestra Pit! Anything but that! I'll take On Error Resume Next over the Orchestra Pit!
Admin
Admin
As for the pattern this would force being considered good in C: There is a difference between disabling a tool and not having it in the first place.
Plus, with the code actually under discussion, it seems doubtful that error codes were being checked after every call (or ever). (Not that that never happens in C.)
Admin
setjmp / longjmp. So yeah, it does.
Admin
Tequila shooters. Then the user can't see the errors, the user can't understand the data, and the inverse function of the tequila infusion will create a self correcting system.
Get off my barstool, kid.
Admin
Admin
I've used this in some VBS scripts before. I added my own error handler such as "if Err.Number <> 0 Then" and added error handling code. Of course, in VB6 you can have it go to a line or label.
Admin
The double-standard is that when VB programmers forget to check their error codes, VB is a bad tool. When C programmers forget, C remains blame-free.
Admin
Well, that's the proper way to use it. But most people who use it just plaster it at the top of every code file and then don't even bother to check any errors, they just hack away.
Admin
This code is provided "as is" without warranty of any kind, either expressed or implied. In particular, I disclaim all liability for any direct, indirect or consequential loss, damage, injury or death resulting from its use.
Admin
Incorrect. VB6 exceptions will bubble up the call stack looking for an active handler. Only if the exception reaches the top of the stack, or a break in it, without being handled will the application quit.
Admin
Admin
Admin
BTW, I'm still trying to figure out your rationale for saying that I've never programmed in C. I can see the guy who mentioned longjmp saying it, because he actually noted a feature of the C Standard Library that I strategically ignored (it's a library function, not a language feature). However your argument seems to be: You mentioned that C programmers sometimes forget to check the return code of functions, here's some C code that doesn't check the return codes of anything and recklessly uses a zero pointer, ha - got you.
Admin
Lest software developers feel unique, this is also true for hardware technicians. Can't count the number of times I've had to show someone with a fresh cert or degree how to use a voltmeter or even something as painfully simple as a magnetizer.
Admin
Good call. Are "sandwich courses" still on offer to students? Industrially-sponsored degree courses in which academic terms are alternated with periods of direct industry apprenticeships. You end up with a generation of electronic engineering graduates who know how to use a soldering iron and even (in extreme cases) welding equipment. Happy days.
Admin
Admin
There were tons and tons and more tons of those in an order system that I maintained at a previous employer. They would obvioulsy produce all kinds of seemingly completely random results, and they were a complete pain to try and fix
We kept finding bugs that had been there since the application was brand new, but since the application just resumed the next line when the Sub crashed, they had never been noticed.
I'm no longer with that company.
Admin
You realized that CS degree are not the only one giving "structured thinking", or, for what it matters, programming lessons ?
Admin
I demand this be turned blue, Alex.
Admin
God, no. XP is vastly superior to 2000.