Author Topic: One File VS Multiple Files  (Read 9029 times)

0 Members and 1 Guest are viewing this topic.

Offline qazz42

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1130
  • Rating: +30/-12
  • hiiiiiiiii
    • View Profile
Re: One File VS Multiple Files
« Reply #15 on: March 18, 2011, 05:05:19 pm »
In C# I like to use many source files, but in TI-Basic I try to limit it >.>

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: One File VS Multiple Files
« Reply #16 on: March 19, 2011, 03:41:41 pm »
I generally use multiple files for anything other than Pure TI-Basic.

Same. I always keep everything for a BASIC project (data and all) in a single program.

For most computer projects, I also keep it in a single file unless they should be separated for practical reasons (such as to create a public class in Java). Same with my ASM projects, mainly because they're mostly really small.

But for Axe, it's completely different. I split the source up into insanely small portions -- Contra is currently at 21 subprograms, each of which is around 100-150 bytes. (I think XDE was at 15 or so.) It compiles a bit slower, but it's much, much easier to find and rewrite portions of the project, especially considering the way I compress my source x.x
« Last Edit: March 19, 2011, 03:42:13 pm by Deep Thought »




Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: One File VS Multiple Files
« Reply #17 on: March 19, 2011, 03:44:05 pm »
I generally use one file if I'm programming on the computer, but multiple files if I'm programming on-calc.  If I'm in Basic, I combine all of my files into one before the final release. ;)

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: One File VS Multiple Files
« Reply #18 on: March 19, 2011, 03:50:33 pm »
I generally use multiple files for anything other than Pure TI-Basic.

Same. I always keep everything for a BASIC project (data and all) in a single program.

For most computer projects, I also keep it in a single file unless they should be separated for practical reasons (such as to create a public class in Java). Same with my ASM projects, mainly because they're mostly really small.

But for Axe, it's completely different. I split the source up into insanely small portions -- Contra is currently at 21 subprograms, each of which is around 100-150 bytes. (I think XDE was at 15 or so.) It compiles a bit slower, but it's much, much easier to find and rewrite portions of the project, especially considering the way I compress my source x.x

The shoot-em-up game you make had 6 files if I remember :S

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: One File VS Multiple Files
« Reply #19 on: March 19, 2011, 05:15:42 pm »
I'm going to agree with Sir's general opinion here. TI-Basic, for small programs, is not, IMO, a good idea because you can only edit one program at a time, so when you switch sub-programs you have to scroll. It also fills the programs menu and the arch/del one too. Of course, that's not practical for larger programs, and in that case you might be working on a sub-program for long enough to make switching not a concern. The same general idea goes for most calculator things, I think.
As for computer languages, you can edit multiple files at once and using multiple files is generally painless. It provides for more organization and is simple enough to do, so why not? As for the many files problem, source (for non-interpreted languages) can be packed in an archive (like .zip) or put in a separate folder, and, in the case of Java, .jar files put everything into one file.
There's my two cents :) (This isn't meant to attack any others' posts, just to be certain :P)
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: One File VS Multiple Files
« Reply #20 on: March 19, 2011, 05:38:39 pm »
Well, it's nice to see everyone agreeing on something :P

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: One File VS Multiple Files
« Reply #21 on: March 19, 2011, 05:45:10 pm »
I'm going to agree with Sir's general opinion here. TI-Basic, for small programs, is not, IMO, a good idea because you can only edit one program at a time, so when you switch sub-programs you have to scroll. It also fills the programs menu and the arch/del one too. Of course, that's not practical for larger programs, and in that case you might be working on a sub-program for long enough to make switching not a concern. The same general idea goes for most calculator things, I think.
As for computer languages, you can edit multiple files at once and using multiple files is generally painless. It provides for more organization and is simple enough to do, so why not? As for the many files problem, source (for non-interpreted languages) can be packed in an archive (like .zip) or put in a separate folder, and, in the case of Java, .jar files put everything into one file.
There's my two cents :) (This isn't meant to attack any others' posts, just to be certain :P)

Unless if you program Basic/Axe on the computer like me.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: One File VS Multiple Files
« Reply #22 on: March 19, 2011, 05:54:44 pm »
Ah, yes, I forgot about that. Then nothing wrong there :)
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: One File VS Multiple Files
« Reply #23 on: March 19, 2011, 06:09:04 pm »
Ah, yes, I forgot about that. Then nothing wrong there :)

But it's also boring to put *all* files on Wabbit.

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: One File VS Multiple Files
« Reply #24 on: March 19, 2011, 06:12:09 pm »
You can just send them all in one go, just hold ctrl while you click on the files to send then drag. ;)

Myself, it depends on what type of project it is.  Levels, definitely outside file, also I tend to split level editors from the games if they don't fit together.
I prefer to keep it to one file, tho--less stuff in the program list.
Vy'o'us pleorsdti thl'e gjaemue

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: One File VS Multiple Files
« Reply #25 on: March 19, 2011, 11:58:40 pm »
Ah, yes, I forgot about that. Then nothing wrong there :)

But it's also boring to put *all* files on Wabbit.
Yeah that's one of the reason why I prefered to code on-calc.

Offline Jonius7

  • python! Lua!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1918
  • Rating: +82/-18
  • Still bringing new dimensions to the TI-nspire...
    • View Profile
    • TI Stadium
Re: One File VS Multiple Files
« Reply #26 on: March 20, 2011, 12:20:48 am »
In most cases, it's better to have a single file, however if it is a major program, maybe up to 8 files are ok if each of them are major sections of the program. If there are levels, I'd prefer to have all levels in 1 file, but this may depend as it could be better if each level had a separate file. It's important to find a balance between 1 program or several programs.
(taken from my experience using a Casio CFX-9850)
Programmed some CASIO Basic in the past
DJ Omnimaga Music Discographist ;)
DJ Omnimaga Discography
My Own Music!
My Released Projects (Updated 2015/05/08)
TI-nspire BASIC
TI-nspire Hold 'em
Health Bar
Scissors Paper Rock
TI-nspire Lua
Numstrat
TI-nspire Hold 'em Lua
Transport Chooser
Secret Project (at v0.08.2 - 2015/05/08)
Spoiler For Extra To-Be-Sorted Clutter:

Spoiler For Relegated Projects:
TI-nspire BASIC
Battle of 16s (stalled) | sTIck RPG (stalled) | Monopoly (stalled) | Cosmic Legions (stalled)
Axe Parser
Doodle God (stalled while I go and learn some Axe)

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: One File VS Multiple Files
« Reply #27 on: March 26, 2011, 04:31:27 pm »
Didn't the 9850G use like 2-4 bytes per BASIC token by the way? I remember hearing something about how 9850G programs were twice larger than 9860/PRIZM ones.