Having done web development on several platforms (Perl+CGI, ASP.NET and PHP), I was introduced to Ruby on Rails about two years ago, and it was love on first sight. The separation of code and layout was a bliss after PHP require statements (and vaguely similar to ASP.NET, by the way), and database abstraction was on a wholly different level.
And, you don’t need semicolons after statements in ruby, just how sexy is that? What more can a man need (write a comment, if you disagree :).
Now Rails does have some annoyances, like painful configuration for multiple applications running on a same server. If someone actually likes writing Lighttpd rules and making special provisions for it in routes.rb, again, let me know. It also seems that in some cases, all the abstraction and “there is a really clever hack to do this with just one line of code” -mentality has taken over good sense, which for me has meant that my “Rails 0.9” skillset has been mostly deprecated, and replaced with layers upon layers of new stuff I should be continuously keeping up with.
Now a recent Slashdot article (the one linking the page-long rant from Mongrel developer) had some positive comments related to Django, and I decided to check it out. And guess what? It just rules.
Now if you like your trusted PHP or like to roll on with Rails, wherever they take you, please don’t read further. But for those adventurous who don’t think using indentation to format blocks is a bad idea (Python developers obviously didn’t, and Django is a Python framework), I think there are several lovable features in Django, when compared to Rails. These are, of course, my personal opinions, speaking as a person who has developed a fairly complex Rails project (a personal budgeting app) over two years of time:
Just a short note on this Slashdot newsbit that almost got me falling off my chair: Nokia is acquiring Trolltech, the makers of QT graphics library behind the popular Linux window manager (/platform) KDE.
I mean, if I had been asked a month ago the top three companies making money with open source software, I would’ve replied RedHat, MySQL and Trolltech. And since MySQL has already been acquired, I really wonder what is next.
Also, it is interesting that Nokia decided to acquire Trolltech, even though their Maemo platform is based on GTK and Gnome, not QT and KDE. Well, let’s just hope they don’t stop providing a GPL version of QT in the future.
Anyone want to bet who is the next open source shop being acquired by some big players? My bet is RedHat being acquired by Google or Microsoft, because, well, that would just be surprising, wouldn’t it?
Picture of this 99.9% light-absorbing monster material can be found from news.com.au coverage. Now as many slashdotters pointed out, this opens up obvious possibilities for solar panels, but once these really get cheap, I’d propose a couple of additional ones:
Limiting the light scatter in open areas where adequate lightning (e.g. for safety) and darkness are simultaneously preferred. Theaters, nighttime transportation (ever tried to sleep in a well-lit train?) spring up to mind
Ninja clothing. Of course the problem is, that once you actually become darker than the night, you may be more easily spotted.
Striking interior decoration. Doors that look like black holes? Check. Really black borders for your home theater projector canvas? Check. Sofa that just doesn’t seem to be there? Check!
And of course there is my absolute favourite: MacBook Night Air, as shown below.
Like Nigel Tufnel says in the movie This Is Spinal Tap: It’s like, how much more black could this be? And the answer is none. None more black.
Just thought to post a brief and shamelessly positive note on my current hosting provider, WebFaction. It was actually their one-click WordPress installation procedure that got me playing around with blogging, which then lead to founding this blog. I ran into it when searching for suitable site to host Django-powered software, which lead me to this comparison of Django-friendly web hosts.
Now this probably wouldn’t be worth noting otherwise, but WebFaction is the only provider so far (leave a comment if you find others), that fulfilled all my stringent requirements for a hosting provider:
Support for PHP, Ruby on Rails and Django (this alone is hard without virtual servers)
Support for MySQL and PostgreSQL (to suit the daily mood)
No arbitary limits on subdomains and domains within plans (it’s not like they cost anything to the provider)
Starting cost must be below $10 a month (I’d rather scale up when I actually have traffic, not beforehand)
Suffice to say, requirement for recent web platforms (Rails, Django) combined with relative freedom and low cost are almost impossible to find. Having said that, a brief look on what WebFaction was offering did convince me to finally abandon the real-men-host-their-own-servers -approach, which had been causing me a headache lately (DSL line and a Linux box in the living room isn’t just meant for 24/7 services, if you know what I mean). In addition to my personal requirements, this provider sported additional, and in some points even exceptional benefits:
Unlimited domains and subdomains (I did say it already, did I?), e-mail addresses, mailboxes, and databases (yep, you heard it right)
Full shell access with SSH and SFTP
One-click installers for a dozen of most popular applications (most Python web frameworks, Rails, WordPress and others), which actually make what they are supposed to do
Database sizes count towards disc quota (instead of the outrageous “10MB per database” restrictions on many cheap hosting providers)
A lot of people are asking me (of course I have to make this stuff up because I don’t have any readers) how I’ve done the menu bar (the horizontal thing containing static pages and categories, just below the name of this blog). This is a good question, because the menu bar is actually widget-ready, so I don’t have to change it when I add new categories. “But how have you avoided the widget headers and still remained strictly XHTML compliant?”, I hear some of my imaginary readers say. Well, I’ll tell you how.
First step is to understand how WordPress sidebars are done:
Theme tells that it has sidebar(s) using either register_sidebars(_n_) or one to several calls to register_sidebar(...). This is done in functions.php.
Where the sidebar should appear, you call dynamic_sidebar(), and if it returns false, you render some static stuff instead of widgets.
All this is explained in excruciating detail in WordPress documentation, so look it up in there, if you want to know exactly how it’s done. Now when all this is done, your call to dynamic_sidebar() (done inside <ul> and </ul> tags) will output the widgets selected to this sidebar in the following manner:
I was struck by the brilliant idea of designing and implementing my own design for this page. Because the page has been up for like two days and I have around one point three faithful readers, I decided to scrap the needless testing platform and go straight to production.
So bear with me for some hours while I stylize the posts and sidebar on line. For the random viewer, it may even be an interesting interactive event. Or then not. Anyways, sorry if your eyes hurt when reading!