Software dev at Netflix | DC techie | Conference speaker | egghead Instructor | TC39 Educators Committee | Girls Who Code Facilitator | Board game geek | @laurieontech on twitter
Software dev at Netflix | DC techie | Conference speaker | egghead Instructor | TC39 Educators Committee | Girls Who Code Facilitator | Board game geek | @laurieontech on twitter
Software dev at Netflix | DC techie | Conference speaker | egghead Instructor | TC39 Educators Committee | Girls Who Code Facilitator | Board game geek | @laurieontech on twitter
I don't like the idea of categorizing "worst" code based on arbitrary metrics like lines of code, O(n) efficiency, etc.
However, I'd say bad code is difficult to understand and read. Code will always be interpreted by machines, but it should be comprehensible to humans.
But if I'm being honest the "worst" code I see is code with horrible security. I.e. plain text passwords, or hardcoded credentials.
I agree with all this! I do quite a bit of teaching, and I stress readability, correctness, and testing over metrics like efficiency and whatnot.
Inefficient code is more often than not hard to read! There is a reason people try to get rid of "pyramid code".
For sure! I was just referencing your mention of big O as a criteria for bad code.
Oh absolutely. We're in total agreement!