I like to keep things as simple as possible. Simple things are easy to understand, easy to change/update, harder to make mistakes, quick to make and only focus on the important things. When you write code that is simple and short, you reduce technical debt.
KISS Keep It Simple Stupid. It is easy to make complex things and hard to make simple things.
You can see this mindset in code:
-code is focussed on readability (clear names, structure)
-code is short (little/no boilerplate code)
-code does not use many libraries or compiler settings
-standard features are used
Performance only matters when it matters. Of course it is good practice to think of widely used efficient algorithms when beginning a new project, however, do not make code less readable and don't waste your time to make the code quicker. Choose the most intuitive option, not the fastest option.
Here is what you should do instead if you have measured performance and have noticed that a piece of code is too slow:
This is in the order from do first to do last.
-buy a faster computer -> this might sound expensive, but optimizing code takes time and time is money
-think of a faster algorithm/data structure -> from linear search to binary search
-think of cutting corners in the code -> do not recalculate the same value 1000000x
-think of memory -> try to reduce memory allocations with a buffer, keep allocations small or as a multiple of the page size (4096 bytes), place related elements next to each other in an array
-finally you can try to make code less readable but faster, although the compiler already does a lot of optimization
I'm always interested in working together. Contact me