Kalzumeus is getting to the point where I want to start periodic deployments to the Internets to test it (yes, yes, that DOES mean I’ll be able to announce it publicly, sometime this month if development doesn’t hit snags), so I went shopping for a hosting service. I eventually settled on TextDrive, which appears to have a decent reputation for Ruby on Rails hosting. $124 later I was the proud owner of a new “startup” hosting package for a year. I’ll be spending another $120 or so later to get a certificate for the domain but for now I don’t have any data that needs https so its a waste.
Sidenote: Its a wonderful age we live in where you can buy 95% of the tools you need to run a business for less than $10 a month. The founder of Textdrive, a guy named Jason who clearly has some chops in the provisioning enterprise class server deploments department, reckons you should budget 10% of sales for infrastructure. So, for example, if you plan on getting $10,000 a month in sales your monthly server/colo fees/electricity/etc bill should be about $1,000. This may well be true for larger installations, but I’m pretty sure you can get by on about $30~$50 a month for $10,000 in sales as a uISV with some care given to app selection. I’ll break down the math for you some other day, after I have an app and benchmark numbers I can point you to, to demonstrate that I’m not shooting smoke out of my hindquarters.
Anyhow, yesterday was a comedy of errors. These are 100% my doing — I bit off a lot more than I could chew with technologies I do not have a full conceptual understanding of yet. Example: I spent three hours trying to manhandle my local SVN repository onto the server. The textdrive docs got me set up with a new repository in 3 minutes, but actually importing the information to it was a constant battle with Netbeans. I eventually lost my most recent work to corrupted settings (“What do you MEAN I only have 3 class files?!”) after twiddling stuff with text editors, and had to cleansweep my local copy of everything, then restore from the local repository. Then I got out Cygwin (bless you, Cygwin), killed all the .svn directories, deleted and remade the remote repository, and imported the newly-checked-out-locally repository into the remote repository. One more open of Netbeans later and I was done. Blaaaaah. On the plus side, both Kalzumeus and Bingo Card Creator now exist safely outside of my hard disk.
Incidentally: its far, far simpler to set up hosting with GoDaddy than it is with TextDrive. The difference in the level of control you get for TextDrive is night and day though. I’m eventually going to have both Apache and Lighttpd running on the server, Apache proxying everything and making sure the /blog/ folder goes to WordPress, with Lighttpd putting things to the Rails application. Try that on Godaddy… if you dare.
Then, despite the fact that it was running rather late, I wanted to get some actual coding done rather than losing a night just to wrangling with tools. Again, 100% due to my own negligence, I lost a lot of time debugging why a transaction wouldn’t work. Well, OK, 98% to my own negligence. You see, Rails takes an awful lot of syntatic shortcuts which are deeply meaningful but documented in, I kid you not, exactly one throw away line in The Book. And, unfortunately, the emphasis on “create code whose intent is crystal clear” gets lost in some of these shortcuts.
Example: build vs new vs create. One throwaway line will teach you that create actually creates the object in your database while build/new just create it in memory, a sort of Key Distinction when you’re deciding “What do I need to guard with a transaction block?” And, for more fun, build and new are interchangeable… except when they’re not.
@user = User.build #OK
@user = User.new #OK, same as above
@new_friend = @user.friends.build #OK
@new_friend = @user.friends.new # No new method on friends! Whoops!
@new_friend = @users.friends.create # Works, but note different database behavior!
Anyhow, I will soon be establishing a blog at kalzumeus.com (you could visit there now, but its a fairly boring “coming soon” page that was autogenerated). That will be getting most of my future programming/business oriented and professional development posts. This way I can keep the blog for the actual product site focused on the customers rather than on myself or an interest the customers don’t share (“helping uISVS make money”). I won’t be abandoning this blog in the near future, though.