Archive for September, 2007
September 26th, 2007 • General
Is it just me, or did “framewar” hell break lose this September? Cedric Otaku calls Obie Fernandez a Rails bigot. Obie, perhaps in jest, ticks people off. Then realizing the error of his ways, attributes it to humor. Obie, surprisingly gets a decent, objective response from Daniel Spiewak. Daniel, weary of Ruby community’s reactions, clarifies his “self-avowed Rubyism”.
Point #9 in Daniel’s post caught my eye. I have two colleagues of mine, one is a die-hard Rubyist, the other is a Perl/PHP coder (Perl for fun, PHP for profit). When they asked me how I think Ruby compares to Perl, this was essentially my response:
Ok, admit it, Ruby’s syntax is complex. If you don’t think so, then you don’t know the language as well as you think you do. All that DSL goodness comes at a price. Flexibility is hard to build into a language, and as a result Ruby has all sorts of weird constructs and cryptic tricks required to get things done.
— Daniel Spiewak on Ruby vs. Java
September 25th, 2007 • General
“There must be a reason for such strong reactions” was all I could think of following yesterday’s flamewars. These spiteful comments couldn’t have come out of nowhere. And then I remembered PHP, and how active it was during 2002-2005. I remember being excited about every single release, and every new template class, and every tiny framework. But what I remembered most was PHP community’s attitude towards Perl.
PHP people knew that Perl wasn’t competition, that PHP filled a different niche than Perl, and more importantly, that the Perl ecosystem is a rich source of information, proven code and tried ideas. PHP learned from Perl instead of fighting it. Just like Perl learned from
awk, which learned from
The PHP community engaged in flamewars only when the pace of PHP development declined. When PHP stopped being as good as it used to be. Many concentrated on deflating Rails’ hype instead of doing any real work; many have failed.
And this wasn’t as obvious within the PHP community as it was within Java’s. Ruby was a real threat to Java purists. Here came a language, with a clean object-oriented design, fun to write with, and supported by many libraries; what’s not to like? If you pay attention, you’ll notice a pattern of superfluous arguments: Ruby is not as fast as Java, Ruby is still immature, Ruby isn’t enterprisey. None hold any water.
It’s pointless to argue against a programming language, even more so a programming framework. There’s a right tool for every job, and some right tools are destined to give way to newer, better tools.
I’m sure my PHP readers can remember PAT and notably
patTemplate. This collection of libraries is one of the oldest in PHP history. At its time, PAT was widely used by many developers, especially those who like templates and want to keep their View clean of PHP code.
PAT grew old and slow, while new libraries emerged doing what PAT did in different ways. But there was never a reason to despise PAT. If anything, we respected PAT even more.
Rails is a tool that will give way to a newer, better tool which will do exactly what Rails does, but in a different way. Rails feels to me like the PAT of Ruby, except “Ruby Application Tools” doesn’t sound as good an acronym.
Derek Sivers, probably unintentionally, struck a sentimental nerve in the Rails community.
The odd, and immature reactions piled up quickly. PHP people hailing for their savior, and misty-eyed Rails followers, fiercely debunking the “myth” of Mr. Sivers. The chaos overshadowed a serious concern: An obscure suicide note, published by none less than David Heinemeier Hans, the originator of Rails.
Rails’ hype was over in July 2007. Of course that didn’t, and should not be a reason to abandon such a curious project. We’ve learned, over the course of years, that rewriting is bad. That it’s a thing you shouldn’t do. It’s interesting that nobody complained a couple of years earlier, when they really should have; but then again, one man’s poison, is another man’s meat.
The Rails community backlash against Derek sounds like it came fresh from the ’80s, where a lonely teenager is tricking his phone to carry a name-calling response to some absurd BBS group over a noisy line. Haven’t we learned that calling others stupid backfires? We are seven years well into the 21st century, I thought lousy telephony was dead.
Derek’s post was awfully misinterpreted. It feels like he’s been cast out a sacred cult called Railsotology, and condemned to glance back in regret at the puffy pillows of social praise. There’s a strange divide between the friendliness of the Ruby community, and Rails. The latter was able to stand on Ruby’s shoulders, but never learned why Ruby really took off. I realize that blind arrogance would suggest Rails pulled Ruby into the light, but I big to differ.
The language of bias is exactly what made Rails interesting. “Opinionated”, they said, and we liked it. I liked it, and I’m the most opinionated person I know.
Bias sold Rails. It was the very essence of its marketing efforts. Denouncing bias is bias in itself. So is condoning a rewrite, and condemning another.
September 19th, 2007 • General
Or, to convert the title to English, The Blueprint Grid Builder.
Three days ago, I learned jQuery (in just about an hour, because it’s so damn easy). I knew about Blueprint for quite a while, but never used in production, and probably never will. I’ll leave Blueprint’s limitations for another post.
Let’s agree on a few things. Blueprint claims to aid grid-based design. That’s not entirely accurate. Yes, really. Columns aren’t grids, and the Web will probably never see true, “gridesigns”. Regardless, Blueprint is great for quick prototypes.
Gridizle, a.k.a. The Blueprint Grid Builder, a.k.a. my idea of a hacked-up, patched-up, single-page program, uses Blueprint to build a layout, and it assumes you know what
class="span-8 prepend-1 border" means. If you don’t, please read a the Blueprint tutorial.
How It Works
Blueprint’s layout is split into 24 columns, each is 30px wide with a 10px right margin. You can customize these numbers with the Grid Generator, but for now, Gridizle assume Blueprint’s defaults.
Click “Add column” button and choose the number of spans for your column. A new column will be added to the main layout. Columns are distinguished with a top and bottom border.
You can add more columns to the main layout, or inside other columns. Clicking any column will highlight it in Blinding Yellow, and will allow you to add new columns inside it. Click anywhere outside the main layout to deselect all columns. New columns will be added to the main layout now.
<hr /> acts as a row separator. When your columns span less than 24, you can insert a separator to start a new row. Double-click the separator to remove it.
“Column border” adds a
border class to the column. A Blueprint’s column border appears in the middle of the gutter on the right of that column.
“Column last” adds the
last class to the column. Suppose you have a row split into four columns. Your columns will have
span-6, which adds up to 24. However, the last column will jump to the next row because it has an extra margin on the right, making it 10px wider than what it’s supposed to be. Blueprint’s
last class removes this margin, which aligns the last column properly.
You can increase or decrease prepend and append values by clicking the corresponding +/- buttons. These values are useful when you want to adjust the columns positioning.
Play with interface for a while, I’m sure you’ll get the hang of it.
- Gridizle doesn’t calculate the maximum allowed number of spans in nested columns.
- Adding a full border around columns, instead of a top and bottom border, messes Blueprint’s layout. So for now, Gridizle’s columns look funny.
- Showing and hiding HTML code should be done in a popup window, instead of using the ugly
class="last"could, and should be calculated automatically.
- Appending and prepending don’t know when to stop. So don’t over do it.
- Column spans can’t be changed, for now. When adding columns, try to pay attention to the span number you choose.
- This is a pre-pre-alpha software. I’ll try to improve it whenever I have a chance. However, since I’m licensing it under GPL, you’re free to hack on it.
September 18th, 2007 • General
I have a love/hate relationship with Twitter. I see how it can be useful, but can’t stand how noisy it gets.
Feels like a 21st century Slashdot.