Dashdashforce

Misadventures in software engineering

RM Terrell
RM Terrell
Cover Image for Shoshin 5: Why are we 'pointing' things?

A beginner once asked: why don't we do less?

Other Writings

Blog Rebuild: Onwards

So I burned everything down and rebuilt it. I was in a mood, what can I say?

Creating SQL insert statements programmatically from CSV with Python

On tonights episode of 'Reinventing the wheel' we have this useful little script I made.

How to sort by two keys in an array of objects in JavaScript

Here's how I solved it and created a function that eventually became part of a composed function pipeline for UI data processing.

Pragmatic Programmer Code Navigation Challenges in VS Code

When in doubt, open the command palette and search for it.

Shoshin 4: But what *is* JSON?

So on this installment of 'beginners mind' we have the question of 'what *is* the data I need anyways?' Not what I was sending to the API it turns out.

Learning Java with Co-Pilot

The time saving and experimentation this tool allowed absolutely sped up how quickly I was able to get a PR up for the tests and saved a lot of googling through outdated Java docs.

Five Things VSCode Part 3

Might need to bind this one to a big red button on my desk.

Mocking named exports in Jest unit tests

Apparently it takes forgetting and remembering how to do something about 3 times before I finally decide to take the time to write something down.

Initial thoughts on Github Co-Pilot

You’re not coding with Shodan here, it’s more like coding with Bender. Just keep your expectations in line with that.

Setting up Cypress tests in multiple directories

Such large refactors always have That One Dumb Thing that trips you up for a minute because it's weirdly hard to figure out just from docs.

Setting up a new macOS machine for development

Please don't break any of these things in the future Apple I beg you.

How to write Python on an iPad

Jeff Goldblum might want a word with the engineers over at Github.

How to setup the VSCode python unit test extension in subsystem linux

PYTHONPATH my old nemesis we meet again.

How to get a segmentation violation in Go

Even though I've been writing Go for a bit now there are still occasions when something in the basics jumps out and bites me. This was one of them.

How to use interfaces to create mocks in Golang unit tests

Now that you've successfully made your code more complicated without adding anything of new value to it, let's get to the actual benefits...

A bobblehead and a dev walk into a unit testing bar.

This is the story of how a previous manager solved a persistent testing failure issue by making devs stare at a horse butt on their desk.

Go unit testing in VSCode

Command line tools are great but sometimes its easier to just click a button.

Generating a Go trace and streaming it out of a pod

...never fear there is a solution for that too in the form of using cat.

On learning

Bravely do it wrong, then do it better

Conditional Call Stack Based Logging in Go

The ability to pause everything and inspect every variable at a specific point is like programming with your third eye open in a way that a good old print() statement can't hope to compete with. However...

Five Things VSCode Part 2

...it really comes in handy when you want to go back to something you searched 5 minutes ago and already forgot what it was.

How to see hidden files and folders in the MacOS popup Finder

Oh come on you silly Mac, the folder is right here.

The only constant is change

It's Go time

Rendering React components directly in Django HTML templates.

'The Dream' when I first set up React with Django was to do the obvious.

Docstring Driven Development: For when TDD struggles under the weight of shifting design.

For me at least though, besides all the often talked about reasons for TDD, or at least heavy immediate testing, the mental focus it gives me is what I find to be the greatest benefit.

Variable Ownership and Borrowing in Rust

Stay Rusty my friends.

Variable shadowing and scoping in Rust

Having been raised in the Mad Max-esque craziness that is JavaScript's scoping system, learning Rust has been a real breath of fresh air.

Python and its named reference system

Sometimes it helps to interrogate the man behind the curtain a bit.

Custom snippets in VS Code

The one tricky bit here was those pesky newline characters.

Aliasing JavaScript paths in Webpack, Eslint, Jest, and VSCode

Coming from the world of Python with relative imports this all seemed pretty gross to me...

Shoshin 2: Jest tests can be ran asynchronous

Me and async clearly don't have a great relationship...

Setting up different Webpack configs for prod and dev

'Why are we running Webpack developer mode builds on a production test server?' '...good question I'll get right on that.'

Dividing a Git branch after opening a PR

Maybe you forgot to create a new branch for the new features (not like I would ever do such a thing, no sir)...

The Scorched Earth Guide to Adding Vue 2 to Django

..if you dear reader are wandering the same vast desert of 'please no more greenfield guides, my boss wont let me burn down our codebase' then I hope the information here is useful to you.

The Scorched Earth Guide to Adding React 16 to Django

I hate greenfield guides.

Adding a key:value pair to a list of Javascript objects

A very specific problem with a very convenient solution.

Shoshin 1: body.json() is async

...it took me half an hour of chasing the REST call red herring before I, you guessed it, read the docs.

Changing VSCode's highlighting behavior

You know you're in deep with a particular editor when you start trying to modify what the double click does.

React Basics: State vs Props

Humble pie, meet face.

Five things I use a lot in Visual Studio Code Part 1

The fact is I'm a fanboy of anything that just works...

Me vs Docker Round 2: Optimizing Dockerfiles

Another layer bites the dust.

Me vs Docker Round 1: Nothing is as easy as it looks.

Turns out you need to actually COPY your project code into the container for it to work.

Finding a changed string in Git history

Down the Git documentation rabbit hole...

Misadventures in Jquery Typeahead

Lesson learned, don't just read the docs, read them close.

Quickly switching from Powershell to Bash using WSL

This is such a silly, small command that you would think it would be obvious, but I had never seen it documented...