Creating a Notification Badge with HTML5 and CSS3

I recently wanted to add a notification badge to a website. I wasn’t sure what the best approach was, but I knew I didn’t want to add extra markup and position it with CSS. I also didn’t want to use a jQuery plugin to add this little feature. I ultimately decided to use the HTML5 […]

Continue Reading

Benchmarking PHP Script Speeds

I recently learned about jsperf.com and I’ve really enjoyed looking at the speed results of different pieces of code. However, I couldn’t find any sites that did the same for PHP and I’ve really wanted to test different ideas that I’ve had. How it should work There were a couple of things that I wanted […]

Continue Reading

How I use Markdown with WordPress

I love writing stuff in Markdown. But when I decided to write my blog posts in MD I wanted to have the same syntax as GitHub. In particular fenced code blocks. There are a lot of plugins for WordPress to use MD, but most of them were too complicated for my liking. And they didn’t […]

Continue Reading

Designing better Checkboxes

When adding an <input type=”(radio|checkbox)” /> I recommend wrapping the whole thing in a label. Because it makes the clickable area bigger and allows the user to miss the text and input while getting the desired result. Here’s the basic markup. Check out this Pen!

Continue Reading

Lazy Loading with PHP

I’ve been looking through a lot of PHP projects on GitHub lately and I keep seeing people including all their classes on launch. And unfortunately it’s the reason I decide not to use their code. What is Lazy Loading Lazy loading it a pattern of only including classes when they are needed. And fortunately enough […]

Continue Reading

Huck – PHP Testing Framework

Huck is a Behavior Driven Development (BDD) framework based on Jasmine for JS. It is designed with a simple syntax to give it a fast learning curve. Getting Started Huck runs in the browser so you don’t have to load terminal. Just upload it to your server, create the specs and load index.php. Huck will […]

Continue Reading

PHP PubSub

A little over a year ago I read a post on Nettuts+ regarding PubSub with jQuery. The idea is you create (or subscribe to) a collection of functions that are called when you publish an event in your application. It seems like something that only works in javascript because php doesn’t deal with user events. […]

Continue Reading

Prevent DOM Reflow

Javascript is a really laid back language. You can write a script a hundred different ways and most browsers don’t care. However, as I found out there are consequences for not diligently writing proper code. I turned Chris Coyier’s datalist pollyfill into a jQuery plugin. Everything seemed perfect and I was rather self-impressed until I […]

Continue Reading