Viewing the ‘General Programming’ Category

Resources For Starting A Website


I’ve been helping people out with their websites recently (as well as starting and a recurring question I hear is “What do I need to start a website?”

There are two things that every website owner needs:

Domain Name

If you look up toward the top of your browser you’ll see an address bar. The first part of the address is That’s a my domain name. Other domain names you’re likely familiar with are,, and

In order to make it easy for users to visit your site, you’ll want to purchase a domain name as well. They’re quite cheap at around $10/year. I use NameCheap to register my domain names. In the past I used GoDaddy but several years back moved all my domains to NameCheap because I got tired of GoDaddy’s constant up-sells and user interface quirks.


Now that you have a domain name, you need a server connected to the internet that can host your website’s files and potentially any databases. I’ve used DreamHost to host multiple websites for over ten years. I love their management console along with its one-click install tools that allow me to install things like WordPress in a jiffy. I’ve also found their customer service to be good and they’ve kindly helped me through problems that turned out to be my fault. I’ve helped others who were using providers like Bluehost but I find DreamHost to be superior. Be sure to use the promo code aaronhardy at checkout to receive the largest discount available.

Once you have a domain name, change the domain’s settings to point to the nameservers provided by your hosting provider. If you’re using DreamHost, the nameservers will be and Once that is complete, upload your website files to your hosting provider (or install something like WordPress) and you’re on your way! Good luck.

Dependency Injection And IoC Containers


The dependency injection pattern is one of my all-time favorite patterns in software design. The concept, in its most simple form, is so simple yet so powerful.

In essence, it takes us from this:

var TweetStream = function() {
    this.twitter = new TwitterService();
TweetStream.prototype.streamTweets = function() {var tweets = this.twitter.getTweets();};
var stream = new TweetStream();

To this:

var TweetStream = function(twitter) {
    this.twitter = twitter;
TweetStream.prototype.streamTweets = function() {var tweets = this.twitter.getTweets();};
var twitter = new TwitterService();
var stream = new TweetStream(twitter);

So what’s the big deal?

In the first example, TweetStream creates the TwitterService instance. TweetStream is forced to have a knowledge of (1) the exact “class” it should use to communicate with Twitter, (2) where and how to access the constructor, and (3) how to create an instance and appropriately initialize the object (passing parameters to the constructor, calling methods after the fact, etc.).

In the second example, TweetStream does not need to know any of these things since TwitterService is created by a third party and later passed into TweetStream. TweetStream only needs to know how to interact with the instance it is passed.

Although seemingly benign, the additional knowledge that TweetStream is forced to have in the first example increases its coupling to its dependencies while decreasing its own cohesion. The additional coupling leads to code that can be difficult to test and less flexible at runtime. If we were to “inject” the dependencies rather than forcing TweetStream to create or find them, we can easily mock dependencies during unit tests and provide them directly to the subject being tested. At runtime, we can easily swap out the object being provided as a dependency based on rules or contexts. Continue reading »

Studio J Online Scrapbooking


Scrapbooking just went from crafty women huddled around piles of paper shreds to online digital awesomeness. Not that crafty women or piles of paper shreds aren’t awesome. Nay. But for many, this translates into finding babysitters or a willing spouse; finding large blocks of time; purchasing a gajillion expensive scissors, stamps, buttons, papers, and ribbons; finding storage for such paraphernalia; and discovering craftiness from within. I mean, seriously, does this or this look fun to clean up? I’ll pass.

For the last year and a half at Rain I’ve been working on Studio J, Close To My Heart‘s flagship online scrapbooking application. It’s been quite a ride but the result is really quite revolutionary. Continue reading »

JavaUtils: Detecting and Installing Java from AIR


Adobe AIR is a great way to bring the sexiness of Flash to the desktop. However, sometimes you need more low-level power for things like connecting to peripherals. For this reason, AIR applications are sometimes paired with Java applications to accomplish such tasks. But first, the user’s system must have an adequate Java Runtime Environment (JRE) installed in order for the Java application to run in the first place. Continue reading »



Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 9.0.115 or higher installed.

What is it?

RedLiteGreenLite is a small, simple app that allows a group of people to communicate the status of something. The status can be either red or green and the subject can be whatever. That may sound a bit general, but that’s the point. It can be used for whatever purpose your crazy mind can come up with. I’ll get you started:

  1. At work, we have a single shower and a lot of shweaty guys after soccer. So we know when the shower’s available, someone can turn the status red when he enters the shower and turn it green when he exits. This way nobody has to keep stopping by the shower to see if it’s available. When it’s green, it’s available. When it’s red, it’s not.
  2. At a call center, representatives are split into groups. When one group is on break, no other group is allowed to go on break. Again, when the status is red, a group is on break and other groups must continue attending the phones. When the lite is green, the next group is free to take a break.

The process is pretty simple: join a group. Other people join the same group. When others in the group change the status, you’ll be notified. When you change the status, others in the group will be notified. The status of the group will be persisted across sessions. In other words, if everyone logs out and then logs back in a week later, the status will remain as it was the last time it was set. Continue reading »

Finding nodes with a namespaced attribute using e4x


When digging through XML, e4x is definitely your friend but it can be tricky sometimes. I recently came across a situation where I needed to find all nodes with a certain namespaced attribute. I didn’t care what the attribute’s value was; I just needed to know which nodes had the attribute. Continue reading »

Piano Marvel: Interactive Piano Lessons


Rain, where I work, has released yet another super-duper app. It’s called Piano Marvel and it’s set to revolutionize how people learn how to play the piano. I’m not a piano player myself, but I do remember taking private piano lessons as a kid. I hated it. It was monotonous, inconvenient, and felt like a chore. I wasn’t intrigued and I don’t believe I was the only kid that felt this way.

A while back, Guitar Hero hit the gaming industry by storm and kids flocked to learning the guitar. Sure, it wasn’t a real guitar, but it was still an instrument of sorts and kids were still learning hand-eye-ear coordination, rhythm, and other music essentials. The game was a huge success, bringing in over $1 billion in sales in the first 26 months and set an industry record.

Why such a difference in my experience learning how to play the piano years ago and kids learning the pseudo-guitar with Guitar Hero? Guitar Hero provides objectivity, benchmarking, competition, and addiction. You can play with your friends in a fun atmosphere. Piano Marvel takes these concepts and applies them to learning the piano. Students play along to accompaniment, see exactly which notes they hit and when they hit them, and earn trophies as they complete increasingly difficult exercises. They can practice whenever they choose and can even battle it out with their piano-playing comrades. Continue reading »

Kelly Clarkson iPhone App


The company I work at, Rain, has officially entered the iPhone development arena. This week we released an application for Kelly Clarkson (i.e., Sony BMG) called Kelly Clarkson: Open Mic. While I didn’t personally work on this application, I am proud of my co-workers and their serious skills at taking the app from scratch to the big show. Continue reading »

Rain SVG


Businesses win customers when they deliver what customers want. Customers get what they want when they can customize products to their own preferences. At Rain, where I work, we recognize the profit potential that clients can achieve with this concept and have created many applications allowing users to design their own products. How do we do it? Let’s talk SVG.

Suppose we create a simple product designer containing a single rectangle. The user can rotate, scale, position, and color the rectangle. The rectangle will then be printed in spectacular fashion on the customer’s very own poster. So, Jim hops into the application and moves the rectangle to the center of the poster, doubles its size, colors it blue, then rotates it 45 degrees. He then saves his design.

How is Jim’s design saved? That is, how is Jim’s design described in such a way that (1) he can later re-open it and continue modifying his rectangle and (2) a printing shop can print his poster at virtually any size without degrading its quality? Continue reading »

TileList Padding and Grid Lines


As you might know, designers can come up with some pretty funky ideas that don’t always match up with the default functionality of the framework you’re using. The pro is that your app turns out fresh and unique. The bad is that you’re the one that has to make it work. Of course, that also might be why you have a job.

Recently I received a comp from a designer that looked more or less like this:

Grid TileList Continue reading »