Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Questions on style
#21
Quote:I forgot to mention that although I prefer one monolithic file in QB64, I do try to keep my code organized by function (general-use, graphics definitions, tile routines, etc.) Having collapsible sections would be nice for this approach. 

I have giant file too for storing reusable subs and functions, my toolbox. But I don't include that file with code I share at forum, I use it to pick out tools I need for a particular app and copy/paste them in. I also keep a testing area for those Subs and Functions.
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply
#22
I have massive single files. Most of the actual work is done in a few key subs so the rest might as well be a library, but whenever I tried to clean up my code along those lines and make some improvements for efficiency, I ended up ignoring it once I was done and fell back into my ordinary habits.

For assets, I create a single file memory dump and use precompiler commands to switch between loading that or the original files which are usually in a subdirectory that has the same name as the program.
Reply
#23
As I've gotten older I've adopted many standards of coding, some K&R and camel case, but I've been slowly trying to adopt some of "The Power of 10" which is what NASA uses. https://en.wikipedia.org/wiki/The_Power_...tical_Code

Its a bit extreme and certainly not necessary for small projects, but in a large base, you kinda have to have a standard.
Reply
#24
(06-26-2023, 12:29 PM)Ultraman Wrote: But I really wish we had code folding in our IDE. Then again, you could also just do it with the Visual Studio Code extension that Grymmjack wrote a tutorial for. It has lots of cool features. I haven't ever been able to take much advantage of these features but there are tons of them.

I'm a huge fan of code folding, but I am spoiled: Gupta Team Developer (aka SQLWindows) programmer over here since 1993, and to this day nothing does code folding like that product.

That said, I rather like TreeSheets for analyzing long and complex code.  If the code is indented, it automagically gets organised perfectly in TreeSheets when pasted into a cell.

To not clog up this thread of discussion, see here: https://qb64phoenix.com/forum/showthread...0#pid17330
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Half baked pipe dream questions - hardware and os Parkland 9 1,332 05-23-2025, 03:00 PM
Last Post: madscijr
  _IIF limits two questions doppler 18 3,059 05-14-2025, 04:33 PM
Last Post: madscijr
  IDE suggestions / editor questions madscijr 14 2,359 05-01-2025, 12:56 PM
Last Post: madscijr
  Questions about INSTR Circlotron 7 1,032 04-27-2025, 03:12 PM
Last Post: mdijkens
  Just a Few Questions TarotRedhand 15 2,885 09-11-2023, 12:10 PM
Last Post: DSMan195276

Forum Jump:


Users browsing this thread: 1 Guest(s)