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.
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.
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
Redfinger: A Ruby WebFinger Gem
Just yesterday, Google turned on webfinger for all GMail accounts. Today, we’re releasing a RubyGem to help you use the new protocol!
What’s a WebFinger?
WebFinger is a new protocol for extracting public information about a person via their e-mail address. It is meant to complement systems such as OpenID as well as give a simple way to get basic information about a user without having to ask them for it.
E-Mail providers can implement WebFinger by creating a special URL (specifically at /.well-known/host-meta) that is an XRD XML document telling the requester a URL at which they can find out more about e-mail addresses on their domain. Google’s, for example, is http://www.google.com/s2/webfinger/?q={uri}. When the WebFinger endpoint is requested with an e-mail address in place of {uri}, Google looks up information about that e-mail’s public profile and provides it in a standardized XRD XML format.
So why WebFinger when OpenID already exists? Users are used to associating their e-mail address with their identity. It’s natural since an e-mail address is (usually) for a specific person. By putting a protocol in place to find out more about an e-mail address without requiring additional input from the user, a host of options become available.
For instance, if I’m an application looking to authenticate using OpenID, I can ask a user for their e-mail address instead of their OpenID URL (something that will confuse mainstream users to no end). Or, if I want to automatcially fill in basic profile information, I can check to see if a parseable profile page is available in a format such as hCard.
Enter Redfinger
Redfinger is a library built to easily consume the WebFinger protocol. Installing it is simple:
gem install redfinger
Using it is just as simple:
require 'rubygems'
require 'redfinger'
finger = Redfinger.finger('youraccount@gmail.com')
finger.open_id.first.to_s # => "http://www.google.com/profiles/youraccount"
Redfinger will query the host of the e-mail domain specified, and, if the Webfinger protocol is supported, retrieve information about that e-mail address including such links as OpenID Provider, hCard URL, and more.
How can you use this today? Well, if you’re an OpenID consumer you can use the above code to try to “intelligently find” an OpenID endpoint from an e-mail address. Of course, it will just about only work with Google at the moment (this is an alpha protocol, after all). Or, you could install the mofo gem (a gem for parsing microformats for web pages) and do some neat things with microformats:
require 'rubygems'
require 'mofo'
require 'redfinger'
finger = Redfinger.finger('account@gmai.com')
card = hCard.find(finger.hcard.first.to_s)
card.fn # => "That GMail user's full name"
card.title # => "The title he/she entered on Google Profile"
Here Redfinger determines a URL that will have hCard information about the e-mail address specified, and the Mofo gem goes out and fetches that address, parsing out the information.
WebFinger is still brand new (Google calls it “alpha”) but it shows some promise for being a great way to make the open web more seamless for users. As always, the Redfinger source code is available on GitHub and RDoc Documentation is available. Check it out!
Present.ly Chrome Extension
We’re always looking for ways to make it easier to keep up to date with your co-workers using Present.ly. Recently I’ve been using the Mac Beta of Chrome and thought a Chrome Extension could be a great way to use Present.ly throughout the day. As of today it is available on Google’s Chrome Extension Directory.

The functionality of the extension is still growing, but you can read and post updates to your network as well as view text attachments. It will keep refreshing automatically and let you know when new updates come in, letting you check in without even opening a new tab!
As with all of our client applications, the Present.ly Chrome extension is available as open source on GitHub. We think it’s a great new way to access Present.ly, and we hope you enjoy it!
Official VOA PNN Application Released for iPhone and Android
On the heels of U.S. Secretary of State Hillary Rodham Clinton's Net Freedom speech, Intridea was delighted to receive notification Apple had approved the official iPhone application we developed for Voice of America's (VOA) Persian News Network (PNN).
This new application gives Iranians a unique opportunity to get the latest news on their mobile devices and to share with the world the news as it happens in their country," said Acting PNN Director Alex Belida. "It is a groundbreaking way to expand our reach inside Iran and deepen our relationship with a key VOA audience."
Following Iran's troubling elections in the Summer of 2009, the Senate aptly passed the Victims of Iranian Censorship (VOICE) Act, which provided much needed funding and support to the Broadcasting Board of Governors to expand Farsi language broadcasting into Iran by the Voice of America's Persian News Network.
This application empowers Iranians at a time when the government is staging a crackdown against opposition protesters, Mr. Belida said. As with the disputed elections [last] year, VOA's Persian service continues to be a leading source of news and information for Iranians.
In this video, Hamed Behravan, Sr. VOA Correspondent showcases the newly released mobile application to millions of Iranian television and web-based viewers, on his weekly Technology Roundup segment.
Built under the technical leadership of Brendan Lim, Intridea's Director of Mobile Solutions, the application is designed for iPhone and Android Devices, and features the ability to read the latest VOA News Stories and share them through Facebook, Twitter, or e-mail. Users can also keep up-to-date with the VOA PNN's Twitter feed (@voapnn). Additionally, "the application allows users to anonymously report news accompanied with either an image or video captured directly from their mobile device" says Lim; "enabling a new wave of citizen journalism."
Intridea is dedicated to supporting Gov 2.0 projects and programs that promote human rights, uphold democratic principles, and strengthen civil institutions. In the case of the VOA PNN App, we have been given an opportunity to create a platform that extends the Iranian people the freedom of speech --- in real-time.
Many important security measures were considered to operationally defeat or circumvent censorship and/or surveillance of content created, shared or stored by users. And with future guidance from the VOA & US State Department, Intridea plans to develop other sophisticated transmission techniques to counter the Iranian government's use of filtering systems, and general stranglehold of internet & mobile transmissions.
The VOA PNN application was built using Appcelerator's Titanium Mobile platform. Using Titanium Mobile, we were able to create an application for both, iPhone and Android, using just a single codebase. Also, Titanium Mobile allowed us to develop these native applications using only HTML, CSS, and JavsScript, which greatly reduced the amount of development time.
Here's how to get it:
On iPhone or iPod Touch
You can download it directly from the App Store. You can also find it by searching for 'VOA PNN'.
On jailbroken iPhone or iPod Touch
If you have a jailbroken iPhone, you can find the application through Cydia or Rock. The application is listed under the BigBoss source, which is included by default on both of these applications. Just do a search for 'VOA PNN' to install the application.
On Android
The application is listed under News & Media in the Android Marketplace. You can also search for 'VOA PNN' to install it.
- arabicandroid - http://code.google.com/p/arabicandroid/
- XDA Developers - http://forum.xda-developers.com/showthread.php?t=616384
Stay tuned for more.
Simple Mustache JSON Serialization
If you’ve taken a look at Mustache, the “stupid in a good way” templating engine, you might know that there are also Javascript Mustache renderers such as Mustache.js. Today we’ve released a small library called mustache_json that allows you to compile your Mustache view objects into JSON, allowing them to be interpreted by Javascript Mustache rendering engines.
What this means for your project is that you will finally have a identical client-side and server-side rendering interface, opening wide the opportunities for pushing more of the rendering work onto the client-side, a boon for many real-time and heavy-interaction applications.
To install mustache_json, just get the gem from Gemcutter:
gem install mustache_json
To use it, simply require 'mustache_json' and all of your Mustache objects will automatically be given a #to_json method. For instance:
require 'mustache_json'
class Person < Mustache
def initialize(first_name, last_name)
context[:first_name], context[:last_name] = first_name, last_name
end
def initials
"#{context[:first_name][0..0]}.#{context[:last_name][0..0]}."
end
def listing
"#{context[:last_name]}, #{context[:first_name]}"
end
end
bob = Person.new('Bob', 'Bobson')
bob.to_json
This will render into a JSON object that looks like this:
{"last_name":"Bobson","initials":"B.B.","listing":"Bobson, Bob","first_name":"Bob"}
Mustache JSON gives you access to all of the public instance methods you declare in your Mustache as well as any context you have set. It is essentially a fully compiled version of the Mustache view, providing everything another renderer needs to create the actual markup. The JSON back-end for this library is swappable, meaning you can use the JSON gem, JSON pure, ActiveSupport, or Yajl by default (and any other class with an encode method if you’ve got a different library).
Documentation is available on RDoc.info and the source is available on GitHub. Stay tuned for posts in the future about utilizing this library to actually perform identical rendering in Ruby and Javascript.
Presently Now Available for Palm webOS Devices
Coming hot off the heels of the Presently 2.0 release for the iPhone, comes Presently for Palm webOS. Presently for Palm brings most of the same great features from the iPhone version to any Palm webOS device, such as the Pixi or the Pre, with the unique look and feel of Palm webOS applications.
Some of the great features of the webOS version of Presently include:
- Post and view updates
- View your replies, direct messages, and your feed
- View profiles groups and people
- View updates for groups and people
- Join existing Presently accounts
- Create your own Presently account if you don't have one
- ... and much more
With this latest release you can now keep up with your company natively on the iPhone, Android, or Palm webOS platform anywhere you go. Presently for webOS devices is now available on Palm's App Catalog.
Presently v2.0 Released for iPhone
A new version of the Presently application has just been released for iPhone and is now available on the App Store. Presently for the iPhone is the best way to keep in touch with your co-workers where you're not in front of your computer. The new version of Presently brings a completely new application, developed using Appcelerator's Titanium Mobile platform, that is packed with many more features than the previous.
Below is a list of just some of the great new features that have been added to the latest version of Presently for iPhone.
- Completely redesigned user interface
- iPhone 3GS users can now post videos with their update
- Can view a list of all users and groups
- Profiles for individual users or groups
- Follow or unfollow specific users
- Join or leave specific groups
- View followers and whom an individual is following
- Search through all users
- Search through all groups
- View last updates for any user or group
- View mentions for any user or group
- View updates from any of your custom feeds within Sources
- View updates from any of your groups within Sources
- Offline-capabilities for your main feed
Introducing Oria
Oria (oh-rye-uh) is an in-memory, Ruby-based, zero-configuration key-value store. For those of you who don’t know, a key-value store (KVS) is a database-like piece of software that effectively behaves like a Hash in Ruby – you store values under unique keys and retrieve them later. One of the big benefits of this model over relational databases is that you can store arbitrarily structured data without the overhead of a SQL-based server.
I built Oria because I needed a semi-persistent store that spoke JSON and was reasonably fast, but I didn’t want my applications to rely on complex server-side applications. It is written in Ruby in a bid to make it dead simple to use. That means you can use it like Memcached or Redis without having to compile, manage, or monitor any processes. It’s very straightforward:
- Install it:
gem install oria —source http://gemcutter.org
- Require it:
require “oria”
- Use it:
Oria[:foo] = {:bar => "baz"}
You can store strings, hashes, integers, floats, booleans, and arrays. If you absolutely need marshaling, handle it on the client side:
Oria[:foo] = Marshal.dump(Bar.new("baz"))
bar = Marshal.restore(Oria[:foo])
But in general, I would encourage you to avoid using marshaling at all, and instead store the key attributes you need to keep track of, e.g.:
Oria[:foo] = "baz" bar = Bar.new(Oria[:foo])
Oria is different from other KVS’ in a few ways. First, it’s designed to provide the functionality available with other systems at a fraction of the server and maintenance cost. The zero-configuration setup means deploying, starting, and stopping all happen seamlessly. Second, Oria is built to be modestly performant. I’ve sacrificed the extreme performance gains from something like Tokyo Tyrant in order to provide something very easy to use. As a result, it’s not quite as full-featured as the alternatives in terms of networking or traffic capacity. Third, Oria’s persistence is modeled on Redis’ – it writes asynchronously to the disk as it goes dormant (i.e. stops fielding requests). Unlike other KVS’, however, Oria is not fully persistent. Rebooting your server will completely clear Oria out, so it’s not intended as a permanent storage medium – just a well-performing, simple-to-configure, temporary data store.
You can learn more about Oria at its Github page.
Hashie: The Hash Toolkit
One of my earliest gems was Mash, a useful tool for creating mocking objects as a Hash. One of the most common problems people had with Mash was a simple one: it conflicted with another class of the same name in extlib! To address this problem as well as give the project some room to grow, Mash is now part of a new toolkit called Hashie. Hashie is available now via Gemcutter and the source, as always, is available on GitHub. To install:
gem install hashie
Hello, Hashie
Hashie is, right now, simply the former Mash code along with a new extended Hash called a Dash. A Dash is a “discrete hash” that has pre-defined properties. It can be used as a dead-simple data object when even something like DataMapper is too heavy, but a Struct is too light (Dash gives you the ability to set per-property defaults as well as initialize from an attributes Hash). For example:
class Person < Hashie::Dash property :name property :email property :occupation, :default => 'Rubyist' end p = Person.new p.name # => nil p.occupation # => 'Rubyist' p.email = 'abc@def.com' p.email # => 'abc@def.com' p['awesome'] # => NoMethodError p = Person.new(:name => "Awesome Guy") p.name # => "Awesome Guy" p.occupation # => "Rubyist"
The other advantage Hashie has over Mash is that it’s built from the ground up to avoid conflicts. Instead of adding stringify_keys methods to the Hash class, it’s instead added to a Hashie::Hash subclass. You can, however, get Hashie’s few Hash extensions in the Hash class by including the HashExtensions:
Hash.send :include, Hashie::HashExtensions
Hopefully the move will make it easier for everyone to use it in their projects without fear of running into conflicts, and hopefully you’ll also find the Dash useful. Over time the functionality of Hashie may grow to encompass additional simple and useful extensions of Hash. So install Hashie, your friendly neighborhood Hash toolkit, today!
Car Finder Becomes a Hit Application for iPhone
We released Car Finder just over a week ago and the amount of attention we've received is much more than we could have ever anticipated. For those of you who don't know, Car Finder is an iPhone application that utilizes augmented reality to help you find where you parked your car.

Note: Car Finder developer Brendan Lim and his brother (with the dollar) sold separately
Throughout this whole process we've noticed that the Twitter mentions that came after these news articles proved to play a huge part in Car Finder's success. Below are a list of a few articles that covered the release of Car Finder.
Wired UK
Save face with the Car Finder augmented reality app
The Unofficial Apple Weblog
Use Augmented Reality to Find Your Car
Autoblog
Latest auto iPhone app: Augmented reality parked car finder
Holy Kaw!
Can't find your car? There's an app for that. - Holy Kaw!
Cult of Mac
Car Finder iPhone App Uses Augmented Reality To Find Your Wheels
Boing Boing
Car Finder app for iPhone
Car Finder is available now on the App Store for $0.99. Intridea offers services for application development on all major mobile platforms, which include iPhone, Android, BlackBerry, and Palm webOS. If you need help with your mobile application feel free to contact us for a quote.
Quick Tip: Readable Conditional Validations in Rails
This is something that many may already use as a best practice, but if not it’s something simple and convenient to add to your repertoire. Sometimes you may have a model that requires additional information if a certain condition is met. For example, I may require a user to add more information about themselves if they wish to be listed publicly, whereas I would not if they do not wish to be listed. By combining ActiveSupport’s Object#with_options and ActiveRecord’s conditional validations, we can implement this behavior in a straightforward and readable manner (assuming here that there is a boolean field called “listed” in the database that is exposed as a checkbox or similar to the user):
class User < ActiveRecord::Base
# Our standard validations
validates_presence_of :login
validates_uniqueness_of :login
# Validations for listed users
with_options :if => :listed? do |l|
l.validates_presence_of :email
l.validates_length_of :description, :minimum => 100
end
end
It’s a simple technique that piggybacks off of Rails’s automatic construction of existence query methods (in this case, listed?) for fields in the database combined with the mapping power of with_options and standard conditional validations.
Use Augmented Reality to Find Your Vehicle With Car Finder for iPhone
If you’ve ever parked your vehicle in a large parking lot you’ve realized that it would be great to have something help you memorize where your car was. Intridea’s latest iPhone application, Car Finder, helps you do just that. Unlike the cookie-cutter car finding applications in the App Store, Car Finder helps you find your car using augmented reality.
Using the camera, A-GPS and the compass built into the iPhone 3GS, Car Finder allows you to find your car by positioning an overlay on top of a live view of what’s in front of you. Also, when you mark your car Car Finder allows you to set a note for your parking spot. This is particularly useful if you know what section you’re parked in or if the GPS is spotty in the location that your car is currently parked in.

Car Finder is available now on the App Store for $0.99. Intridea offers services for application development on all major mobile platforms, which include iPhone, Android, BlackBerry, and Palm webOS. If you need help with your mobile application feel free to contact us for a quote.
Presently Adds SharePoint Integration
We’re always looking for ways to make it easier to integrate Presently into your day-to-day workflow. Today, we’re happy to announce something that will make it much easier for businesses using Microsoft’s SharePoint to integrate Presently. Starting today businesses can use the Presently SharePoint Web Part.
The Presently Web Part will allow you to view and post updates to your company’s Presently account from directly inside your Microsoft SharePoint portal. For more information on the installation and usage of the Web Part, you can visit the SharePoint application page.
We have also released the source code to the web part, it’s available on GitHub. Please feel free to contact support with any additional questions.



