Best possible code

2025/12/27

Type
Learning Resource
Format
Glossary Article
Version
General
Subject Tags
Code
Assets
All else
Copyright 2016-2026, GDQuest
Created
2026/02/16
Updated
2025/12/27

Best possible code

There are a lot of beliefs about what is the best code, but almost all of it is subjective.

There are many parameters that can be used to determine if code is good or not. For example:

Programmers say that some methods increase such or such metric. Methods like:

term="object_oriented_programming" label="Object Oriented Programming" /> is supposed to make code easier to read and more fitting to requirements.

lower the amount of bugs.

to lower the amount of bugs too and make them faster to fix.

of code and make bugs harder to introduce.

We've been studying all the metrics above, and others, and all those methods, more or less since programming exists. And in about 60 years of studies, the resounding answer is: we do not know.

There are no clear numbers demonstrating any method is better than any other, on any of those metrics. There are a lot of studies demonstrating programmers believe such or such method is better, but that is not supported empirically.

In other words, all methods seem relatively equivalent generally (some may be better in specific cases).

There are a few things we do know increase code quality (across all metrics):

  1. Amount of sleep
  2. Pair programming and code reviews

These two elements increase all metrics. So make sure you get good sleep, and that you show your code to others!

To know more about such things, here's a YouTube playlist with good talks about empirical approaches to software engineering:

Become an Indie Gamedev with GDQuest!

Don't stop here. Step-by-step tutorials are fun but they only take you so far.

Try one of our proven study programs to become an independent Gamedev truly capable of realizing the games you’ve always wanted to make.

Nathan

Founder and teacher at GDQuest
  • Starter Kit
  • Learn Gamedev from Zero
Check out GDSchool

You're welcome in our little community

Get help from peers and pros on GDQuest's Discord server!

20,000 membersJoin Server

Contribute to GDQuest's Free Library

There are multiple ways you can join our effort to create free and open source gamedev resources that are accessible to everyone!