23
Jun

Create TinyURL like URLs in Ruby

Some Ruby on Rails side-project hacking I’ve been doing led me to need to generate shortened URLs.  The ShortURL gem is fine if you want to use TinyURL, Snurl, or some other external service to generate and manage your URLs, but in my case, I need to host the URLs so I can track usage statistics and redirect to a URL determined at request-time.

I wanted to avoid generating curse words, or any words for that matter, so I opted not to use vowels rather than try and figure out something more clever.  I also had no requirement to obfuscate the sequential nature of the generated value.  The result essentially converts a number to a base 54 string suitable for use as a URL parameter.

URL_CHARS = (’0′..’9′).to_a + %w(b c d f g h j k l m n p q r s t v w x y z) + %w(B C D F G H J K L M N P Q R S T V W X Y Z - _)
URL_BASE = URL_CHARS.size

def generateUrl idNumber
localCount = idNumber
result = ”;
while localCount != 0
rem = localCount % URL_BASE
localCount = (localCount - rem) / URL_BASE
result = URL_CHARS[rem] + result
end
return result
end

My usage will be to convert the numeric primary key of my model objects to this hash, so that Person #1174229 could be referenced as the short url http://app.com/p?i=7sH_

Obviously, the straightforward business of inserting this value into your table, performing lookups on it, etc is omitted and should be fairly straightforward to a seasoned developer.  The function can fit almost a half-billion values into 5 characters, and doesn’t experience the stack overflow issues of some recursive implementations I found, so I think it’s pretty useful.  (7 characters give you 1.3 trillion possibilities… nice!)

I can see a pretty cool plugin being built to solve this problem… maybe I’ll get around to writing short_url_fu one of these days.

19
May

Startups & the Superhero Origin Story

Josh and I went to see “Iron Man” after Startup Riot this evening, and Josh commented how the first superhero movie is always the best.  I tend to agree, and for me, I think it has a lot to do with my love of startups (and why Superman is lame).

The superhero origin story typically follows some flawed individual who sees something wrong in the world that gives them a reason to become something great.  Startups are based on flawed individuals who see a problem and think they have a solution.  Both startups and superheros make mistakes along the way, go through awkward phases where they come to grips with their “powers”, need to reevaluate their solutions, and can emerge powerful and revolutionary.

To me, the story of a successful startup closely follows the superhero origin story.  The sequel can be done well - watching Google mess with the wireless spectrum auction was interesting, but not nearly as cool as watching them rise from nothing to trounce Yahoo, Microsoft, Altavista, and the rest in search.  The mistakes made along the way are part of the charm, and nothing will ever be as epic as their rise to fame.  Superman is lame because he’s a golden boy - he basically shows up with super powers and no real flaws.  Cheering for Superman is like getting excited about the epic rise of ESPN 2.

08
May

Running Eclipse on MacBooks with Java 6

The title of this post is a bit misleading in that you apparently cannot run Eclipse on a MacBook Pro with Java 6 set as the default JDK.  Never mind that it took Apple a year and a half after the release of Java 6 for Apple to support Java 6 on OS X in the first place.  I thought Apple was “developer friendly”?  My experience has usually been slightly better than working on a PC, except that the failings of a PC can usually be dismissed as Microsoft’s incompetence.  Apple seems to act more like a highly-opinionated jerk.

After I upgraded to Java 6 (and then had to manually change my JDK symlink even after the upgrade), Eclipse refused to start.  The system log showed:

[0x0-0xa90a9].org.eclipse.eclipse[4265]: _NSJVMLoadLibrary: NSAddLibrary failed for /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Libraries/libjvm.dylib
[0x0-0xa90a9].org.eclipse.eclipse[4265]: JavaVM FATAL: Failed to load the jvm library.

To resolve the issue, I edited /Applications/eclipse/Eclipse.app/Contents/Info.plist, and uncommented this line:

/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java

Problem solved.  Apparently Eclipse uses 32-bit SWT-Cocoa bindings, and Apple just decided that they weren’t going to support 32-bit SWT any more in Java 6, breaking any app that uses them in the process.  So the fix is to just run Eclipse under Java 5 (Java 6 projects still work in this setup).  I’m starting to lose track of the consumer-unfriendly attitudes I’ve experienced from Apple.  Their version of Java 6 is late, incomplete, and lazy.

I will declare this now - Apple is every bit as evil as Microsoft.  If Apple EVER gets the market share that Microsoft once held, Microsoft’s anti-trust violations will seem like trivial misdemeanors compared to what Apple would do with such power.  I need to gather my thoughts on this soon and elaborate on this point.

25
Apr

Startup Riot is HUGE for Atlanta

Startup Riot will rock Atlanta on May 19th, 2008.  ~70 startups will have 3 minutes each to pitch themselves before an audience of other startups and prospective investors, employees and customers.  Bilgistic creator Sanjay Parekh has been a force in organizing this event, recruiting his high-school colleague Drew Curtis of Fark.com as the keynote speaker, and getting more than 70 regional startups signed up to pitch.

Atlanta has had several cool startup community events.  TAG’s annual business launch competition is underway again, Atlanta Startup Weekend launched Skribit, and we have had awesome unconferences such as 2 years of SoCon and last year’s BarCamp Atlanta.

What sets Startup Riot apart is that it is ORIGINAL and UNIQUE.  I haven’t heard of ANY other cities hosting events where an early stage company can pitch their company to investors and customers for FREE.  Sanjay has certainly been working hard to make the event happen, and the costs seem to already be covered by sponsors.  It is an event I can see other cities copying, and it’s starting here in Atlanta.

Of course I have a vested interest in Startup Riot.  My previous startup, WeTheCitizens. will be pitching.  I’ll be pitching (for a whopping 3 minutes)  FeatureFrame, a video platform for independent film-makers and commercial content-producers, but I’m also interested in the community aspects.  Many, many startups that I know of will be using this event as a major catalyst for them to build their pitch and move their business forward.  I can’t wait to hear about what dozens of other Atlanta startups are working on, and for Atlanta to pioneer an event that other cities will undoubtedly look to reproduce.

20
Apr

RubyOnRails.org hacked?

In trying to update my Ruby gems today, I got some strange errors.  Upon navigating to the Ruby on Rails site, I saw the following:

So what’s the word?  Did the main Ruby site get hijacked or expired?  If so, this could be yet another obstacle to enterprise adoption of Ruby/Rails.

Update: This post has been posted to Digg, and comments there indicate that the RoR IRC channel has acknowledged an issue with the domain, and they are “looking into it” (i.e. - 37 Signals is calling their lawyers).

27
Mar

Amazon Content Delivery Network Web Service?

Content Delivery Networks (CDN) such as Akamai and Atlanta’s own Internap handle the problem of delivering content (especially large content), handling all of the scalability and geographical delivery optimization. This market has become fairly commoditized, and since it requires huge investment in hardware in many locations and software to glue it together, new competition in this market would seem unlikely.

Amazon Web Services just announced the innocuously named Elastic IP Addresses and EC2 Availability Zones.  Elastic IP lets you associate a static IP address with an individual EC2 instance - slick.  “Availability Zones” effectively let you deploy your apps into different “zones” (probably different physical data centers) to protect against outages in a single “zone” or the internet around that “zone”.  This feature also supports regions, currently only us-east is available.

Where this gets interesting is when they add some more regions.  Amazon promises faster performance between servers in the same zone, so it seems necessary that at some point,  they’ll ensure that you can load your S3 content from the same zone your server’s in.  So now you have a geographically distributed network of servers that can delivery large amounts of content and handle any spikes in server or bandwidth demand.  Hmm… sounds like a CDN.  You can imagine someone building an entirely new CDN based entirely on Amazon Web Services (or should we call it SkyNet?).  Or is this the beginning of Amazon exposing the internal plumbing they’re putting in place to make S3 itself behave more like a CDN?

SkyNet (AWS) just keeps getting more interesting.  At least until it becomes sentient and sends an army of giant robot dogs after us.

26
Mar

Syncing my online life - New Blog Domain and Blog Bling

http://blog.kischuk.com/ is the new web address, http://feeds.feedburner.com/rkischuk is the new Feed URL. Existing links and feed subscriptions should work fine for the foreseeable future.

I’ve been on a mission lately to sync my online presences, initiated when I started using Twitter. I didn’t like maintaining different statuses on Facebook and Twitter, so I started using TwitterSync to push my Twitter status into Facebook - works like a champ. I wanted to bring my blog and flickr activity in too, so I fired up FriendFeed, and that worked and let me bring in my GTalk status, Google Reader, last.fm, and LinkedIn activity as well. Added the FriendFeed app and now all of that activity is pulled into Facebook. They need better controls so I can tell FF not to push my twitter activity into my feed (TwitterSync already updates my status directly), but I suspect this feature is coming.

Rhapsody listening history proved to be an interesting challenge, since Rhapsody’s plugin support is pretty sparse - Last.fm doesn’t have a Rhapsody scrobbler. I had to make my Rhapsody listening history feed public on Rhapsody.com, and am using RhapsodyScrobbler to push my listening activity to Last.fm. It’s a bit of a hack, but works nicely.
Giving this blog a facelift proved challenging. I’ve been happy using a wordpress.com hosted blog, except for the theme selection, domain name, and poor widget support. But there are no hosting, scaling, or software upgrade headaches. I paid $10 each for the Custom CSS and custom domain upgrades, and was able to tweak a new theme to something I’m pretty happy with (still some room for improvement). I’ve had kischuk.com registered for a while, free DNS with ZoneEdit, and finally added a CNAME for blog.kischuk.com to point to wordpress. The most unfortunate thing about hosted WordPress blogs is that they don’t support widgets of any variety (iFrame or embed). The best tool available for this is the RSS widget - I was able to point this to my twitter and Last.fm RSS feed to provide the pseudo-widgets you see in the right column. I also see this as the best hope for adding some semblance of Skribit support.

I am looking to add a good Flickr app to Facebook - any suggestions?

24
Mar

The Seas of Job Change - Wrapping up at WeTheCitizens

18 Months ago, I left a transitional role with Proficient/LivePerson to head up the development team at WeTheCitizens. In that time, we scaled the Wildfire platform from running a single gubernatorial campaign to a true SaaS platform that successfully ran for Rudy Giuliani and scales well to holding many national customers concurrently. It’s been quite a ride, filled with all of the highs and lows you could imagine. One of my fondest yet most stressful memories is working until 2 AM on a customer launch, waking up at 5 AM to catch a plane, and spending the morning calling back and forth to Atlanta as our production servers bounced up and down as the team in Atlanta discovered critical issues and bounced the server to apply fixes. Probably 5 minutes before we started training individual users, the system was stable enough to stay up, and the training and launch went great, thanks to an awesome technical team. I’ve worked with some of the best folks a startup could ask for, and I think we’ve accomplished a lot to be proud of. I’ve had great opportunities to expand my involvement in the Atlanta startup community, and met many more incredible people.

With these expanding horizons, came a conflict. There are a number of things I’d like to pursue, but trying to do to much “on the side” while serving in a startup VP role AND pursuing an MBA only comes at the expense of the MBA or the startup.  Testing the waters of any new venture while already in such a role is difficult at best. It’s been a great chapter at WeTheCitizens, and I it’s an opportune time to move on to new things - the team there is poised to thrive without even missing a beat. I’d like to explore some opportunities to co-found a new company.  I have a few ideas of my own I’d like to explore, build, and see if they get traction.  I’d love to take more of the load of Skribit development of of Calvin.  I’d love to explore leadership roles in some other local, fast-growing, young companies.  In leaving WeTheCitizens, I was trying to walk a fine line of finding a role that provided interesting work and long-term potential without conflicting with these other interests.

I found all of that and more in a contract position with Premiere Global (fondly locally known as Ptek), where I’ll be starting on Monday.  The project is important and interesting (I’ll share as much as I can, when I can - strategic projects at public companies can be a bit more sensitive than startup progress), we’ll be building a high-quality development team (solid Java resumes/referrals welcome), and we’ll be building a massively scalable system.  There’s potential for a longer-term position, but the contract nature of the position also affords a more natural boundary between day-job and other interests.  I’ve decided not to take any MBA classes this summer, freeing up some more time.  I’ll have time to pursue a number of different projects that have eluded me recently.  Six months from now, I’ll be in a far better position to decide what my next big step is.  Expect this blog to get a bit schizophrenic.  The role with Premiere is a good bit of hands-on development, so I’ll be sharing some nuggets that will help Java people.  I’ll be a bit more public and promotional with some of my other projects, which will be fun.  I think I’ll be just as busy, but with a much more diverse array of tasks on my plate.

—————-
Now playing: The Doors - The End
via FoxyTunes

15
Mar

Tornado Night at the Georgia Dome

I went to the Georgia Dome tonight for the SEC basketball tournament.  I caught up with a good friend who’s on UK’s faculty to watch both games, but the weather had different plans.

The Mississippi State vs. Alabama game went to overtime.  The Kentucky fans (a majority of the attendees) seemed quite excited for overtime even though they weren’t even playing, so I thought little of it when I heard what I thought was the UK fans loudly stomping their feet.  Until it became evident that it wasn’t them… it was too loud.

Looking beyond the UK fans, I could actually see the fabric of the roof of the Dome shaking in the wind.  I’ve been in the dome before for storms, and the fabric has never moved.  One of the advertising banners near the roof tore, pieces insulation started visibly blowing through the air of the dome, the scoreboard and partitions hanging from the ceiling were swaying widely, and the stomping noise got louder.  At this point, we decided that being underneath the steel and fabric roof was a bad idea, and were among the first wave of people to head for the concourse.

This was the edgiest part of the evening.  The aisles began filling up, people were becoming impatient with the slow walk up to the concourse, and the train-like sound of a tornado grew louder.  Here, there was a major possibility of a Cloverfield moment - like some monster was about to peel back the roof of the dome, screech, and create mass hysteria.  But simpler than that, if the power had flickered or gone out, if a larger tear had opened in the roof, I think chaos would have erupted.  It was a nervous and tense moment that could have taken a very bad turn.  After this, the stories began to circulate and we looked at visible damage.  One person almost got hit with a bolt that fell from the ceiling.  One security guard saw a rotating storm, another saw a woman who was outside slammed into the building by the wind.  There was an obvious hole in the roof of the Dome.

After lots of waiting, they somehow managed to finish out the Mississippi State  game, and they decided to wait to start the second game.  Overall, their crisis plan needed a LOT of work.  Via my phone, I learned there were ongoing tornado and severe weather warnings, but they left people in their seats rather than requiring them to move to the more sheltered concourses.  They provided very infrequent updates.  They kept telling everyone to stay around, and then suddenly announced that the Dome would close in 15 minutes.  They also postponed the second game just when all of the storm threats were subsiding.

The walk back to my car proved to me that a tornado was almost certainly the culprit.  The damage was extreme, but localized to very narrow areas.  We saw pieces of insulation surrounding the outside of the dome, and what appeared to be random structural pieces of the dome.  Insulation was blown so fast that it severed halves of shrubs.  Metal barricades were bent as they blew over.  Branches and plywood were sheared.

The most convincing evidence was on the Northside Drive side of the Dome.  Just below the roof of the dome were 2 sections where the exterior paneling was ripped off.  The insulation was gone, and torn banners were visible.  There were effectively 2 huge breaches directly to the interior of the dome, which explained why is was so drafty after the initial hit, and why they were reluctant to resume games if more bad weather was coming.  Large metal monument signs had been wrestled to the ground, twisted and wrested from their foundations.  Power poles and trees were toppled like twigs.

The Georgia World Congress Center may have sustained some of the worst damage.  LOTS of windows on the west side of the building were shattered.  Water pipes were broken and spewing water, and fire sprinklers appeared to be running as well.  News reports showed that this caused flooding in the building, and I’m sure this will require major repairs.

My car was frighteningly close to the path of destruction, but appears to be fine.
What a night!  I’m exhausted, and glad to be safe through this experience, which will also be another intriguing memory with a great friend.

03
Mar

Skribit Reloaded

Andrew Hyde notes that Skribit is now publicly available.  We had been in private beta as we stabilized the product and environment, and are now open to anyone with a blog who’s interested in collecting reader feedback on what they should blog about.  We also added some nice features along the way, and cleaned up some gaps on the Skribit site.

One key focus for this release was closing the feedback loop.  We notify bloggers when they get new suggestions, give them weekly activity summaries, and notify suggestors when a blogger writes about their suggestion.  Simple, but critical in keeping the conversation going.

Startup South is showcasing the Skribit widget as it now renders correctly when the width is narrowed.  Narrow-sidebar-bloggers rejoice!

Lastly, my contribution (with gratitude to acts_as_commentable) - you can now comment on a suggestion.  Because the meaning of a suggestion isn’t always clear.

Major cred goes out to Calvin (the feature machine), Paul, Jason, Lance, Alan, Josh, and anyone else I’m missing who made this latest release possible.  These guys make burning free time on a second startup a pleasure.

P.S. - You may note that I don’t have Skribit on this blog.  It’s not that I don’t want to use it (I REALLY do), it’s that hosted WordPress blogs such as this can’t handle iFrame widgets.  Boo.