The first time I encountered Three.js I was blown away. It was hard to believe that the intricate 3D scenes I was looking at were not videos, they were being rendered directly in the browser! I wanted to make something with it, anything, just to understand what this technology was and where it fit in the ecosystem of HTML, CSS, and JS.
While there were a few exploratory attempts to incorporate Three.js into early iterations of my site, what’s left now is the spinning text mesh on my site’s home page. In this post I’ll walk through how we can…
At work we have a convention for naming git branches that goes:
dev/<your name>/<JIRA ticket id>. I often end up with a pile of branches of the form
dev/ilyam/XY-1234, and having to switch between them gets to be a chore after a while.
Oh My Zsh definitely makes life easier by providing git autocomplete and some helpful aliases, but I thought I could save a couple more keystrokes still.
The script below is a bash function that takes a single argument. The output of
git branch is grepped for that argument, and if no matching branch is found, the function…
Sometimes though, we might want to annotate our source code for other reasons, such as setting reminders to refactor something, remove a method, rename a variable, etc. and then be able to access that information in one place.
In this post I’ll walk through writing a script to parse a series of files and extract…
Closures can seem like a daunting topic to anyone who’s relatively new to programming. They represent a topic that lies beyond the core programming concepts that are part of most introductions to the field — primitive data types, variables, functions, basic control flow, etc.
Nevertheless, closures are a very straightforward concept, so I want to explain them as I understand them, and provide some examples to illustrate why you might want to use them. In this way, they can go from being an abstract concept to a technique you can actually deploy in your everyday code.
The term ‘closure’ refers…
Setting up the boilerplate to write a React component can be tedious. On its own, making a directory and putting some files in it with some basic import statements is not a big deal, but doing it over and over (especially when setting up a project) can chip away at your mental resources.
So I wanted to share a little script to help take out some of the legwork.
Assuming the following directory structure:
│ └── createComponent.js
│ ├── components
│ ├── pages
│ └── ...
The script affords the following example usage: