Monday, March 22, 2010

583 Hours of Work

Forge is a relatively big program with about 35,000 lines of code and an additional 35,000 lines of comments. The problem isn't bad programming, it is just that it takes a ton of code to do anything. The user interface code takes up about 7,000 lines of code.

Talking about lines of code is a little deceiving because the numbers are hard to understand. Roughly (and I'm mean very roughly) it takes about 1 minute to write 1 line of code. So 35,000 lines equals 35,000 minutes, which is 583 hours or about 15 weeks of work at 40 hours a week. Obviously a great deal of time and effort has gone into this program. Sometimes you are doing good if you can write 1 line of code per minute because you are debugging which entails more thinking than writing.

I put in maybe 100 to 200 hours of work to begin with and all of the other effort has been Dennis, Rob, Chris, Zerker and the other guys on the forum. For the last 6 months or so I've just been sitting on my backside and letting them do all of the hard work. I'm just glad that people enjoy playing and programming Forge. It is also humbling to allow other people to look at your code because there are always sections that could have been done better. Dennis and the guys have been adding new features despite the limitations of my initial, "add a feature if you need it", "hacky" design.

One of the first things that Dennis did was to add protection. I, the creator of Forge, know that protection is not supported and I didn't think that Forge would ever support protection. Dennis redid CardFactory, one of the biggest chunks of code, and added protection to every spell and ability that needed it. And that was only the beginning. He and Rob added cards like Hypnotic Specter which Forge does not support but uses hacks in order to get it working. (A hack is like duct tape. It could be done better in a hypothetical world but it works, so no one really minds.)

I try to highlight some of the people and work that is done behind the scenes that most people don't notice. I stopped working on Forge when it had 1,200 cards and now it has more than 2,800 cards. That is what I call progress.

All statistics exclude blank lines and were generated with cloc, thanks to Frololo for the suggestion.

Thank you Dennis, Rob, Chris, Zerker, Huggybaby (for the forums) and everybody else who has helped.

1 comment:

Forge said...

Just another long explanation of why programming is really, really hard. :)