Wednesday, May 27, 2009

Release Plans

With open source projects, there is an adage of "Release early, release often". These words can really help an open source project get off of the ground and run smoothly. It allows users of the code to provide feedback and see progress. It also means bug fixes are quick to make their way out the door, so a user doesn't have to shelf a project because they are waiting on the fix. Finally, it helps the hype machine - if I'm making announcements often about my library's releases, it means more chances for those who would be interested to stumble upon it.

My time grows increasingly finite as my duties as a web developer and father increase, but I actively maintain three projects with more on the way. Seeing how much favoring process over code helps my productivity at the workplace makes me quick to apply the concept towards this problem. I need a process that allows me to direct small amounts of time to the project that are hyper-productive, and will force a release out even if the amount of work I have accomplished is less than profound.

My plan is to commit to about five hours of side-project work a week. A small amount of weekend time plus half an hour here and there spread across the week should keep that manageable. Each week will have some goal in mind, even if it is minor. Bug fixes must come first, and there should be sufficient test coverage. Next, I plan on alternating my project every week. At the end of the week, I will do a release. If I'm planning on having somewhere between 4-6 projects going, this means I have a release coming every month to a month and a half - often, but not spammy. This process isn't unlike what we use to great effect at Integrum, so I can't count myself as creative.

As of this writing I'm already in the middle of a week, but the best time to start is always now.

Friday, May 22, 2009

Fun in Adversity

I've had a moment where I was racing go-carts at break-neck speeds, and staying ahead of my competition because I was cutting corners. I've grinned ear to ear as I was panting because three swordsman thought I'd make easy prey because of my exhaustion. I've laughed at the end of really hard and horrible days. I've come to accept that I really like having adversity.

Don't mistake this to mean I like having a difficult life full of struggles, or that I'm not annoyed by stupid things. As a programmer I solve technology problems. As a family man I solve my family's problems. Why should I not enjoy the act of knocking down things that stand up to get in the way of things? It's easy to worry about things, or be stressed because things are less than ideal. I like it when people look at the challenge I have ahead of me and think "I'm glad I'm not him". It makes me feel like I'll come out better and proven.

Those three swordsman paid dearly for underestimating me, and I pushed myself beyond my limits to make sure they did. When I push past a limit, that simply puts the limit higher. Next time I'll be more exhausted with four swordsman, and I'll still come out on top.

The more I look at things this way, the less stress I feel for the grueling things that lay ahead. The less stress I have, the easier these problems are to tackle. In a way, it makes these struggles fun.

Friday, May 15, 2009

Pocket Computers

Part of being a technologist means developing technology, but it's easy to forget that we should be using the tools we create. For a while, I've avoided the new fancy cell phones because partly I wanted to save some money, and partly I wanted to see where things were going. The money isn't an issue anymore, and after RailsConf's problem I had with communicating, navigating, and just all-around having my act together, I decided that it was time for a fancy cell phone. I was set on the sexy allure of an iPhone. I didn't want one of those ugly, clunky Android phones.

It occurred to me that I'm a software developer. I can write tools that fit my silly needs perfectly. I've done so with apps like Snippet, Twittest, and TinyTodo. These are all apps that have more than returned my initial investment of development in terms of personal productivity. Do I want to write iPhone apps using Objective-C? No. Ah, well there's an interesting condition. JRuby (and Ruby), are fun languages that allow me to express my ideas quickly. Why jump on something like Objective-C while I'm still doing interesting things over here in Ruby-land? To match this observation, an Android phone can run JRuby apps.

I still have a lot of research to do, but I'm aware that you can't run background apps on the iPhone. It's DOS on a phone, and really pretty. I'm not so sure about the Android phones, but there's not a definite no.

So I'm off to dream up all sorts of neat applications that will go on a phone I don't have yet. One such application I've dreamed up is something that will prevent me from standing outside in the parking lot talking to our Scrum Master about nerd stuff and productivity for an hour and a half.

Thursday, May 7, 2009

What Happens at RailsConf stays at RailsConf

This occasion marks my first visit to RailsConf (at `Vegas, hence the title). Some of the Integrum veterans who've been going since the first RailsConf didn't seem to think this was a very good one. I thought RailsConf '09 was better than RubyConf'08. RailsConf seemed to be surrounding more practical topics, even if the speakers had missed the mark. I feel like I pulled a lot away from the conference. I will admit that I mostly stuck to my guns in terms of following JRuby (and friends) progress.

Crate, Rawr's CRuby evil (or good?) twin, looks neat, and promises a very small Ruby executable. It sounds like native Windows executables can be created. Can they be created from one platform but built for another? I'm not sure. I'm a little jealous that CRuby can be packed down into about 5 megs (from JRuby's 11M-ish jar). Create seems to put a lot of energy into building cherry picked extensions for an even slimmer package. Crate also seemed to be able to deploy Rails apps on servers where Ruby isn't installed - Something Rawr doesn't do explicitly, but is handled by Warbler pretty well already. I did get a chance to meet with the creator of Crate (the Crator?). I tried to put Rawr on the radar in hopes that we can share any common code (if he wants Crate to be able to do .app files, Rawr can give him a good start).

I also attended a Glassfish/Netbeans all-in-one talk. I mostly went for Netbeans, but I learned some stuff about Glassfish I didn't know before. asadmin, the Glassfish controller, stands for App Server Admin - this helps me remember what commands are for, and this one struck me as odd when I first saw it. Setting up Glassfish is pretty stupid easy from how things are described, but I've seen that before. I didn't know that Glassfish is just Rails-aware, but doesn't load any Rails modules until it sees a Rails app inside its app directory. For those who think that Glassfish is a bulky, oversized Java app server, the Glassfish gem is 3 megs. There's also recipes for Capistrano. The app server also supports Sinatra and Merb out of the box. It also includes an update center, but I didn't see to what extent this exists.

Netbeans was the other half of the talk. Before I get into Netbeans I want to mention RubyMine, which appears to be IntelliJ-lite for Rails (and maybe Ruby). Don't tell the people who like it that it's running on Java (: RubyMine looks a LOT like Netbeans from the screenshots and displays I saw at the booth. When I saw a lot of positive posts about RubyMine, I was a little irritated, since it does a lot of things Netbeans does, and costs money. I'm trying to put that feeling aside - after all, it's all about using the best tools we can, not the ones we are simply fond of. I grabbed a trial version of RubyMine to give a spin. Will it support my JRuby apps? I think I'll do CRuby stuff so I'm not going up-hill here.

For Netbeans, I've blogged before about woes with the debugger, a very promising feature. Arun Gupta showed the debugger working as it should with the same version of Netbeans I'm using now. This makes me think there's something wrong with my setup, and not Netbeans itself. I need to revisit the debugging feature as well as my project setup (I suspect it's because I'm using Webbrick, and not Glassflish). Netbeans seems to have some usage stats it can pull up. Some of this is through NewRelic, some just straight Glassfish integration.

There was a JRuby talk given by Thomas Enebo and Charles Nutter. They showed how Glassfish doesn't constantly stink up memory for concurrent requests when running in a multi-threaded mode (I'd imagine each thread allocates and deallocates this memory on demand?). Mongrel uses N times the concurrent requests you want to be able to handle. JRuby has the ability to do named groupings with regular expression, which can make a very difficult to read expression at least a little bit easier. It would also allow access to those groupings via a name, rather than an index. JRuby also supports a Ruby 1.9 mode, which means you can play with 1.9 without having to set up another (and potentially conflicting) Ruby environment. Just use --1.9. The JRuby team also got to show off Gravitor (:

One of the talks was about scaling Rails, or at least was titled that way. They talked about a bunch of problems with scaling databases and didn't offer many solutions. They did show off Gosu with an interesting Wolfienstien 3D port, which showed that Ruby 1.9 could handle some performance intensive stuff, but had little to do with scaling Rails.

JRuby and friends got a lot of love with this conference. I believe I missed one of the talks about scaling with Google App Engine, but the official Google App Engine w/ JRuby talk was one I got to see. This one showed a lot of promise to me. Google App Engine will take your WAR file and run it, like a good hosting provider should, but GAE also throws more resources at the app if it should need them (and your budget allows). The scaling is dynamic, unlike a rent-a-VM solution. The database also scales dynamically, but uses a datastore database, as opposed to a standard SQL/relational database. GAE uses BigTable, and is like CouchDB in the datastore regard. I remember hearing about what CouchDB could do, but now it seems so much more relevant. Instead of having records with IDs that refer to each other, datastore databases just store objects or some kind hashes. How much this buys you isn't totally clear yet, except for the ability to shard the database, and therefore scale. The GAE team provided a DataMapper layer for BigTable, which is the only known way to get a read/writable DataMapper on your JRuby app. Now that Rails 3 has the promise of swapping stuff out on the stack (such as ActiveRecord), things are really looking up here.

Charles Nutter and Evan Phoenix did a talk on Ruby-performance-no-nos. Showing how a single extend call destroys your entire method lookup cache for CRuby (but not JRuby and Rubinius). The options hash idiom is also very expensive. I got a recording of this session, although I think my hand was covering the microphone, so everything is much more quiet than it should be.

Someone got a video of myself working on Life-Tank with Gemini. I haven't seen it posted yet. I got pretty choked up on my words because I forgot what to say. I wish I would have gotten the guy's name. Now I won't know when the video lands somewhere.

I'm glad I got to catch up on some JRuby things I'd been slacking on. As the resident JRuby guy, I need to be more up on the Rails side of JRuby (even if Integrum never goes that route), and this definitely helped.

Saturday, May 2, 2009

Riding the Wave

One of the practices at Integrum I feel that really brings the team together is mini-breaks that we take throughout the day. There's a pool table, dart board, and XBox 360 with four controllers (the maximum per console). One of the popular mini-break events is Death Tank, a 360 Live Arcade game - a small game normally under $20 that you download directly.

Death Tank is real-time Scorched Earth, and even has some things it borrowed from the game. Younger players will see it as a real-time Worms. Angle, power, and lob are the basic components to the game. Add in the ability to scoot, potential prizes, theme rounds, and different things to lob, and you have a fun game.

As I watched and played Death Tank, it occurred to me that the game was driven purely by physics, and was successful in doing so. With Gemini, a pure physics system was painful for a lot of things we wanted to do. This seemed like a great opportunity to clone the game and see how far I could take it. So far, I'm extremely driven to see a playable game soon.

With RailsConf just around the corner, one would think I would be trying to do everything I could to further my Rails project so I can ask more questions to the Railsites I'll be around. My general thought is that when this kind of motivation comes, you need to ride it until it's over. Surges in motivation for free-time projects are fickle at best. And who knows? Maybe this will turn into a great opportunity to make a scoring web-app.

Friday, May 1, 2009

Time Boxing

At Integrum we have a dedicated Scrum master, known to mortals as Chris Young. Scrum is a series of advice and methods for handling software projects, with the hopes of squeezing as much blood out of rocks as possible. Conversations with Chris are always fun, because I try to eat lots of his time by throwing him interesting tidbits that are resistible to him the same way that stretched and veined neck is to a vampire.

I've been reading Hitch Hiker's Guide to the Galaxy lately - I don't normally write this way (I think).

One thing Chris has shown me (or at least given a name to, which makes it easier to wield) is Time Boxing. Time Boxing is the idea that you deliberately limit a task to a certain amount of time because the task will have a tendency to run-away, and then you've devoted days to writing a blog post about how Netbeans and TextMate differ in ability to find in files.

If I were to give myself 10 minutes a day to write a blog post, I think I could handle it. As proof, I did by writing this post in under 10 minutes just now. Some other things I've used to time boxing is bug-fixing, writing features, and some research. When the time is up, I go for help. It doesn't count that you're inching along when you need to be going at a brisk pace, after all.

I use Apimac Timer to help me with this. It's pretty easy to use and the demo version works just fine for most time boxing needs.