Code lines number influenced by formatting style.

Started by
22 comments, last by Bacterius 10 years, 1 month ago


replace arrays with variables having actual numbers in their names

Array length known only at runtime? Only one reasonable solution - self-modifying code, and invoking undefined behaviour by assuming the variables are placed contiguously on the stack. Actually, scratch that - lookup is achieved by a sufficiently large switch.. no, that's too readable.. a long list of if/else conditions.. no.. you know what, let's just precompute the program's output for every possible input and just hardcode that. It was throwaway code anyway.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

Advertisement
LOC isn't a totally useless metric. It can be used a a proxy for how long it would take to find a bug, and the over all complexity of a project. It's just important to remember that it's not an accurate measure. But sometimes, that's ok.


let's just precompute the program's output for every possible input and just hardcode that. It was throwaway code anyway.

Maximum productivity according to LOC goes to this man!

"I would try to find halo source code by bungie best fps engine ever created, u see why call of duty loses speed due to its detail." -- GettingNifty


Maximum productivity according to LOC goes to this man!

Uncountably many lines, for almost all programs cool.png

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

This topic is closed to new replies.

Advertisement