Tue Jan 31
“ OK, that is seriously too sweet. ”
Jeremy Durham
Enumberable#group_by
module Enumerable def group_by inject({}) do |groups, element| (groups[yield(element)] ||= []) << element groups end end end events.group_by(&:month) # => {'May' => [<Event>, <Event>], 'June' => [...]}
The 2006 Practicalmadness Oscars Game
Correctly predict the winners of as many Academy Awards categories as possible by March 5 and win…
something (to be announced). Details at David Demaree’s blog.
“ That really chaps your caboose. ”
Sam to Marcel, in reference to using “less” rather than “fewer”
#rubyist.org
Sun Jan 29
Sat Jan 28
“ What’s new here is that nothing is new here. ”
Brian Foote
Fri Jan 27
“ Open Minds Collect Trash ”
Waterfall 2006
Thu Jan 26
Wed Jan 25
Tip “I could care less”
“I could care less” means that you could care less, implying that you do care.
If you find yourself saying “I could care less” you probably meant to say “I couldn’t care less”.
“ So Ian, with respect, no…you’re not right. ”
Chad Fowler on monkey patching
“ If we live to see the other side of this, I will remember your kiss. So do it with your mouth open. ”
John Darnielle in Dilaudid
Tue Jan 24
#rails-core
Mon Jan 23
#rubyist.org
“ Celebrate, shut up, and do something. ”
Ryan Singer
Date range to SQL clause
(6.months.ago.to_date..1.year.ago.to_date).to_s(:db) => "BETWEEN '2005-07-27' AND '2005-01-22'"
“ How many times, in your professional career, have you written a function to generate a Fibonacci sequence? ”
Josh Carter on Ruby vs. Lisp
“ For developers who consider themselves as poets and artists too, I can’t think of a better language. ”
Edd Dumbill on Ruby
Sun Jan 22
Tip Only run certain tests
test/unit has an -n command line option which allows you to run only tests whose names match a specific string or pattern.
ruby account_test.rb -n test_downgraderuby account_test.rb -n /downgrade/
Breakpoint into failing tests
Scott comes up with a small hack that lets you drop into a breakpoint automatically when you have a failing assertion.
“ If all the 3D models of declined architectural proposals were to be collected, a totally different world could be compiled. ”
Ursula Lavrencic (paraphrased)
Sat Jan 21
#rails-core
Fri Jan 20
The McGurk effect
Watch the video, then play it again with your eyes closed. Brains are
#rails-core
“ When something is too hard it means that you’re not cheating enough. ”
DHH
“ The reason the young care so much about prestige is that the people they want to impress are not very discerning. ”
Paul Graham
Thu Jan 19
Tip farther vs further
Both are comparative degrees of far, but farther refers to physical distance, while further refers to figurative distance.
- I can’t walk any farther.
- I didn’t look into the problem any further.
“ This is Chicago. ”
An automated announcement on the L
Rake 0.7.0 released
Highlights include parallel (threaded!) tasks and namespace support. You know the drill:
gem install rake (or get it the luddite’s way). Thanks Jim!
“ It’s slick like a wet doorknob! ”
Jamis Buck in a Sunrise commit message
#rails-core
Wed Jan 18
“ Imitation is the saddest form of flattery. ”
Dave Thomas
#rails-core
#rails-core
“ We ask that you restrict these links and downloads to your own personal use only. We are not using any copy protection or DRM as we prefer to start from the point of trusting our customers. If the system is abused, we will have to review how we provide content. ”
UnderworldLive shop download page
Tue Jan 17
“ Nothing is more unsightly than a solemn multi-millionaire. ”
Jeffrey Zeldman
Mon Jan 16
Fri Jan 13
“ What I’m more surprised over is the lack of interest in domain-specific languages in general. They just don’t seem to turn on Python people. ”
David Heinemeier Hansson
“ We ended up deciding it was too much magic and could confuse experienced Python programmers. ”
Adrian Holovaty
#rails-core
What’s new in Python 2.5?
LtU provides a highlight reel. (Getting rid of
map in favor of list comprehension.)
Thu Jan 12
“ In considering everything, he almost can’t help but stumble on the truth. ”
From a review of Consider The Lobster
#rails-core
“ Playing with super-simple face shapes is weird emotional territory. ”
Ryan Singer
Tue Jan 10
“ And now that you’re gone, were you ever there at all. ”
Euros Childs in The Humming Song
“ And it scrolls like butter. ”
Steve Jobs
#rails-core
Mon Jan 9
“ Falafels was his specialty and soon he became known as the FALAFEL KING. ”
The Falafel King
Sun Jan 8
“ A for effort, F for give me a fucking break. ”
Jason Fried
Sat Jan 7
“ I Googled you recently and I deeply enjoyed your website. You’re really narcissistic. I mean that in a very good way. ”
My friend, who is a “Psychoanalytic Psychotherapist”
Tip
Filter collections by class with Enumerable#grep
Enumerable#grep uses the === operator internally, so in addition to matching each value in a collection against a regular expression, you can match against a class too.
>> [1.2, 3, ‘5’, nil, 7].grep(Numeric)
=> [1.2, 3, 7]
Fri Jan 6
#rails-core
“ Please only Web 2.0 oriented people. ”
JOB Opening
Tip
Use any? rather than !empty?
Calling Enumerable#any? without a block is the same as yielding each element to the block. As a result, when you can’t use unless, any? is semantically similar to the uglier !empty? (or size.nonzero?).
if foo && !bar.empty?This works for anything that includes
- vs.
if foo && bar.any?
Enumerable, notably Array and String.
“ Why are we not doing internationalization in Basecamp? Is it because it is a hard technical problem? Hell no. It’s because it would totally, like, cramp our style. ”
David at Snakes and Rubies
#rails-core
Thu Jan 5
#rails-core
“ You are a bundle of energy, always on the go. ”
Sam’s fortune
“ You are the master of every situation. ”
Marcel’s fortune
Wed Jan 4
“ At ThoughtWorks we mostly do enterprise software and we’ve been helping our clients get real for years. ”
Obie Fernandez
#rails-core
Tue Jan 3
Mon Jan 2
“ WAKE UP! This is VERY cute! ”
John Carter’s Little Lexer
“ Users don’t care about YOU—they care about themselves in relation to what you offer. ”
Kathy Sierra
