
-2000 Lines Of Code - colinprince
http://www.folklore.org/StoryView.py?project=Macintosh&story=Negative_2000_Lines_Of_Code.txt
======
chadaustin
The other day I calculated my net contribution to the IMVU client, in lines of
code. Excluding third-party libraries, I have subtracted about 100,000 lines
since 2005.

Reminds me of an old presentation by Alan Kay. He was demoing some networked
virtual world he'd written, including avatars, portals, and chat. He wrote it
in Smalltalk, and said it summed to 60,000 lines. He said with a bit more
effort, he could probably reduce it to 20,000.

There's something to be said for a complete lack of duplication in the system.

~~~
blasdel
Alan Kay's current project is to implement a full operating system from bare
metal to userland GUI in 20,000 LoC, using as many meta-languages as necessary
to get there in a pedagogically cogent way:
<http://vpri.org/html/work/ifnct.htm>

For instance, their TCP implementation is under 200 lines, implemented as a
parser-expression-grammar for the ASCII-art diagrams from the RFCs:
[http://www.moserware.com/2008/04/towards-moores-law-
software...](http://www.moserware.com/2008/04/towards-moores-law-software-
part-3-of-3.html)

~~~
jf
Is there code I can download for this project?

I'm about to pay $1,300 so I can legally purchase a Genera system. I'd love to
look at similar projects.

~~~
dkersten
Right now, I wish I was you...

------
s3b
"Measuring software productivity by lines of code is like measuring progress
on an airplane by how much it weighs."- Bill Gates.

~~~
breck
link? I'm just curious. Would love to read more about BG's thoughts on coding.

~~~
alexandros
Can't locate a source for this on google. I'm calling urban legend.

~~~
dkersten
"Just because Google cant find it, doesn't mean it doesn't exist" - Albert
Einstein.

~~~
alexandros
"A witty saying proves nothing" - Voltaire

Look, this saying is by Bill Gates, should have been made in the last 30
years, it returns three pages of results, and yet none of them are mentioning
a source. Some are referencing each other, and some are also including the
'640k should be enough for anyone' legend. Yes, it's not 100%, but the
indications are not good. The ultimate counterargument of course would be a
source.

~~~
RyanMcGreal
"I hate quotations. Tell me what you know."

\-- Ralph Waldo Emerson

~~~
mlinsey
"Famous remarks are seldom quoted correctly." -Simeon Strunsky

~~~
dkersten
"Simeon Strunsky never said that" - Joe Ball

------
techiferous
Always remember that you are a problem solver first and a coder second.
Sometimes you can solve a customer's problem without writing a single line of
code.

~~~
breck
that's a great quote. i'll probably start using that.

------
taitems
Just by including jQuery in a project I was able to shave a total of 22kb off
a range of files without much trouble. But the current release version,
minified jQuery is about 23kb. It's a balancing act.

EDIT: Also, in the next version of jQuery, they plan to separate out the core
code such that you can include only what you need, so that 23kb will drop to
only what you need.

~~~
vegashacker
For me at least, the main benefit by far of fewer lines of code is fewer bugs
and maintainability. Code kilobytes rarely matter (though I concede "k" can be
relevant on the web).

~~~
taitems
It was an easy way for me to illustrate how many lines of code I culled. I
make it sound amazing, but the majority of changes involved turning 20 line
functions with for loops into a simple 2 line jQuery snippet.

Also, jQuery means rarely declaring in-function variables therefore avoiding
memory leaks.

Happy coders all round :)

------
roundsquare
I remember a story (don't know from where) in which someone was hired to
reduce the size of a code base. His compensation went up for each line of code
deleted and went down (by a bigger amount) for each time he caused a crash.

It may not be true, but I like the story anyway.

------
tpyo
Who was that guy who suggested using lines written plus lines deleted. Was it
Knuth?

~~~
cousin_it
All numeric metrics of programmer productivity are easily gamed, but yours is
particularly so: just add and delete one line repeatedly.

~~~
eru
That's true, when you use the metric to influence some material gain or loss
for the developer. As an indicator for the state of a project (and its speed)
together with other metrics, it may not be too bad.

------
ehsanul
I'm reminded of this Google Tech Talk, where the speaker (Jon Bentley) refers
to a colleague's praise of someone who "adds function by deleting code":
<http://www.youtube.com/watch?v=aMnn0Jq0J-E>

Edit: Fixed quote

~~~
nash
You know you are doing it write when you do that.

For added value combine with sloccount when removing code (I removed $200k
value from our software, fixed 8 bugs, and removed that stupid limitation
about green text today)...

~~~
cubicle67
> I removed $200k value from our software

That sounds like a bad thing...

~~~
nash
Not when you are using sloccount to measure the 'value' of the software.

------
thehigherlife
can anyone help me find a favorite of mine? Its the one where they are
building a program and the employee working on it had been let go from apple,
but he snuck in every day to finish it.

~~~
nzmsv
<http://www.nucalc.com/Story/>

