Archive for the Rails Category

Andre on Rails

Posted in Rails on March 16, 2008 by hungtruong


class AndreTheGiant < ActiveRecord::Base
  has_one :posse
end

SVN Poem

Posted in Rails with tags on March 14, 2008 by hungtruong

I just svn’ed up to revision 142
But nothing has changed;
There’s nothing that’s new.

Super Thank you & Reminder board

Posted in Project Update, Rails on February 2, 2008 by kmouly

Project Name: Super Thank you & Reminder board

Summary:

I have two project ideas. I want to do one of them first and then implement the second.

Thank you board: The first project is to make the existing Thank you board (at WH and SI North) show messages related to the users near the display. A user profile is created for all users who post Thank you messages. The profile will store user’s unique name and the BT devices associated with the user. While posting a message the user can enter the unique name (or email id) of the recipient of the thank you message.

When a user(s) is detected near the display, the display will append the BT device names to query while requesting the next message to display. The server will find the user corresponding to the BT device and select the message in the order below:

  • Message sent to the user
  • Message sent by the user
  • Message sent/received by users who are connected (by thank you messages) to another user near the display
  • Preference will be given to the latest messages

Context aware meeting reminder: A ideal scenario to showcase the application. “Mouly sends an email reminder to Ben and Hung he copies the mail to coolapps@umich.edu. The subject line of the email is Meeting at 405A 7 pm today. This email is parsed and store in the database as an event associated with the Ben, Hung and Mouly’s profiles. When Hung goes to the Student lounge, he sees the a message on the screen: Reminder for Hung - You have a meeting at 7pm at 405A.”

Users email an event invitation/reminder to participants and copy the email to the application’s email id. A rails application will monitor an email inbox. Google Calendar API’s Quick Add function can be used to parse the text and break it into event fields - title, time and place. An entry is made in the events table - which has event title, time, location and participants information.

Users can associated their email id and BT device by sending an email or via the web interface.

The application will have some rudimentary understanding of the location of the meeting room. It will display meetings in west hall only in the West Hall displays.

Technology Used: Drupal, PHP, Ruby, Bluetooth

Research Goal:

  1. Do user aware displays increase the thank you messages posted?
  2. Is there an increase in meeting attendance when the ambient reminders are present around the users?

Educational Goal: Learn how to select the most relevant message to present to one user or when more than one users are present. Understand the privacy issues involved in public displays.

Deliverables:

  1. Use cases for the frequent flows.
  2. Working Drupal module to display the thank you message
  3. Working Rails application to creates events and display reminders

Migrations And You!

Posted in Rails on January 28, 2008 by hungtruong

This week’s post from me to you is about migrations. “What are migrations,” you ask? They’re ways to update the schema of a database without actually touching icky SQL syntax. I actually like touching SQL, but if you don’t then migrations are the way to go! They’re also useful for keeping the changes of the database saved in some kind of format so you remember what you changed.

So here’s some posts about migrations! The first is from rails wiki. This is a pretty sweet source. I used to refer to this a lot when I was learning RoR. It’s the first link on Google, so it must be good!

http://wiki.rubyonrails.org/rails/pages/UnderstandingMigrations

Up up down down left right left right b a start
Just because we use cheats doesn’t mean we’re not smart
So here’s a migrations cheatsheet

http://garrettsnider.backpackit.com/pub/367902

Here’s a link from International Business Machines about migrations.

http://www.ibm.com/developerworks/java/library/j-cb08156.html