Archives - Mar 2010
March 30, 2010
Persistence Smoothie: Blending NoSQL and SQL at Confoo
Earlier this month Pradeep and I had the opportunity to fly to Montreal to speak at Confoo, a multi-disciplinary web technology conference that grew out of a PHP conference. One of the days had a Ruby track and I had the opportunity to present a talk entitled Persistence Smoothie: Blending SQL and NoSQL. While the sessions weren’t recorded, I’ve taken up the practice of screencasting my talks to be able to provide some semblance of a recording afterwards:
The slides are also available on SlideShare for perusal:
I had a great time at the conference and got to speak to some others who were using NoSQL systems in the real world. Montreal was a lot of fun (getting to eat foie gras at Pied de Cochon certainly didn’t hurt) and I’m looking forward to giving a refined version of the same talk at RubyNation 2010
Update: I forgot to include a link to the source code for the application demoed during the talk. Here it is on GitHub.
Do you like this story?
March 29, 2010
Recap of MobileX Conference in Nashville, TN
This was my second time speaking and attending the MobileX conference. Last year there was one event that was held in Lexington, Ky. This year the MobileX Conference has hit the road with events in Columbus, Ohio, Chicago, Ill., Nashville, Tenn., and Lexington again. You can view their whole schedule at mobilexconference.org. The MobileX Conference in Nashville had a pretty good turnout and was well received by those who attended.
Noah Kagan, Founder of kickflip, Inc (makers of GetGambit.com), who also spent time as the CMO at Mint.com and was the original creator of Facebook Mobile, gave the opening keynote. Noah's talk was titled "Making Money in Mobile - It's not just the iPhone", which was very informative and entertaining. It definitely set the mood for the rest of the event.
The conference was broken out into three separate tracks, "Entrepreneur/Investor," "Technical," and "Mobile Music." There was also an "iPhone Beginner" course offered at the same time. My first talk was on the topic of "Building Native Apps Using Titanium Mobile".
I went over Appcelerator's Titanium Mobile platform and how you could build truly native applications for iPhone and Android just using JavaScript. I event went into detail about how we built certain elements of the iPhone version of Grub.it.
Sam Soffes from Tasteful Works had a talk titled "Reuse Your Code", which went over how to create static libraries and bundles for your iPhone or iPad application. Nick Holland from Mobile Assassins had a great talk titled "What I Wish I Knew Before I Started a Mobile Gaming Company".
Another great thing about this conference was that there were panel sessions throughout the day. These panels allowed the audience to ask specific questions regarding a topic and get all of our opinions. I was fortunate enough to be on one panel with Jackson Miller and Sam Soffes about native applications versus the mobile web, which actually didn't get all that heated since we were mostly on the same side. We took questions from the moderator and answered questions from the audience and I felt like it ended up being pretty informative.
Sadly, Michael Mettler from AdCru and former Product Manager at Admob, could not make it to the event. I was asked at the last minute to do the closing keynote that I did at last year's MobileX conference in his place. Instead of updating my talk from last year, I decided to do a whole new talk around the current state of mobile and why it is such a great time for us as developers, entrepreneurs, and investors to be in mobile right now. My closing keynote talk was titled "I'm Mobile, Who's Coming With Me", and I believe it went pretty well.
The MobileX Conference in Nashville was a great event. I had a great time and judging by the tweets I can tell that I wasn't the only one. The MobileX Conference in Lexington, KY kicks off on April 16, 2010 and I'll be there speaking again. If you're in the area and would love to hear about great things in mobile, I highly suggest that you attend.
Do you like this story?
March 29, 2010
Shanghai On Rails event in China
The seventh local Ruby event by the Shanghai On Rails community was held last weekend. Our senior engineer, Guoning Lv is the founder of the event and I was there speaking. Thanks to 5173, for providing the space, resources and support. Thanks to everyone who attended, friends both old and new. The passion and energy of the community members made the event a big success. The Chinese Ruby and Ruby on Rails community is growing!
All of the topics at the event were presented by Senior Engineers from professional Rails companies. The presentations were interesting and high-quality. The first topic was about JS2/JSAPI by Factual. JS2 language is a cross-browser object oriented approach to JavaScript which makes JavaScript development more fun and productive.
The second talk was titled “When ERP Fell In Love With Rails”, by Jason from Nanjing RoRedu. He shared his experience about how to manage projects, and teams in their ERP projects.
I gave my talk on NoSQL, titled NoSQL: Re-Think the World, which compared traditional RDBMs with the new storage approach of NoSQL. I also spoke about how to choose between the appropriate method for individual situations.
The final talk was Static Code Analysis For Ruby, given by Richard Huang from Ekohe. He shared his gem, rails_best_practices and talked about its implementation. This a great gem to use in refactoring projects and it is widely used by the open source community.
We had a great time at the event. Thanks again to 5173 for sponsoring the event!


Do you like this story?
March 29, 2010
Ruby Quick Tip: Regular Expressions in Case Statements
Did you know that you can use regular expressions in case statements in Ruby to check for a match? For instance, if I’m implementing some method_missing functionality and I want to check for bang or question methods, I might be tempted to do something like this:
def method_missing(name, *args)
name = name.to_s
if name.match(/!$/)
puts "Bang Method!"
elsif name.match(/\?$/)
puts "Query Method?"
else
super
end
end
But it’d be much cleaner if instead it looked like this:
def method_missing(name, *args)
case name.to_s
when /!$/
puts "Bang Method!"
when /\?$/
puts "Query Method?"
else
super
end
end
This is great, but now what if we want to call out a method for bang and question methods? Thankfully Ruby has us covered there as well:
def method_missing(name, *args)
case name.to_s
when /^(.*)!$/
bang_method($1)
when /^(.*)\?$/
question_method($1)
else
super
end
end
By using the $1 global variable we can access the last regular expression match performed by ruby. This is just one of those little details that makes working with Ruby such a joy.
Do you like this story?
March 25, 2010
RSpec the Unexpected
Recently I came across the need to refactor a web service. I knew I wanted to build a safety net of unit tests first — ones verifying that, given a specific HTTP request, I would get a specific JSON response. The snag: this application is written in PHP and my favorite testing framework is RSpec
Would I be able to use RSpec, I wondered, on a project that wasn't Rails, Merb or even Ruby at all?
I am happy to report that, yes: despite its embrace of the convention-over-configuration philosophy, RSpec is flexible enough to use for non-Ruby projects.
It is quick and easy to get some tests up-and-running completely outside the context of a Ruby-based web framework.
In fact, you only need two files to make it happen, as you can see in the proof-of-concept screenshot below:

I've made these files available in a github repository, but I will walk you through them below.
The Rakefile is just four lines that include the spec task via a require statement and set the configuration options inline:
require 'spec/rake/spectask' Spec::Rake::SpecTask.new do |t| t.spec_opts = ['--colour', '--format=specdoc'] end
And the tests themselves? You just need to put them in one or more folders under spec/ and follow the naming convention of something_spec.rb. (You can override this, if desired.) In this case, I used very simple tests for demonstration purposes.
Then, all it takes is rake spec and, Voilà!, and you can run RSpec tests for a project that isn't based in Ruby!
Note: This was tested with ruby 1.8.7 and rspec 1.3.0; different versions may require some tweaking.
Do you like this story?
March 24, 2010
Looking Back at RubyConf India 2010
The first ever RubyConf India took place in Bangalore, India at the Royal Orchid Hotel last weekend. Our Director of Research & Development, Pradeep Elankumaran, and I were there speaking. The event was put together by ThoughtWorks and was unlike any other tech conference we've ever attended. It wasn't the talks, the speakers, or the format -- it was the overall attitude of everybody who attended RubyConf India 2010 that made it very special to us. Everybody who attended were extremely passionate about learning and showed so much interest in all of the topics that were presented for the two days of the conference.
All of the topics presented at RubyConf India 2010 were interesting. Roy Singham, Founder and Chairman of ThoughtWorks, kicked off and closed the event. Ola Bini of ThoughtWorks gave a talk on "The Future of Programming Languages". Nick Sieger from Engine Yard was there to give his talk on "Rails 3 Through Choices". The highlight of the two-day event was when Yukihiro "Matz" Matsumoto, the father of Ruby, gave a talk via Skype about the future of Ruby. He also mentioned that work on Ruby 2.0 would start in August of this year. There were also talks by Nick Sieger, Arun Gupta, Aman King, Brian Guthrie, and many others. You can see the whole list of speakers and talks by going here.
Our very own Pradeep Elankumaran gave two talks. His first talk was titled "The Big Wave of Indian Startups - (Almost) Effortless Entrepreneurship", which sparked a large amount of audience participation and was one of the most interactive sessions of the weekend. His other talk was "Messaging Queueing in Ruby - An Overview", which went over different choices we could use to do queueing in Ruby. I gave my talk on MacRuby, titled "MacRuby to The Max", which went over MacRuby, HotCocoa and how it compared to Objective-C. I even did some live coding and created a quick and easy currency converter.
We had a great time at the first ever RubyConf India. We definitely want to thank ThoughtWorks for putting together a great conference that was extremely informative and enjoyable. You can bet that we'll be there again for RubyConf India 2011.
Do you like this story?
March 17, 2010
Friday Coffee Hour at Intridea
Every Friday at 4:00 pm, the Intridea team takes pause from the pressing tasks in which we are immersed. For an hour we set aside open tickets, bug fixes, running tests, reading code, and writing emails, except for the most urgent requests. From different parts of the country we pick up the phone and join one another in what we call, “Coffee Hour.”
While not everyone that joins in on the call is necessarily drinking a cup of coffee, the term “coffee hour” embodies the spirit of what happens during that hour. The format is not rigid and no one is mandated to be there. Team members jump in on the call as they can; often times Coffee Hour starts out with only a couple of people and then grows in size throughout the hour, especially if someone is engaging us with an interesting topic of discussion. Flip is usually the one to ping people in Presently throughout the week for topic ideas, and by Friday morning there are generally 2-3 talking points setup for that afternoon’s Coffee Hour.
One of the most popular Coffee Hour sessions was in February when Michael and Potsiadlo shared their techniques for logo creation. Michael created a logo on the fly and talked us through his process for creating it; he covered previewing fonts, how to do font selection for a logo, how to create shapes and modify them, and how to apply subtle effects to enhance an image.
Afterward, Potsiadlo showed us how he designs a logo; he starts off with an idea and branches off of that idea multiple times until the perfect design emerges. When he is finished, you can see the entire ancestry of his design in the same document.

During another Coffee Hour, Flip presented Oria, an open source key-value store that he wrote in Ruby. The following week, Pradeep presented on Apache Camel and Llama, his implementation of Camel in Ruby. The next week Michael presented on NoSQL, Redis, CouchDB, and Cassandra.
We didn’t have anything scheduled for last Friday’s Coffee Hour and only a few people were able to attend. Adam started talking about screen and then showed us how to use it on a remote box using SSH. This got Flip (a Textmate user) asking about Vim so Adam took the opportunity to explain the hype. Adam showed us screen splits, movements, how to navigate through a project, basic usage of ctags, gave a quick demo of the NERD_tree plugin, a demo of NERD_commenter, a demo of fugitive for git, a little rails.vim, block editing, explained tabs and buffers and their differences and gave a rundown of Vim configuration. He pointed us to Derek Wyatt’s site which has awesome tutorial videos on Vim.
While there are usually a couple of topics prepped in advance for the Coffee Hour it’s still a very loose format and people are free to bring up other topics or just use the time to talk about their week, a project they’ve been working on, get advice, or just listen in. It is a small but important bit of time set aside each week for us to gather in the virtual “break room” and talk shop. It is a weekly ritual that brings our voices to each other’s offices and reinforces the humanity of our working relationships while affording us the opportunity to share our knowledge and experience.
Do you like this story?
March 16, 2010
Grub.it Launched - Location-Based Dish Review Web & Mobile Application
Today we are excited to officially launch Grub.it, a location-based web and mobile application that enables people to find or review individual dishes at restaurants wherever they may be. Grub.it exists to help you find top notch meals wherever you are and aims to connect you with local specialties, hidden gems and exquisite dishes in general.
Unlike traditional food review sites, Grub.it focuses on individual dishes instead of restaurants as a whole. Now people can see what dishes are the most popular at a given restaurant and ratings for restaurants will solely be based on dishes that have been tried - which is far more accurate. Also, since people can see the ratings for each dish, never will anybody need to guess what would be the best dish to order off of the menu. Grub.it is also a very powerful tool for business owners, since they can find out why certain dishes are more popular than others at each individual location.
Grub.it's mobile integration plays a very important role. From the Grub.it iPhone application, you can 'grub a dish' (rate, add photo, and attach a review) at nearby restaurants. When you grub a dish, you also have the option of sharing what you've just eaten and the rating to all of your friends on Twitter or Facebook automagically. You can also view dishes that have been reviewed that are close to you, your network activity, nearby restaurants, your reviews, and much more.
The mobile version of Grub.it is currently available for iPhone and iPod Touch in the App Store. We are currently working on bringing Grub.it to Android and Palm webOS in the near future. The current version of the mobile application was developed using Appcelerator's (www.appcelerator.com) Titanium Mobile platform.
All of us at Intridea hope that you and your friends enjoy Grub.it and find it to be very valuable and fun. We'll be adding many new features within the next few weeks. So, the next time you go out to eat, make sure to grub it!
Do you like this story?
March 5, 2010
Hashie Gains a Chainable Hash
Hashie, Intridea’s Hash Toolkit, is today with version 0.2.0 gaining a new member: the Clash.
A Clash is a “Chainable Lazy Hash” that allows you to construct a hash using method syntax. It is meant to be used in a similar way to the way that Rails 2.x’s named_scope or Arel’s query building work. Let’s start with an example:
require 'hashie/clash'
c = Hashie::Clash.new
c.where(:abc => 'def').order(:created_at)
c == {:where => {:abc => 'def'}, :order => :created_at}
Pretty neat, right? But you can go beyond that. Clash also allows you to use bang method notation to create, dive into, and return from sub-hashes. Let me show you what I mean:
c = Hashie::Clash.new
c.where!.abc('def').ghi(123)._end!.order(:created_at)
c == {:where => {:abc => 'def', :ghi => 123}, :order => :created_at}
By using a bang method, you automatically create a subhash that is then the subject of the chain, allowing you to create more keys on that subhash. Then, if you want to jump back up to the top-level hash, you simply call the _end! method to return up one level in the stack (thanks to jQuery for that particular inspiration).
While Clash is a very simple tool, we hope that it could eventually make its way into some of the new ORMs that are cropping up around NoSQL systems (such as MongoMapper) to provide the same kind of effortless chaining that has made ActiveRecord so easy to work with.
Do you like this story?
March 4, 2010
Intridea Gets a New Look
Today, Intridea.com got a brand new look and feel. The goal behind the redesign was to improve the user experience with a cleaner and more attractive layout. I'd say the goal was met and exceeded with better organized content, careful use of white space, and a more vibrant color scheme. Visitors will still find all the major menu items and frequently used links in the same place; they just might stand out more and look a little better.
Before and After
Key Features:
- Enhanced Usability
- Greater User Experience
- Consumer Focused Interaction Design
- Warm Balanced Visual Design
New Sections
Services
In this section you'll find a run down of the Intridea process as well as the detailed services we provide to each of our clients. Did you know Intridea holds regular training classes based on cutting edge development practices?
Portfolio
Our new portfolio section showcases a variety of stunning web and mobile applications Intridea has built for clients, products and open source projects. Clicking on any showcase item will reveal a full description of each project. If you like what you see here, contact us and we'll help you bring your next project to life!
Blog
We've paid special attention to our new blog section. With a focus on design and usability our new blog aims to give you the best information in an easy-to-read format. Looking for an old article? No problem. You can easily access old posts directly from the right sidebar.
Contact
Our contact us page has been redesigned to help you get a hold of us quicker. Select any of the options from our contact form and include a short note. One of our helpful client service representatives will follow up with you promptly. If you prefer to reach us by phone, you can call us at 1-888-968-IDEA. We look forward to connecting with you!
About
Intridea would not exist if it wasn't for the talented group of people we have here. We're like family. Each of us are extremely grateful for one another and we hope you'll find this new section helpful for learning more about what we do here at Intridea.
Please let us know what you think about our new look by leaving us a comment below.
Do you like this story?
March 1, 2010
Skeet: A Twitter Client for Chrome
For users of Google Chrome there are a number of useful extensions that enhance your browser in a myriad of ways. Skeet for Chrome is a new Chrome extension that provides a lightweight, simple, and usable Twitter client right inside your browser.
Skeet is a simple, usable Twitter client for Chrome based on our recent launch of the Present.ly Chrome Extension. It uses OAuth to connect to Twitter so your password is safe and it gives you dead-simple access to your home timeline, mentions, and messages.
We hope you enjoy using Skeet. It’s 100% open-source (available on GitHub) and we aim to make it the best Twitter client for Chrome. Install it today!
To keep up to date with the latest news about Skeet, follow us on Twitter at @skeetapp












