Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Why you always initialize on declaration (reddit.com)
13 points by jgershen on June 16, 2011 | hide | past | favorite | 2 comments


"The code caused the capacitors to keep charging even after they had reached their limit, until kaboom."

Sorry, but that isn't possible. Maybe if you keep raising the voltage (which would be a pretty strange thing to do), but even then it wouldn't cause an explosion, but rather a short. And no capacitor I have ever heard of can store enough energy to explode.


Electrolytic capacitors are capable of popping violently should they become internally shorted by excessive overvoltage or reverse bias. The aqueous electrolyte destabilizes and produces hydrogen, which builds up pressure inside the casing until it leaks or blows. Dramatic video: http://www.youtube.com/watch?v=ToWsF3HcQUU

I can vaguely imagine a charging circuit being designed to have what amounts to a current source rather than a voltage source, but I don't know enough in detail to confidently associate that idea with the story in question.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: