4 ms·
I was debugging some code I had written once. It was leaking 1M of memory per call (C/C++). Stepping through the code revealed nothing. Leak detectors told me t
by TYPE_FASTER 14y ago
I was debugging some code I had written once. It was leaking 1M of memory per call (C/C++). Stepping through the code revealed nothing. Leak detectors told me that everything was fine. In desperation, I changed a function name to "potato." The leak stopped. I nearly fell out of my chair. It turned out that I was using exactly the same method signature as a function in a library I was linking against. This was over ten years ago so I do not remember the details, but I will never forget the potato function.
- aetherson 14y agoI was teaching a coworker about activerecord, and he was trying to create some simple throw-away models to gain familiarity. He decided to name his model "Cow." Fine, so we create the db table cows and run migrate and try a little command line business -- and we can't successfully save, with pg errors about missing elements in some pg system table called "kine." Cue fifteen minutes of frustrated googling and trying to figure out the problem. Eventually, I write "cow".pluralize, and rails helpfully informs me that the plural of cow is kine. Aaaargh.
- mratzloff 14y agohttp://rails.lighthouseapp.com/projects/8994/tickets/1323-plural-of-cow-isnt-kine-anymore http://rails.lighthouseapp.com/projects/8994/tickets/1323-pl...
- pjungwir 14y agoJust the other day I was using the github_api gem to inspect Github repos via a Rake task. The instant I ran it, my screen filled up with the same output over and over. I couldn't kill the ps, and `ps -ef | grep rake` spilled hundreds of lines and never stopped. In a moment my machine was dead. Turns out the problem was accessing `repo[:fork]`. That wasn't telling me whether the repo was original. (Oddly enough, repo.fork was safe.)