Articles tagged with collectiveidea

Last call for early-bird price on Rails Training

collectiveidea May 28 2008

Just a quick note to remind you that May 31 is the last day of early-bird pricing for the Ruby on Rails session. After Saturday, the price will go up from $1195 to $1495. (Who couldn’t use an extra $300?)

If you’re going to be at RailsConf, find us and get a discount code that gives you the early-bird price until June 6. We look forward to seeing you!

posted by brandon | updated May 29th 04:09 PM | 0 comments

Collective Idea welcomes Brian Ryckbost

collectiveidea May 19 2008

Collective Idea would like to welcome Brian Ryckbost. Brian started as our first intern 9 months ago, and, even after putting up with crap from Daniel and me, joins us today as a full-time employee. Congratulations, Brian, on graduating from intern to employee; you were the best intern we ever had!

posted by brandon | updated May 19th 05:38 PM | 1 comment

Announcing: Sessions by Collective Idea

collectiveidea May 15 2008
Update: Daniel has a great post that explains the idea behind “Sessions”.

We’re really excited to announce Sessions by Collective Idea on June 23-26. Come spend 4 days in Holland, Michigan, learning Ruby and Rails. Whether you’re a Ruby newbie, or want to get better, this Session is for you.

This Session features hands-on training by people who know Rails inside and out, and have taught Ruby, Rails, and Rails deployment across the globe.

In your free time, you’ll get to explore Holland’s unique downtown, the fantastic sand dunes of Lake Michigan, or talk to other Rubyists over drinks.

Register today and save 20%. We look forward to seeing you!

posted by brandon | updated May 16th 10:59 AM | 0 comments

Awesomeness: database backups

collectiveidea April 27 2008

At Collective Idea, we have a plugin called awesomeness that is…well, awesome. It’s a collection of things that we use in almost every project that aren’t generic enough to go into individual plugins (although some things may have evolved enough to be worthy of plugin status).

A while ago, I blogged a little snippet for backing up your remote database. Well, that snippet as evolved quite a bit, into it’s own set of rake and Capistrano tasks.

First, the rake tasks. You Can easily create a new local backup:

$ rake db:backup:create

This creates a backups directory in your project, with a subdirectory for each backup based on the timestamp. A backup consists of the schema.rb file and then a fixture for each table to hold the data. Why fixtures? Good question. Because we wanted the backups to be database independent.

You can easily restore your local database to the latest backup, or a specific version:

$ rake db:backup:restore VERSION=20080427214315

That’s nice, but what good are local backups? That’s where Capistrano comes in. Just add this to your config/deploy.rb:

load 'awesomeness/backup'

This adds some nifty remote backup support. Now, whenever cap deploy:migrations is run, a backup of your remote database will automagically be created and stored in the shared directory on the server. You can also have them transferred to your local machine by adding a callback in your deploy.rb:

after "backup:create", "backup:download"

Sometimes, you just want to take a snapshot of the server and plop it into your local database.

$ cap backup:mirror

How do I get this backup awesomeness?

Awesomeness now lives on Github (like the rest of the world). Fork it and let us know what you think.

posted by brandon | updated May 1st 10:01 AM | 2 comments

Tips for freelancers: take a shower

collectiveidea March 20 2008

While we’re not exactly freelancers at Collective Idea, we operate very much like freelancers; we are contractors that work mostly out of our homes on client projects. We share many of the benefits that freelancers enjoy, and experience many of the same challenges. In the coming days and maybe weeks, I will try to post some of the things I’ve found helpful from personal experience.


Seriously, take a shower, every day! Not only that, but take a shower first thing in the morning.

Working from home, it’s easy to get into the habit of stumbling out of bed, occasionally making a quick pass through the kitchen, and plopping down right at your desk. There were often days weeks where I would go straight from bed to my office and start working, not pausing to shower until mid-morning, noon, or sometimes even after work.

I’ve found that showering early in the morning has been helpful for several reasons:

  1. Consistency: We are creatures of habit, and that is a good thing. We live in natural rhythms, and the beats that we move to are important for productivity. I’ll talk more about this in my next post.
  2. Transition: When I first started working from home, what I missed the most was the drive or walk from home to work, and back again. Without it, I found it very difficult to make the mental transition from personal life to professional life. The two would often blur and I would spend the first half of my day distracted by personal matters while I was consumed by work in the evenings. Showering has become my morning transition. I take care of personal matters when I wake up–breakfast, bills, laundry, etc–and begin working immediately after I shower and get dressed.
  3. Freshness: water is very refreshing, both physically and mentally. While I’m not one of them, many people find that they do their most creative thinking in the shower. But I do find that after I shower I’m very refreshed and sharp.

So there you have it: proper hygiene is as important for your professional life as it is for your personal life.

Up next: you’re a professional, show it with your hours.


This post is somewhat different from the typical format of this blog, so I’d love to hear your feedback. Also, I’m interested in any tips you may have as a freelancer or independent consultant. Send me an email or post your tips in the comments.

posted by brandon | updated March 20th 01:26 AM | 6 comments

Ruby on Rails Training in San Francisco: April 1–4

collectiveidea February 28 2008

I’ll be leading another hands-on, interactive workshop exploring the ins and outs of Ruby on Rails in San Francisco on April 1–4. Experience the Rails way of approaching web applications, starting with the basics of Ruby and Rails, and then diving into the full Rails’ MVC stack, testing techniques, Ajax and even web services. In the 4 day class, we’ll work through the full life-cycle of a Rails project, giving you experience with all facets of a typical app, lead by people that have been working with Rails every day for 2 years.

Sign up now on Marakana’s website and receive $150 off using the coupon code “collectiveidea”.

posted by brandon | updated February 28th 01:16 PM | 2 comments

Ruby on Rails Training in San Francisco, Jan 29–Feb 1

collectiveidea January 11 2008

Maybe you’ve heard of it, but there’s this fancy web framework called Ruby on Rails. Apparently it’s all the rage these days. It’s only 2.0 right now, so the big kids say it still belongs on the playground, but there’s rumors of people using it to do real work. The word on the street is that it makes you more productive and makes programming fun again. If that sounds like something you’d like to learn, you can get more information and signup on Marakana’s website.

Update: Marakana is offering $150 off when you sign up using coupon code “collectiveidea”!

posted by brandon | updated January 16th 09:44 PM | 0 comments

Ruby on Rails 2.0 Training in San Francisco, Nov 26-29

collectiveidea November 15 2007

I will be leading another 4 day Ruby on Rails course in San Francisco on November 26-29. Since Rails 2.0 is almost out (and may be by the end of the month), the training will be based on Rails 2.0, including the wonderful world of resources.

So whether you’re new to Ruby and Rails and want to see what all the fuss is about, or you’ve been playing with Rails 1.x and want to see what 2.0 has to offer, head on over to Marakana’s website to sign up.

posted by brandon | 0 comments

Looking for a Rubyist

collectiveidea September 27 2007

ecounseling.com, a project that we worked on at Collective Idea, is looking for a Rails programmer to implement some new features and continue to expand their site.

The site is a Rails application with lightweight CMS, live chat using Campfire, membership management and credit card processing. The client has been fantastic to work with, the problem is just that there aren’t enough hours in the day. So we’re looking for someone that is interested in full-time or consulting work. The client would ideally like around 40 hours/week, but I could contribute up to half of those.

Let me know at the email on the right if you’re interested.

posted by brandon | updated September 27th 01:16 PM | 0 comments

Ruby on Rails Training

collectiveidea July 18 2007

I will be leading a 4 day Ruby on Rails training course in San Francisco on September 4-8 through Marakana.

From Markana’s website:

In Ruby on Rails Training course you will learn to put your web development on Rails using Test-Driven Development to create clean Ruby code that works, developing the confidence you need to fearlessly refactor and enhance your Rails application going forward…Students will build a Rails application, learning the TDD lifecycle from the beginning. Time spent in lecture will focus on an introduction to Ruby, a thorough discussion of Test-Driven Development, and an in-depth exploration of the Rails framework, including a final day focused on using Ajax with Rails. The majority of the course will involve intense, hands-on learning to provide students with opportunities to encounter more realistic obstacles as they familiarize themselves with the rhythm of development on Rails.

If you can’t make it to San Francisco in early September, or are interested in private training for your company/group from developers with 2 years of real world Rails experience, feel free to contact me.

posted by brandon | updated July 18th 11:49 AM | 2 comments

Handling forms with multiple buttons

collectiveidea July 16 2007

With an app that I’m working on, the client wants to have several buttons for doing different actions on every form: “Save”, “Save & Continue Editing”, “Save & Add Another”, and “Cancel”. HTML only allows you to have one action defined per form (instead of per button), and Rails pretty much assumes that if you submit a request to a specific action, you expect to execute it.

So, instead of littering my code with all kinds of if/else statements, I decided to wrap up the functionality into a little plugin that makes it a little cleaner.

with_action is a respond_to style helper for executing different blocks based on presence of certain request parameters.

def create
  with_action do |a|
    a.cancel { redirect_to articles_path }
    a.any do
      @article = Article.new(params[:article])
      if @article.save
        a.save { redirect_to article_path(@article) }
        a.edit { redirect_to article_path(@article) }
        a.approve do
          @article.approve!
          redirect_to article_path(@article)
        end
      else
        render :action => 'new'
      end
    end
  end
end

A block is invoked if a parameter with the same name exists and is not blank. Here is an example of the form that submits to this action:

<%= submit_tag 'Save', :name => 'save' %>
<%= submit_tag 'Save & Continue Editing', :name => 'edit' %>
<%= submit_tag 'Save & Approve', :name => 'approve' %>
<%= submit_tag 'Cancel', :name => 'cancel' %>

If an any block is present and no parameter that matches one of the other blocks, it is called by default, otherwise the first block will be called. The any block is the only one that can have nesting and be called multiple times.

I realize this could be considered trivial, but this looks a lot cleaner than the alternative, and more importantly, gave me a way to standardize on how I handle these actions. Let me know what you think.

http://github.com/collectiveidea/with_action
posted by brandon | updated June 19th 07:19 PM

Making cookies with Javascript

collectiveidea July 11 2007
new Cookie({eggs: 1, flour: 3, sugar: 1.5, brownSugar: 1});

Oh, wait…not those kind of cookies (mmm, now I’m hungry for cookies).

The script.aculo.us wiki has some code for working with cookies in JavaScript. I’ve extended it a bit to allow for other options when setting the cookies. Here’s how to use it:

// setting cookies
Cookie.set('name', 'value');

// change domain, path, and expiration in # of days
Cookie.set('name', 'value', {
  domain: 'foobar.com',
  path: '/path',
  expires: 14
});

// the google cookie (doesn't expire)
Cookie.set('name', 'google', {expires: false});

// reading cookies
Cookie.get('name');

// Get an array all cookies that are set
Cookie.all();

// erase a cookie
Cookie.erase('name');

// check if browser accepts cookies
if(Cookie.accept()) {
  // do stuff with cookies
}

You can grab the code from here.

posted by brandon | updated July 11th 04:24 AM | 0 comments

How to eliminate the best candidates

collectiveidea July 08 2007

From a recent, very poorly written job posting:

We need this done very quickly, in a matter of days

I am amazed at the number of job postings that have phrases similar to this.

Employers: sounding desperate will only help you find desperate candidates–those that need work immediately and are willing to put up with desperate clients. Anyone that has time to do your work immediately is likely short-changing their current clients (hint: you will eventually be the current client), or doesn’t have any current clients–either of which should raise a red flag.

Take a deep breath and rewrite your job posting in a way that makes you sound like a professional. You’ll get interest from a lot better candidates.

posted by brandon | 4 comments

Working in Israel

collectiveidea June 19 2007

I think the biggest perk of working in this industry (and working for yourself) is that we can work from almost anywhere, as long as there’s a connection to the tubes.

This summer, my wife is studying in Israel. So, instead of staying home alone for 6 weeks, I decided to go along. So far it’s working out pretty well. Although the view from my “office” isn’t very exciting, as you can see:

'The office' in Israel

I will be regularly posting pictures on Flickr and random observations on twitter.

posted by brandon | updated June 19th 07:04 AM

Happy anniversary to me

collectiveidea May 03 2007

With all the chaos lately (trying to close on a house and traveling for a funeral), I forgot that Monday was an important milestone. It has been one year since I joined Collective Idea.

It has really been a great year. I get to work with one of the most talented programmers I know, I get to use some of the best tools in the industry, I get to work on a wide variety of projects, I can’t ask for much more.

Looking back through my last year of blog posts (which, sadly, was less impressive than I expected it to be), it has been quite a ride.

posted by brandon | updated May 3rd 11:01 AM | 3 comments

About

I'm Brandon Keepers, a web application developer that likes beautiful code, valid markup and adherence to standards. As a part of Collective Idea in Holland, Michigan, I practice Agile software development primarily using Ruby on Rails.

-86.103171 42.785037

Contact:

more »

Syndicate