- 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
Admin
Admin
All I am saying...
Admin
Que? TRWTF; found.
Admin
Agree! ...and, as much as possible, cleanup your mess -- use 'delete' or 'free'.
Admin
Admin
Real programmers write their own malloc.
Admin
Also, disproportionately likely to have FNGs who aren't afraid of one of their dozens of tech savvy programmers find their post and use it against them. When there's only one guy who could finger you, it seems a lot safer - especially if that one guy's already flown the coup. Granted, if that one guy's still there, he has a lot more clout than any of the dozens of tech savvy coworkers one might have in a bigger shop, simply because there's so many fewer people to share the IT department clout with...
But anyone working on a large project in isolation is going to create at least some WTFs.
Comment before an eval of an unsanitized string in some code I wrote that will never see the light of day (Note: despite the fact this code will never be released, I've still fixed it. It now uses a lookup table to find a code reference and syntax description. If the syntax description parses, it calls the code reference with the described arguments. Otherwise it returns nothing. In either case, it runs faster than the crap that followed this comment.):
/* Where do they get them from, and why do they send them
(I'll admit, TRWTF was actually the code processing the conditionals, that ran on every single active object for every action, to see if that action triggered any of the conditional functions for that object. But, at the time I wrote it, I only had five active objects, so it handled the "need" at the time.)
On most systems, malloc doesn't even directly allocate its own memory. Instead, it invokes brk, sbrk, or whatever the actual system interface is for raw memory allocations, to do that. Malloc adds some accounting to that, so that free can work.
Admin
So in other words:
Only cowards use 'new' xor 'malloc'.