Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Here's another....file I/O difficulties.
#22
Nice to know new stuff :lol:

In that scenario, I concur and agree with you.

Anyway, for every variable which won't be used within a scope, I'd declare it on top rather than doing it just before it's used. Call it "cosmetic". I just find it more handy, and useful. 'Cause there's an advantage on declaring stuff when it's used if you are inside a delimited chunk of code (that scope thing), but there isn't if you are not.

Btw, when giving hints to code in BASIC, I always encourage coding in the right way, and the right way (for me) is the "pseudo OO" way, I mean, trying to use (or at least emulating) encapsulation as much as possible.

And, trust me, I'm usually working adapting already coded software to fit our needs at work. That means that I've played around with the guts of postnuke, squirrelmail, docmanager and other systems. And I can assure you that 1,000 lines functions are quite common :lol: (and a nightmare). And in Java it's even worse. Sometimes splitting your methods so much is a bad move, mainly 'cause of massive exception handling. Of course you have to break your code in as many functional parts as possible, that's the key to structured programming, but I just want to tell you that "Good functions are no more than 15-25 lines" is not always appliable.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply


Messages In This Thread
Here's another....file I/O difficulties. - by Anonymous - 01-10-2006, 01:26 PM
Here's another....file I/O difficulties. - by na_th_an - 01-10-2006, 07:52 PM
Here's another....file I/O difficulties. - by DrV - 01-16-2006, 03:08 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)