Query: Estimated no. of SLOC to make a decent application?

Greetings everyone,

This is going to sound like a very subjective and very beginner question - which in some ways it is - regarding programming.

I am a newbie to programming and C++ is my first language and have been studying it for about a year or so and written some short but involved programs and a few "major" projects. But, in my study of the language to date, I have noticed that SLOC of code are in general, bad yardsticks (which it generally is) to measure the productivity of a programmer and the efficiency of a program.

My question is how do you know when you have reached that proverbial "equilibrium" that distinguishes between a well written program and one that isn't? For instance, the development of the first Linux kernel (~10,000), the SLOC of Windows 3.1 (4-5 million), etc - i.e. how do you know when writing and viewing your LOC - it isn't overkill compared to the purpose of the program? I once read about a guy who wrote 40,000 LOC to make a Tic-Tac-Toe program (an insane number) but was too inexperienced to know any better. I and others, would prefer not to make a similar mistake.

My reason for asking is an attempt on my part to estimate with some realism, how much time I could dedicate to writing a program. I have Googled, to no avail, trying to find an inkling of a possible answer to this beginner, but highly undocumented "problem".

Any insight that anyone can offer would be humbly, kindly and greatly appreciated.

Many thanks!
how do you know when you have reached that proverbial "equilibrium" that distinguishes between a well written program and one that isn't?
I don't think this has anything to do with how much code has been written. There's a certain architectural beauty in code that's considered well written, along with a reasonable and consistent style of the actual written code. But in the end, software is an engineering effort and thus a compromise between agreed requirements, cost, efficiency, reliability, available tools, hardware and user satisfaction.

A good architecture assists in the task at hand and the forseeable future. Very often systems are re-architected because the new requirements are found to be unsuitable for an existing otherwise reasonable architecture that's been stretched to its limits.

Lines of code haven't figured into anything I've mentioned so far and as far as I'm concerned, is largely irrelevant. The use of libraries can skew this metric by vast amounts (as it should). In my experience, lines of code has no place in comparing systems or indicating how complex they are. It's mostly an indication of entropy.
closed account (EzwRko23)
LOC is just a measure of the effort. Some achieve much with little effort, some achieve little by huge effort. The program is written well, when you cannot remove any line of it without decreasing its quality. Also, LOC is not a good measure because something that requires 100000 LOC in C can be probably written in 20000 LOC in C++ and 5000 LOC in Scala, Ruby or LISP.
Topic archived. No new replies allowed.