ruby

Continuations in ruby

8 minute read Published: 2011-03-27

In the weekends I like to learn lisp (my favorite lisp is scheme), and, whilst I do it in a chaotic fashion, I end up actually learning. Today I'm reading about continuations, a theme that is mentioned over and over in schemeland and which I hadn't the guts to try and understand. Until I found this chapter in the book "Teach yourself scheme in fixnum days". As eye-opening as it is, what I found most surprising is that ruby also has continuation! So I'll sum up what I learned about continuations using ruby for the examples. All the examples and content are either paraphrased or taken directly from the above book.

Magic considered harmful: teaching the first programming language

8 minute read Published: 2011-03-26

This might come off as yet another developer ranting against java, so let me state this before even stating my goal today: I think java is a neat language which shows off some good ideas that have clearly influenced the programming community for the past years. But, as highly as I think of java as a kinda good designed product and harbinger of very nice things, like the java virtual machine (cradle of fine languages like scala and clojure)and the widespread use of just-in-time compilation, I consider that teaching it as a first programming language is harmful, because in teaching it you have two choices: either delve into thorough and sometimes hard explanations as to why things have to be done the way they're done or resort to magical explanations: "write it like that because I say so". And both have equally pejorative consequences: the former leaves little time to teach the fundamentals of programming, like control flow, functions, recursion, environments/computational objects, logic and testing; and the latter sets a rather weak foundation which dooms the future of future engineers/computer scientists.

Git in the classroom: cloning/pushing exams in programming courses

7 minute read Published: 2010-10-30

I had to apply an exam this week for a web development for beginners course I'm teaching. We're using ruby for the server side for a couple of reasons: heroku is an excellent option for one's first deployments and I wanted to get a better grip on Ruby on rails 3 and html5 for my own improvement (and I've found that there's no better way to learn stuff the good way than teaching them).

No decent developer can survive without some sort of source control management. The one I know more of is git and I'm a huge fan of github. We're actually using github organizations to manage the class projects (the github staff is really great, they've let me use private repositories for the student groups at no extra charge).

The internerd, indeed

1 minute read Published: 2010-08-29

Ruby jewelry

2 minute read Published: 2010-08-29

Yesterday I had no money to go out and the weather sucked. So I decided to pick up one of my side projects and hack for a while.

For that project I need to fundamental components, a way of extracting keywords in a text and a wrapper for the public rss feeds of delicious.com. So I created webtagger and deliruby (this morning I thought to rename it to "delirious", which is cooler, but, well, nevermind) and released them as opensource gems for whomever wants to to hack them and use them. I think it's cool to be able to release something easy to use for others (using gem install instead of downloading the source, extracting it, installing it and all that fuzz).

So, how do you create a gem?

Slicing bread with chainsaws, one size doesn't fit all webdev needs

4 minute read Published: 2010-08-22

Ok, world, big fat disclaimer here: I'm not an experienced developer in all of the web frameworks that have existed in the history of ever (I've only done kinda serious stuff in three of 'em) and this thing I'm saying here is more of a hypothesis that I'm currently putting to experience's scrutiny than a rational, exhaustively thought, conclusion. Now, read on.

Nowadays, there are lots of web frameworks, and people have done wonderful stuff with them (twitter was written initially with ruby on rails, p.e.). And, truly, they have allowed the now commonplace fast, yet robust and standards compliant, development of big projects. But what about the little projects? Those little apps with at most a couple of tables in a database and a simple service to offer? Well, the really cool and experienced developers just do that in the big frameworks too...

Ay, there's the rub that makes big frameworks of so big a hype.