Longest program you have written?

In terms of lines of code, what is the longest program you have ever wrote? My longest program was Project Raft standing at a tiny tiny 1900 line of code. I plan on blowing that away though because Zombie Nauts is already to 1702 lines of code and im about 5% done with that game. So, what is the longest program you have ever written?

Not sure, somewhere in the 50k-100k range. The code tends to be more expressive the longer you’ve programmed though, meaning the LOC to feature ratio decreases significantly. I remember back when I was somewhat fresh at programming - I could easily spew out 2-3k LOC per day; I rarely write more than 500-700 on a good day now, yet I manage to implement a lot more functionality in that same timeframe nowadays.

In the end, LOC isn’t really a useful metric of anything - even if some backward companies encourage such nonsense.

I did never count and will not.

I disagree. The more you’ve already programmed the more utilities and abstraction you (should) have, meaning that with a good design you should be able to reuse bits and pieces of your code leading to a higher feature/LOC ratio. :slight_smile:

Edit: Just to answer the topic - around 2000 LOC, which was (obviously ;D) a game engine. Dang, I have to stop making engines and start producing some games now. :smiley:

Decreasing LOC/feature == increasing feature/LOC :point:

Squaball might have been a little bit less than 10k.
Wilderness to home is over 10k probably.

Maybe I’m over counting a little.

Oops, you’re right, my bad. :slight_smile:

How does one figure this out? Add up the line number of the last line in every class?
My current project is by far my biggest though.

There are some things called metrics or something like that. I installed one sometime ago.

Bill gates: measuring code by number of lines is the same as measuring an airplane by weight.

Heh, I got a little 2D space shooter that I work on every so often.

The Ship class is ridiculous, tons of fields and methods. Must be around 1500 lines just for that class. Not a whole lot but it is one, non-refactored class lol.

:o I thought I was cool with FlubberSpace being the biggest and only project I’ve ever made.(Only good one that is :point:). It has about 670.

Ok, so I installed Metrics.

It’s telling me:
Total Lines of Code = 3190
Method Lines of Code = 1983

Does that mean almost 40% of the lines is fluff, just formatting and stuff?

My largest project ever is my current, Retro-Pixel Castles.

Total lines of code as of today: 6,787

but kinda like junkdog said, lines of code really are only a hint at complexity, but really someone could have a 5k lines program someone else can write in 500. Personally I feel my code is fairly fluff free. Although there’s a few places where I could probably shave off a few lines.

Also coding style comes into play, for example I write all my one-liner getters and setters like this:

	//Get total height and width of map in tiles.
	public int getMapWidth(){return map.getMapWidth();}
	public int getMapHeight(){return map.getMapHeight();}

where as someone could easily write them like this:

	//Get total height and width of map in tiles.
	public int getMapWidth(){
		return map.getMapWidth();
	}

	public int getMapHeight(){
		return map.getMapHeight();
	}

or even (if they’re C people who picked up this habit):

	public int getMapWidth()
	{
		return map.getMapWidth();
	}

	public int getMapHeight()
	{
		return map.getMapHeight();
	}

So I think style can add/remove a lot of lines. :stuck_out_tongue:

I’m more impressed by less lines of code.

Let’s see some smaller numbers. :smiley:

  • Jev
package rpc.launcher;
public class Launcher {

	public static void main() {
		System.out.println("ohai world!");
	}
}

[icode]
public class Main{public static void main(String[] a){System.out.println(“Hello World”);}}
[/icode]

  • Jev

MERCury is currently at around 10K LOC.

But these numbers don’t mean too much. If anything, they loosely represent how long you have worked on this project.

-wes

I recently stumbled upon this self-playing flappy bird clone in 155 lines, incl graphics: http://glsl.heroku.com/e#14407.0

That would make for a fun java game jam/contest. Instead of “under 4k”, “in 48 hours”, etc, we could have a “best game with less than 500 lines of code” contest. It would have to include external settings/config files so no one cheats and stuffs all the meat into a .properties file or something.

Could be a fun idea down the road.