3 fundamental programming concepts you need to know

You may have decided to pick up coding as a hobby. Maybe you are developing the next great game/app. And probably you did not go to school to get a degree in computer science.

You picked up a programming book from Amazon or Barnes & Noble and taught yourself C++, python or Java.

You think you are ready to develop a game/app. However, I have a hard truth for you.

Simply knowing a computer language does not make you fit to develop apps or games.

Yes, you can develop a game/apps but most likely they will be a mess.

Knowing a Computer Language is like knowing the Alphabet. You may know your vowels and consonants, but this does not mean that you know how to write.

Once you know a computer language, the 3 things you need to learn are:

  • Object-Oriented Programming Principles
  • Design Patterns
  • Data Structures

These three concepts will take your coding to the next level.

Object-Oriented Programming Principles

There are 7 Object-Oriented Programming principles you should always keep in mind when designing your game or app. They are:

  1. Encapsulate what varies
  2. Code to the interface, not to the implementation.
  3. Favor composition over inheritance.
  4. Strive for loosely coupled designs between objects that interact.
  5. Classes should be open for extension but closed for modifications.
  6. Depend on abstractions. Do not depend on concrete classes.
  7. A class should have only one reason to change.

Design Patterns

The purpose of Design Patterns is to make your coding:

  • Modular
  • Flexible
  • Adaptable
  • Maintainable

With design patterns you no longer code, instead you Design.

You are no longer the mason, you are the architect.

With design patterns, you will design apps that are

  • Easy to modify
  • Simple to add functionality
  • Painless to maintain

Some of the design patterns you should know are:

Data Structures

There are more elegant ways to perform a Search or a Sort algorithm than you know.

You don’t want to do a linear search on an array with 10000 elements. You want to use a Binary Tree Search algorithm instead.

You don’t want to sort 10000 elements by brute force, you want to use a Heap Sort algorithm instead.

Data structures teaches you elegant algorithms that make your coding faster, efficient and elegant.

Some data structures you should be familiar with are:

  • Queues
  • Stacks
  • Linked-lists
  • Binary Trees
  • Heaps

Want to receive post like this? Sign up to our newsletter.

Harold Serrano

Computer Graphics Enthusiast. Currently developing a 3D Game Engine.