Continuing on with our series of interviews with the June 2007 Hackfest winners we talk to Mislav Marohnic from Croatia.
He is best known for his role in Prototype as a core team member.
In this interview find out why he made the switch from PHP to Rails, how he got involved in contributing to Rails and lots of handy links to libraries and resources he uses.

I am a student at the Faculty of electrotechnical engineering and computer sciences at Zagreb University, Croatia. At my first year we were taught core C programming, but nothing more; so, unsatisfied by my college's curriculum in the field of computer science, I ventured into the world of programming and web technologies. I worked with PHP for longer than 3 years, but was growing more and more unhappy with its community, widely adopted (bad) practices and the quirks in OOP support. When I first saw Rails controller and model code I thought it was something for kids because it looked ridiculously simple and it read aloud like English language. But, the Rails hype grew and, since I was learning Perl and Python at the time, I decided to give Ruby a shot. I was also attracted to the language because I learned that the Prototype framework, which I enjoyed a lot, mimicked the Ruby language. I immediately fell in love with Ruby's community, conventions and practices. I've then learned Rails by dissecting its internals and doing some real projects afterwards.
I was employed for 2 years, but currently I'm freelancing. In my country (Croatia), which has a very low number of Ruby/Rails developers, I never miss a chance to do an introductory presentation or a workshop for Rails.
I've made contributions to both Prototype framework and Rails, probably
more to the former than the latter. I remember
doing some fixes in the unit testing process of the both frameworks. I also
worked on the Event module of Prototype a lot; there was some bughunting in
the new module
code,
mouse wheel support and so on. I've updated document.getElementsByClassName
method to match the one that is implemented in Firefox
3, so now it
accepts multiple class names:
document.getElementsByClassName('item highlighted')
I also worked on many enhancements for the Form
module. One of the highlights is
the setValue method for form controls which can manipulate text inputs,
radio buttons, checkboxes and select boxes:
// text input:
$('user_name').setValue('Mislav')
// checkbox or a radio button:
$('remember_me').setValue(true)
// mutliple select box:
$('attend_classes').setValue(['cheese rolling', 'evil chemistry'])
In Rails, I have fixed clean_logger to work with Ruby 1.8.2,
enabling deployment of apps that run on Rails trunk to such systems as
Debian.
Same as most people: I've got bitten by a bug and I had an idea to resolve it. I was already experienced with SVN because I contributed to Zend PHP Framework; I co-authored the initial Zend_Cache module and have written a manual for it.
Contributing to Rails was a bit difficult at first because I had to understand Rails internals, why some features are the way they are and what goes where. I also had to get used to writing unit tests, even in cases when that is most difficult. I worked on a very slow PC for a year on which Rails unit tests took over 12 minutes to finish; I remember using the time to explore code and API docs more to see if I have missed anything.
The hardest thing was probably exploring code. Ruby is highly dynamic, so a
single class could be defined in more than 10 files. (Try to find all
InstanceTag code to see what I mean.) During this time rgrep became my
best friend.
I started out with Windows/cygwin, but have since switched to Ubuntu Linux on a decent PC. I have tried UltraEdit, jEdit, Eclipse and other coding environments, but have finished back on vim (from which I kind of started) because it provides me with power without clutter.
I have learned that the most important things about an editor are not
sophisticated things like code-completion, GUI framework integration or
additional helper windows around your code; they are little things like font
with proper antialiasing setting, color scheme (DejaVu Sans Mono/oceandeep
here) and neat helper hacks that vim enables. Of course, I couldn't live
without command-line tools like grep, tail, locate, ssh/scp, wget
and, of course, script/console. The latter, combined with ruby-debug, is
something I probably spend most of my time in.
My recent favorite kits/libs are Hpricot, the new Capistrano and Sake. I also started using Haml and Sass for my new projects and I love it so much I'm even converting old templates.
I'd say that Rails 2.0 is mostly about major cleanup (removal of cruft), API
documentation improvement, new REST/routing magic (like polymorphic URL
helpers) and ActiveRecord performance enhancements/consistency in
associations. There are already significant improvements in documentation
and test coverage all over the framework. I also like how script/generate scaffold now generates
a RESTful scaffolded resource. Date calculations have never been easier and
migrations have never been
sexier! I've been running on
edge ever since before Rails 1.2 and have never regretted it; if my app
broke that could only mean that I've ignored a depreciation notice, which I
shouldn't have.
I have overtaken maintaining the will_paginate plugin and this, besides Prototype 1.6 release, is currently my main public project that I'm doing for Rails community. I have some other neat ideas that I will try to push out by the end of the summer. I'm also slowly succumbing to the peer pressure and finally making a blog/personal site. When it's up, I hope you'll meet me there :)
Sorry, comments are closed for this article.