Why do I include the number of lines of code everywhere?

Whenever I write about a piece of software, I often include the number of files and lines of source code that compose that software. I usually use the notation (x files, y LOC).

Generated code

I write about Software Factory (SF) and code generation. I enjoy code generation because it is really cool and saves me tons of work.

I spent decades working on this, and I probably wrote one million lines of code or even more. Not all of it was good. Not all of it was consistent. But I had to key in all of them over all those years.

However, I’m at a point where I start getting back the efforts I have put in. I probably generate about 80% of the code I use now. That is a lot of “free” code.

Return On Investment

This is important because LOC is how I calculate my ROI on all the code that I write. It is a measure of what I got back from writing the Software Factory in the first place.

Every time I generate 100k LOC that is 100k LOC, I don’t have to write. And I can calculate my velocity based on LOC / week.

It is also a sign of quality. When I write solutions, I make extra efforts to ensure that the generated code is of higher quality. And, I know that it will generate in a much more consistent way than it ever would if I had to write it manually.

So, is it a success?

MY goal is to eventually generate close to 100% of my code. But even before that, I can definitely say that it is a success.

I’ve spent most of my efforts writing the Software Factory so far. While the core SF engine (486 files, 18819 LOC) is 95% manually coded, most of everything else was generated:

  • 13 micro-services (3034 files, 90992 LOC);
  • 39 Angular client libraries, 39 .net client libraries (1894 files, 89696 LOC);
  • and 2 front-end applications of (1539 files, 92573 LOC).

That is a total of 6467 files and 273261 LOC. All usable code that was created in the last 6 months. How long would it take to write all this manually? Probably a lot longer…

This version of the Software Factory is not complete. I still have to write 2 more front-end applications. But with the help from the Software Factory (previous version), I should be able to take this in a couple of weeks,

Velocity! Velocity! Velocity!

I spent the last 6 months investing in velocity. With this new version of the Software Factory, I will have much greater flexibility and abilities. I will be able to start focusing on other aspects of code and work on creating new products and product lines.

The following 6 months will be all about velocity, and I plan on more than 20x the number of LOC write. Can I make it? I don’t doubt it for a second…

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: