IverCore
Web & Software Developer-
To Puppet or to Chef, that is the Question
Posted on June 5th, 2009 No commentsI have taken a break from coding ruby and rails for a couple of weeks to try and get my company’s administration is order. To do this I have been using the sysadmins automation tool called puppet, which is written in ruby, but uses an external DSL, meaning that you don’t get all the power of ruby, just the amount that they let you have.
I actually even went to Belgium last week to a training course run by the company responsible for maintaining the puppet code. And while there I came to the conclusion that I like the idea of having an external DSL… in theory. Because it means that it is tailored to the task at hand, and it is actively parsing the code you write to make sure that it adheres to a set of rules for the task. But like I said in theory this is a good idea. In practice, well being a ruby developer means that I find puppet extremely restrictive. Simple things that I take for granted in ruby (in any programming language in fact) are just not available in puppet. Which is very strange to me, as the company claims to have been around for as long as rails and you would think that in the about 4 years that rails have been around puppet would have matured to a much higher level than where they are. In fact in using puppet I always have a feeling that I am using some outdated version of the code because it just does not allow me to do the simplest of things. For example before version 0.24.5 (or something like that) and bearing in mind that they are on 0.24.8 at the moment, you couldn’t even do
if $variable == something_else
Which means that because I am using ubuntu as my server and the version of puppet that ships with that is older than this, I cannot even do this. I asked on the irc channel about the best way to install puppet and they kept telling me to stick with the distributions copy or create a package for the distribution myself. I am obviously dealing with a bunch of sysadmins here, they never want anything to stray off the beaten path. And the thought of installing myself from souce, nooooooooo, burn him at the stake they cry.
But anyway, I mean come on, for a configuration tool that claims to have been around for so long this is just poor in my eyes. I start to wonder that if it is just because the guys that produce puppet just are very paranoid and just don’t trust people to use the full power of ruby correctly. And if this is the case, it is kind of an insult and we as developers (or indeed sysadmins, which is who the tool is primarily designed for) don’t need to be babied in this way.
Chef on the other hand (which I have no experience with, except for a lot of reading and research that I have done) seems to embrace the ruby (and rails) philosophy more. They give you a tool, written with an internal ruby DSL, meaning that you can do anything that you can do in ruby when writing the scripts, this means that there is not much momr learn for us ruby developers, just some new methods, and it has a top down order of execution, which mean that code is executed in the order it is written in, which puppet isn’t. I mean, why make things more complicated than they need to be? Companies systems are complicated enough, but to then go and invent, what in essence is a whole complex new language (a feature poor one at that), just to manage those systems is insanity if you ask me.
But I digress. I will continue to battle the puppet in the coming weeks and see if I can get it to do what I want. But if it were my choice I would have gone with Chef, it might not have solved any of the bigger problems in any a simpler manner that I am having with puppet, but it would have been a hell of a lot less frustrating to be using a language I know, with rules that I know, and could debug problems within 5 - 10 mins instead of half a day. Oh and I must add that while there is a lot of puppet documentation out there, I find it disorganised, and unclear.I could be reading something and trying to apply it, only to find out through the irc channel that the way I am doing it is deprecated or it applies to another version of puppet.
Oh and just on the off chance I was reading an article in Linx-mag.com, and they just happen to mention both puppet and Chef, which is strange because system automation isn’t even the topic of the article. But here it is for you anyway
http://www.linux-mag.com/id/7348/
And here is what Ezra of Engine yard fame has to say on the subject.
http://brainspl.at/articles/2009/01/15/chef-suck-on-my-chocolate-salty-balls
and
http://brainspl.at/articles/2009/01/31/cooking-with-chef-101
I must admit that I have a basis towards Chef because of its pure rubyness, but then why make life harder than it needs to be. Ruby was made to bring the fun back into development, and it has spoilt me for any other languages, and without it I certainly wouldn’t be a developer anymore. Why? Life is too short. Puppet seems to want to more in the opposite direction to this.
I have heard it said that ruby developers and stuck up and arrogant about their language, we have a right to be, it is a language designed for humans first, not machines.
I seriously don’t understand how so many companies use puppet, but I guess the mind of a developer (especially a ruby one) is far removed from that of a sysadmin. Thank God!
-
gEdit == jEdit # false
Posted on May 14th, 2009 No commentsBut almost.
While I am a huge fan of jEdit I am constantly keeping an eye on other text editors making up the ground on its functionality.
Being a developer a slick fully fuctional, light weight editor is key for me.
Yesterday I took another look at gEdit, and to my surprise it has acquired a new plugin which not only equals the functionality of jEdit’s column select, it far surpasses it.
This plugin, Multi-edit, not only allows you to edit in columns but actually gives the user multiple cursor marks so that they can edit in multiple places not just in straight lines. I don’t really want to duplicate what is explained on the website already so I won’t, and instead just post the link to the page right here.
What this means in the grand scheme of things is that gEdit is in reality one plugin away from being my editor of choice. What is stopping me at the moment? The excellent RecentBufferSwitcher plugin from jEdit that gives the user ctrl-tab switching to the most recently used files. Much of like how on most computers you can use alt-tab to circle through the most recently used applications.
And you may ask why I am looking for another editor when jEdit does all that I want, well java! Not the programming language itself (although that doesn’t help its cause) but the fact that jEdit (hence the j in jEdit) relies on the Java jvm in order to run. This has caused me a few problems in the past, not to mention the fact that it means that I have to install another piece of software just to use jEdit. Whereas gEdit is a native application and written in C and Python, meaning quick starts (depending on how many/few plugins you have installed and enabled), and no problems that I used to have with java applications running under compiz.
So seeing as it is just one plugin away from satisfying all my needs, I may take a stab at RecentBufferSwitcher functionality, but I am not making any promises. In fact I would even say that if someone were to volunteer their time duplicating the ctrl-tab functinality into gEdit I would pay them to do it. Something like 50 euros, I think it is a small cost for something that is so key to my job.
Anyway, jEdit here today, maybe gone tomorrow.
-
Passenger For Nginx
Posted on April 17th, 2009 No commentsPhusion Passenger, the application server that makes deploying ruby web apps on apache so easy, has now been ported to nginx, my web-server of choice.
And me being me, I have already switched all the ruby web apps I host over to using the passenger module in nginx. Which means that, no longer do I have to have apache running behind nginx to deal with the ruby apps using passenger. I can just do it straight from nginx.
Life is good
Get it here
http://blog.phusion.nl/2009/04/16/phusions-one-year-anniversary-gift-phusion-passenger-220/
-
New Theme
Posted on April 7th, 2009 No commentsAs you can see I am using a new theme for this blog.
Why? The other one was too dark, and this one is brighter, cleaner, and goes along with my new state of mind to do things and simply and with as little effort as possible.
-
Test Framework
Posted on March 10th, 2009 1 commentI have decided that, just for a while (maybe more) I will leave RSpec in favor of a TestUnit + Mocha + Assert2 combination.
My problem with RSpec is that while the specs maybe easy to read, I always find myself having to read the documentation to find out how to write the assertions in the first place. And this for me means that it is not easy to use. Whereas with the above combo I think things are simpler and more straightforward for me.
Like I said in a previous post, I am tired of things that make me have to think about things that I don’t want or need to be thinking about all the time. So, out with the old and in with the new. Or should that be out with the new and back to the old (with a bit of new).
-
Mack No More - I’m So Tired
Posted on March 5th, 2009 No commentsI really cannot catch a break with a framework.
No sooner had I decided to use Mack as a framework, that the developer announces that it will no longer be maintained.
I am being pushed into a corner.
The only frameworks left that have the maturity I would like is Rails and Merb. Rails I am not too fond of the opinionated ways, and Merb will become Rails come version 3.
I think there is some sort of conspiracy theory going on out there to get everyone to use Rails. And too be honest as long as the Merb changes get rolled into Rails I wouldn’t mind. But the frameworks are in such a state of flux at the moment I am not sure what the right thing to do is. And I have no idea when Rails 3 will be ready.
Really I am just mentally tired of all of this. I would just like to use one framework that I like the philosophy behind and releases updates regularly. By that reasoning Merb would be the way to go, because although it will be merged to Rails 3, it, as the developers say, will have a clean upgrade path. Which should mean that it should act as just the next version of Merb.
So it is with some reluctance that I will go back to using Merb. What I am secretly hoping is that when Merb does get Merged into Rails 3 someone/some people will fork it and maintain it as a separate framework. I would love to do such a thing, but I have neither the time nor the inclination to do such a thing. I am at a point where I just want to use something that works and that is flexible. I am tired of hopping for here to there. I am tired of the time and thought given to doing things that don’t produce useful code, like thinking what framework to use and migrating code from one framework to the next just to test it out. To be honest I am starting to feel like I did in the Good (bad) old Java days when I am just getting tired of it all.
So to preempt that this is the plan. I am going to take the thinking out of it all and say this. Rails and Ruby got me to carry on being a developer and Merb embodied all the things I wanted from Rails even before I knew of the project. So I am done with the endless thinking. I will use Merb, and follow whatever path and route is shall take, whether that be a merge into Rails 3 or whatever. As long as the principles behind it are still the same I don’t care anymore.
It is either that or call it a day and do something completely different unrelated with computers and work with real people, which almost happened in the good (bad) old java days.
So there you have it, the flux has stopped for me. Wherever Merb and its philosophy goes so will I. Whatever shape or form it takes, I will use it. If there ceases to be a Merb (whatever name or form it may have), well then, I will cross that bridge when I come to it. But I am pretty sure I know where that bridge will lead and am sure that it will lead out of developer town. But who knows, life has a way of surprising you.
-
Speaking Of The Mack Framework
Posted on February 25th, 2009 No commentsI forgot to mention this in the previous post about Mack, but the other day I was working on a Sass plugin for Mack with the help of Mark Bates the developer of the framework. And now there is Sass support within Mack. This was a must for me, as since I discovered Haml & Sass the thought of going back to using the more primative (in my opinion) erb & css is just not an option. I mean, I can do it, but why would I want to? It’s like why write a letter when I can write an email?
So to have Haml & Sass in a framework that I use, is a MUST! Because for me once I have found a better way to do something, to go back to an old way of doing things seems like a pain in the ass.
I don’t go backwards, that is why there is no more Java or PHP for me.
Anyway, I am glad to have helped bring some Sass enlightenment to Mack.
-
Just For Me
Posted on February 23rd, 2009 No commentsThis is more for me than anyone esle. To serve as a reminder before I jump the gun trying to do some software project
test = is_developing_language_as_easy_or_easier_to_use_than_ruby? if test do_project else reject_project puts "Life is too short to be using headache inducing languages" end
-
Mack Framework
Posted on February 23rd, 2009 No commentsRecently I have been playing with 2 alternative frameworks. Ramze and Mack. This isn’t going to be any sort of review on the either. Just a short post to share my feelings.
Ramaze is a great framework, because it gets back to basics and just gives you enough of what you need in order to get going. And at first when I was exploring other frameworks I was using Ramaze. But while Ramaze is a great framework I found myself writing a lot of code just to get it to do what thing like Rails, Merb & Mack already did.
So I have switched from using Ramaze to using Mack. Which is supposed to be a best of breed from all the frameworks. I think I am happier using Mack because, while Ramaze is great, I don’t want to have to redo things that have already been done. I mean that is the whole point of a framework, to reduce the repetition and tedium of coding, and to speed up time to deployment. And I just found myself constantly fighting with Ramaze to get those things done. So it doesn’t really suit me, but I would definitely say that if you haven’t used it you should give it a try. It might just be what you are looking for.
For now I will continue with Mack. Let see how long I will stick with it. If you have read my other posts you’ll know that I don’t stick with frameworks or editors for long as I am always looking for something better. But maybe with Mack I might have found a good Medium.
P.s. I am still using jEdit as my evaluation of all other editors (even gEdit with all its recent plugins) show that none come close to jEdits ease of use and extensibility. Although I have high hopes for Redcar being developed by Daniel Lucraft. I have recently downloaded and built it from the git repo and it is looking very good indeed, and on my Asus 1000h it is not too much slower than jEdit. And best of all it is in Ruby, meaning that if I wanted I could hack on it without feeling I was using a language that depressed me (like java). But I will have to wait and see on that. But you can check out Redcar ide from the link on in the links menu. It is also on github, and also there is a lighthouse account.
Well this was just supposed to be a really short post, but I guess I rambled on a bit more than I expected.
-
rEdit is dead. Long live…..
Posted on January 19th, 2009 No commentsWell at the moment long live textadept. All the things that I wanted to do (well not all, but easy to extended), and none of the work.
Now that is my type of project, one that I don’t have to do much work.


