Progress is Regress
Interestings
a jQuery plugin introduces regression
A plugin introduces a regression. Wait to upgrade jQuery 2.0.x.
http://blog.mindedsecurity.com/2013/04/jquery-migrate-is-sink-too.html
jQuery 2.0
It's out! And it dropped support for IE versions > 9!
Full release blog post here: http://blog.jquery.com/2013/04/18/jquery-2-0-released/
Also, as JT had mentioned, there is a security hole that was introduced in 2.0. Hold off until this is fixed!
UTC FTW
Interestings
Date.yesterday is a lie
Rails provides a handy 'Date.yesterday' method. This effectively uses 'Time.zone.today' to calculate yesterday as per the configured timezone.
Ruby's 'Date.today' method uses the system's timezone via a call to localtime(). Therefore, if your Rails app is configured in UTC and you live on the West Coast, tests that assert that 'yesterday < today' will start failing at around 5pm.
Not *that* kind of standup
A light dusting or snow
Interestings
Sending a JSON array in the POST body
When you send an array in your post body, there is a middleware that will put that array into params[:_json]. This is because params has to be a hash.
Is this thing on?
Interestings
Ruby method cache article
James Golick wrote an interesting article on MRI's method cache and how difficult it is to write software that uses it effectively.
http://jamesgolick.com/2013/4/14/mris-method-caches.html
Google Mirror: API for Google Glass
https://developers.google.com/glass/about
"The Healthy Programmer" book in Google Drive
"The Healthy Programmer" by Joe Kutner, same guy whose video was watched for Monday's lunch video. Full of amusing chapter titles.
Events
Tuesday: Pair Exchange
Pizza will be served
Interestings
0 duration != no animation
UIView documentation for animateWithDuration:animations: says: "If you specify a negative value or 0, the changes are made without animating them." but specifying a zero duration is not the same as not using animations at all. Specifically, constraints still animate even if the duration is 0.
Friday
Interestings
Working With Ruby Threads Book
Jesse Storimer (Working with Unix Processes & Working With TCP Sockets) released a new book on threading with Ruby.
You don't know try
If you thought, ActiveSupport :try caught any NoMethodError, you were just as wrong as me: it does not raise only on nil and NilClass.
NY Standup: Documentation interpolation and RVM, Brew and autolibs FTW
Interestings
Grant Hutchins / David Lee
If you wrap the opening name of a Ruby heredoc in single quotes, its insides will act like a single-quoted string.
If you wrap the opening name in backticks, the heredoc will be immediately executed through system()
<<-HEREDOC
1 + 2 = #{1 + 2}
HEREDOC
=> "1 + 2 = 3\n"
<<-'HEREDOC'
1 + 2 = #{1 + 2}
HEREDOC
=> "1 + 2 = #{1 + 2}\n"
<<-HEREDOC
uname
date
HEREDOC
=> "Darwin\nMon Apr 1 17:50:43 EDT 2013\n"
Found at http://jeff.dallien.net/posts/optional-behavior-for-ruby-heredocs
rvm autolibs
In the latest versions of RVM, you can have RVM build dependencies automatically for you. For instance, if you use Homebrew, you can run
$ rvm autolibs brew
and from then on, RVM will automatically build any packages it needs via Homebrew.
As always, read "brew doctor" to get more info about how to set up your particular system.