3 ms·
"AV Rule 1: Any one function (or method) will contain no more than 200 logical source lines of code" Are they crazy? 200 SLOC is a huge beast. With our non-mis
by pkolaczk 13y ago
"AV Rule 1: Any one function (or method) will contain no more than 200 logical source lines of code"
Are they crazy? 200 SLOC is a huge beast. With our non-mission-critical software, we typically aim to not exceed 20 lines of code per function, and this including comments and whitespace. Typically it is not very hard to get functions of size < 10 sloc.
- Jweb_Guru 13y agoWith your non-mission-critical software, you also probably don't have hard limits on recursion. Writing iterative versions of naturally recursive functions can blow up function sizes fast.
- john_b 13y agoI'm not sure if they're defining "logical" lines of code as all non-comment lines, but if so the requirement to have all curly braces ({}) on a line of their own would add to the vertical line count.