Hacker News new | past | comments | ask | show | jobs | submit login

Recursive email: Very early in my career, I made something accidentally recursive.

There's a reporting & data extraction language called Focus (nowadays WebFocus). I was working in a very old version, and had a few nested GOTO statements to form a loop where the final output was a customized email sent for each row of a query returned. I had to make a simple update, but accidentally deleted a line first. I reinserted it... one line off from where it had been. My careful GOTO structure went from a loop, to recursive. Instead of sending an email to each row returned, I sent an email to the first person. Then I sent an email to the second person and the first. Then to the third, and the second, and the first.

The list was about 1,000 recipients... but luckily it usually finished very quick, and I would monitor as it went, and noticed the long run time after about 100 iterations and killed it. I then checked the logs to see why it ran so long, and traced back my error and fixed it... and sent an apology email to the 100 recipients I accidentally spammed.




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

Search: