Friday, July 4, 2014

Month 5 - AI Colony

Are you addicted to incremental clickers? Do you like programming? Do you wish you could just write a program to do the clicking and deciding for you? Then you are in luck!

I really liked playing Time of Exploration and Adventure, Ho! on my Android phone but wondered what the best strategy was. When is it more efficient to go for the goal versus increasing production? To test out this and many other theories about incremental games I built AI Colony.

AI Colony let's you program in JavaScript to click and buy for you. The goal is to come up with the best program to win.

To keep everyone safe, your code is executed in a sandbox. Essentially your code is sent to a Web Worker which handles the processing in the background with no access to the rest of your browser.

AI Colony - Incremental Game where you program the clicker

Thursday, June 5, 2014

Month 4 - Hosting Transfer Complete - Goodbye GoDaddy, Hello Arvixe

Well the hosting transfer is complete. It all went well except a couple of bumps that were sorted out.

I chose Arivxe because of the price ($8) and because of the number of SQL databases you can have for the price (unlimited). I had to buy a unique IP which is another $2 per month for use with my SSL certificate. Note that the plan I have says 6 domains and unlimited websites but it is actually the opposite. It seems I can have unlimited domains as long as they point to no more than 6 websites.

The transfer itself was pretty simple. I had to call and email support a couple of times but they were very quick to help resolve issues. One issue I had was I didn't pick a lifetime domain (they give you a domain for free as long as you are a customer, unlike GoDaddy which it is only free for a year). I decided that I wanted to get to complete this site's name change and they were gracious enough to add it to my account after setup.


Working with domains was the most difficult part.

The hosting setup is very very different from GoDaddy which took some learning. Like GoDaddy you have a section for domains and a section for hosting. You can manage your domains in the domain manager but it is easier to have them point to the hosting nameserver and manage the domains with the hosting so as to keep domains and websites in sync easier. I ended up setting up a handful of websites. One for my DNN, one for my projects, one for and one for this website's projects. In GoDaddy you can set any number directories as an IIS application root but because of the restriction on the number of website you can have, Arvixe does not support this. What I had to do was set each of the directories that weren't part of the root project (e.g. as a virtual directory so IIS would use their web.config as a root. In the root of the website's web.config I added a rewrite rule that would rewrite the subdirectory url to an internal one using the virtual directory.

            <rule name="Redirect subdomain" patternSyntax="Wildcard" stopProcessing="true">
             <match url="*" />
              <add input="{HTTP_HOST}" pattern="*" />
             <action type="Rewrite" url="{C:1}/{R:0}" />

Unfortunately Arvixe doesn't support a wildcard domain binding for subdomains so I had to create all the domain bindings for each of the subdomains. Each domain entry is a binding that tells IIS what to load when it receives a request for that domain. Each domain binding can also have it's own DNS entries setup for it as well in the same place or inherit from the parent domain. This was useful for setting up since it needed to point to the DNN website.

Arvixe considers domain forwarding to be a website (since that has to be handled in IIS and not in any DNS). I've also added domain forwarding rules to the rewrite section of the web.config to avoid spending my precious website count.

My recommendation is to set up all the domain zone files and websites in the Arvixe hosting name server then point your existing domains to the new name servers. Arvixe provides you with an internal domain you can use to test your website while DNS has changed or hasn't propagated. I still have a couple of domains at GoDaddy until they near expiration and they just point to the Arvixe name server. Also, make sure you set up your MX DNS entries FIRST! I forgot to setup my entries before switching name servers and I'm pretty sure I lost some emails. This was also when I was trying to transfer a different domain into Arvixe from GoDaddy since it was expiring. I wasn't getting any transfer emails. Arvixe support was nice enough to restart the transfer process twice until I got them and completed my transfer. Domains are about $10 or $8 to transfer which is 1/4 to 1/2 cheaper than GoDaddy.


Transfering the actual websites was much simpler. I first copied all my files to my computer via FTP and then copied them to Arvixe the same way. It might be faster overall using the compress and extract zip options but I didn't think of that until halfway through. Since the GoDaddy only has one root folder per hosting, at Arvixe the files got split up into different folders. You can even see your IIS logs with Arvixe.


Setting up an SSL certificate was pretty easy too but did take a couple of days. Namecheap was having an amazing sale on SSL certificates ($2 IIRC) so I bought two. Like I mentioned before, you need a dedicated IP address to use SSL certificates at Arvixe. You have to email to request your CSR to provide to Namecheap for signing and then email them the signed certificate to install which took a while but wasn't difficult. GoDaddy doesn't let you shop around for certificates and they charge something like $80/year so I saved quite a bit of money on my certificates. Currently only uses SSL so they type of certificate isn't too important.

Monday, June 2, 2014

Month 4 - Hosting Transfer

This month I am feverishly working on transferring this project and all my other hosted sites from GoDaddy to Arvixe. It looks like it is going well so far but some things might be down for a little while.

You can also access this project at with the new name change.

Friday, May 16, 2014

Month 3 - DriveXCountry Beta

When I was a kid, we would either drive from Arizona to upstate New York or Florida each summer. Some summers we would do a tour of the National Parks. The drive itself was rather boring but my sister and I had different things to keep us entertained, from cds to magnetic board games and video games. Now that I'm older I appreciate the different stops my mother found to keeps us interested. She even made it a goal to look up different Muffler Men to find along our route. The earliest memories involved using a map and later methods involved Rand McNally's Trip Maker software and rudimentary Internet searching (1997).

Unfortunately there aren't many good tools online to plan a road trip. I mean really plan it with hotels, food and attractions along your route. Google Maps is great for getting from A to B so why don't we build on top of that? That is where DriveXCountry come from.

Last month's project was a private alpha version and this month is the first beta release. I've been working on this project on and off for the past three years but this month I really got to sit down and put all my ideas into code.

The site is written entirely in Javascript except using ASP.NET MVC for user accounts and saving. I've gotten to learn new technologies like KnockoutJS and Google Maps API. So go check it out.

DriveXCountry - Road Trip Planning

Sunday, March 2, 2014

Month 1 - Chrome Now - Beautiful Cards for your desktop

I am pleased to announce the release of Month 1's project - Chrome Now. This is a new tab replacement for Chrome which displays Google Now like cards.

As far as I can tell this project is unique. This extension is extendable by other extensions by using cross-extension messaging. So other developers can create their own cards can have them show up on the user's new tab page. A sample project is available on github and the cross-messaging portion is open source so others can learn from it.

Even though Google is now working on Google Now for Chrome I am very proud of this extension. I feel that switching from a week to a month for each project has produced a higher quality result. Stay tuned for more projects!

Chrome Now - Base extension
Chrome Now - Chrome Package - Extension extension
GitHub - Make your own cards
Chrome Now Homepage - Learn  more

Tuesday, February 11, 2014

Month 1 - Cross-extension messaging

Success! Things are going well with my new Chrome extension!

Without going in to too many details at this point, the base extension is responsible for displaying the page. A second extension contains a number of javascript classes which build HTML elements and send them back to the main page for display. When an extension is loaded, the javascript opens a port to the base extension and sends a "register" message:

//Called on remote extension when loaded
module.Extension.prototype.register = function(){
var extension = this;
this.port = chrome.runtime.connect(module.nowExtensionId);
this.sendCommand("registerExtension", this.getDetails());

The base extensions listens for any incoming connections and spawns a javascript object for each new connection:

//Handles the first connection by an extension
if (module.isBlackListed(
 return;  // don't allow this extension access

if(msg.command == "registerCard") {
} else if(msg.command == "registerExtension"){

Once the extensions are connected, we can send commands both ways. The wonderful thing is since the second extension does the registering, the base extension does not need to know any details about other extensions. Only the second extension needs to know the base extension's ID.

More details to come as I build upon this. By writing the base extension other developers should be able to write their own extensions to hook in.