Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

[Standup][NY] 03/08/2012


  • Ruby MRI seems to have taken a step back in time, a dangerous, but useful feature (to some) is the goto statement.
  • It appears that DateTime object has some issues with doing math. - 1.hour #raises TypeError - 3600   #works as expected
    1.hour.class          #Fixnum
  • Reading the CSS property background-position in Chrome returns an invalid value. Don’t rely on it.

  • Github was hacked! They had a security issue that was a result of attr_accessible being uses incorrectly. Remember to authorize your SSH keys.
  • Need help with cron? Use to convert cron into friendly English.
  • &&, ||, and ! vs. and, or, and not. It is highly recommended to always use the strict logical operators (&&, ||, and !) because the keywords
    (and, or, and not) don’t have the same operator precedence.
  • When evaluating variables in strings with bash, its better to use ${var} than $var. The curly-brace allows you to evaluate a variable with copy behind it. For example, ${var}asdf and $varasdf evaluate differently because of the expected variable name.


  • Rails <3.1 has some gotchyas when using :inverse_of option.

    class Note < ActiveRecord::Base
      has_many :contacts, inverse_of: :note
    class Contact < ActiveRecord::Base
      belongs_to :note, touch: true #for triggering the note observer when the contact is updated
    class NotObserver
      def after_touch(note)
        note.contacts # does not have the new attributes updated unless you specify the :inverse_of
    # Somewhere in the code...
  • When table names are not namespaced on a class. What is the best way to work with this if we want table names to be namespaced?

    class Foo::Bar < ActiveRecord::Base
    > Foo::Bar.table_name == "bars"

  1. John Pignata says:

    Actually, it seems like the 1.hour value works as expected. The 1.hour.ago value is a DateTime so that should raise a TypeError. But:

    >> – 1.hour
    => Fri, 09 Mar 2012 07:29:25 -0500

    This works fine and returns the expected value.

    >> 1.hour.to_i
    => 3600

    Story checks out, it’s an hour.

    >> – 3600
    => Wed, 01 May 2002 08:29:43 -0500


Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *