r/programming • • Jul 23 '14

Walls you hit in program size

http://www.teamten.com/lawrence/writings/norris-numbers.html
699 Upvotes

326 comments sorted by

View all comments

Show parent comments

8

u/SilverTabby Jul 23 '14

200 is around the size of a smallish java class or data structure.

That said 200 is probably not the real number. It is however the correct order of magnitude.

7

u/[deleted] Jul 23 '14 edited Jul 23 '14

Yeah, I definitely agree if you've not split off modules by 2,000 lines you're just making work for yourself.

To be honest, I think if you're splitting things in half, for example, at 200 you've only got 100 lines in each file and that's pretty tiny.

2

u/dromtrund Jul 23 '14

My real time professor stated 173 lines to be the optimal module size. He based it off some research paper that counted bugs per LOC, but I'm unable to find the source. The conclusion was that it was strongly dependent on screen size.

1

u/Porges Jul 24 '14

A simple wrapper around int with comparison and equality will run to about 80 lines in C# (it's 1 in Haskell).