Author Topic: How prolific are you?  (Read 5208 times)

0 Members and 1 Guest are viewing this topic.

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
How prolific are you?
« on: September 02, 2012, 01:36:09 pm »
Everyone wants to know how many lines of code they've written in their lifetime right? Well now you can.

Assuming you have all of your source files in one giant folder make a batch file that looks like this and run it.
Code: [Select]
mkdir summation
del summation\summation.txt
for %%f in (*.z80) do type "%%f" >> summation\summation.txt

A folder called summation will appear and inside will be all of your programs all joined together.

Spoiler For tweaks:
If you don't use the file extension ".z80", you can change that part to ".asm", or whatever you use. If you use all kinds of extensions, you can make it ".*", but that will try to sum all files of all extensions, including .exe's and whatnot.

If you have your source in folders, you can sum that too, but you're going to need to include each folder yourself. The code for a folder is

for %%f in (folder\*.z80) do type "%%f" >> summation\summation.txt


Spoiler For my batch file:

mkdir summation
del summation\summation.txt
for %%f in (*.z80) do type "%%f" >> summation\summation.txt
for %%f in (blue2\*.z80) do type "%%f" >> summation\summation.txt
for %%f in (flashCards\*.z80) do type "%%f" >> summation\summation.txt
for %%f in (missile\*.z80) do type "%%f" >> summation\summation.txt
for %%f in (osPatcher\*.z80) do type "%%f" >> summation\summation.txt
for %%f in (zrox\*.z80) do type "%%f" >> summation\summation.txt
for %%f in (zstart\*.z80) do type "%%f" >> summation\summation.txt


My summation.txt had 3,072,590 characters and was 234,453 lines long. How long is yours?
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: How prolific are you?
« Reply #1 on: September 02, 2012, 01:39:50 pm »
That's a lot of lines! :P
Mine is 0 lines....
* Sorunome hides
But nice idea to make your line-counting and word-counting easy!

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Re: How prolific are you?
« Reply #2 on: September 02, 2012, 03:10:35 pm »
Darn, with short lines in BASIC programs and the large amount I made, I can't imagine how many lines I wrote in my life. On top of that I had a few extra programs I no longer have due to data loss years ago.

Offline cooliojazz

  • Support Staff
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 619
  • Rating: +66/-9
  • I omnoms on your soul
    • View Profile
    • Unreal Phantasies
Re: How prolific are you?
« Reply #3 on: September 02, 2012, 03:29:59 pm »
Here, have a modified version that works with directories and multiple extensions
Code: [Select]
del sum.txt
FOR /F "delims=`" %A IN ('dir /b /s ^| findstr ".ext1 .ext2 .ext3"') DO type "%A" >> sum.txt
Replace .ext1, .ext2, etc. with all the extensions you want to search for, eg ".z80 .asm .inc"

I did it with like every project i have on this computer (java and php stuff mostly) and got 18,447,077 characters and 366,780 lines.  I wish I could include all the TI programs I've ever written too, and the few vb ones i wrote a long time ago that are floating around somewhere... then it would probably be more like 20 million characters =P
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: How prolific are you?
« Reply #4 on: September 07, 2012, 05:50:42 pm »
I'm glad to see someone knows DOS.

Also, you beat me by like 6x.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline cooliojazz

  • Support Staff
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 619
  • Rating: +66/-9
  • I omnoms on your soul
    • View Profile
    • Unreal Phantasies
Re: How prolific are you?
« Reply #5 on: September 07, 2012, 07:52:59 pm »
Haha, only because I've been using it so much for a project the last couple weeks XD  And do you realize how many text editors fail at opening a 18.5m char file, or don't have a word counting utility?  I actually had to go and download like a fifth one just to do that.
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

Offline Link

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 152
  • Rating: +7/-3
  • Well excuse me princess!
    • View Profile
Re: How prolific are you?
« Reply #6 on: September 07, 2012, 07:56:09 pm »
Hmm, currently at 38798 lines, including all projects (c/c++/ruby and so on)