

Why you always initialize on declaration - jgershen
http://www.reddit.com/r/AskReddit/comments/i17q5/reddit_i_just_screwed_up_royally_at_work_let_me/c20254k

======
ars
"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.

~~~
premchai21
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.

