DISQUS

Ruby Best Practices Blog: http://blog.rubybestpractices.com/posts/jamesbritt/2009-04-13-solving-the-problem.rc.html

  • sandal · 7 months ago
    For those interested in where the inspiration for Korma came from: Have a look at git-wiki, specifically the decklin fork:

    http://github.com/decklin/git-wiki

    So a key part of solving the problem here was looking at how someone else solved a tangentially related problem. If you're wondering about where the name came from, I was very sick from the previous night's Indian food when I made the first commit on this project. Romantic, huh?

    Thanks James for a great writeup. It'll be interesting to see if others end up using Korma and hacking it for their own needs.
  • PSD To Wordpress · 2 months ago
    Thank you for the link Sandal, it describes it all! thank you.
  • James Edward Gray II · 7 months ago
    Isn't that the logo for the Dharma Initiative in Lost? That could explain a lot… ;)
  • Mike Moore · 7 months ago
    James, I _really_ like this approach. I still haven't recovered my Mephisto install, and I've been looking to move to something akin to Webby or Jekyl. But I haven't found a decent way to get them to generate the tag pages from my entry's metadata and was about to roll my own solution. I love the idea of using a post-commit hook to generate the site. Very clever.
  • Martin DeMello · 7 months ago
    > If you are wondering why working code was removed, consider that any code you have is something you have to maintain. As bug-free and robust as you may like to think it, no code is easier to maintain than no code.

    A valuable lesson - something I really should keep in mind more often.
  • ehsanul · 7 months ago
    You guys should be in charge of what goes into Rails 3. Nice write-up, loving the minimalism in coding.
  • ehsanul · 7 months ago
    Oh wow, only just read the comment about where the name of this blog engine came from... Damn, that used to be one of my favorite foods, still like it quite a bit! My aunt and grandma still make it for me if we happen to be in the same city. Good stuff!
  • jamesbritt · 7 months ago
    One of the reasons I liked Nitro, and now Ramaze, is exactly that aesthetic of feature selection.
  • lucapette · 7 months ago
    Interesting point of view, interesting approach. Loved "no code is easier to maintain than no code."... :) I think i'm going to follow this blog.
  • jfcouture · 7 months ago
    I'm not sure I understand why you built Korma. What's the difference between Korma and using Webby along with git?
  • jamesbritt · 7 months ago
    Fewer features, smaller code, in Korma.

    Korma focuses on a specific set of requirements, making it easier for someone to jump in and get started with it for particular tasks.

    I like Webby, use it for several sites, and after seeing Korma thought about wiring git into Webby to possibly automate certain tasks, but Webby has it's own quirks and requirements.

    An interesting aspect of Ruby (and similar languages) is that there is less need to contrive a one-size-fits all app because many things are getting easier and easier to hand roll.

    EDIT: regarding Gregory's subsequent comment, I did not write Korma, so I'm suggesting why one might start form scratch on something rather than adapt existing code. I was already experience with Webby when I saw Korma, and it seemed such a simple, direct, fit for the needs that the idea of using Webby never crossed my mind.

    Later, when digging into the code and writing my post I thought about Webby + git, but it would serve different needs than Korma.
  • sandal · 7 months ago
    Korma was actually assembled by pulling together bits of git-wiki and my former blog engine, Blaag (which I admit was written only because I didn't know Webby existed), to provide exactly what I wanted. For the RBP Blog, I needed some custom features, and I didn't know whether or not Webby would easily support author specific feeds and things like that.

    Considering that Korma was put together in a night in a half from soup to nuts, I definitely trust < 250 lines of my own code to be easier to hack on than a couple thousand lines of someone elses code (for me, at least :).
  • jfcouture · 7 months ago
    to james and sandal:

    As a developer, I totally understand why you'd want to roll your own solution! :)

    I'm in the process of updating my blog so I'm looking at different solutions. I was wondering if there was something about Webby that made it seem like a bad choice for this site.

    But probably the thing that confuses me the most is why you're using grit. I mean it's natural to use git to version the text files of the posts, but when generating the site, why do you need to access the git objects, instead of working directly with the files?
  • sandal · 7 months ago
    Now that question is definitely more to the point! :)

    Grit isn't super necessary here, and may reflect a bit of Korma's git-wiki ancestry. I used it to grab post creation times from the changelogs, but it could be factored out and an alternative approach could be used for retrieving post timestamps.

    Another good feature is that because the content is generated only from what's in the git repository, we lower the risk of local file modifications or cruft. But that's admittedly, a small beneficial side effect.

    Anyway. Feel free to fork and drop that dependency if you want. Not sure if we'll pull it back upstream or not, but it seems like a reasonable suggestion to me.