What Can You Build in 600 Lines of Code?

I would have to say that some of the most impressive code in terms of size to functionality are Steve Gibson’s Window’s programs written in assembly. http://www.grc.com/smgassembly.htm

If you have an old Windows machine, this was the most amazing screen saver program, in 200K! http://www.grc.com/chroma.htm

@Darren we’ll you can’t write anything in Python for sure :slight_smile:

Anyways one practice I do have is to write any module for a larger app to have less than 500 lines. It’s not that hard but whenever I see a module that has more lines than that I reanalyze and break it into smaller more focused sub-modules

I wrote a python and pygame-based blackjack GUI game in just over 600 lines of code… I’m entering it in a contest, then I’m gonna open source it and release it.

Since I’m fluent in Japanese, I’ll translate for those that are wondering what the post says:

Well its a cooperative TODO application. Haven’t used one myself, but I’ve been hearing lately that they can be very useful.
However what’s really interesting is that this web app was written in Ruby On Rails, and it’s just 579 lines long.
Maybe I should learn some Rails too.

My friend built a multi-million dollar web app in 2,000 lines of ruby code (including unit tests). Makes me feel kinda of ashamed of my passion in C#.

I hope BOO become more popular.

@mehdi

dd can do that for you in 1 line

I think conciseness is important, but how about another constraint to this thought experiment?

Challenge:

After writing your 600 lines of code, you come up with something additional that the code should do. Then, hand it off to a fellow programmer and have them add it successfully without your help.

If you can do that, and you don’t fuse your brain into a smoldering bio-mass in the process, I think you just rose to the rank of Sensei-Coder :slight_smile:

I am proud of www.bigbadjim.info:6060. I have worked almost five hours on it. It is an exercise in keeping things simple. It has 504 lines of code so far, and does work.

It would be a todo list if I put “TODO” in big type at the top

XMonad, a window manager, was at one point less than 600 lines of haskell. Now it’s around 1000, I think.

Remember HyperCard? I wrote a lot of HyperCard applications in less that a hundred lines of code: Payroll systems, accounting systems, inventory, games, demos, etc. I started using Hypercard as a application prototyping tool, but the apps came out so nicely, I simply used the prototype as the program. Whole applications could be written in a couple of days.

My favorite was called “Stack2Text” which would dump a Hypercard stack into text script that could recreate the entire HyperCard stack again. It was a way to transfer HyperCard stacks over text only BBS systems.

HyperCard was the primary reason why people upgraded their Macs to 4Mg of memory (Remember that this is in the days most PCs still had only 640K). Hypercard needed a full Meg of memory to work.

Apple lost interest in Hypercard almost the day they released it. Hypercard languished for years. It never got much further than bitmapped black and white graphics.

i wrote a php script to take info from the URL that was submitted by my friends WiFi app, to draw out a graph in a PNG image. the script is only about 250 lines

I build my new website using Django (python framework) in 632 lines of code, with 674 lines of html templates. This doesn’t include the hacked javascript I used, nor the settings files. Pretty good though, and it’s getting full of features.

http://www.shuttercal.com

I wrote a weather service provider (http://forecaster.ws) in about 100 lines, and a blogging tool (http://www.subwindow.com) in about 60.

600 lines is kind of a lot =)

The (Python) code for DecentURL.com was about 350 lines when I first launched it. It stabilized at about 500 lines after I’d added a few features. Now I’ve added some “premium services”, but it’s still only 900 lines.

I wrote a python web application that measures a given URL from various geographic locations using an accelerated path and a non-accelerated one and presents the difference using a Flash UI all done in roughly 360 lines of code. Its useful for my sales folks to demontsrate the value of a an Application Delivery Netwotk.

using MySuperAwesomePrewrittenFramework;

public class TadaList
{
myFramework.Scaffold();
}

This is why I’m not impressed at all with rails and line count. When you move 90% of the functionality into the MVC engine, all you really need to do is whip up a handful of views and a few controllers.

Sure, MVC is a nice architecture, but rails didn’t even MVC, they just made it popular.

BTW, you could create Tadalist almost entirely in ASPX markup without writing a line of code, doesn’t mean you should.

even == event.

@Other Pythons Users,
I love python, don’t use it everyday, but my comment about you can’t do it in Python to Darren, was that you can’t write an app in one absurdly long one line of Code when using Python, which I think is a good feature as it forces code to be reasonably readable.
And in the one line code camp, I would hope that all real Javascript apps out there would be compressed into a single horrible loooooong line of code, so they don’t waste my bandwidth. I guess that means it’s necesarry to write a useful app in 1 line of JavaScript code :slight_smile:

nitpick: event==invent

I wrote a Weewar notifier in AutoIt in ~250 lines of code. I tried writing it in c# but I gave up after about 2000 lines of code and over 18kb of different source files.