Skip to content

2020🔗

Set Theory Basics in the Eyes of 10 Year Old

My morning. Explaining set and intersect theory basics to my 10 year old with Minecraft gamer tags. Trying to justify the need to know this, the best I could come up with was his future need to build a shark attack report accurately.

Kids are the best. Tech is fun. What job would have me spin up with docker-compose up -d my MSSQL container, write a quick SQL example with INTERSECT, UNION and all to demonstrate this magic.

Followed it up with a half-hearted lie that my day is comprised of cmatrix 😂 which he didn't believe for more than a couple seconds.

{{< asciinema id="DnQ0MCgZekv11MggByfjqRNNT" >}}

Ways to Improve Codespaces Local Docker Experience

I've been enjoying Codespaces local development workflow with Docker containers.

I'm using macOS and on Docker experimental release. Here are some ideas to get started on improving the development experience.

  • Clone the repository in the virtual volume (supported by the extension) to eliminate the binding between host and container. This would entail working exclusively inside the container.
  • Increased Docker allowed ram to 8GB from the default of 2GB.

Any other ideas? Add a comment (powered by GitHub issues, so it's just a GitHub issue in the backend)

Keep the Snippet Simple

I took a quick step back when too many parentheses started showing up. If you question the complexity of your quick snippet, you are probably right that there is a much simpler way to do things.

I wanted to get a trimmed message of the results of git status -s. As I worked on this snippet, I realized it was becoming way overcomplicated. 😆

$(((git status -s) -join ',') -split '')[0..20] -join ''

I knew my experimentation was going down the wrong road, so I took a quick step back to see what someone else did. Sure enough, Stack Overflow provided me a snippet.

$(((git status -s) -join ','))[0..20] -join ''     # returns the string '12345'

Moral of the story... there's always someone smarter on Stack Overflow. 😆

Go R1 Day 12

Day 12 of 100

progress

  • Worked on Algolia index project to do atomic updates on search index on my blog.
  • Worked with json, structs, ranges, and more.
  • Saw success with the first value in my output now correctly parsing out the title from the front matter.
  • Implemented zerolog.
  • Used front library to parse yaml front matter into map.
  • Accessed map to get title into json.

Hoping that eventually I can build out a Go app for sharing that's the equivalent of "atomic alogia" allowing diff updates. I haven't found anything like that for hugo so far.

Deadcells

Beat Deadcells with 3 cells active. Uninstalled. There is no way I'd find any pleasure in life trying to do more. This game is an endless pit of "git gud".

Now to go do something productive 😄

Improve Your Cloudwatch Debugging Experience With Cw

A quick fix to improve your debugging of remote commands in AWS is to install cw.

With a quick install, you can run a command like: cw tail -f --profile=qa --region=eu-west-1 ssm/custom-automation-docs/my-custom-doc. This will give you a real-time stream of what's running.

You can also use the AWS Visual Studio Code extension, but I prefer having a terminal open streaming this as I don't have to go in and refresh any further tools to see what's happening. I tend to always start with a single instance/resource for debugging so this is a great way to remove the barrier to visibility a bit more.

Delta Improves the Git Diff Experience

Checkout delta for a much-improved git diff experience. I typically use VSCode or a GUI based editor because I find the diff view pretty messy by default.

This new diff view is a perfect example of a simple CLI tool that improves a development workflow by just fixing something I didn't know could easily be fixed. 😀

delta diff viewer

Go R1 Day 10

Day 10 of 100

progress

  • Experimented with CLI tool using go-prompt
  • Customized initial options
  • OS independent call to get user home directory.
  • Iterated through a directory listing
  • Used path join to initialize path for directory search.
  • One challenge in working with structs being returned was figuring out how to print the values of the struct. Initially, I only had pointers to the values coming back. This made sense, though, as I watched a tutorial this weekend on slices, and better understand that a slice is actually a small data structure being described by: pointer to the location in memory, length, and the capacity of the slice. Without this tutorial, I think seeing the pointer addresses coming through would have been pretty confusing.
  • In reading StackOverflow, I realized it's a "slice of interfaces".
  • Worked with apex logger and moved some of the log output to debug level logging.
  • Final result

{{< asciinema id="uAGRQLD2Tuj3NVgDePMGqVnT1" >}}

source

{{< gist sheldonhull "709b7cf02c40863c3c845de9b4fb6d5a" >}}