Hacker News new | ask | show | jobs
by chrisutz 1918 days ago
Started a new job working on a company's API team. The API had out of memory issues and had processes crashing all the time.

The code was PHP. All API calls ended like this:

echo json_encode($data) . "\n";

Changed just one character, the period to a comma so the string wasn't duplicated before being output. Problem solved. Felt like a hero.

1 comments

You probably found a co-worker's underhanded speed-bump meant to be taken out before the next annual performance review.