dash dash force Misadventures in software engineering

Variable Ownership and Borrowing in Rust

One of the central concepts of Rust is variable ownership, and Rust implements rather strict rules around what variables have access or control over what resources at a given time to prevent race conditions or other mangling of data. In general, there is only one variable that binds to a resource at a time. The exception here will be with primit... Read more

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. However that doesn’t make it totally free of some sneaky behaviors. One in particular is the concept of variable shadowing, and how it can lead to some odd code execution when re-declaring variables. Let’s tak... Read more

Python and its named reference system

My first programming languages were Javascript and C#, and at my current job I started working with Python for the first time. Since I learned Python primarily on the job, I dived into it with a very “alright lets just make this work” kind of attitude and breezed over some of the fundamentals. Over the years I’ve picked up a lot of things from c... Read more

Custom snippets in VS Code

A few snippet extensions I’ve installed have inspired me to venture into creating my own custom ones. Turns out VS Code has a great system for doing this and can be a huge time saver for boilerplate code. The Initial Annoyance A snippet I’ve gotten a lot of use out of is testa which comes from the Jest Snippets extension (I think, I have a lot... Read more

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

You ever seen some nasty looking imports in JavaScript like import Checkbox from '../../../core_components/Checkbox'; Coming from the world of Python with relative imports this all seemed pretty gross to me so I went out looking for a way to clean those up a bit. Sure enough Webpack offers a way to build your application with import aliases, ... Read more