Is there a "golden ratio" in coding?
Posted
by
badallen
on Programmers
See other posts from Programmers
or by badallen
Published on 2011-02-10T02:20:00Z
Indexed on
2011/02/10
7:33 UTC
Read the original article
Hit count: 444
programming-languages
|best-practices
|programming
|programming-practices
|general-purpose
My coworkers and I often come up with silly ideas such as adding entries to Urban Dictionary that are inappropriate but completely make sense if you are a developer. Or making rap songs that are about delegates, reflections or closures in JS...
Anyhow, here is what I brought up this afternoon which was immediately dismissed to be a stupid idea. So I want to see if I can get redemptions here. My idea is coming up with a Golden Ratio (or in the neighborhood of) between the number of classes per project versus the number of methods/functions per class versus the number of lines per method/function.
I know this is silly and borderline, if not completely, useless, but just think of all the legacy methods or classes you have encountered that are absolutely horrid - like methods with 10000 lines or classes with 10000 methods.
So Golden Ratio, anyone? :)
© Programmers or respective owner