Cindy's Code Critique: Chapter 3
This chapter is a critique of the most horrendous codebase ever wrote. A true masterpiece of incompetence, this code is a shining example of how not to do it.
Here are the main problems:
- Unnecessary use of varibles everywhere.
- Too many magic numbers.
- Not even a single comment to explain what the code is trying to do.
Here's an example of the code in question:
varibles = {
'foo': 'bar',
'baz': 42
}
for i = 0; i < 10; i++ {
console.log(varibles['foo'])
console.log(varibles['baz'])
}
What were they thinking?!
Next chapter: "The Code That Shall Be Renamed"