Justin Fuller

Go Tip: Prefer Function Arguments

Here's a quick Go language tip: Prefer function arguments over struct fields. I'll explain why.

Self-Documenting Code

At my first real Software Engineering job, the lead engineer taught me code should be self-documenting. In practice, this meant we did not document our code.

Helper Functions

I wake up in the morning. The sun is bright, the air is warm. The day is Saturday. What do I do? Of course, I settle down with my laptop to write some code. I'm just waking up so I need to start simple to get the ol’ synapses firing.

Why do we fall into the rewrite trap?

One of my favorite reads is Joel Spolsky's Things You Should Never Do. He wrote this post almost twenty years ago, outlining the downfall of Netscape and others because they spent years rewriting working code. His solution is, unsurprisingly, to refactor. About a year before Joel wrote Things You Should Never Do, Martin Fowler published his popular book, Refactoring: Improving the Design of Existing Code. So, my question is, if we as a community figured out — twenty years ago — that we should stop rewriting programs, why is it still commonly done today?

Go Things I Love: Channels and Goroutines

This series, Go Things I Love, is my attempt to show the parts of Go that I like the best, as well as why I love working with it at The New York Times. In my last post Go Things I Love: Methods On Any Type, I demonstrated a feature of Go that makes it easy to build Object-Oriented software. This post, Channels and Goroutines, will demonstrate a few neat concurrency patterns in Go.

Go Things I Love: Methods On Any Type

Now 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 code

Are 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 better

TL;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.

Next page

👋 Hey, I'm Justin. I occasionally write about things. I'm married with a bunch of kids. I work at The New York Times. I make things like Better Interviews, Purchase Plan and Really Simple Notes.

Links

Better Interviews Github Purchase Plan Really Simple Notes

👋 Hey, I'm Justin. I occasionally write about things. I'm married with a bunch of kids. I work at The New York Times. I make things like Better Interviews, Purchase Plan and Really Simple Notes.

Links

Better Interviews Github Purchase Plan Really Simple Notes