The importance of code editor proficiency

By Josh Sherman
4 min read
development
vim
productivity

Hi, my name is Josh and I am a Vim addict. I have been for quite a while now, nearly 15 years by my estimates. I love everything about it but in all honesty, I have only really started to get “good” with it in the last couple of years. […]

How to zero fill a number with PHP

By Josh Sherman
1 min read
development
php

Zero filling (or zero padding) is when you pad a value on the left side to a specific length. This is something you will commonly see in database schemas for integer columns. But what if we’re not working with data that’s already zero filled by a database? All we have […]

How to get keys from an associative array in PHP

By Josh Sherman
1 min read
development
php

One of PHP’s most powerful features are arrays and the multitude of functions available to interact with and manipulate them. Arrays can be indexed by integers as well as string, known as an associative array. Instead of looping through the array with foreach and assigning the key to another array, […]

Dynamic page titles with GitHub Pages

By Josh Sherman
2 min read
development
github
github pages
jekyll

Ran into a bit of an issue today when deploying some changes to my blog. The home page, which was working just fine locally, was being treated as if it were a blog post page. What keyed me off to this was the title of the page which was “joshtronic […]

Passing variables to anonymous PHP functions

By Josh Sherman
1 min read
development
php

The other day I ran into a situation (first time, it seems) where I needed to access a variable inside of an anonymous function inside of preg_replace_callback(). My first thought, even though it went against my better judgement was to simply define the variables as global inside of the function. […]