

Ask HN:How many LOC is/was your simplest useful application? - rokhayakebe

Ask HN:How many LOC is/was your simplest application?
======
cperciva
According to sloccount, bsdiff + bspatch is 425 lines of code. I've written
smaller applications, but that's probably my smallest _useful_ application --
at least if you consider being used (albeit unknowingly) by millions of people
and being responsible for saving hundreds of man-years of waiting for
downloads to complete to qualify as "useful".

------
MaysonL
1 - back in 1964 I wrote a utility for the operations staff at the stock
brokerage I was interning at that copied a deck of punched cards which fit on
a single card, and I wrote it at the keypunch machine.

------
aristus
g, an interactive shell for grep and ack that lets you search files and open
them to specific lines. 120 lines of Python.

    
    
        $ g --js FooBar
    
         1) static/web/www/foobar.js
              4:   var FooBar = function( options 
              9:   FooBar.superclass.constructor.call( t, $.extend( {
             28:   Foo.inherit( FooBAr, somthing.ui.Baz, {
    
         2) static/web/www/js/ui.js
            196:   FooBar.show( new something.ui.FooBar( {
    
        ack> open 1 28
        ack> open 2 196

------
aristus
iSVN is an interactive shell for SVN. Think CPAN or RPM shell. Normal use is
to list all files that are modified, and to pick various ones by number and
operate on them (commit, revert, diff, etc). It's 60 lines of Python. Reminds
me, have to release it...

    
    
        $ cd ~/svn
        $ isvn
        svn> status
        1)  ?      devtools/bin/isvn
        svn> add 1
        A         devtools/bin/isvn
        svn> update
        Updated to revision 1234.
        svn> commit 1 -m "new interactive svn tool"

------
makecheck
First ask if LOC is a good measure for programs. :)

LOC can be very misleading. A better estimate, to me, would be: _how long did
it take_ to write your simplest, useful application?

~~~
rokhayakebe
I am not a programmer. I just started to learn 16 hours ago, but I built 2
simple simple apps (ok not really app) with a few lines(30 and 140), but they
are nonetheless useful to me (as a beginner).

