A CMS in Ruby on Rails, and Why I Stopped

For the last couple of months I have been writing a series of posts describing a personal Ruby on Rails based CMS. I have been writing tutorial style posts outlining what I was doing, and why I was doing it. Don’t bother trying to look for those posts, because I’ve archived them.

This decision was pretty easy after I slowed down and reviewed the situation objectively for a few minutes. That clarity, coupled with a few truths that hit home while reading the source of a few other Rails applications pretty much sealed the deal.

The next post in the series was going to be an overview of another Ruby CMS project, BrowserCMS. I saw a video from RailsConf about this project, and recognised a lot of their goals as coinciding with mine. So I was going to poke through their code, see how they’ve done things, compare it to how I did the same things, or was planning to do them.

While I was reading through their source, it occurred to me just how much I don’t get Rails. I have a bit of a poke around with scaffolding and get familiar enough with the generators and I decide that I’m ready to tell people how do create a CMS in Ruby, because I’ve nearly finished creating a CMS in ASP.NET.

It’s clear to me, now, how silly that was.

Rails isn’t just a framework for Ruby, it’s a whole change in paradigm. Intellectually, I know Rails is “opinionated software”, however I don’t think I understood what that really means. I tried to make my code as flexible and configurable as possible, and I was struggling with all but the most basic CRUD tasks.

So, first I realised I wasn’t ready to tell anyone how to do anything in Rails.

But I have a series of about 5 posts doing just that. What do I do with those? Do I continue on, plugging away at learning while trying to instruct? I decided the answer to that depended on what I had achieved with my posts. What was the value of them?

Then I realised that I had covered very little other than simple CRUD. Sure, I had some unusual object relations, like trees and self referential comments, and I implemented some business logic like compiling pages into templates, however the total sum of the non-CRUD related content could have fit into 1 post. So I spent 4 posts blathering away at how to achieve the same task as running script/scaffold.

What’s worse is that I realised I was back in the rut of creating a CMS. How on earth did I do that again, after stating loudly and proudly that I don’t even like programming websites.? Well, I told myself, you are planning on using this on your own sites, your many, many online business ideas. Sometimes you have to do the same old thing to earn money. Which is true, if I had done anything of worth, but I hadn’t, I was a long winded scaffold script. I got carried away in the joy of learning a new language/framework (which isn’t a bad thing), and fell into the familiar territory of doing what I always do (which is a bad thing).

So, now I realise that I’m not only trying to teach people something I don’t understand, I’m trying to teach them how to do something I don’t even like doing.

That’s stupid.

I’ve archived the posts. I may revisit, as I still have grand ideas of what a CMS should be, but for now I’m shelving the whole thing. Luckily I have such a small readership (read: none) at this stage, nobody will be affected. For that I’m grateful.

And yet, through all this stupidity, I have learnt a few things of value.

I’ve learnt that Ruby on Rails is more complex than I thought, and will hit the books again to pick up some more advanced techniques.

I’ve learnt that I’m scared to push myself in programming. This revelation is a pointy one. I love programming, it’s my job, it’s my hobby and it’s my passion. The fact that I’m scared to push myself to innovate, hiding behind the excuse that I’m not smart enough or I’m not creative enough is double edged. On one hand, it’s sad that I’m not as ambitious as I thought. On the other, it’s great that I know now, so that I can get stuck into remedying that.

I’ve also learnt a lot about blogging. Those posts of mine weren’t really providing much value. I don’t have many readers because I’m not saying anything new, and I’m not showing anybody cool things they can’t find in a hundred other blogs. I also didn’t have much of a personal voice, and was writing them like I would a textbook, which is missing the point of a blog. It’s supposed to be informal, and I’m supposed to show my personality. So, I’ve found my voice, while realising that I’m not providing value. Another pointy idea, but ultimately good, because that too is something I can work on.

So, inevitably, I have to question the value of this post. What could this post provide to someone who stumbles across this website? Well, a few things.

Firstly, self awareness is a great thing to possess as a programmer. If you know where your weaknesses are, you can train in them, and get better. But that’s not enough, you also need to know what you’re afraid of, so you can recognise that you don’t even know that it’s a weakness. That fear hides the existence of the things you’re not good of, and that’s a major roadblock to improving.

And lastly, if you don’t have anything to add to the conversation, don’t say anything. The whole internet is a conversation, and I’ve just been babbling to myself in a corner the whole time. If you want to contribute, add your own thoughts, your own interpretation on subjects that are well known. Go into new levels of detail on old ideas and technologies. Introduce new ideas or technology, or modify existing ones. Contribute, don’t just talk for the sake of talking.

Tags: , , ,

  • mark
    The topic is misleading.

    You clearly meant RoR, but you said a "CMS in Ruby".

    I am using Ruby for pretty everything, I do not use RoR though. So I wonder if you confused the two.

    Hint: It is easily possible to write a CMS in ruby. It is a shame that so many people only find ruby because of RoR. Quite frankly, we would be better off if people focus on ruby, instead of specific frameworks.
  • Tim
    You are, of course, correct. You make a good point about Ruby not being Rails.

    I was trying to build it on top of Rails, much like the BrowserCMS guys, as a way to learn Rails better.
    This comment is a good kick in the pants to remind me, and others, that they don't need to build on top of Rails.

    I have changed the title to reflect this.
  • Stu
    Arg, I'm totally doing the same thing - it just makes sense for the stuff I'm making to be webservices (using django which is a little nicer than say JSPs or PHP) - but still web programming is just not as much fun as other types of programming.

    Look at the log file, edit the code, refresh the page...

    It seems like a lot of work for what you get out the other end, does it really have to be this complicated... surely there is a middle ground between the rigid 3 column CMSs and Rails/Django/Whatever framework?

    All of these frameworks seem so heavyweight - so much to learn... there must be a way of making these dead simple so you don't need to learn as much, but still being as powerful - we seem to be going in that direction, but really slowly.
  • Tim
    I think microframeworks will do what you (and I) seem to be seeking. It's funny that you mention Python, because I was looking at a whole bunch of Python microframeworks a week or so ago. You should look at djng, itty, mnml, newf, Juno and Werkzeug. Admittedly, I haven't had a chance to look at any of these, however I've heard Pythonista's praising them all.
  • Awesome post, thanks. Your insights apply to me as well.
  • Tim
    Thanks, I'm glad I could share.
  • Experiences like this, mature you, and season you. And bring you close to know, what NEEDS to be coded, not how to code well. Just like music, you need to KNOW why you play the notes, not just how to play them. Sooo, cheers ma man, to that i raise my glass.
  • Tim
    I don't think I fully realised the importance of solving a problem instead of writing software, at least until the this post. I used to read about it all the time, and think that if you were writing software, you were solving a problem. But sometimes you just create more problems.
  • Thanks for archiving the posts anyway, the last thing the Internet needs is more tutorials by people who aren't quite sure what they're doing themselves ;)
  • Tim
    Most definitely, it's the least I could do :D
  • Joshua
    I like this post, and I appreciate your desire to improve the signal-to-noise ratio of the internet. But you can still blog about ideas that are not ground breaking. If you have a few intelligent readers commenting on your blog, they can point out flaws in your reasoning, and you will be a better programmer/blogger/thinker because of it.

    Some of the most helpful blog posts I've read in the past started out containing nothing innovative, but then an addendum was added which pointed out a flaw/insight which I had previously overlooked in my own thinking.
  • Tim
    Hi Joshua,

    I agree, and have experienced what you've described on a post about something as simple as inheritance in C# and how I was doing it wrong. That alone has validated blogging to me. The whole act of writing is something I haven't done for about 4 years now, so I guess I'm still just trying to work out the kinks. Thanks for the comment.
  • carmen
    a few years ago it occured to me that i could eliminate rails entirely by standard protocol like Atom-Pub or RDF-REST. early versions of my lightweight frameworks (using Ry Dahl's webservers mainly, and my own filesystem based RDF stores) were actually built in rails..

    the whole railsmerbgithub ecosystem is built around the crap in rails that creates busywork that you can factor out specifically by using URIs as database keys (byebye SQL/ORMs, hello Couch/Persevere/Virtuoso/Element) and standard protocols (hello ATomPub/RDFREST, goodbye ACtionResource/ActiveRecord).

    not that SQL is dead or anything, if i had to interact with SQL servers and legacy schemae, all the hlpers/plugins/tools in rails would certainly make it easy
  • Tim
    Hi Carmen,
    Couch is something I've wanted to look at as well. I'd imagine that using URIs as database keys would allow you to do work directly onto Rack or something similar. I have to admit, I've never heard of Atom-Pub and RDF-Rest, so that's something new to look at.
  • Learning rails will teach you a lot of best practices but it really does not progress your raw programming skills that much. Building your own gems, partaking in an open source projects and hacking in micro-frameworks like Sinatra will all help in this area. At least this has been my experience.
  • Tim
    Hugh, I definitely agree. I've been reading a lot about Rack and Sinatra and am pretty keen to get stuck into making something closer to the server without the overhead of Rails, and I'm starting to spend more and more time on Github. I feel that as I use Ruby more, I'll need to fork more gems to suit my needs and start getting experience that way.
  • You may find Camping a better web microframework choice if you want to get you hands more dirty with Ruby.

    /I3az/
  • Tim
    Yeah, I've come across Camping before, however I had completely forgotten about it. Thanks for reminding me about it. I'll definitely check it out again.
  • This is interesting to me because I've had similar revelations. But for me the main thing is I realized that I HATE PROGRAMMING. Now that's pretty funny coming from someone who has done quite a bit of it. But the realization is actually a bit deeper. You see I love seeing my neat ideas implemented. I just find the whole process of getting there extremely tiresome and overly complicated -- And I truly think only green-blooded nerds can disagree with that. The so called art of programming is still very much a clean-room pocket-protectorate domain. It just so happens that now anyone can down his breast and try his hand at it.

    Hopefully one day we will be able to sit down at a computer and create a good piece of software without first having to read a dozen 400-page esoteric manuals. Alas, I fear I may be dead before that day arrives. IN the mean time I dredge along.
  • Tim
    To be honest, I've felt the same in the past, but I've recognised it as hating certain types of programming - namely the 9-5 database driven website CRUD programming. I'm almost the opposite of you - I love seeing ideas implemented, but I love implementing them more. I enjoy hacking at code and playing with frameworks, but only when it's interesting.

    Database driven websites used to be interesting to me, 8 odd years ago. I remember the flood of joy the first time I connected a PHP web page to a MySQL database and managed to store and retrieve information about a drawing. That joy is gone when I do standard web applications now, so I'm on the look out for new and exciting types of programming, or the same old in new and exciting languages (hence my Ruby kick).
  • Nice post. It's nice to see you realized your "mistakes" and were honest enough to put them into perspective and consider what you were doing.
  • Tim
    Thanks Craig. These days I don't have very much time at all for personal programming projects, so it's important to me to use it valuably. Poorly reinventing the wheel is not a good use of any time, no matter how abundant or scarce.
  • Patrick v Bergen
    Thanks man, at least I have enjoyed your self-analysis :)
  • Tim
    More than happy to share, thanks for the comment.
blog comments powered by Disqus