- 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
worse, we silently gobble the exception up, throwing only if rolling back fails!
Edit Admin
So that's "Rest in Perdition" ?
Admin
A shocking number of people do redundant empty checks, I used to work at a place that used jQuery(back when it was semi-popular), and it was the coding standards to always check if the length was empty, and if so replace it with null.
This resulted in code like
Instead of the much simpler and obvious:
I complained about it so often but the tech lead at the time really didn't understand how anything worked and insisted we do what he knew worked rather than trying to change things to make them better.
He was also the person who thought the observer pattern meant we should pass the list of listeners to be triggered to the observer ala:
It took us 2 weeks to convince him that maintaining the list of events everywhere they may be triggered is exactly the problem the observer pattern is supposed to solve, and that if we don't stop it we are no better off than before we wanted to introduce the pattern.
It was interesting to say the least.