Justin Garrison
March 29, 2022

The right tool for the job - 123dev #65

Posted on March 29, 2022  •  3 minutes  • 539 words
A video billboard looks like it's in 3d

Comments

Working smarter

I was sanding some wood and it was taking me a long time to get off a layer of paint even with rough sandpaper. I figured the paper was clogged or worn even though it looked fine. I swapped the paper without much change.

I remembered I had a new type of sandpaper—SandNet—with the same grit but claiming to be stronger. I was skeptical but didn’t have much to lose. It made a huge difference! I immediately started making progress.

It reminded me of working with familiar—but old—tools and libraries. Yes, they still do the job, but by upgrading the version or trying a newer implementation of the same tool it can make a big impact on the speed and reliability of our work.

Global Economy

I’m (still) dedicating one of my comments every week to the war in Ukraine until the conflict ends.

This war is unlike any in the past. Not only is the world more dependent on other economies, but people are so much more connected and accessible.

Companies pulling their business out of Russia impacts all of the people in Russia no matter if they agree with the war or not. Funding for Ukraine has had a boost thanks to individuals around the world donating. News and updates can be seen quickly via social media.

I have been thankful to follow updates from various sources about people I know defending Ukraine. I would never get these updates on the news and am thankful for the people who have been dedicating time to post the updates.

Go 1.18 introduced generics into the language which can be a great time saver when doing similar tasks with different types. Even with generics you’ll need helpers for a lot of common tasks. lo gives you a ton of helpers so you don’t have to make them yourself.

GitHub - samber/lo: 💥 A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find…)github.com 💥 A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find…) - GitHub - samber/lo: 💥 A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find…)

Regex is one of those scary powerful tools. I’m thankful I spent a considerable amount of time to learn how to use it early in my career, but there are still many things that surprise me. This was one of the simplest and coolest regex expressions I’ve seen in a while.

A regular expression to check for prime numbers — Noulakaz

How to check if any number is prime with a single regex expression.

I often use python3 -m http.server to server a directory over http on my local network. Some systems don’t have python installed so I asked on twitter for alternatives. This one looks like a great option to serve files in a single binary.

GitHub - briandowns/simple-httpd: Drop-in replacement for Python SimpleHTTPServer. Provides TLS via Let’s Encrypt over HTTP2, and auto generated self-signed certificates.github.com Drop-in replacement for Python SimpleHTTPServer. Provides TLS via Let’s Encrypt over HTTP2, and auto generated self-signed certificates. - GitHub - briandowns/simple-httpd: Drop-in replacement for Python SimpleHTTPServer. Provides TLS via Let’s Encrypt over HTTP2, and auto generated self-signed certificates.

Follow me

Here's where I hang out in social media