Go Things I Love: Methods On Any TypeNow that I am working with Go as my primary language at The New York Times, I want to explore some of my favorite features of the language. I don't intend this to reveal previously unknown features or best practices; I just want to share some of the reasons that I enjoy working with the language.
Keep a git repository of all your practice codeAre you struggling to find projects to showcase to potential employers? Have you been practicing LeetCode as you prepare to interview for a Software Development job? Do you occasionally practice a Kata on Codewars to keep your skills from getting rusty?
Service calls make your tests betterTL;DR: If all tests are mocked, you don’t know if your code works, you only know that, theoretically, it is supposed to work if the integrations adhere to the contract you expect.
Refactoring — oops, I’ve been doing it wrong.Welcome to my intervention. I’m a refactoring addict and I’m not afraid to admit it, but there’s only one problem: I’ve been doing it backward. You see, what I’ve been doing could be more accurately described as premature code abstraction.
How To Write Error Messages That Don’t Suck“A validation error occurred.” Yep. Thanks! The release is imminent; this is the last update that needs to be verified, and I get an error message that’s as useful as the close button on an elevator.