We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
The 7 Deadly Sins for Gophers - John Gregory
Discover the 7 deadly sins of gopherhood and learn to write simple, idiomatic Go code.
- Don’t be lazy, don’t neglect writing tests, and don’t write code that’s hard to understand.
- Avoid over-engineering and premature optimization.
- Don’t use Go’s silence of compilation as an excuse for lack of commenting.
- Don’t be afraid to take a simple approach and avoid unnecessary complexity.
- Use Go’s built-in support for concurrency and goroutines wisely.
- Avoid overusing interfaces and instead use simple, clear functions.
- Learn to write idiomatic Go code by reading others’ code and learning from their mistakes.
- Don’t panic when things go wrong - pause, think, and refactor.
- Use Go’s error handling mechanisms effectively.
- Keep your code simple and easy to understand.
- Don’t overcomplicate your code with unnecessary complexity.
- Learn from your own mistakes and don’t repeat them.
- Keep your code organized and easy to maintain.
- Use abstractions wisely and avoid unnecessarily complex abstractions.
- Don’t be afraid to use existing libraries and tools.
- Don’t overcomplicate your code with unnecessary features.
- Learn to control complexity and avoid unnecessary complexity.
- Keep your code readable and maintainable.