country-region-selector

Posted on Mar 24, 2014 in Open Source Projects | 2 comments

This week as part of some contract work I found I needed to add a simple country & region dropdown to a form, where the fields would be tied to one another; i.e. when you select a country, a corresponding region field would be updated, containing the regions appropriate for that country selection.

Such a simple thing – done a million times. But it turns out I couldn’t find a pre-existing one that fitted the bill exactly as I needed. Lame! So I wrote my own and stuck it up on github.

Documentation: https://github.com/benkeen/country-region-selector
Demo: http://benkeen.github.io/country-region-selector

In the spirit of “You don’t need jQuery” I wrote the thing in plain JS, then ported it over to jQuery just to see how much filesize I’d save. Virtually sod all, as it turns out (1KB).

Oh, and it turns out the file size had to be fairly large (~50KB) due to the sheer amount of string data being stored in it. But I think that’s probably preferable to doing a complex Ajax call to retrieve the individual region field data – much less fussy!

Read More

grunt-search 0.1.4

Posted on Mar 9, 2014 in grunt-search, Open Source Projects | 0 comments

grunt-search 0.1.4 has just been released. It’s a Grunt plugin that searches a list of files for particular search strings and logs the results in JSON, XML or text format – or just output to the console.

This new version contains a contribution from Sergeii Iavorsky, to allow for generating the results in JUnit format as well. Thanks, Sergeii!

Read More

d3pie

Posted on Mar 5, 2014 in Blog, d3pie, Open Source Projects | 0 comments

d3pie So I’ve been working on a new open source project recently: a pie chart script and generator called d3pie. It’s coming along pretty well, but taking waaaay longer than anticipated. So I figured a screenshot might be in order.

It’s pretty wicked. It has a ton of controls for customizing the pie exactly as you’d like, from spacing to fonts, colors, sort order, load effects, mouseover effects, tooltips, label positioning, footer text, and more.

Script coming soon… I’ll post again when it’s available.

Read More

Refactoring CBC Music Mobile

Posted on Feb 23, 2014 in Blog | 0 comments

screenshot

I wanted to write a technical post about a project I’ve undertaken in my job at CBC Music this last year: the refactor of their mobile site codebase. Since starting at the CBC last May (2013) my chief responsibility has been to lead this project, so it was great to see it launch last month.

Maybe I’ll start by outlining the problem I was tasked to solve.

 

The problem

The mobile code – which was already out in the wild when I joined – was perfectly decent, but lacked scalability both in terms of the overall code architecture and in what was doled up to the client. The JS was arranged in a simple object namespace, which was generally quite readable but had already led to a great deal of unnecessary and unfortunate coupling.

Worse, all JS was sent to the client on initial page load. Each and every sprint (we were on a weekly sprint cycle at the time) led to 10KB, 20KB, 30KB+ increases of the resource size and they knew that this problem was only going to be compounded over time.

What we needed was to update the codebase for on-demand loading, and rethink the overall JS architecture for a simpler, more formal structure to improve the overall code quality, and to make it simpler for junior developers to work with it.

Read More

generatedata.com 3.1.1 released

Posted on Feb 2, 2014 in Data Generator, Open Source Projects | 0 comments

generatedata.com has been updated for version 3.1.1. This version includes a number of key bug fixes, and also a new set of Data Types specifically for credit card generation. The code was contributed by Zeeshan Shaikh, replacing the older Credit Card data type. Besides being the additional functionality (PAN, PIN, CVV, Track 1, Track 2 data generation now all possible), the actual fake credit card numbers being generated are also valid.

Anyone using the older data type has had their configurations ported over to use the new PAN data type.

You can see the new version here:
http://www.generatedata.com

All the best!

Read More