Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Coding Styles
#34
Gosub:
I hate Gosub and only use it when necessary. To my mental state is adds to the clutter and muddies the flow.

Subs/Functions:
I love Subs/Functions. I think it clarifies the code and makes it much more readable.  If there is a large amount of cluttered code and moving it to a Sub/Function will make things more readable I will sometimes create a Sub/Function even if that is only used in a couple places.  Clarity and ease of understanding is king for me.

Libraries:
With my libraries I am anal about keeping things compatible and running smooth.  If there is a Sub/Function that does not fit the current need, I will change it.  A lot of my libraries have control parameters that I will pass to adapt for these current 'updates' - this makes sure that the new features will not break the functionality for legacy code (ok...sometimes yes, but rarely). I use the pipe character a lot for embedding controls into passed data for an update to a Sub/Function.  I like that character since I never use it with real world data.

If/ElseIf/Else:
Unlike Steve, I do like the If/ElseIf/Else for logical processes. To me it is easier to read and sometimes necessary for concise code.

Comments:
I love comments...although I will have to admit that I write and debug, and then go back to add comments.  I will change the code too many times to comment while I am writing it.  A lot of the time I sit down with an idea and start typing well before I have all of the logic worked out - I go on the fly.  Quite often it needs changing...and sometimes a lot of changing.

Boolean:
I love Boolean expressions.  The ability to use them as not only operators, but to also be able to use them for And/Or expressions without actually using And/Or is tits! (that is a throwback term from my childhood and it means awesome for you newbies!).

Line Numbers:
Wait...whaaa?!?  Line numbers are still a thing?  Holy crap people - do you still use punch cards too?

Suffixes/type identifiers:
I love them. It allows me to immediately recognize the type of variable and (hopefully) see my errors quicker.
Reply


Messages In This Thread
Coding Styles - by Pete - 08-09-2024, 03:09 PM
RE: Coding Styles - by SpriggsySpriggs - 08-09-2024, 03:21 PM
RE: Coding Styles - by TerryRitchie - 08-09-2024, 05:29 PM
RE: Coding Styles - by Pete - 08-09-2024, 03:54 PM
RE: Coding Styles - by bplus - 08-09-2024, 04:03 PM
RE: Coding Styles - by SMcNeill - 08-09-2024, 09:03 PM
RE: Coding Styles - by Pete - 08-09-2024, 04:16 PM
RE: Coding Styles - by SpriggsySpriggs - 08-09-2024, 06:40 PM
RE: Coding Styles - by TerryRitchie - 08-09-2024, 07:52 PM
RE: Coding Styles - by Jack - 08-09-2024, 07:10 PM
RE: Coding Styles - by Jack - 08-09-2024, 07:19 PM
RE: Coding Styles - by Kernelpanic - 08-09-2024, 10:29 PM
RE: Coding Styles - by CharlieJV - 08-09-2024, 10:56 PM
RE: Coding Styles - by Kernelpanic - 08-09-2024, 11:21 PM
RE: Coding Styles - by CharlieJV - 08-09-2024, 11:27 PM
RE: Coding Styles - by Pete - 08-10-2024, 03:46 AM
RE: Coding Styles - by SMcNeill - 08-10-2024, 04:55 AM
RE: Coding Styles - by JRace - 08-10-2024, 09:41 AM
RE: Coding Styles - by SMcNeill - 08-10-2024, 10:43 AM
RE: Coding Styles - by OldMoses - 08-10-2024, 12:08 PM
RE: Coding Styles - by CharlieJV - 08-10-2024, 02:11 PM
RE: Coding Styles - by Pete - 08-10-2024, 02:55 PM
RE: Coding Styles - by bplus - 08-10-2024, 03:19 PM
RE: Coding Styles - by SMcNeill - 08-10-2024, 03:41 PM
RE: Coding Styles - by Pete - 08-10-2024, 04:28 PM
RE: Coding Styles - by SMcNeill - 08-10-2024, 11:08 PM
RE: Coding Styles - by Kernelpanic - 08-10-2024, 06:00 PM
RE: Coding Styles - by Pete - 08-10-2024, 07:30 PM
RE: Coding Styles - by TerryRitchie - 08-10-2024, 07:53 PM
RE: Coding Styles - by TempodiBasic - 08-11-2024, 12:46 PM
RE: Coding Styles - by Pete - 08-11-2024, 06:45 PM
RE: Coding Styles - by Kernelpanic - 08-19-2024, 06:35 PM
RE: Coding Styles - by quickbasic - 09-04-2024, 06:09 PM
RE: Coding Styles - by dano - 09-09-2024, 12:46 AM



Users browsing this thread: 33 Guest(s)