Ask HN: What horrifying and/or terrible things have you seen in production code?
1–10 of 20 posts
Re: Ask HN: What horrifying and/or terrible things have you seen in production code?
#2Re: Ask HN: What horrifying and/or terrible things have you seen in production code?
#3Re: Ask HN: What horrifying and/or terrible things have you seen in production code?
#4Re: Ask HN: What horrifying and/or terrible things have you seen in production code?
#5RPG.
Sorting months by alpha name.
Re: Ask HN: What horrifying and/or terrible things have you seen in production code?
#6And now think about the security and data integrity problems that implies.
Re: Ask HN: What horrifying and/or terrible things have you seen in production code?
#7* No authentication check on any page after login page. (You could type in any URL in browser address bar and gain access).
* GET request updating home page related content in database. (A few of these GET request was picked up by Alexa bot and we hard our home page content change randomly for many days. We had a real hard time troubleshooting this one).
* Use of mysql_query() in PHP. (Deprecated mote than 10 years ago. Opens doors for SQL injection).
* Use of loop variables i,j,k,l,m for 5-level nested loop. (Too error prone and difficult to read).
* Unit testing applied to a highly monolithic code. (The hacks for isolating code units produced more garbage than the code itself). It was a legacy code and the management blindly ordered writing of unit tests when a few bugs were caught in production.
Re: Ask HN: What horrifying and/or terrible things have you seen in production code?
#8- duplicating full data set to handle offline sync of data between a client and a server
- over 1000 lines of java per source file
Edit: formatting
Re: Ask HN: What horrifying and/or terrible things have you seen in production code?
#9Not that many years ago I was still seeing people storing credit card numbers in plain text files on servers, and sending them unencrypted via email.
Re: Ask HN: What horrifying and/or terrible things have you seen in production code?
#10"I don't know why this works"
Oops. After that they put me at the front end due diligence instead of the back end.