Wed Aug 31
Pluck attributes from a collection
module Enumerable def **(method) map {|i| i.send method} end end Person.find(:all) ** :name # => ["Scott", "Nicholas", "Tobi"]
#rails-core
Mon Aug 29
“ One of the two engineers who built the study I speak to you from today, Bill Meyers, is retiring this week. My voice comes to you through wires and faders and switches that he soldered into place, one by one, by hand, with his partner in crime Al Mix, who could not have been more generous and helpful and decent to work with. And we are sorry to see him go. ”
Ira Glass in the closing credits of High Cost of Living
Sun Aug 28
“ Are you for kidding me?! ”
Patrick Henry Ewing
#rubyist.org
Evaluating Django
Rails programmer Jeremy Voorhis has been evaluating the new Python web application framework Django. He’s written down some of his impressions, including details on where it is similar and different from Rails.
Sat Aug 27
“ The most remarkable thing about you standing in the doorway is that it’s you and that you’re standing in the doorway. ”
John Darnielle in Going to Georgia
Fri Aug 26
Tip
Eliminate “tag-along” revisions with Darcs amend-record
We’ve all recorded changes where a file or two was forgotten, or where a typo slipped past our eyes. Darcs accomodates for human fallability with the amend-record command, which works just like record but sneaks the changes you select into the most recent patch. What a great idea.
“ The best ship is our friendship. ”
Lisa Smith
Thu Aug 25
Transform hashes into weighted arrays
module Weighted def to_a inject([]) do |array, (key, weight)| array + ([key] * weight) end end end weights = *{:people => 2, :places => 3, :things => 5}.extend(Weighted) # => [:people, :people, :places, :places, # :places, :things, :things, :things, # :things, :things]
“ I had a life affirming talk with the garbage man today. He said, “Believe in me. And take the trash away.” Oh, how do you do it? ”
from Save It by Jim Guthrie
“ Traditionally, the artworks are destroyed upon completion to symbolize the impermanence of beautiful things, a central tenet of Buddhist philosophy. This one, however, will be secured with sprayed-on glue ”
Monks in Louisville Create Tribute to Ali
Love it or Leave it
Chad Fowler talks about writing as a thought excercise which can lead to really clarifying what’s important and changing your life. Fun times…
Oh, he’s also looking for a designer with Rails experience.
“ By Getting Real, you mean using a lot of Javascript and doing XP right? ”
Chad Fowler
Wed Aug 24
#rubyist.org
private message
#rails-core
“” this site was probably designed by
37 signals or the like.
footer copy from hoodwink.d
Tue Aug 23
#ruby-lang
A List Apart 4.0, powered by Rails
Jeffrey Zeldman and Dan Benjamin unveil ALA’s new custom-designed Rails publishing application. Nice!
Mon Aug 22
Visualizing the O’Reilly Connection Network
Timothy M. O’Brien wrote a Python script to generate Graphviz visualizations of his connections on O’Reilly’s new social networking app.
Turns out networks look like networks.
Dissident – More Ruby Dependency Injection
Christian Neukirchen, Ruby prodigy with an unrememberable last name, has not only written a nice new Dependency Injection library, but a nice overview of DI itself.
API sample:
class Application
inject :logger
def do_stuff
logger.log "doing stuff"
end
end
class MyContainer < Dissident::Container
provide :logger, Logger
end
Dissident.with MyContainer do
a = Application.new
a.do_stuff
end
#rails-core
Fri Aug 19
Dynamic CSS templates with Rails
Scott over at Lunchbox Software is working on a nice dynamic CSS generation API built on top of Jim Weirich’s Builder library.
Something like this
site_background = '#FAFAFA'
text_color = '#7F7F7F'
lb_fonts = 'Helvetica, Arial, sans_serif'
css.comment! ‘this is my css file’
css.body(:class => ‘foo’) {
css.background_color site_background
css.font_size ‘small’
css.font_family lb_fonts
css.line_height ‘18px’
css.color text_color
}
becomes
/* this is my css file */
body.foo {
background-color: #FAFAFA;
font-size: small;
font-family: Helvetica, Arial, sans_serif;
line-height: 18px;
color: #7F7F7F;
}
#ruby-lang
Thu Aug 18
The Sawzal Programming Language
Sawzall has become one of the most widely used programming languages at Google
Mon Aug 15
Lunchbox Software’s Lunchroom
Core developer Scott Barron has revamped his main Lunchbox Software site and added a blog, The Lunchroom. He’s been with Rails since day one. If you work with Rails you should know this name and company.
Sat Aug 13
#rails-core
Wildcard completion with Google
Nathaniel Talbott (he wrote test/unit ya know…) notices that you can do wildcard completion style searches with Google.
Example:
Ruby was created by *
Fri Aug 12
List generation helper for Rails
def make_list(items, options = {}, type = :ul) lis = items.map {|i| content_tag(:li, yield(i))} content_tag(type, lis * " ", options) end # e.g. make_list(@links) {|l| link_to l.label, l.url}
#rubyist.org
“ Like C++, Objective-C is an extension to the C programming language that made it object-oriented. Unlike C++, Objective-C is weakly typed and extremely powerful. ”
Aaron Hillegass in Cocoa Programming for Mac OS X
RSpec
No, it’s not a new perfume from Ali G, it’s a “Behaviour Specification Framework” for Ruby inspired by Dave Astels’s article A New Look at Test Driven Development. Apparently they’ve been too busy writing tests to get any documentation done so far :o.
Thu Aug 11
Wed Aug 10
Integrating Flash interfaces with Rails
Rich Kilmer describes how he integrated his ActionStep library into Rails in one night while at OSCON. Includes some examples.
“ By using Ruby, I want to concentrate the things I do, not the magical rules of the language, like starting withpublic void something something somethingto say, “print hello world.” I just want to say, “print this!” I don’t want all the surrounding magic keywords. I just want to concentrate on the task. That’s the basic idea. So I have tried to make Ruby code concise and succinct. ”
Yukihiro Matsumoto
Tue Aug 9
Mon Aug 8
“ You can wear plenty of red without knowing any Ruby.And supposedly you can write Rails code without knowing any Ruby.
”
Why the Lucky Stiff from A Starry Afternoon
Playback all messages, courtesy of Jim Weirich
class VCR def initialize @messages = [] end def method_missing(method, *args, &block) @messages << [method, args, block] end def play_back_to(obj) @messages.each do |method, args, block| obj.send(method, *args, &block) end end end
10 Things Every Java Programmer Should Know about Ruby
Another great talk by Jim Weirich from OSCON 2005
Sat Aug 6
Example use of Class Interception
def test_warmer Warmer.use_class(:Heater, MockHeater) do # Here, anytime a method in Warmer references # Heater it will get a MockHeater class instead. end # Here Warmer is back to normal. end
Dependency Injection: Vitally Important or Totally Irrelevant?
Jim Weirich’s OSCON 2005 talk. The room was so crowded even Dave Thomas was turned away at the door.
Rio – Ruby I/O Comfort Class
Rio is a convenience class wrapping much of the functionality of IO, File, Dir, Pathname, FileUtils, Tempfile, StringIO, OpenURI, Zlib, and CSV.
Thanks for the convenience.
#rails-core
Fri Aug 5
“ Kate Lee is blessed with an exceptionally rational mind and will hopefully forgive me for the callous words. ”
Hoverbird
“ marcel, you should have a stamp that says agile so you can go around stamping things with your approval ”
Maura
Thu Aug 4
private message
#rails-core
#rails-core
Wed Aug 3
#rails-core
#rubyist.org
“ Old men
move me.
The way courage is asked of them
to walk.
The way they still wear hats
and tip them for a lady.
How their collars stand out from their thin necks.
How they are careful to balance their heads.
How they do not complain
but, if you ask, might say,
“Most horrible!” and grin.
How they wear Hush Puppies, walk silently,
practicing to be ghosts.
How their hair grows so white and thin
it lies on their frail skulls like light.
How when they are alone, their spindle fingers
make gestures, speak in silence.
How their mouths work, remembering.
How their eyes, their eyes look far, far off,
seeing something I do not yet know what. ”
Old Men by Norah Pollard
Mon Aug 1
PairOn XP chair
“Unfortunately we’ve sold out of our initial batch of 5000 to ThoughtWorks.” Can you feel the agility?
