Go Time: Golang, Software Engineering

The se7en deadly sins of Go

49 snips
Oct 25, 2023
In this spooky episode, the hosts discuss John Gregory's seven deadly sins of Go, including the importance of contextual comments, the concept of pride as a sin, building a flexible JSON schema parsing library, the use of channels for concurrency, balancing mindset and error handling, avoiding over engineering, unpopular opinions in horror films, and the opinion on Go as a language for software engineering and design.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
ADVICE

Contextual Comments

  • Write code comments that explain the "why" behind the code, not just the "how".
  • Focus on business logic and context, not obvious code functionality.
ANECDOTE

Overly Opinionated Libraries

  • John Gregory needed a JSON schema parsing library for code generation but found none suitable.
  • Existing libraries had private functions, preventing customization, forcing him to write his own.
ADVICE

Library Design

  • When designing libraries, consider how others might use them in unintended ways.
  • Offer options and avoid being overly prescriptive, allowing for flexibility and extension.
Get the Snipd Podcast app to discover more snips from this episode
Get the app