Sun Jul 31
Using Rails helpers in irb with include_all_modules_from
$ irb -r rubygems -r action_controller
>> include_all_modules_from ActionView::Helpers
>> puts link_to('Google', 'http://google.com')
<a href="http://google.com">Google</a>
Include all modules contained within some nesting
module Kernel def include_all_modules_from(parent_module) parent_module.constants.each do |const| mod = parent_module.const_get(const) send(:include, mod) if mod.class == Module end end end
#rubyist.org
#rubyist.org
Sat Jul 30
private message
Big Nerd Ranch
Intensive programming courses taught by industry leaders in a resort like environment.
#rails-core
Fri Jul 29
“ Nailing a killer karaoke performace can encapsulate exactly how you feel while removing stress and mental anguish. The only thing I can think to compare it to would be Dianetics. That shit works. ”
Patrick Henry Ewing
#rubyist.org
“ All aesthetic concerns (style, form, structure) answer this purpose: Let in the world. That is why Pynchon is our biggest writer, the gold standard of that overused word inclusiveness: No dogma or tidy aesthetic rule or literary fashion is allowed to prefilter the beautiful data streaming in. Everything is included. No inclination of the mind is too small or large or frightening. The result is a gorgeous madness, which does what great literature has always done—reminds us that there is a world out there that is bigger than us and worthy of our utmost humility and attention. ”
George Saunders on Thomas Pynchon
“ Pynchon’s fiction made it clear that, if you wanted to write, you had to know everything: everything about history, science, politics, even calculus; you had to know everything while being funny at the same time, and lyrical, bringing into the novel a freewheeling, present-tense, colloquial-poetic American voice, in books that were like adventure stories and comedy routines, and where the characters were forever breaking into song. ”
Jeffrey Eugenides on Thomas Pynchon
“ The author has asserted his moral rights. ”
From the Copyright page of the The Routledge Companion to Postmodernism
Wed Jul 27
Grandmother, what big serifs you have
Check out Strange Attractions’ Little Yellow Writing Hood from the second annual Typophile Film Festival at TypeCon2005. Spotted on Mark Simonson’s blog.
Graph the activity of your Darcs repositories
Core developer Scott Barron (htonl) shows how to walk through the revisions in your Darcs repositories with Ruby, run
rake stats on each version, and plot the LOC to a graph to get an (admittedly useless, but pretty) overview of your work history.
Tue Jul 26
Santiago Calatrava and the Fordham Spire
— a $500 million undertaking which will plop the country’s tallest building (almost 2000 feet tall) on Chicago’s Lake Shore Drive. Condominium residences in the tower are expected to cost between $6.5 and $7.5 million. Yes, please.
From rake’s Rakefile
def egrep(pattern) Dir['**/*.rb'].each do |fn| count = 0 open(fn) do |f| while line = f.gets count += 1 if line =~ pattern puts "#{fn}:#{count}:#{line}" end end end end end desc "Look for TODO and FIXME tags in the code" task :todo do egrep /#.*(FIXME|TODO|TBD)/ end
AJAX Debugging Console
“Each individual XMLHttpRequest invocation will get listed there, with all the details on the request and the response, as well as options to edit and replay the request or replay the response callback.”
Mon Jul 25
Proc#to_method
class Proc # Converts the proc into an UnboundMethod which # can then be bound to an instance of the given # +klass+. def to_method(klass) identifier = :"__Proc_#{object_id}__" klass.send(:define_method, identifier, self) method = klass.instance_method(identifier) klass.send(:undef_method, identifier) method end end
“ Illinois has some of the pitfalls you expect from literary singer-songwriter albums. Flute solos, for one thing. For another, there’s the inevitable song about the serial killer who dresses up as a clown, which symbolizes nothing about American life except the existence of creative-writing workshops. ”
Rolling Stone review of Illinois
“ I wish you way more than luck. ”
David Foster Wallace, Kenyon Commencement Address 2005
“ And I wanna be like water if I can,
‘cause water doesn’t give a damn. ”
D.C. Berman, Horseleg Swastikas
“ Big boobs? Yes! Small boobs? Absolutely! I don’t really care. When you’re younger boobs are a bigger deal, but as you get older, you bat them around, they’re nice to have, but after a while you get bored of them. And fake boobs? Well, they’re ain’t nothing like the real thing. ”
Vince Vaughn
Fri Jul 22
“ Being uptight doesn’t lead to cool software. ”
Mike Matas
Thu Jul 21
#rails-core
Wed Jul 20
“ But one of the most vivid memories of my life, nearly twenty-five years old, is of emerging from a tent somewhere in the Black Hills of South Dakota, into a still, clear, cold morning, with the early sunlight slanting obliquely through the trees. It was one of the few times I understood reverence — not just reverence for nature, but as part of the more complicated mythologies humans layer on top of it. It wouldn’t have been the same had I driven to that spot from a nearby motel after a trucker’s breakfast. ”
P. Ragde on wallace-l, re: camping
#ruby-lang
Tue Jul 19
Information overload courtesy of Digg
Digg is a technology news website that combines social bookmarking, blogging, RSS, and non-hierarchical editorial control.
Democratized content feeds. Here comes the schizophrenia.
“ How often the prospect of future happiness is thus sacrificed to one’s impatient insistence upon an immediate gratification. ”
Marcel Proust, Swann’s Way
Mon Jul 18
Algorithmic pluralization of English words
Damian Conway breaks down various approaches to programmatically pluralizing English words. Check out Lingua::EN::Inflect for the gruesome details of his implementation.
Sun Jul 17
“ I’ll come up with something witty to say, just gimme a second. ”
Patrick Henry Ewing
Sat Jul 16
“ And past all this, reddened by a round slow September sun, are mountains, jagged, their tops’ sharp angles darkening into definition against a deep red tired light. Against the red their sharp connected tops form a spiked line, an EKG of the dying day. ”
David Foster Wallace, Forever Overhead
“ 22. At my memorial service, I would like my clergyman to begin his eulogy with the words “I suppose, in a way, we all killed him.” ”
Request #22 from the living will of Paul Rudnick
Fri Jul 15
script.aculo.us Wishlist
A look at what’s coming in future releases of Thomas Fuchs’ script.aculo.us library.
Searchable documentation with Rails Dock
Duane Johnson has developed a Google Suggest style system powered by RubyOdeum. “This means that if you type redirect_to and wait for suggestions, you will not only see the ActionController::Base#redirect_to but also ActionController::Flash (for example) since its documentation references redirect_to.”
“ Pair programming is a learnable skill, but one often at odds with the tendencies of the sort of people who typically get into programming. Perhaps I should state this less equivocally—nerds aren’t generally good at talking. ”
Kent “Making New Friends Every Day” Beck
A simple YAML configuration model
class YamlConfiguration < Builder::BlankSlate def initialize(yaml_file) @yaml_file = yaml_file end def method_missing(name, *args) yaml = YAML.load_file(@yaml_file) yaml[name.to_s] || nil end def authenticate(u, p) u == self.username and p == self.password end end Configuration = YamlConfiguration.new APPLICATION_CONFIG_FILE
Thu Jul 14
“ I’m all for moderation but sometimes it seems moderation itself can be a kind of extreme. ”
Andrew Bird
“ I’m glad I held my breath for a few hours. Otherwise, I would probably have had to post another picture of a flower tomorrow. ”
David
Application Deployment with Rails
Jamis Buck describes 37signals’ atomic, distributed Rails deployment mechanism.
Optimus keyboard
“Every key of the Optimus keyboard is a stand-alone display showing exactly what it is controlling at this very moment.”
#rails-core
“ Food, also, is a hallmark of XP projects. There is something powerful about breaking bread with someone. You have an entirely different discussion with them if you are chewing at the same time. So XP projects always have food lying around. ”
Kent “Please Watch Your Weight” Beck
Wed Jul 13
LiveTree: Ajax tree widget for Rails
Created by Emanuel Borsboom. This widget is built on top of Ionist’s own Prototype library, and integrates beautifully with Rails. Check out the demo, too.
Flickr’s architecture
“About 60,000 lines of PHP code”. And that is only as of almost a year ago. Yikes.
“ Using some templates in Eclipse or IDEA, I’m pretty sure your simple database backed CRUD applications could be built in the same amount of time as with RoR. ”
Delusional Java developer
#rails-core
#rails-core
Agile Web Development with Rails out of beta and off to the printer
Some bound copies should be available at OSCON
“ Anyone who drops his name 4 times, his phone number, and reps his grill, all in 4 lines, is hype. ”
Jean-Paul on Wallace-l, re: lyrics by Mike Jones
Tue Jul 12
#rails-core
Sydney DP1
Spotted on Anarchaia, this experimental version of the Ruby 1.8.2 interpreter features native threads, a native
Binding.of_caller and a GC.on_gc callback. Excellent stuff.
Call a block repeatedly until an exception is raised
def as_many_times_as_possible loop {yield rescue break} end
Ruby on Rails Podcast
Scott kicks off his latest project with a DHH interview and the latest Rails news. There’s even a mention of Ionist! Do give this a listen.
“ “Words,” he said, “is oh such a twitch-tickling problem to me all my life. So you must simply try to be patient and stop squibbling. As I am telling you before, I know exactly what words I am wanting to say, but somehow or other they is always getting squiffs-quiddled around.”“That happens to everyone,” Sophie said.
“Not like it happens to me,” the B.F.G. said. “I is speaking the most terrible wigglish.”
“I think you speak beautifully,” Sophie said.
“You do?” cried the B.F.G., suddenly brightening. “You really do?”
“Simply beautifully,” Sophie repeated.
“Well that is the nicest present anyone is every giving me in my whole life!” cried the B.F.G. “Are you sure you is not twiddling my leg?”
“Of course not,” Sophie said. “I just love the way you talk.”
“How wondercrump!” cried the B.F.G., still beaming. “How whoopsy-splunkers. How absolutely squiffling! I is all of a stutter.”
”
Roald Dahl, The B.F.G.
“ Everyting in software changes. The requirements change. The design changes. The business changes. The technology changes. The team changes. The team members change. The problem isn’t change, per se, because change is going to happen; the problem, rather, is the inability to cope with change when it comes. ”
Kent Beck
Mon Jul 11
Come on! Feel the Illinoise!
New Sufjan Stevens. Forty-eight states to go. Defy me to stop listening to this.
Generate RSS feeds of Darcs repositories
With the wonders of XSLT, it’s as easy as
darcs changes --xml | xsltproc rss.xslt -. Now that’s a sit-up I don’t mind doing.
Thu Jul 7
Thinking in Ruby
Jim Weirich explores the ways in which Ruby helps programmers tackle complex problems.
Wed Jul 6
“ Worship power, you will end up feeling weak and afraid, and you will need ever more power over others to numb you to your own fear. Worship your intellect, being seen as smart, you will end up feeling stupid, a fraud, always on the verge of being found out. But the insidious thing about these forms of worship is not that they’re evil or sinful, it’s that they’re unconscious. They are default settings. ”
David Foster Wallace
Mon Jul 4
“ My week beats your year. ”
Lou Reed
Sun Jul 3
Find the name of the newest file of a given type in a directory
class << Dir def newest(glob) self[glob].max {|a,b| File.ctime(a) <=> File.ctime(b) } end end Dir.newest('*.pdf')
Sat Jul 2
Thoughts on Vooly
Chris Neukirchen discusses his Vooly markup language and shows how it’s used in Anarchaia.
