Category: Hacker Notes

Have you seen cool forms that look like this? They’re often called natural language forms or conversation forms. From a visual perspective, they look awesome. I’ve been incorporating them into a few side projects, up until a couple of days ago. One of my sites was using a conversation form as a user signup. The form […]

I have an existing rails project in which the requirements were recently changed. Initially, I had a model associated with another through a one-to-many relationship. Now, there’s a new use case which changes the association to many-to-many. Existing: class Questionnaire < ActiveRecord::Base   has_many :sections end class Section < ActiveRecord::Base   belongs_to :questionnaire end Changes: […]

I inherited a rails codebase that was written about 5 years ago. The codebase is a web application for a nonprofit that does leadership training and assessments. Training participants perform a self-assessment and invite peers to evaluate their leadership. Each training participant receives a report that shows their self score in relation to peer scores, […]

I’ve had a crush on Meteor for about a year now. And have done a few sample apps. Yesterday, I decided to create a meteor package. One of the cool things about Meteor is its smart packages. The smart packages are similar to other package or libraries in other languages, like Ruby Gems or NPM. […]

Testing is a subject that is often talked about as a best practice in the Rails community. However, behind the scenes, many a Rubyist forego testing, using lack of time and “prototyping” as an excuse. The root cause is that a lot of Rubyist have bad habits that need to be broken, including myself. Two […]

Tbl uses a script for starting new rails projects. After you run ‘rails new example -d=postgresql’, create a new file in the script folder of the new project. (don’t worry about an extension for the file) Add the contents to the new file set -e gem install bundler bundle install –binstubs bin createuser -s -e […]

This weekend I participated in the AT&T Mobile HTML5 Hackathon. I had very mixed feelings in the beginning about my participation for multiple reasons. The first reason in which I was against participating is because I have a number of incomplete apps from previous hackathons that I have yet to complete, and I didn’t want […]

#47 Two Many-to-Many – RailsCasts. Found this railscast helpful in trying to understand many to many relationships in ror. And the difference between using has_and_belongs_to_many and the has_many :through. As noted in the railscast, the has_and_belongs_to_many to very limited and does not allow as many options as has_many :through. Due to Ryan’s recommendation in the […]

This post is more for me than for the typical reader of this blog. So, if you’re not a developer, you might want to skip this post. Wanted to jot down some quick lessons learned, in case I ever encounter these problems again. Yesterday, in the rails project for imaiku, we migrated from sqlite to […]