Tag Archives: Javascript

Using jQuery mobile in a ECMAScript 6 project

Oh the pain...

I started using ECMAScript 6 in a project which required supporting the dependencies I was upgrading from. I used Babel JS to transpile my ES6 code with browserify and everything was working fine until I got to jQuery-mobile.

Read More
Mar 11, 2015 3 min read

A thing or two about style guides

A style guide should be chosen when working on a solo project or with a team. This keeps the code manageable when you or your peers come back to work on it in the future. It doesn’t matter which style guideline you choose as long as you stick with it. In a sense, writing clean code will also help reduce technical debt. Below is a collection of style guides that I collected over time. Some important rules are repeated in other styles. It’s nice to keep consistency (to a degree) if you are writing in multiple programming languages but ultimately it’s best to do what’s best for each language.

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”

Martin Fowler, Refactoring: Improving the Design of Existing Code

Read More
Feb 8, 2015 2 min read

jQuery CORS fix for IE8 and IE9

No browser is left behind

Who can blame jQuery for not wanting to support Internet Explorer? Despite whatever the reason, it doesn’t always make business sense and we must support it. I found this piece of code that patches the issue with jQuery.

Read More
Jun 20, 2014 1 min read

Working with JavaScript templates using jQuery

I picked up this nifty way of templating HTML code for JavaScript while working at Monkey Quest and haven’t looked back. The idea here is to separate your design from your code. This is particularly useful when you are adding content to your site after the initial rendering. Data can be fed in from a number of sources and added to a page using a template.

Read More
Apr 1, 2014 2 min read