{"comment":{"created_at":"2011-11-30T18:17:09Z","position":30,"commit_id":"2f436e573aa2dbe87514d5745ffec75f89726112","updated_at":"2011-11-30T18:17:09Z","user":{"gravatar_id":"e23fdd49cd6b944d3568b5439f703d79","id":35702,"url":"https://api.github.com/users/zuk","login":"zuk","avatar_url":"https://secure.gravatar.com/avatar/e23fdd49cd6b944d3568b5439f703d79?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Two things here:\n\n1. In Ruby, always use underscore notation. This should be `observation_from_db`. Or better yet, `existing_observation`.\n\n2. Instead of `some_var == nil`, it's more standard to use `some_var.nil?`, although both will work. Personally I prefer to just do this:\n\n    if some_var\n      # then it's not nill\n    else\n      # it's nil\n    end\n\nOne reason you might want to do this is because some database backends return \"false\" when there is no results and others return \"nil\".\n\nWhat you're looking for here is not \"false\" but \"falseyness\" (the opposite of \"truthyness\"). Both \"nil\" and \"false\" are \"falsey\".","id":758597,"path":"agents/archivist.rb","line":30,"html_url":"https://github.com/encorelab/EvoRoom2/commit/2f436e573a#commitcomment-758597","url":"https://api.github.com/repos/encorelab/EvoRoom2/comments/758597"}}