Recent Representative Line

A single line of code from a large application that somehow manages to provide an almost endless insight into the pain that its maintainers face each day.

Apr 2019

Log Every Error

by in Representative Line on

Tom C inherited some Go from another developer, and writes, “I’m pretty sick of finding this sort of stuff in this code.”

	if log, err = dockerservice.GetLoggerInstance(); err != nil {
		log.Err(fmt.Sprintf("Logger error: %v \n", err))
  }

Tern Your View

by in Representative Line on

We all just love ternaries around here. So much. A powerful form of code golf, they can clarify and they can confound, but usually it’s just confounding.

Christopher sends us this example, saying, “This is an accurate indicator of the rest of the code.”