Use the KISS principle of “keep it simple, stupid” as a guide for finding the simplest solution to the problem at hand.
In programming, that means keeping your code as streamlined as possible. Avoid adding unnecessary complexity.
There’s no need to reinvent the wheel if a proven and simple technique solves your challenge.
Why use a fancy new technology just for the sake of using it?Unity already includes numerous solutions in its Scripting API.
For example, if the existing Hexagonal Tilemap works for your strategy game, skip writing your own. The best code you can write is no code at all.
The related YAGNI principle (“you aren’t gonna need it”) instructs you to implement features only as you need them.
Don’t worry about features that you might need once the stars align.
Build the simplest thing that you need now and build it to work.
The first step of software development is to understand what you are trying to solve. This idea might seem like common sense, but too often developers get bogged down in implementing code without understanding the actual problem, or they'll modify the code until it works without fully grasping why.
Instead of adding code to fix a problem, investigate the root cause. Ask yourself why it’s happening rather than applying a band-aid solution.
An example of a problem is: the vehicle will not start.
Why? – The battery is dead. Why? – The alternator is not functioning. Why? – The alternator belt has broken. Why? – The alternator belt was well beyond its useful service life and not replaced. Why? – The vehicle was not maintained according to the recommended service schedule. (A root cause)[3] The questioning for this example could be taken further to a sixth, seventh, or higher level, but five iterations of asking why is generally sufficient to get to a root cause.[4] The key is to encourage the troubleshooter to avoid assumptions and logic traps and instead trace the chain of causality in direct increments from the effect through any layers of abstraction to a root cause that still has some connection to the original problem. In this example, the fifth "why" suggests a broken process or an alterable behavior, which is indicative of reaching the root-cause level.