Mon Oct 31
Long-tail CAMP
“We’re certain that Long-Tail Camp will be a huge success and expect it will be over in about 10-12 years, depending on the exact parameters of the distribution…”
“ I crossed 50 states only to find that Georgia’s real pretty but it’s you that’s on my mind. ”
Beulah
“ It’s 80+ in Portland and everyone is grinning slack-jawed in the sun. It’s mass bliss. ”
Jeremy Kemper, last spring in #rails-core
Sun Oct 30
Suffix aliases in zsh
% grep mate .zshrc # Cause '*.rb' to be expanded to 'mate *.rb' alias -s rb=mate
Sat Oct 29
Tip “Definately” is not a word
According to Google, over 7% of the time people try to write definitely, they spell it with an “a”.
“ Plus ca change… ”
From a nice new tumblelog (this guy really gets it)
“ post ”
not one person wants my hair
“ Lay back, lay back, rest your head on my thighs. ”
Will Oldham
Fri Oct 28
Tip Effortless lighttpd
Currently in trunk, Rails provides script/lighttpd which (assuming you have lighttpd and fcgi installed) is as simple to use as script/server.
% ruby script/lighttpdFun times.
“ I was a landscape in your dream and all my mountains were on fire. ”
Of Montreal
#rails-core
Leak-free JavaScript closures
Laurens van den Oever devises a clever wrapper for cleaning up after IE.
Web Two Point Oh!
Itching for some angel investors, but don’t have a business plan yet? This handy Web 2.0 name and product generator might be just what you’re looking for.
Thu Oct 27
“ Please no more lol unbelievable. ”
Vjaggra spam
“ Design is the fundamental soul of a human-made creation… ”
Steve Jobs
Wed Oct 26
“ Go! ”
Stephen Malkmus
#rubyist.org
Tue Oct 25
“ Deeply the difference is really bigger, but in the usable. ”
Someone in #rubyonrails
Mon Oct 24
Tip
Use raise instead of puts for debugging
When you might normally resort to so-called “printf debugging”, use raise instead. So instead of the classic:
puts "DEBUG: #{some_value_that_isnt_right}"
use:
raise some_value_that_isnt_right.inspect
Make your messes in such a way that you can’t forget to clean them up.
“ I want to support re-writing instruction sequence on Ruby level. ”
SASADA Koichi
“ The combined effects of the new testing defaults in Rails 1.0 make your tests go faster. And when you’re running tests after every change, every second counts… ”
Mike Clark walks through why testing is faster with Rails 1.0
“ Only post things that are awesome. ”
Marcel Molina Jr.
Sun Oct 23
“ A book is good or bad only in relation to a reader’s particular needs at a given time. ”
Jerry Weinberg
#rubyist.org
Sat Oct 22
Tip Stub out authentication and leave it for later
You know that your Rails application will include authentication eventually. Focus first on what is most important (i.e., not authentication).
Have a single method logged_in? determine if someone is authenticated. When you start developing your project add a stub for logged_in? in your ApplicationController that just wraps local_request?.
def logged_in? local_request? end helper_method :logged_in?
You can then start using logged_in? throughout your application as you intended to without worrying about the implementation details. Requests that are not defined as local will be treated as unauthenticated requests.
Later, when your authentication scheme is hooked up, just replace local_request? with the actual code.
“ It’s like you’re watching a conveyor belt and pink seaogs or orange umbrelloots or blue yahtzicles start emerging from the rubber curtains at the end. You watch it and it’s just the daily assembly line all right, but it’s got a very neat style dripping off. ”
_why on what draws him to tumblelogs
#rubyonrails
“ I’m in the archipelago and I’m waiting to arrive. ”
Mirah in Archipelago
Fri Oct 21
“ Jason Fried, Ryan Singer, Sam Stephenson and Marcel Molina in Chicago, Matt Linderman in NYC, David Heinemeier Hansson in Copenhagen, and Mr. Jamis Buck in Provo, Utah. ”
Signal vs Noise sidebar
Wed Oct 19
Using the result of a block to set a default method parameter
def speak(message = yield) message end speak 'Hello' # => 'Hello' speak { 'Howdy' } # => 'Howdy' speak 'Hello' if false # => syntax error speak { 'Howdy' if false } # => nil
#rails-core
Sat Oct 15
Fri Oct 14
“ Dynamicity is your friend, but my ENEMY. ”
SASADA Koichi
Thu Oct 13
Tip Customize the inflector in edge Rails
If you’re riding the development version of Rails, you can customize the inflector to create or override pluralization rules in environment.rb.
Inflector.inflections do |inflect| inflect.plural /^(ox)$/i, '1en' inflect.singular /^(ox)en/i, '1' inflect.irregular 'person', 'people' inflect.uncountable %w( fish sheep ) end
Note that the inflection rules are frozen now in Rails trunk, so this is the way to bend them to your needs.
“ Money tends to make you more agile. ”
David Black
Tue Oct 11
“ You understand that in Ruby, things ought to act like chunky bacon. ”
Jamis Buck, explaining the new plugin system for Rails
Mon Oct 10
“ The guys complaining that reported 10:1 savings over Java was bullsh*t were right on target: 10:1 is way too low from what we’re seeing. ”
Rick Bradley, whose 20,853-line Java app became 823 lines in Rails
“ BY DOWNLOADING AND USING SYBASE SOFTWARE, YOU CONFIRM THAT YOU ARE NOT LOCATED IN ANY COUNTRY UNDER U.S. ECONOMIC EMBARGO (AFGHANISTAN (TALIBAN-CONTROLLED AREAS), CUBA, IRAN, IRAQ, LIBYA, NORTH KOREA, SUDAN AND SYRIA)…AND NOT DIRECTLY OR INDIRECTLY INVOLVED IN THE DEVELOPMENT OR PRODUCTION OF NUCLEAR, CHEMICAL, OR BIOLOGICAL WEAPONS OR MISSILE TECHNOLOGY PROGRAMS. ”
Sybase License Agreement
#dylan
“ I have tried to be good. Judge me as you will. ”
Jedediah Purdy, at the age of 8, in a letter to Santa Claus
#rubyist.org
“ Love letters…require the courage to stake oneself on an expression of hope that may very well come to nothing. They also indicate a perception of importance, a sense that some possibilities, however unlikely, are so important that not acknowledging them would be an act of terrible neglect. ”
Jedediah Purdy in the preface to For Common Things
#rubyonrails
Sun Oct 9
“ With respect to the collection of information and the control of paperwork, the Director shall coordinate the review of the collection of information associated with Federal procurement and acquisition by the Office of Information and Regulatory Affairs with the Office of Federal Procurement Policy, with particular emphasis on applying information technology to improve the efficiency and effectiveness of Federal procurement, acquisition and payment, and to reduce information collection burdens on the public. ”
US Paperwork Reduction Act of 1995
“ Whatever’s clever is totally whatever. ”
Upright Citizens Brigade, episode 109
Sat Oct 8
Progressive politics
Scott Chacon is using a tumblelog as part of his campaign to become a member of Congress. He’s also using campaign management software written on Rails called GroundWorks, to be released under the MIT license. Open politicians can’t be bad, can they?
#rubyist.org
Fri Oct 7
“ The pen is the tongue of the mind. ”
Miguel de Cervantes
Extract shared logic with global Ajax callbacks in Prototype 1.4.0_pre11
Ajax.Responders.register({
onCreate: function() {
if (Ajax.activeRequestCount > 0)
Element.show('spinner');
},
onComplete: function() {
if (Ajax.activeRequestCount == 0)
Element.hide('spinner');
}
});
What’s the rush John Henry?
John Henry is a comprehensive framework and web-based IDE for rapidly developing Ruby on Rails apps.
Thu Oct 6
“ I don’t know who Katie Holmes is, aside from apparently being Cruise’s utero-cyborg. ”
Mike on wallace-l
Wed Oct 5
#rails-core
#rails-core
“ During this trying time when no one can get their techie catchwords to stick to the refrigerator no matter how hard they slap it with the enchanted magnetic spatula, it’s good to know that the contrived phrases really do fly, graceful and unclasped and bearing north toward chilled shrimp. ”
_why