Article 2X97T CodeSOD: This or That

CodeSOD: This or That

by
Remy Porter
from The Daily WTF on (#2X97T)

Processing financial transactions is not the kind of software you want to make mistakes in. If something is supposed to happen, it is definitely supposed to happen. Not partially happen. Not maybe happen.

Thus, a company like Charles R's uses a vendor-supplied accounting package. That vendor has a professional services team, so when the behavior needs to be customized, Charles's company outsources that development to the vendor.

Of course, years later, that code needs to get audited, and it's about then that you find out that the vendor outsourced their "professional services" to the lowest bidder, creating a less-than-professional service result.

If you want to make sure than when the country code is equal to "HND", you want to be really sure.

if(transaction.country == config.country_code.HND || transaction.country == config.country_code.HND) parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");else parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ".");
buildmaster-icon.png [Advertisement] Application Release Automation for DevOps - integrating with best of breed development tools. Free for teams with up to 5 users. Download and learn more today! TheDailyWtf?d=yIl2AUoC8zACf11QeQF-ck
External Content
Source RSS or Atom Feed
Feed Location http://syndication.thedailywtf.com/TheDailyWtf
Feed Title The Daily WTF
Feed Link http://thedailywtf.com/
Reply 0 comments