Now let's talk about variable naming conventions...
3. Always comment out old code (never delete unless major version update)
Allman for me (I used to use write in Pascal / Delphi).
Back in the good(?) old days, indentation (along with anything else that might actually make a program readable, like only having one statement per line) was shunned, in the interests of making the darned thing run faster:
https://s9.postimg.org/p7vendtnz/Loc_Bas.png
An example of Locomotive BASIC (for Amstrad CPCs) I've just found at random, to illustrate the way we used to do things. Careful scrutiny of the code reveals this little gem of 'structured programming':
230 ...FOR n=1 TO 10:IF n>3 AND n<8 THEN 250
240 LOCATE citypos,25: PRINT"[]";
250 NEXT...
(THEN 250' is shorthand for 'THEN GOTO 250'). Why write two for-next loops to do something, when you can replace them with a single one that does the same thing, and as a bonus does nothing at all for the hell of it...
I come from Amiga and DOS where code file size was important and each new line was one or two bytes extra so it was K&R lol.
Ah yes the old basic's another time when memory and space was limited I remember coding on a zx81 with 1Kb RAM (yes 1024 bytes) machines by today's standards are behemoths.
I'm a tabs man.
Next up, opening braces on same line as the previous statement or next line, and should they be indented with the next code block or underneath the previous line?
I use Allman style
https://en.wikipedia.org/wiki/Indentation_style#Allman_style
if (csTJ == "to blame") {
/* all is right with the world */
} else {
/* well it's not my fault */
}
stick to spaces or tabs but don't mix them.
Ah yes - the joys of storage poverty....![]()
Thank you nerds (I mean that with affection), your responses have made me smile this morning. Oh, and Aasgard ... jeez dude, get yourself a version control system like sccs or cvs. LOL