2011: Year in Review

2011 was a crazy year for the world. For Laura and I, 2011 was a very busy year filled with hospitals, construction projects, and lifestyle changes.

Boycotting GoDaddy

I’m boycotting GoDaddy because they support the Stop Online Piracy Act (SOPA, H.R. 3261), and the Protect IP Act (PIPA, S. 968). These bills sound good from the titles, but are broadly worded to allow the government to takedown websites for almost any reason. Feeling the pressure from the interwebs, GoDaddy officially renounced support for SOPA, but there was no mention of PIPA.

GoDaddy sells domains for cheap, and in return, I look past their horrible control panel, cheap advertising campaigns, and ridiculous animal abuse. No more; I’ve finally moved my 16 domains to Namecheap. I suggest you do the same and move your domains a responsible company like Namecheap or Dreamhost (both affiliate links).

And to read more about SOPA, Jeffery Zeldman has written a great piece on SOPA and what it could mean for our industry.

Arguments vs Arrays

I saw a job posting that illustrated the JavaScript/ECMAScript knowledge-level the candidate needed with:

can you figure out whether you’re working with an array or arguments list without the use of 3rd party code?

I was intrigued, because I didn’t know the answer.

Submit Form With JavaScript

Recently I was asked how submit a form with JavaScript… and I didn’t have a solid answer for them. The shame! So, like a teacher having the class write ‘I will not talk in class’ over and over as punishment, here are a few various ways to submit a basic form in JavaScript.

Kentico Content Slider With Cropped Thumbnails

I had a need to build a content slideshow with thumbnail pagination. In this project, Kentico is our CMS of choice.

In the existing website, users can upload images of any-size and aspect-ratio, and then we resize the image in the Transformation. Our pager thumbnails need to be square; a string of mixed-size images doesn’t look quite right. But unfortunately Kentico doesn’t provide a way to crop images on the fly. Luckily, CSS can help.

JavaScript Double Equal vs. Triple Equal

Douglas Crockford’s Javascript: The Good Parts:

JavaScript has two sets of equality operators: === and !==, and their evil twins == and !=. The good ones work the way you would expect. If the two operands are of the same type and have the same value, then === produces true and !== produces false. The evil twins do the right thing when the operands are of the same type, but if they are of different types, they attempt to coerce the values. The rules by which they do that are complicated and unmemorable.

Double Equals (==)

Double equals (==) will try to convert the 2nd half to the same type as the first half of the expression.

string == number will result in a comparison to string == string after the conversion.

Triple Equals (===)

Triple equals === is just a straight comparison, regardless of type.

Using === is not any quicker if the types are the same. If types are not the same, === will be quicker because it won’t try to do the conversion.

Ruby Static Blog Engine

A static site is an interesting idea. Fairly hassle free, handles high-traffic well, and a much lower chance of getting hacked. However, they’re a nightmare to manage if you want any sort of consistent look. But maybe not.

Jekyll (Github) is a Ruby project for generating and maintaining a static site or blog.

Octopress gives you templates and some fancy plugins that make the engine quite a bit more friendlier.  Now all of a sudden, a static blog is looking very doable.