Author Topic: Really Long Source Code  (Read 18252 times)

0 Members and 1 Guest are viewing this topic.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Really Long Source Code
« Reply #30 on: April 10, 2011, 05:31:23 pm »
My editor has an instant search box in the upper right hand corner.  All label names in my program end with a colon so if I want to jump to a label, I just enter the label name plus colon and it instantly jumps to that line.  Very useful for large files.  I also keep other tags like TODO and FIXME around for easy access.  That and general categorization of the code makes it manageable.  I actually find it faster than some of my other projects that I've split into separate files because you don't have to switch back and forth.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Really Long Source Code
« Reply #31 on: April 10, 2011, 05:44:44 pm »
Mimas is currently 16040 lines, not counting auto-generated files.  That's by far the largest assembly program I've ever written.

How do you people deal with source code when it starts getting over 4000 lines long? I feel like once it starts reaching this length, I start losing time by searching through the code for routines. At these sizes, the scroll bar is almost useless.

etags. :)  And occasionally grep.

And yeah, I'd say 4000 lines is too long for a single source file, no matter what language or editor you're using.

You win us all.

And @SirCmpwn: Half of the tiDE code (or maybe even more) is code generated by the GUI designer, hence I'm not impressed with 26thousand lines.

SirCmpwn

  • Guest
Re: Really Long Source Code
« Reply #32 on: April 10, 2011, 06:40:21 pm »
And @SirCmpwn: Half of the tiDE code (or maybe even more) is code generated by the GUI designer, hence I'm not impressed with 26thousand lines.
Are you kidding me?  Maybe 1/8th is generated.

Offline XVicarious

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +45/-28
  • I F**king Love Twisty Puzzles
    • View Profile
    • XVicarious
Re: Really Long Source Code
« Reply #33 on: April 10, 2011, 07:55:54 pm »
Okay... I'll settle this Visual Studio stuff. I'm gonna count my lines. Once with everything. The other withonly the *.designer.* files.

Everything: 1524
Designer Files: 1178...

So 1178/1524
589/762
77.3% of my visual studio project is Designer code.  Though take into consideration that C# takes up more lines that Basic with all the braces and stuff. So. SirCmpwn. Do a *.Designer.cs search on your project and see what happens.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Really Long Source Code
« Reply #34 on: April 11, 2011, 05:28:55 am »
Okay... I'll settle this Visual Studio stuff. I'm gonna count my lines. Once with everything. The other withonly the *.designer.* files.

Everything: 1524
Designer Files: 1178...

So 1178/1524
589/762
77.3% of my visual studio project is Designer code.  Though take into consideration that C# takes up more lines that Basic with all the braces and stuff. So. SirCmpwn. Do a *.Designer.cs search on your project and see what happens.

Maybe, I forgot that tiDE has a giant Assembler, and code for extra classes (like DockPanel and Text Editor).

SirCmpwn

  • Guest
Re: Really Long Source Code
« Reply #35 on: July 15, 2011, 05:49:10 pm »
Update on the size of tiDE:
Total lines of code: 46,778
Total lines of code (non-generated): 40,226  [This means ~86% is manually written]
Total size of source and binaries: 30.6 MB
Size of source alone: 6.86 MB (total size of everything you should have to run tiDE without source)
Number of files: 736
Number of folders: 148

There are 15 projects that contribute to the tiDE code base.  They are:
-Assembly (exposes methods for manipulating assembly files, including assembly and disassembly
-Basic (exposes methods for manipulating TI-Basic files, including tokenization and detokenization)
-Brazil (core z80 emulation library)
-DCS7Design (a graphical designer for DCS7 GUI)
-GenerateTable (one of several programs that assist the other libraries, this one generates a table file for Assembly)
-GenerateTI83PlusIncDocumentation (another assist project, it generates documentation in XML for ti83plus.inc from WikiTI)
-GenerateTIBasicDocumentation (assist project, generates documentation in XML for TI-Basic commands from TI|BD)
-GenerateTIBasicHighlighting (assist project, generates the file that TI-Basic syntax highlighting is based on)
-GenerateZ80CodeCompletion (assist project, generates the z80 documentation that is used for code completion)
-Stetson (TI-83+ emulator)
-TableFileEditor (assist project for manipulating files created by GenerateTable)
-TI Developer API (library for manipulating TI files such as 8xp and 8xk files)
-tiDE (the main interface that ties together all the other projects and provides an IDE)
-Tokenizer (old project that provides some support to Basic)
-WinFormsUI (controls the dock capability of tiDE)

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: Really Long Source Code
« Reply #36 on: July 16, 2011, 09:02:33 am »
A java game I'm working at has 9 files, each with an average of 2000 lines. That's a total of around 18000 lines of java code. And I still have a lot to do.
My largest basic program is almost 700 lines and over 11Kb large, which is large for a basic program which has almost no text in it.
Largest axe program: 40 lines. I haven't coded much in axe...
My largest (and only) asm program is now around 2500 lines, and also with this program, I still have a lot to code. I think I'm abouth halfway thereof the coding part, then I still have to make levels..

I don't think I can beat someone with the lenght of my programs, but maybe with the lenght of routines: My longest ams routine is 798 lines of (unoptimised) code.
« Last Edit: July 16, 2011, 07:15:49 pm by ben_g »
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Really Long Source Code
« Reply #37 on: July 24, 2011, 09:59:29 am »
SirCmpwn, could you make something that loops all folders and all files in a directory and adds all lines? So it's not just for Visual Studio Projects, but for any directory? I wanna count the lines in wxwabbitemu.

SirCmpwn

  • Guest
Re: Really Long Source Code
« Reply #38 on: July 24, 2011, 02:16:06 pm »
Yeah, look back a ways, the program I already posted does this.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Really Long Source Code
« Reply #39 on: July 24, 2011, 03:41:03 pm »
Update on the size of tiDE:
Total lines of code: 46,778
Total lines of code (non-generated): 40,226  [This means ~86% is manually written]
Total size of source and binaries: 30.6 MB
Size of source alone: 6.86 MB (total size of everything you should have to run tiDE without source)
Number of files: 736
Number of folders: 148

There are 15 projects that contribute to the tiDE code base.  They are:
-Assembly (exposes methods for manipulating assembly files, including assembly and disassembly
-Basic (exposes methods for manipulating TI-Basic files, including tokenization and detokenization)
-Brazil (core z80 emulation library)
-DCS7Design (a graphical designer for DCS7 GUI)
-GenerateTable (one of several programs that assist the other libraries, this one generates a table file for Assembly)
-GenerateTI83PlusIncDocumentation (another assist project, it generates documentation in XML for ti83plus.inc from WikiTI)
-GenerateTIBasicDocumentation (assist project, generates documentation in XML for TI-Basic commands from TI|BD)
-GenerateTIBasicHighlighting (assist project, generates the file that TI-Basic syntax highlighting is based on)
-GenerateZ80CodeCompletion (assist project, generates the z80 documentation that is used for code completion)
-Stetson (TI-83+ emulator)
-TableFileEditor (assist project for manipulating files created by GenerateTable)
-TI Developer API (library for manipulating TI files such as 8xp and 8xk files)
-tiDE (the main interface that ties together all the other projects and provides an IDE)
-Tokenizer (old project that provides some support to Basic)
-WinFormsUI (controls the dock capability of tiDE)

Holy crap, that's massive!!!

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Really Long Source Code
« Reply #40 on: July 24, 2011, 04:56:29 pm »
Today I had the opportunity to read gcc.c and python.c and more files of the source code of GCC and Python.

Python's Source Code is very well organized and very well commented, but GCC is just crazy O.O