Mike Grafton's blog
Interesting Things
- A certain Pivotal project runs 'bundle update' often, since they have a shared gem that gets updated a lot. They were wondering why it was so slow, and supposed it was due to slowness at rubygems.org, and thought a local mirror would help. They were wrong. Turns out the slowness is in the implementation of rubygems, whereby a 110K list of gems is marshalled and unmarshalled.
Interesting Things
- jQuery mobile: awesome!
- jQuery 1.6 is out and will break you. Read the change notes and upgrade with care. [Ed.: you do have JS tests, don't you?]
Interesting Things
- Josh and Alexander are pairing at a new iteration of the tête-à-tête pairing desk, where they've hacked (with a bandsaw) a traditional Ikea desk to allow for better ergonomics and pairing dynamics. Expect a blog post with pictures soon.
Help!
Does anybody know anything about Lucene scoring using a document boost?
We see an exponential relationship between document boost and the fieldNorm component of the score for each term. Can anybody explain this?
Help!
How do I turn off coloring in the RSpec runner?
The answer: don't put
--color
in your spec/spec.opts file.
Interesting
There's an easy way to merge hashes in Javascript, using either JQuery or Prototype.
For JQuery:
$.extend(target, hash1, hash2, ...)
For Prototype:
Object.extend(target, hash)
JQuery's syntax is a bit nicer since you can merge any number of hashes into the target hash.
This is handy for grabbing JSON off the wire and merging it into an existing or "default" object.
You can use this to merge prototypes, achieving a type of "inheritance" (or what passes for such in Javascript). But be careful, since the rightmost hash wins - IE, its properties overide properties by the same name in the target.
