Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Old Programming Habits?

Author
Message
Leeorg
19
Years of Service
User Offline
Joined: 5th Jul 2005
Location:
Posted: 12th Jul 2005 07:51
A tad off topic maybe, but just wandering if anyone out there has been on and off programming for years and still implements old habits that were necessary when the 8 bit machines were around and memory was a premium?
For instance,
a. i always try and cram as much code onto a single line as possible
b. I always minimise spaces and use abbrieviations for varibles and keep a list of whats what even though i could use the full english word.
c. Once I have wrote a subroutine, I sometimes scan through it see if I can improve on it - make it smaller (so as to execute faster? - once upon a time this would have been necessary)
d. I keep remarks to a bare minimum. Only important ones allowed!

Does anyone else have any odd or old habits?
NanoBrain
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 12th Jul 2005 11:37
Leeorg,

I would say myself that these old habits of yours are good habits. I not too sure of the use of cramming as much code onto a single line as possible, though. The effeciency of spaces and the usage of abbreviations are definitely a plus in DB, due to it being an interpreted language. Also, in agreement with you, a subroutine can never be too compressed and edited.

I believe, that still today, effieciency is very important, and might always be. Not only for speed, but for the organization of one's program, to the extent that another programmer can quickly touch-up another's program.


+NanoBrain+
P Schnell
20
Years of Service
User Offline
Joined: 13th Feb 2005
Location:
Posted: 14th Jul 2005 07:53 Edited at: 14th Jul 2005 07:54
Do smaller variable names really help in DB? Most of my variables are made so you can look at the code and know what each one is. Same with remarks. I always thought the compiler took them out and did what it needed with variable names while it was making the program.

I wasn't programming anytime before WinXP but when I'm done with a program and have time on my hands I go back to the code and make a seperate copy with as little subs and loops as possible.

Oh, and when I'm doing a lot of DBdrawing commands I just do them all on a memblock and then make the bitmap out of it when I refresh. That might not help but I do it anyway.

Leeorg
19
Years of Service
User Offline
Joined: 5th Jul 2005
Location:
Posted: 14th Jul 2005 15:14
Smaller or larger varibles makes no difference anymore. It used to, when memory was at a premium you streamlined your programs as much as possible. I remember seeing program listings and a table would be on the page stating what each varible stood for and what it does.
Remarks also used to take memory up so were used only where definitely needed.
See I've been on and off programming since I was five on a BBC Micro B, so I've been wandering if there are many differences to the way a programmer approaches his program compared with back then.
Any more people want to share there thoughts?

Login to post a reply

Server time is: 2025-05-22 19:59:15
Your offset time is: 2025-05-22 19:59:15