encorelab/EvoRoom2 — comment on commit 2f436e573aa2dbe87514d5745ffec75f89726112
File: agents/archivist.rb line 30
By zuk:

Two things here:

1. In Ruby, always use underscore notation. This should be `observation_from_db`. Or better yet, `existing_observation`.

2. 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:

if some_var
# then it's not nill
else
# it's nil
end

One reason you might want to do this is because some database backends return "false" when there is no results and others return "nil".

What you're looking for here is not "false" but "falseyness" (the opposite of "truthyness"). Both "nil" and "false" are "falsey".