Title: Greeting Hackers,<p>I recently acquired a very uncommon PlayStation 1 devkit and I&#x27;ve set about a personal sidequest to write a _very basic_ PSOne game.<p>I&#x27;ve started by prototyping in JavaScript&#x2F;canvas and am now porting it to C&#x2F;SDL. Once that&#x27;s done I aim to port the C code to use the PSX C SDKs.<p>As well as hobbyism, I&#x27;m doing this to understand C better and at least grasp the practices of C programmers, even if I end up seldom writing C myself.<p>With that out of the way, what practices are good to internalise working in a C project?<p>- What footguns do you often see beginners trip over?<p>- Do you use prefixes like g_ or p_ for globals &#x2F; pointers?<p>- What&#x27;s your &quot;approach&quot; to modularisation in C? Do you prefix non-static function names to mark them as being part of a package?<p>- What are your preferred patterns for ensuring all allocations are eventually freed?<p>- What IDEs do people use for hobbyist C projects? Right now I am editing in VSCode, which is okay, but a little limited<p>- Will I be &quot;okay&quot; in the real world using more &quot;recent&quot; C features like VLAs? Or are these typically proscribed?<p>- Does it generally matter how I do error handling, so long as it isn&#x27;t setjmp &#x2F; longjmp?<p>- Are there any tools that will help me avoid many footguns or UB? I am compiling with -Wall -Wextra -Wpedantic, and using &quot;leaks&quot; on MacOS.<p>Any advice from C programmers new or seasoned is a help!
Upvote: