Decouple your code from your web server

By Josh Sherman
4 min read
development
holiday api

I used to be quite adamant about running nearly the same exact software stack locally as I did on my servers. Running Linux made it easy to pull this off and being able to do the same on OS X was a contingency for switching. I have never been a […]

Start your day with a list

By Josh Sherman
3 min read
productivity
writing
time management
project management
motivation

I’ve been seeing these “how productive people start their day” posts on my social feeds a lot more recently. It got me thinking, “hey, I consider myself successful, how do I start my day?” A while back I started to make mental notes about how I started my day, or […]

Calculate the length of a string with PHP

By Josh Sherman
1 min read
development
php

Calculating the length of a string is a useful feature of any language, in fact it’s one of the few pieces of functionality that has a consistently simple syntax across modern languages. You can calculate the length of a string as part of some server side user input validation or […]

Non-binary genders are complicated

By Josh Sherman
8 min read
scenekids
development
retrospection

No, this post is not some rant about non-binary genders. I’m actually referring to the trials and tribulations that I went through to implement a third gender option on my social network. The title is an homage to the CSS-Tricks post titled Features Are Complicated. This isn’t some dramatization, it’s […]

How to get a server's hostname in PHP

By Josh Sherman
1 min read
development
php

The hostname of your server or local system is an easy way to determine which environment you are working with, either local or production. Prior to PHP 5.3 you would need to utilize the php_uname() function and with 5.3+ there is a built-in function for getting the hostname: pre-5.3 $hostname […]