While doing a bit of work on Tempo recently, we found we had the need to provide a union’ed set of Active Record associations on a model. We already had the code in place in acts_as_network to do something very similar via the UnionCollection class, so it was a simple step to create ActsAsUnion within the same plugin.
Here’s an example of what we mean and how it works:
class Person < ActiveRecord::Base
acts_as_network :colleagues, :through => :invites, :foreign_key => 'person_id',
:conditions => ["is_accepted = 't'"]
acts_as_union :aquantainces, [:friends, :colleagues]
In this case a call to the aquantainces method will return a UnionCollection on both a person’s friends and their colleagues. Likewise, finder operations will work accross the two distinct sets as if they were one. Thus, for the following code:
stephen = Person.find_by_name('Stephen')
# search for user by login
billy = stephen.aquantainces.find_by_name('Billy')
both Stephen’s friends and colleagues collections would be searched for someone named Billy.
To obtain acts_as_union, simple install the newest version of the acts_as_network plugin and use as shown above. The acts_as_union method does not accept any options.
I’m fresh out of the Seed Conference and it was, hands down, the best event I’ve been to in years. Imagine a full day of intelligent and down-to-earth entrepreneurs talking honestly about their businesses and communities, completely immersing the audience in creative opinions and ideas. I walked out Crown Hall feeling energized.
I don’t think that a play-by-play write up of each talk would even do it justice. Instead, here’s a selection of quotes from the various presenters that really speak to the overall vibe and flavor of the event.
“Deliver more value than you charge for it” – Jason Fried on pricing software
“If Content is King, Marketing is Queen – and we all know who runs the house” – Gary Vaynerchuk
“We don’t have a 5 year plan, or even a 5 minute plan” – Jim Coudal on the ineffectiveness of long term planning
“Build relationships with clients that listen to you, and that you CHOOSE to work with” – Carlos Segura
“It’s about bleeding out of your eyes and working your face off” – Gary Vaynerchuk on how hard you need to work to be successful
“It’s better to fail in a group because you can all blame someone else together” – Jim Coudal when asked if it’s better to fail alone or with a team
“I don’t consume. I put out. I PUT OUT.” – Gary Vaynerchuck on why he’s successful within his community
“If they come you will build it” – Jim Coudal on putting the community before the product
“You may be the client and paying the bills but you are irrelevant to this picture” – Carlos Segura on the need to connect with the intended audience as a designer, not the client
“Your app is having a conversation with your user” – Jason Fried
“I didn’t make the front page of Digg for 18 months” – Gary Vaynerchuk on being patient in the beginning of a venture
“I’d rather talk to the real people” – Jason Fried on why 37signals doesn’t track analytics in their applications
Hiring and the workplace culture
“Its about giving the right people the right opportunities” – Carlos Segura
“Make it fun. In a culture ruled by fear no amount of money can make it right.” – Jim Coudal
Why NOT to pay attention to the competition
“Every minute you spend on your competition is one minute you’re not spending on yourself” – Gary Vaynerchuk
“The more you look AT your competition the more you will look LIKE your competition” – Carlos Segura
“There really is room for everyone” – Jeffry Kalmikoff on the size and scope of online markets
“You can’t worry about things you can’t control and you can’t control your competition” – Jason Fried
“Can it make money? Will we be proud of it? Will we learn something new along the way?” – Jim Coudal on evaluating business ideas
“You don’t know if its any good until you build it” – Jason Fried
“More people watch TV that read books in America” – Gary Vaynerchuk about using online video to your advantage
“It would be awesome if…” – Jake Nickell on how a great idea should start
“The person who buys enterprise software is not the person who uses it” – Jason Fried on why that model is broken
“Keep doing the stuff on the side and when something sticks run with it” – Jason Fried on doing side projects with full time work
“People will feel it even if they don’t know why” – Jason Friend on getting the extreme details right
Just Plain Funny
“I’ve answered a million emails while pooping” – Gary Vaynerchuk on the indispensable nature of laptop computers
“Fly in progressively closer circles until you fly up your own butt and disappear” – Jim Coudal on how to perfect your work
“I’m huge in Denmark – I’m like Hasselhoff” – Gary Vaynerchuk on his international community
Disclaimer: I wrote these out in field notes live during the talks (no recording involved), so if there are any inaccuracies just let me know and I’ll correct them.
A long time ago I read Neal Stephenson’s essay In the Beginning…was the Command Line, an absurdly fun romp through the evolution of the modern operating system (at least up until the time it was written, it’s a bit dated now), in which he compares Windows 95 to a crummy station wagon, classic Mac OS to a cheesy Euro-sedan, and Linux to free tanks that no one wants. It’s a kind of ode to a hacker’s love for good tools, and discusses how interfaces have evolved from the command line as their ancestor.
We here at Zetetic are still big fans of the command line, which makes sense given our line of work. We prefer many good tools that do simple things that we can link together to do very powerful things. That’s the legacy of many of the oldest command line tools that are still in heavy use today, and the driving aesthetic behind some emerging tools like Git. (If I’m speaking somewhat generally here, it’s because I wish to avoid alienating readers with grotesque demonstrations of piped UNIX commands ;-)
On the web this aesthetic seems to be driving a lot of innovation as many online services, including ours, are striving to be good at some very specific things and to offer easy integration points with related services. More and more, services are turning to Twitter to provide users with mobile features and access, which makes a lot of sense – not everyone can afford an iPhone, but almost everyone has text messaging capabilities in their pocket and a service like Twitter makes a useful transport (when it’s working).
And thus, we come full circle back to the command line, in the year 2008. How long will the honeymoon last? Hard to say, but I’m going to put my money on it being around until the next drastic change in how we physically interact with computers.
Those of us who are real big nerds and power-users tend to have keyboard shortcuts for everything and we like to avoid using a mouse to get around an interface quickly. We don’t want to go to the web to fill out a form and click ten things, we don’t want to navigate an interface with our fingers on our phone’s web browser.
What we want is to tell some service or system, in very short, simple terms, what to do for us. And if you’re like Stephen and I, you don’t really want to spell everything out, you want to provide just the barest amount of information needed so you can move on to the next thing.
We embraced this notion at Zetetic immediately when we first built PingMe, an interactive reminder service that provides a text based command line interface. In normal human-speak, you can send simple commands in a text message to create reminders while you’re on the go.
When building Tempo we saw that this capability was easily adapted to time entry. There are numerous ways to enter time with Tempo, but the most powerful, quickest, and probably the least understood so far is the command line. It’s a format of input that allows for mobile time entry by e-mail or twitter (giving you SMS and IM by extension), and it’s actually available in the web interface, too, shown below:
Instead of waiting for a web form to load and clicking through the interface, looking for what is desired, the user gets the immediate satisfaction of telling the system what’s up, but with only the text “1 hr design meeting in NYC @project @tag”. It’s faster, and there’s a sense of empowerment there. It’s like the difference between working within a bureaucracy and a small company. Less waiting around for everyone else, more personal responsibility. You don’t get a list of what tags or clients you have, but you already know because you use them all the time.
While folks aren’t flocking to the command line input form in our web interface, a lot of Tempo users are really taken with submitting their time entries over Twitter and E-mail, and are using this command line syntax. While I think we’re the first time tracking service to provide this kind of interface, we’re certainly not the only ones who think the idea is a good one, and that’s a good sign that we’re on the right track.
We made some adjustments to Tempo last week, most of them below the surface, but I figured I’d mention two of the visible changes.
We’ve added a field to the Account page called Seed Tags, where you can list any tags you want to always be visible as default options for time entry on any project you create. This is aimed at some of our power users who work with multiple individuals and want to work with a common set of tags.
We’ve also implemented a request for additional details on Blinksale invoice line item descriptions. When you generate an invoice with one line item per entry you’ll now get the name of the person who entered the time and the date as well.
The useful acts_as_network plugin for cleanly representing network relationships in rails has officially been moved over to GitHub. GitHub will be the official repository from now on so we won’t be updating the SVN repo on rubyforge any more. Check it out!