- 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
I wouldn't let anyone fix my car K&R-style. The hinges wouldn't match up...
There's an online "investment" bank around called Saxo...
Admin
That is true when passed as a function parameter, so
int main( int argc, char ** argv )
is the same as
int main( int argc, char * argv[] )
They are not the same in local use where char * points to an external writable pointer while char [] holds the data in the stack, with the length specified, or the length necessary to hold what it is initialised to.
Admin
I hope I never work with you and I wouldn't want you to work for my company if I were hiring.
Admin
You're Winston except that you got special permission to do that because you had the patience and social skills necessary to get to that position. 'Cause after all, we're all squishy humans.
-- Furry cows moo and decompress.
Admin
Well, Java compiler prohibits this and often times this prevents sloppy programming using if-else if-unexpected kind of errors.
Admin
The article has a very very poor example of what can increase executable size. It's true that initialising an array in the declaration can increase the size dramatically, but chances are that there were only a handful of arrays that were big enough for this to have made the impact it did. For the most part, changes like those made, are a good thing.
After upgrading compilers once my exe grew in size by a factor of about 15. There was one large array that was initialised upon assignment, and changing that dropped the size right back down again.
The real problem here is of course: If it aint broke, don't fix it!
Admin
Well, I personally think the WTF are the "coding conventions", but then I fail to understand why having fixed this poorly written code is a WTF?
Admin
Where in the article does it say that the memory leak hadn't been fixed?
Maybe the real WTF wasn't the "carnage", but as this possibly sarcastic remark points out: "Clearly, this meant that the process was broken and that maybe, just maybe it was time to bring in some change controls and QA oversight?"
...followed by: "Nah! The development manager realized the real problem was Winston and that he needed to be fired."
Admin
I would need a time machine to read more than the one-third of the comments that I did, so sorry if already said: MY TAKE ON WHY 2 CDS:
The company's distribution method is "incremental" or "differential" to existing customers (think of backup terminology). I.e. changed executables comprise the release. This app presumably has multiple executables, ergo bloato.
Am I the only one to think of this? I'm a Winstonian C and ASM zealot, yet I feel like I just dumb-jocked this one.
Admin
The original story ptobably said "two floppys". It's just been rewritten into the 21st century.
By the way, you are all assuming a compiler that puts stack-based variables into the stack. For non-recursive functions, that's not required, and optimising compilers will put stack variables into memory or registers.
Oh, and the real WTF is using C, where stack allocation rules are not self evident by design.
Admin
I don't think I've ever heard anyone say that.
Admin
It depends how the compiler handles things I suppose.
I've worked with a less-than-perfect compiler for the sega megadrive that, if you initialised variables at the point of defining them (int x = 123;) it put them in read only ROM data rather than in working RAM. Not a problem, unless the ROM is, as you'd expect, read-only.
If the compiler this company used had a similar quirk, and they produced, for example, firmware or other software with data that shouldn't be self-modified, I can see that it would cause a problem.
Still, that doesn't explain where disc 2 comes from.