World’s Smallest JavaScript Router

In a recent project, actually still in-progress project, I needed a small JavaScript router that would fit the following requirements:

  1. Be Tiny
  2. Allow bookmarking of sub views
  3. Assume jQuery as the only available library

I poked around the interwebs, and used Microjs to see if one of them fits what I’m looking for. None quite did, so I did what any other developer usually does, wrote one myself!

Another point to make is that, all the HTML required was already loaded into the page. I didn’t need any AJAX at all. I wanted it to be a completely client-side solution. Read More

Generate JSHint Markdown Reports

I wanted to quickly talk about a new NPM module I published not to long ago, jshint-md-reporter. As you could figure out from the name, it will give you JSHint markdown reports.

After a quick search, I saw that there wasn’t a reporter already made. I found one that would generate an HTML page in Bootstrap so I stole that same concept, and modified it to generate markdown.
Read More

Empty File Inputs in IE9

In all web development, you run into a bug that’s specific to a browser/version, and defies common sense. At least common sense in the way web development can make sense sometimes.

The past day or two, I have been debugging an issue that had me ready to pull my hair out. It’s specific to IE9 (or the new IE6), and file inputs not being sent to the server through a form POST.
Read More

Simple Gulp Workflow for React

On my newsletter, I recently shared that I’m taking a dive into learning React a bit. I’ve gotten to know the roller coaster that is Angular development and am ready to branch out. As I’ve stated before, always be learning.

React has been the library in the forefront of everyone’s mind recently. The fact that it was focused on doing one thing extremely well, is appealing to me. Angular is great for building complete apps, but you are committing 100% to that ecosystem for all pieces. React does the “V” in MVC and that’s it.

Since React uses jsx, a transpile step is somewhat required (although not always). I also wanted to throw Babel and Browserify on top of that to dive head first into using ES6 as well. I’ve setup a simple Gulp workflow for React that if you’re looking to get into React, is a good starting point for writing apps. Read More

3 Gotchas to Using ES6 Arrow Functions

With the recent release of Node v4 and the finalization of the new JavaScript spec, ES6 arrow functions will start to show up more and more in JavaScript code. If you aren’t familiar, arrow functions are just a way to define a function without needing the function  keyword.

Although it may just look like syntactic sugar, similar to how the new class  keyword is, it does cause the function to behave slightly different. If you aren’t aware of it, those differences could cause some debugging headaches.

Here’s 3 gotchas that you should be on the lookout for. Read More