Contribution!

Posted by Michael Leung
on Apr 27, 08

We opened up the feather repository this past Friday, and have so far received a very warm response. There are 28 watchers on feather-core, and 12 on feather-plugins, as of the time of this writing. Not bad at all for the first few days.

The real big news however, is the fact that we got our first commit by someone other than El, or myself. mbleigh, a rails developer, and designer, got the admin side of feather passing XHTML validation, and added some nice styling to the tables of feather-core’s administration side. We want to give a big shout out to mbleigh for this contribution!

We also have a gentleman who is working on some specs for us, which is outstanding news.

God I love the Ruby community!

Feather Goes Gold

Posted by Michael Leung
on Apr 25, 08

We’ve finally opened up the proverbial reins on the feather git repository. We can’t wait for all you stellar rubyist to start cranking out the patches and/or plugins!

Focus your browser on this!

Committers

Posted by Michael Leung
on Apr 18, 08

I’ve been giving a lot of thought of late as to how to handle committers on feather. I think the approach Evan Phoenix has taken with Rubinius is pretty sweet. Basically if someone submits two patches, and we decide to integrate them into our codebase, that person will subsequently hold the keys to the kingdom, so to speak; full commit rights from then on out. Of course if they start mucking up the code, we always retain the right to usurp that person’s ability to contribute.

I envision feather as being a community effort. El and I have taken the initiative, but really want to see the ruby community drive it home. Hopefully tons of people will start creating plugins and sending us github pull requests to integrate their forks into feather-core.

Unlocking of the feather repo is planned for next Friday night, sometime in the EST time zone. That’s April 25th for calendar impaired amongst you.

I’d love to hear some opinions about this method of managing committers. Currently we have two repos: feather-core and feather-plugins. Do you think we should make the commit rights mutually exclusive? In other words, should people have to submit two pull requests to each? Or should we carry over rights? I’m leaning towards treating them as two separate projects.

For further information about this method of managing contributions on an open source project, feast your eyes and ears on Evan’s talk from this year’s Mountain West Ruby Conf. Interesting stuff.

Birds of a Feather

Posted by Michael Leung
on Apr 18, 08

My friend Jake brought a blog engine called Chyrp to my attention the other day. Interestingly enough, they call their plugins or modules: feathers. How very coincidental. Cest La Vie.

merb-manage

Posted by Michael Leung
on Apr 16, 08

El’s been working on this really nifty gem to manage merb instances. It’s a lot like mongrel_cluster, but it’s adapter agnostic, so it works with thin, evented mongrel, or whatever else merb supports.

It’s really hot shit. Check it.

Shiny #1 - Reopening Classes

Posted by Michael Leung
on Apr 15, 08

This is the first article in a new series I’m beginning outlining code or concepts I think are “shiny”. Every article will feature Ruby, Rails, Merb or JavaScript. Sorry .NET developers, but no C# here.

I thought I’d kick this off proper-like with a concept in Ruby which I really quite adore: reopening existing classes at runtime and adding functionality. If you’re new to Ruby, and particularly if you have a background working with statically typed languages, this concept is going to seem sort of foreign to you, as it did to me when I was first indoctrinated to the glamourous world of Ruby development.

So you may be scratching your head at this point, and wondering why the heck you’d want to reopen a class while the app is running. Shouldn’t all the code for each class be typed into TextMate before the VM has a chance to parse it? The answer is: not always. This technique lets you do some really interesting things that can’t be achieved with statically typed, compiled languages.

Say for some utterly insane reason (which could potentially alert the boys in white coats to come out to your coding lair and scoop you up for all eternity), you think Ruby’s String class should have a to_java method. To add this in at runtime, all you have to do is reopen Ruby’s String class, and wang in (that’s a technical term by the way), your method. There are two ways to accomplish this.

The first way is to simply define the string class in your code and write your method thusly:

class String
    def to_java
        # Put pure, unadulterated insanity code here 
        # to output a string as Java.
    end
end

The second way, is just as trivial to implement:

String.class_eval do 
    def to_java
        # Put pure, unadulterated insanity code here 
        # to output a string as Java.
    end
end

In your code, you can do one of these:

s = “public void iLoveJava() { }”.to_java

This will now just magically work. Pretty effing cool, huh? I’ve used this concept for a number of things. In fact, I’m using it in the feather-tagging plugin, to add associations and fields to my article model. It simply rocks, nuff said!

Merb Wiki

Posted by Michael Leung
on Apr 15, 08

That’s right! Merb finally has its very own shiny wiki! There are some really useful pages in there about testing with RSpec, deployment, and boat loads more. The really cool part is, the wiki itself is a merb app called Collective.

Rejoice in the Merb goodness!

Crazy Cool

Posted by Michael Leung
on Apr 13, 08

El got his blog all feathered out now as well! Check it out at crazycool.co.uk.

Caching!

Posted by Michael Leung
on Apr 13, 08

We got the first half of the page caching code done, as you can tell by how ridiculously fast this blog is now. We still have to update some of the plugins to work with caching, but I was really itching to get this out, to boost perf.

I’m stoked! Feather is really progressing nicely now.

Good-Tutorials

Posted by Michael Leung
on Apr 12, 08

I got a couple very useful comments on my latest feather post, from a Rails developer named Zach Holman. So I started taking a look at his blog, and found this pretty awesome project he started in what looks like 2002. The project is Good-Tutorials, which sports links to tutorials for a number of different disciplines and technologies.

There are tutorials on Rails, Ruby, CSS, JavaScript, Merb, and a lot more. Looks like a really solid site, written in Rails (I believe). Check it out if you get stumped, or have a question or whatever.

Downtime

Posted by Michael Leung
on Apr 11, 08

I apologize for the downtime today. I’m messing around with different hosting configurations. I started with thin, then tried mongrel, and back to thin. Thin is noticeably faster. I’m running on Sqlite3 now, which I’m going to change to MySQL, but not today. We’ve had enough downtime already today.

Thanks for bearing with me.

More Feathery Goodness

Posted by Michael Leung
on Apr 11, 08

So we’ve been hard at work on the feather plugin bits of late. We added a really sweet formatting feature so you can select if you want markdown or textile for your comments, and a bunch of other places on the admin side as well.

Tagging is in play now too, which is really one of the last must have features for feather before we open it up. I’m going to work on page caching all the public facing pages, later on today, and El has theme support on his agenda.

We’re both extremely pleased with Merb so far. It’s a really tight little framework. There are some things that are not that mature yet, but it’s really coming along.

I guess the only major complaint I have at the moment is the destructive migrations in DataMapper, but as we all know, Merb is ORM agnostic, so that’s not a fault on Merb’s behalf whatsoever.

El’s planning to get his new feather instance up shortly. We’re going to have a few other friends test in the next week or two, then open up our git repo! This is very exciting for us!

Merb ftw!

feather-feeds

Posted by Michael Leung
on Apr 08, 08

My cohort El just totally buttoned up the feather-feeds plugin. You’ll notice the Syndicate section on the sidebar now sports a link for comments as well.

If you subscribed to my RSS feed since I launched the new blog, you’re going to want to update your reader, as El made the syndication urls much prettier now. The old address will still work, but it has been deprecated, and will be removed in the next week or so.

By tomorrow I should have a new plugin ready for creating arbitrary side bar sections with custom content.

Diamond in the Rough

Posted by Michael Leung
on Apr 07, 08

Every individual should use whatever framework/language/operating system they as a person, find the most enjoyment with. If coding statistical graphing applications in Cobol is more fun for you than having sex, then that’s your prerogative (although I think you might be doing it wrong, but that’s beyond the scope of this article). I’m not here to tell anyone what they should use. I am here however, to write about my thoughts and feelings related to my personal experience.

For me, Ruby is really where it’s at. Rails as a framework essentially served as a gateway drug to the Ruby language, which is what really has me metaphorically strung out like a meth addict, looking to score his next tweak. Without Ruby, Rails and Merb wouldn’t be able to shine quite as brilliantly. That’s not to say similar functionality can’t be emulated in other frameworks. It absolutely can, and in fact has, in droves; just not with the same beauty and elegance that Ruby brings to the table. I guess that’s all relative though. As the saying goes, beauty is in the eye of the beholder.

I’ve alluded to elegance and beauty so far, which I’ve deemed subjective, but I haven’t really provided any substantial details as to why I choose to embrace the open source culture of Ruby, and stopped blindly slurping down the corporate Koolaid. It is a well known fact that I began my career on the other side of the tracks, so to speak. Much of what will follow next, are the root causes that led me to Ruby. Some of it will be perceived as an attempt to start yet another holy flame war, but that is not my intention. These are just my personal experiences. I’m not attempting to sway anyone, just expressing my own opinions. This is, after all, my blog.

In all honestly, I never particularly cared for web development prior to my serendipitous meeting with Rails. Doing .NET web development always felt clunky and hacky to me. Like the authors of ASP .NET saw what the WinForms team was doing, and by some outrageous notion, thought it would work well on the web. I’m not trying to say that ASP .NET sites don’t work. There are thousands of high traffic sites being powered by ASP .NET as you sit and read this. It works really well. In fact, I’d even go as far as to say it’s more scaleable than Rails under certain conditions. I’m also not saying that there’s any site that can only be built in Rails or Merb, and can’t possibly be coded in .NET, or Perl, or Django, or whatever. What I am saying is working with .NET brought little happiness to my days, and isn’t that what it’s all about? Finding what you’re passionate about. Something that motivates, and drives you to excel, opposed to spending hour after colorless hour, trudging on, laboriously writing the same low-level plumbing code you wrote so many times before.

The vast amount of freedom .NET gives the developer as well, is like having just enough rope to hang yourself with. Applications can be structured elegantly, but effectively designing a highly cohesive, beautiful system takes much effort. And once you’ve gone through all the trouble of designing all the subsystems in a nice clean manner, the framework pulls the carpet out from under you with concepts like PostBacks,ViewState, and obfuscated DOM ids.

Frameworks such as Rails and Merb conversely, have a structured, uniform design methodology built into every single application, saving precious developer cycles for important aspects like, oh I don’t know… business logic, instead of glue code, and months of intensive framework design. I really appreciated the fact that Rails was structured around familiar design patterns. I certainly read Martin Fowlers industry Classic: Patterns of Enterprise Architecture, prior to making the leap, and in fact was implementing many of the patterns illustrated in the book in my .NET code. Definitely not an impossible task, but takes infinitely too much effort. Rails comes with all that baked in, and MVC to boot. When I was entrenched in the .NET world, MVC in ASP .NET was damn near impossible to implement. You could do MVP (model/view/presenter), but I never cared for that pattern. Of course this has all changed with the advent of ASP .NET’s MVC, which I quite like actually, but that’s mostly because of the fact they nicked many concepts from Rails and Django. That my friends, is definitely the subject of another post.

On the other side of the coin, anyone could argue that there will still be bad Rails code. I’ve seen my fair share, so I can definitely validate that. That’s not what this article is about though. Every single language or framework out there will be subject to bad developers writing really hideous code. That’s a constant. This is more about my perceived happiness working with particular technologies.

There’s really so much more I have to say about this, but I’m going to have to save that for a part deuce. In attempt to bring this thing home, I’ll sum up with the following recap:

  • Ruby code is beautiful and Elegant to me. .NET code, not so much.
  • ASP .NET development feels like a hack
  • The .NET framework provides too much architectural freedom, which some people see as a good thing, and in many cases is a good thing. When you want to get stuff coded up as fast as possible though, worrying about the typical mundane implementation details is too consuming. It’s super easy to get lost in the minutia.
  • Ruby frameworks provide a structure based on industry design patterns like ActiveRecord, and MVC. Implementing some of those patterns in .NET isn’t trivial

Here’s what I plan to talk about in the next part:

  • Types of work for .NET developers vs Ruby projects
  • The speed at which things are changing in .NET, and all the new stuff one must keep up with
  • Side by side comparison of Ruby syntax vs .NET (e.g. what makes it beautiful to me)
  • Operating systems each camp uses
  • Tons more

Are you a Ruby developer, who’s come to it from another discipline? If so leave a comment with your experiences? Are you an ASP .NET developer who thinks Ruby is rubish? If so, save your comments. Just kidding, I’d love to hear it from your side as well.

Digg it! and DNZone it

Introducing Feather

Posted by Michael Leung
on Apr 06, 08
I originally started writing this post like so many other people do when they let their respective blogs fall by the wayside. It went something along the lines of: "Hey there, I haven't had the chance to blog in a while, I've been busy doing, blah.. blah.. freaking blah", ad nauseum. I realized how piss-poor it was, like four paragraphs deep, and decided that instead of subjecting you to that familiar monotony, I'll just introduce my latest project, which is, well... this.

That's right, ladies and germs, my partner in crime "El Draper":http://crazycool.co.uk and I are back at the open source game for your, uhh, blogging pleasure. So why write another blogging engine, Mr. Smarty Pants Leung, when there are so many existing apps, and two written in Ruby to boot? _Huh huh huh_?

Strap in for one sec, and I'll tell you. We wanted a lighter, simpler, faster, more modular app to spew forth the arbitrary prose, we're so eager to spew forth (well apparently not _that_ eager in my case, as my past track record can attest to, but you know what I mean (right?)).

Anyway, enter Feather, an extremely lightweight blog engine written using the super cool new(ish) web framework, Merb. We chose Merb over Rails for a number of reasons; the foremost reason in my mind is the fact that Merb propagates many of the ideals we envisioned for our super cool new blogging app. Ideals such as keeping the core code base as light as possible, and providing additional functionality through plugins. I think I can speak for El as well when I say Rails is definitely awesome, we just wanted something a bit more agile for this project, and I'm not talking about eXtreme Programming here.

We have plans to fully open source feather so the rest of you ruby-heads can get your greedy little greed hands on it. Currently Feather is in a very early state though, so we probably won't open it up until we have the opportunity to write a few more plugins, and clean up a few things in feather-core.

As of right now, the comment form below this article (in fact, all things related to comments) is a plugin, as is RSS Syndication. The core of feather is essentially just articles, and a back-of-the-house admin side to manage the whole shooting match. Everything else, and I do mean everything will be installed as a plugin, so you can cherry pick the exact feature set you want to run on your blog, and not have to deal with the bloat of a shit-ton of features you don't care about.

As an aside, I wanted to mention this bad boy is running on the Thin web server, with SQLite3 doing the relational persistence stuff, and NGinx serving up static files.

Stay tuned to this blog, and "El's":http://crazycool.co.uk for further articles about Merb, Rails, and of course news about Feather.