CodeSOD: I'm Sooooooo Random, LOL
by Remy Porter from The Daily WTF on (#4NJBX)
There are some blocks of code that require a preamble, and an explanation of the code and its flow. Often you need to provide some broader context.
Sometimes, you get some code like Wolf found, which needs no explanation:
export function generateRandomId(): string { counter++; return 'id' + counter;}
I mean, I guess that's a slightly better than this solution. Wolf found this because some code downstream was expecting random, unique IDs, and wasn't getting them.
![proget-icon.png](https://thedailywtf.com/images/inedo/proget-icon.png)