- 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
How well do you think such a product would compete against a developer who knows about the /nowarn compiler option or the #pragma tags?
Admin
In the eyes of a manager? Fairly well I'd guess.
"Hmmm, well they're telling me there's too many compiler warnings.... I don't know what those are, so I'll ask Google..."
First hit: "Want to get rid of those annoying compiler warngings?"
"Yes! I do!"
...well, you see where this is going...
"pragma? never heard of it. Look, I already spent good money on this Warn-Away, so let's just try that and see how it works.."
"Look no warnings! No, we don't have time to "actually fix things" I'm moving you to a new project..."
Admin
Admin
We had a client who was reporting that, if the clerk were to press the Break key at "just the right time", our program would start reporting the wrong system date/time. (Only that instance of the program. It wasn't a system-wide thing.)
Turns out that, under "just the right set of circumstances", our interrupt handler could cause a buffer overrun, and the memory following our buffer just happened to be where the runtime library stored the timezone info.
That was a load of fun (FSVO), given that the compiler vendor didn't supply runtime library source, nor was the timezone info stored in a location visible outside of the library (so there wasn't anything like "look at the memory pointed to by the __TimeZone variable"), so we couldn't readily debug the call which returned the current time.
Admin
This remidns me of a temp job I had as software tester for a company making hospital software. The parts in the testscripts involving modules that got removed versions ago (and nobody told me that they got removed) left aside, I followed the tests to the letter, including the general "check for GUI inconsistencies". I reported everything I found, going from testing steps that simply failed, blocking the rest of the tests, to buttons that did one thing on one form and then the same button doing something completely different and unrelated on the next one.
At one point, the guy in charge came in to complain I shouldn't file so many bugs, since it meant "he had to close all of them." I didn't file any bugs since, so that guy was happy, and a few days later I was out of there. I'll never ever go to one of the hospitals using their bug-riddled software, though. Too dangerous.
Admin
"For some inexplicable reason, the system processed 91.4956% of the 341 receipts. Of the remainder, one is corrupted and the rest weren't processed at all. Why would that be?"
Admin
Admin
Mbarrasingly nough indd.
Admin
Eezer Goode, Eezer Goode He's Ebeneezer Goode
Admin
However, is there then any point of having a StackOverflowException class at all? It will only ever be instantiated right before the process is terminated, and nobody will even get a chance to touch the SOE object.
(It appears that you're allowed to construct a StackOverflowException object explicitly and pass it around in your code as long as you don't actually attempt to throw it. Good luck convincing anyone that such code belongs anywhere outside compiler/VM regression test suites, though).
Admin
Burn, Java, burn in Hell. Easy for programmers means more morons in the industry. Mwa-ha-ha!
Admin
At least log the exception!!
Anyone else cleaned up crap code like that by globally running regex replace statements in VS?
Admin
Du-uh. This is not java.
Admin
Unfortunately code like this do exist, I have cleaned up my share of it from an earlier colleague that used on error resume next in VB to handle errors in a software that ported customers from an old version of one of our systems to a new one.
Any rows than did not get copied had to be replaced by hand afterwards, his reasoning was that that was faster than trying to fix the problems to begin with (problems being missing or bad formated data in the original database).
Unfortunately some lines was usually forgotten causing problems during several months before the customer was fully operational again.
Thats why you always should have code review, to catch the lazy errors.
Admin
No, its probably C# ,there you can write like that, even though you should not for obvious (you would hope) reasons.
Admin
The way I read the comment was as a demonstration of alliteration featuring today's letter.
Admin
Yes, because generally they can't speak English properly and have sub-standard education. The language barrier also means it is hopeless to read technical documentation / books because there is no real understanding. I have no idea how these people get into IT apart from the fact they are cheap. You get what you pay for!
Admin
Of course, what they should have done is create a custom logging function which takes the exception as a parameter
try {
}
catch (Exception e) {
log(e);
}
of course, thats almost like doing nothing at all
captcha: quibus, a group of arguments
Admin
of course, is that a natural function anyway?
captcha: ratis, somehow related to rattus rattus?
Admin
Hehe.... I was actually going to take 3 whole months off, but now it will be 2½. Not just holiday though, parental leave also. I get 12 weeks parental leave (per child), plus 5 weeks holiday plus the 9ish public holidays. All with full pay.
I am male btw
Admin
Feature that comment.
Admin
uuh, i've 4 weeks AND pay the dept of the states at the Mediterranean sea. awesome idea, germany...
Admin
You're not paying it, you're lending it. Big difference.
Addendum (2011-07-07 09:08): And at a higher interest rate than the interest rate your country pays to the markets, at that. So all in all, you're actually making money!
Admin
Free Money! No could possibly go wrong there!
Admin
_collection.Add(new BusinessObject((MyType)r["FieldName"]));
in the lambda statement.
Admin
It turns out the CLR sometimes performs tail call optimization.
So this code indeed implements the given specifications ("retry till it works"), but is very specific about the CLR and CLR configuration.
Admin
Has anybody got any Veras?
Admin
If I were to define that function it would be base 10 (or not define it at all). Why can't languages simply use ln for natural?
TRWTF is languages that deviate from normal math symbology on just small details, so unfamiliar people think they know it all...
Admin
The tail optimization goes through catch blocks? Tat it is quite an advanced compiler feature.
Admin
Admin
I admire your epeolatry, by the way.
Admin
You can approach this from both ends: reduce the number of compiler warnings, and reduce the number of users. Sounds like this strategy will accomplish both eventually.
Admin
Admin
Admin
Don't forget the "wearing sneakers and baseball cap" bit.
Admin
Similar to the french who eat a block of heavy cheese deep-fried in butter wrapped in a crepe with chocolate spread stuffed in a croissant stuffed in a baguette followed by an entire bottle of cheap red wine and a pack of cigarettes.
And add to that the stress of working 73 whole days a year with only 50 sicks days...
Admin
Somewhere I read that the french are, per hour, some of the most productive in the world. Makes sense, as they aren't there very long, they don't have time to goof off on the internet.
Admin
(I guess a finally-block would indeed hamper TCO, so i conclude that using finally is a bad practice when you program for the CLR!)
It is as simple as:Admin
Admin
Hell, I would be too if I got 30 days (that's 6 fucking weeks!) of paid vacation a year (by law)... Where I currently am, you max out at five weeks with 2 being the min. Even the C level management gets max five weeks (this varies I'm sure from company to company, but has been consistent from what I have seen).
Admin
Admin
so, sadly- i'm on the verge or suggesting a cleanup like this, just so we can get past the "maximum number of warnings exceeded" warnings on a project or two.
(but- why the hell isn't there an "empty catch block" warning, eh?)
Admin
Maybe they do it all the time at Microsoft and it didn't occur to them that it should be considered a problem.
Admin
Ah, the infamous try/swallow pattern.
Admin
My interns know that one too.
Admin
Admin
Submitter here (obviously I used an assumed name). The article left out the fact that one of our "senior" developers (C# guy who writes code like it was VB6, including "C# Modules" - files with various classes that have all static modules) added a single commit to SVN that removed this, with the comment "Fixing compiler warning".
It's indicative of many things wrong with this codebase. I could supply this site with many days worth of humor.
As an added bonus I'll toss in my own "Representative Line". I found, in a 5000+ line "C# Module", something that sent shivers down my spine:
goto Process;
Yes, a goto statement in C# 3.5. In several places.
Admin
I should add said person has been with the company for about 5 years and was "instrumental" in building our e-commerce application. I thought it was quite.. disturbing that I'm seemingly the only person on the team who understands things like encapsulation and design patterns.
Captcha: Vulputate. I wanted to vulputate my eyes after seeing this code. Vulputate.
Admin
Admin
That reminds me of a snippet of a conversation I overheard in the company cafeteria one day. A young lady was telling her friend that some red light kept coming on in her car, so she put a band-aid over it because it was bothering her.
When you get a warning that something is going wrong, disabling the warning does not fix the problem.
I'm guessing that a few days later she was telling her friend how her car mysteriously died with no warning.