25 years of programming

I started programming in 1983 on a Sharp PC-1251 with an amazing 3486 bytes RAM. It had a Basic interpreter and we had to use it for a Calculus course at the university.

So that’s 25 years ago. That made me suddenly wonder how much code in different programming languages I have written in all those years. A completely useless question of course, but fun nevertheless. I don’t have all the code available anymore so I have to estimate some numbers from memory. The numbers I present include comment and blank lines.

The list:

C: 100.000

C#: 70.000

Java: 20.000

C++: 20.000

Pascal: 5.000

PV~Wave: 5.000

Basic: 2.000

Matlab: 1.000

Lisp/Scheme: 1.000

Assembly: 1.000

Fortran: 200

Perl: 100

Python: 20

Boo: 20

Nemerle: 20

F#: 20

Ruby: 10

This totals 225k lines of code in 25 years.In other words, about 10k LOC’s per year, or 30 lines per day. Other interesting questions that could be asked:

how much of this code is still in use

how much of this code is forever lost

how much of this code is still archived somewhere on a company network

how much code would this have been if it all had been written using language xyz

Hm, tricky question. Only correct answer I guess would be “it depends”. I have some strong dislikes like Fortran and Basic. And obviously building enterprise software with Matlab is not going to work, but it’s great for simulations. I’m fond of functional languages because of their elegance. For desktop software I would almost certainly pick C#. Personally I don’t think there is that much fundamental difference between C# and Java, but I like the syntactical sugar that C# offers me.