All posts

2021

Go R1 Day 44

progress

  • Generated tests for Gorilla Mux and realized need more context and reading on how to properly test Gorilla Mux to avoid excessively mocking.
  • Reviewed two different paradigms for struct methods, using parameters and using global configuration objects.
  read more

Go R1 Day 43

progress

  • Modified forked SharedBrain repo to use yaml parser instead of toml.
  • Modified tests handle invalid casting of interface, which was causing a panic.
1
2
3
4
otherDate, ok := otherDateInt.(time.Time)
if !ok {
  log.Printf("[time.Parse] probable invalid date format %s", plainFilename)
}
  • Improved tests to align to markdown standard formatting.
  • FOSS license scanned on 4 repos to test compliance of licensing for badge.
  • Use goyek templates to build out initial go based build …
  read more

Go R1 Day 41

progress

  • Enabled Go code coverage for tests in VSCode
  • go install github.com/jpoles1/[email protected] to install tooling for generating code coverage badge for readme.
  • Set ![gopherbadger-tag-do-not-edit]() in the readme, and then this gets replaced with a code coverage percentage badge.
  • Generate the required code coverage reports using: go test -coverprofile cover.out followed by go tool cover -html=cover.out -o coverage.html for a visual report.
  read more

Go R1 Day 40

progress

  • Learned a bit more modules vs packages, including internal package special behavior.
  • Configured Azure DevOps remote module source with package level imports.
  • Successfully migrated a utility logger for setup of Zerolog into a seperate remote module for importing.
  • Setup 50% test coverage for logger using gotest test generator.
  • Used Is for test setup. (this would be a cool use of gotest templates test generation)
  • Modified sharedbrain forked repo to generate yaml front matter with dashes. …
  read more

Using Azure DevOps for Private Go Modules

TL;DR

This took a few hours of work to iron out, so figured maybe I’d save someone time.

⚡ Just keep it simple and use SSH

⚡ Use dev.azure.com even if using older project.visualstudio.com to keep things simple.

Modules Support

Unlike GitHub, Azure DevOps has some quirks to deal with, specifically in the odd path handling.

My original goal was to set the default handling to be https support, with the SSH override in git config allowing me to use SSH.

This didn’t work.

  • HTTPS requires …
  read more

GitPod User Feedback

  1. Thank you GitPod for integrating with VSCode. 🎉
  2. Upcoming ssh support, so freaking cool! Are you using Chisel in the backend per the GitHub issues I found discussing workaround? As a Go dev, I’m interested ⚡ I believe Jetbrains + VSCode users will now both be able to leverage the same backend.
  3. GitHub took over the codespace arena with Visual Studio Codespaces being abandoned. Enterprise customers using Azure Repos can’t benefit from any of this new flexibility 💔. Is it in the roadmap …
  read more

Log4 Brains Improves ADR Experience

I’m a fan of architectural decision records. Docs as code sets a practice for a team to track decisions in process and design.

Log4Brains provides markdown template based adr creation, with an option to render a static site for reading.

If you want to start managing your ADRs in a structured way, but benefit from simple markdown as the source files, then this is a great option to consider.

It’s really easy to get started with docker, no npm install required.

Just run: docker run --rm …

  read more

Career Advice From a Drunk Dev on Reddit

Drunk Post: Things I’ve learned as a Sr Engineer has trending with some fantastic discussion on Twitter & Reddit.

What makes it so interesting is the raw and unfiltered message, mixed in with some great humor.

My Background

The author of that post comes from a Data Engineer side.

I’ve been a Database Developer, Production DBA, Cloud Engineer, and other odd hats.

Some of my perspectives is different from the roles I’ve been …

  read more

Highlight Problem Characters in Code

Use Vscode Gremlins to help flag characters that shouldn’t be in your code.

Specifying a Range of Invalid Characters

You can give a range to flag multiple characters with a single rule.

For example, if using macOS and the option key is set to a modifier, it’s easy to accidentally include a Latin-1 Supplemental Character that can be difficult to notice in your code.

To catch the entire range, the Latin-1-Supplement link provided shows a unicode range of: 0080—00FF

Configure a rule …

  read more

The Dark Side

Saw this on a Twitter thread and had to save it. If you’ve ever debated light vs dark themes, you might find this as funny as I did.

Nearly choked on my dinner.