Design Principles Wiki
Introduction
I do a lot of golang code review. This wiki was written so that I can link it in code review without having to write about concept over and over again. If you find yourself trying to explain concepts that are contained here feel free to link pages to people. Other usecase is explorations, maybe you will find something that is new and iteresting.
Articles here are meant as hooks into topics with some examples in GO, not exhaustive descriptions. If I have further reading on the topic it will be linked at the botom of the page.
Practices here heavily use abstraction which is done via interfaces. They use dynamic dispatch which makes code slower. I find that its fair price to pay for flexibility. Faster alternatives to interfaces are code generation with go generate
or generics but both of them feel too clumsy.
Some practices are based on OOP(or OOD - object oriented design). I feel like OOP gets a bad name in the world of programming. Some guidelines, like using inheritence, are bad. I try to cut out the bad parts of OOP/OOD and keep only the ones that work well in the field.
Changeing requirements and uncertain directions are a daily challenge. Thats why this wiki focuses on maintainability.
Some rules are very strict. They help us write applications that are easy to change and reuse. If you don't think you need such strictness feel free to ignore them. Decide what works best for you in your environment.