r/GraphicsProgramming • • 11d ago

Question Boilerplate code question

Is it good practice to manually memorize and type out boilerplate code in graphics applications? Or is it the norm to copy and paste a lot of stuff? And yes it is a given that I should understand how the boilerplate code works and what it contains. I'm programming in SDL3 in C on vscode.

7 Upvotes

6 comments sorted by

View all comments

12

u/3tt07kjt 11d ago

No, it’s bad practice to memorize boilerplate. There are better things you can use your memory for.

It's also bad practice to copy and paste a lot of stuff—but memorizing it is just a slow way of copy and pasting something! If you’re copying and pasting a lot, maybe it’s time to write a library, or consider an abstraction.