Pratik continues his series on Rack with a deep dive into Rack::Builder.
Smashing Magazine shows off a massive catalog of minimalist designs and then attempts to deconstruct them.
BBC: “The paper quoted aides saying that his emails, sometimes sent as late as 0100 or 0300, were ‘generally crisp, properly spelled and free of symbols or emoticons’.”
Can you imagine?
Dear Mr. Karzai,
im in ur country, bombing ur lands. =p
k thx.
--
- O
Pratik’s first in a series of pieces on Rack: how it came to be, why you need to understand it, along with some simple examples. Future installments will cover Rack::Builder and Middleware.
An illustrated re-introduction to HTTP caching with a focus on gateway caches and their potential benefits within the context of modern, dynamic web applications.
Kurt Vonnegut: “The most damning revelation you can make about yourself is that you do not know what is interesting and what is not.”
I've read about five extremely solid articles on this site (20bits.com) today; all thorough, easy to read, and cover interesting topics.
Laurence Tratt: “I had implicitly bought into the idea that C programs segfault at random, eat data, and generally act like Vikings on a day trip to Lindisfarne; in contrast, programs written in "higher level” languages supposedly fail in nice, predictable patterns. Gradually it occurred to me that virtually all of the software that I use on a daily a basis – that to which I entrust my most important data – is written in C. And I can’t remember the last time there was a major problem with any of this software – it’s reliable in the sense that it doesn’t crash, and also reliable in the sense that it handles minor failures gracefully."
Includes a brief history of native support for getElementsByClassName in Mozilla and other browsers.
RDiscount, a fast Markdown library for Ruby, is now included with the FreeBSD ports collection thanks to Daniel Roethlisberger.
Interesting approach to setting cache related headers using a Rack middleware component.
An interesting RubyGems mod by Fabien Franzen that seems to fix the memory hit a process takes on require 'rubygems'. Unfortunately, you have to code for it in your app and apply it to installed ruby commands explicitly. Fabien has submitted a ticket and patch to the RubyGems project, however. You should +1 it (after reviewing the code, of course).
Adam Gomaa: “… this state of affairs doesn’t really help my general feeling of hopelessness when it comes to programming – I know that no matter how good I get, I'm still stuck at being just one person, and the code a single person can write is pitifully small.”
I've come to the same conclusion within the past couple of years. I take on much smaller projects now and try to contribute more to existing projects rather than playing mad scientist on massive works that will never see the light of day. I've also come to appreciate the idea of paying lots of attention to detail on one small thing rather than churning out large quantities of half-baked features.
Allows a server to turn the tables and make HTTP requests to the client. I've been trying to come up with some use for this for 45 minutes and I'm totally baffled but it’s kind of interesting anyways.
Stefano Mazzocchi: “I have a much simpler and humble goal here: give programmers some tricks and some advice in how to proceed to make their web pages look cleaner, more readable and, hopefully, more professional, elegant and original than before.”
So, I got an email yesterday disagreeing with my remark about HTTP caching being wildly under-appreciated in the Ruby web community. I felt bad, a little. Then I read this article (posted the day after my remark), which talks about Scribd moving to a Squid reverse proxy setup to front their Rails deployments:
“But there was a problem – no one uses caching proxies in 2008 :–) So, we’ve got an idea – why can’t we place such a server in front of our application and make it cache content for all users in the world?”
The fact that Scribd had to “have this idea” on their own and had not previously been exposed to a ton of literature/tools on reverse proxy / gateway caching is completely fucking unacceptable. I'm back to agreeing with myself.
Pretty good introduction to building pieces of Rack middleware and using Rack::Builder.
Much nicer, IMO. I'm interested to see if someone can get Rails + Rack::Cache working together so that you can maximize the benefits of generating these validators.
Real HTTP caching for Ruby web apps.
Interesting Rails plugin from Viget Labs that adds ActiveRecord attribute helpers for various humane markup languages. The markdown variation supports both rdiscount and rpegmarkdown. Cool. Not sure how I missed it when it was released in August.
So I've been skeptical about Merb but I really like the world-view Ezra puts forth here: core framework code should be simple (no/little meta-programming), fast is good, Rack is awesome, etc.
Paul Downey translates Dr. Fielding’s REST APIs Must be Hypertext Driven into lay-hacker speak.
Huh? In a sane world, “Ajax” would have been called “HTTP” (or, more elaborately: “JavaScript gets a mostly-standard asynchronous HTTP client library”).
At first I thought this was going to be one of those articles that confuses animated JavaScript effects for Ajax but it goes on to talk about how Ajax is bad because it breaks “Save Page to File” … or something. Save Page to File?!
Tom Preston-Werner on how GitHub came into being and leaving Powerset after the Microsoft acquisition: “When I’m old and dying, I plan to look back on my life and say ‘wow, that was an adventure,’ not ‘wow, I sure felt safe.’”
Same here. I'm still looking for techniques that would make my Ruby libs and apps as simple to follow, debug, and maintain as equivalent Python versions are naturally. Ruby’s module system and cowboy shit (instance_eval, modifying Object, Class, Module, etc.) can go to hell. Python + blocks + class scope + large community and I'm sold.
“… the implications of many of the scientific ideas and theories, whether mine or otherwise, are indeed immoral, ugly, contrary to our ideals, or offensive either to men or women (or some other groups of people). I simply do not care. If what I say is wrong (because it is illogical or lacks credible scientific evidence), then it is my problem. If what I say offends you, it is your problem.”
Sends an email notification when someone stops following you on Twitter. I don’t have the nervous system for it myself.
Using conditional comments to stick an “ie” classname on <body> so that you can target IE from a single CSS file instead of bringing in a separate stylesheet. Nice hack.
“Varnish implementes a subset of the ESI Language 1.0 defined by W3C, this document lays out some of the thoughts and rationale for choices made and advice for usage of these features.”
This lets you perform includes at the cache layer so that each included resource can have its own caching policy. Akamai edge proxies have supported this for some time, apparently.
Looks like a really solid improvement on 1.0. I haven’t had a chance to play with any of the betas but I'm anxious to see whether If-Modified-Since/If-None-Match validation made it in. There’s a note on “serving expired objects until we have a fresh one” but that sounds more like stale-while-revalidate.
I'm pretty sure this exact thought occurs to everyone that sits at a table connected to mine on a daily—maybe hourly—basis. I'm sorry!
“Of course, Strunk and White, as the book is commonly called, has nothing to do with software (it was written in 1935) and everything to do with writing: grammar, composition, and style for users of the English language. But in its 100 short pages this book has more to say about the craft of software than many books you'll find in the ‘Computing’ section of your local bookstore. All you have to do is replace a few key words throughout the text and presto! Pearls of software development wisdom, delivered in near-perfect English.”
That makes sense to me. Gizmodo seems to think ripping off all those people who purchased that crap is a better idea. I hate DRM as much as the next guy but that’s a really dumb take on the situation, IMO.
The financial crisis explained using the crappiest cartoon stick figures ever. Also, the best overview I've seen yet.
Apparently, Yahoo!’s indexer supports marking specific content on a page as “extraneous to the main unique content”. This lets you prevent headers, navigation, and other types of site-level crud from overwhelming the content and the search results will excerpt only content that’s relevant to the page.
From the Yahoo! Web Crawler FAQ: “… apply the robots-nocontent attribute to indicate to search engines any content that is extraneous to the main unique content of the page. Yahoo! Search observes the class='robots-nocontent' present on XHTML elements, such as div, span, and all others.”
This is really close to what “the web” looks like in my brain:

I try to stay in the general vicinity of the “principles mound.” :)
“Beer is the people’s drink. Whiskey on the other hand is seen as a hard drink. It is a drinker’s drink. The sole preserve of men. It’s serious. It is the opposite end of the spectrum to fruit-based neon-coloured liquids sporting little paper umbrellas.”
Ola Bini: “Using instance_eval changes the rules for the language in a way that is not obvious when reading a block. You need to think an extra step to figure out exactly why a method call that you can lexically see around the block can actually not be called from inside of the block.”
Having abused instance_eval in the past, I can say with absolute clarity that it’s usually The Wrong Thing. It can make DSLish code look really cool in controlled and scoped demos but it greatly increases cognitive complexity, making things hard to read and maintain.
Bill Burcham applies the technique of making form controls inherit style from their container in the Air Budd Form Builder Rails plugin. Cool.
… is a Ruby library suitable for use as a drop-in Net::HTTP replacement or with event frameworks like EventMachine and Rev.
Alex Payne’s tumble-like blog on minimalism in coding and design. I didn’t realize @al3x was such a huge conscious follower of the minimalist aesthetic, although I've definitely noticed it in his work.
I'm using this on all of my “linkings” index pages now (see here, for example). It works pretty well. I really like the idea of integrating a piece of the destination site’s visual identity instead of using a generic del.icio.us/bookmark icon. Some site’s with favicons don’t work properly, however, and I'd give anything to have another parameter that let me override the default globe icon (this one: ). It'd be nice if I could say, grab the favicon for this domain but if it doesn’t exist, give me the favicon for delicious.com (
).
A horrible and misguided idea. I've personally never even liked the RJS/JavaScript generation stuff in Rails, and it’s actually well designed, thought out, and quite simple. “Managed Ajax” takes it to a whole new level, building from the assumption that “JavaScript is the new assembler,” and moves most types of interaction logic to the server. Reality seems to be moving in the exact opposite direction. Do yourself a favor and get real comfortable with JavaScript.