Older blog entries for fxn (starting at number 452)

26 Nov 2006 (updated 27 Nov 2006 at 08:42 UTC) »

Giving a talk with TextMate

My talk at the Conferencia Rails 2006 delved into Rails internals and so the content was mainly source code. I tried several approaches to writing it, from Keynote to a quick and dirty script to run text slides in Terminal.app. But the place where code lives is the editor, and so that was the final choice. You get syntax highlighting, scroll bars, and no need to copy and paste with style between applications. It feels like the right place to show code.

The editor of choice was TextMate, I use it practically since it was available. I prepared the talk in a project that contained the Rails source tree, a dummy Rails application to try stuff, and the very slides. To trace code execution in Rails I used plain old Find in Project most of the time. The actual presentation was in a different project, groups were used to structure the presentation in sections and allow for slide ordering within them.

To start the talk all files are opened beforehand, one by one. The easiest way to do that is to select the first one, focus on the editor, type ⌥⌘> (or ⌥⌘` depending on your keymap), and go down the drawer. With that trick Allan told me in the mailing list you go down the project opening files because the focus remains in the drawer.

When I give a talk or a class I always like to freely walk around, and so I normally use some kind of remote control. How could I use one here? I played around with Salling Clicker to no avail, but finally discovered Mira provides a way to assign keystrokes to Apple Remote buttons (why are Apple Remotes white for black laptops?). It was trivial to map play/menu to ⌥⌘⇢/⇠ to move to the next/ prev tab. I could even map increase/ decrease font size and scroll up/down to the rest of buttons. Very handy.

As a final touch, you can get full screen mode with megazoomer. All in all the presentation took the form I exactly wanted for this talk.

26 Nov 2006 (updated 26 Nov 2006 at 11:07 UTC) »

Back from a very successful Conferencia Rails 2006. We were about 150 people in Madrid, plus a few people in Mexico and Argentina connected via teleconference. The organization was excellent.

There were different kind of talks, most of them technical as usual, but there was an interesting round table of Spanish Rails-based companies, and a very good talk about Rails seen from the point of view of the salesman, given by Agustín Cuenca, the CEO of my company. To close the conference there was a session of questions for DHH, who kindly attended the session via teleconference.

It was nice to match names and faces, the Rails community in Spain is just taking shape as in any other place. I think this event will be an inflection point here.

I have been working in my talk about Rails internals for the Conferencia Rails 2006. Rails is about 55K LOCs, aproximately 34K in libs and 19K in tests. In the talk we explore just a corner of that, tracing the execution of code behind some particular feature like class reloading. Working on this talk is being a good exercise.

Alive

I have been very busy lately, and this will last until the end of the year probably. $work is taking a lot of time, we are already ten people in the company. Additionally, in my non-existent free-time I am giving a semester on Perl at the University of Barcelona.

I am preparing a talk for the upcoming Conferencia Rails 2006, to be held in Madrid. There we will have a walk through the source code of Rails, to understand from the very source how are core classes extended, what happens when Rails boots, how are classes reloaded, which is the flow of a request, etc. This is a good way to exercise your Ruby.

miguel gave a talk about Mono in my faculty this week. People who wanted went out to dinner afterwards, I think we were 16. We had a good time.

4 Sep 2006 (updated 5 Sep 2006 at 04:35 UTC) »

Rails: Migrations Gotchas

Migrations are a wonderful addition to Rails, after a few projects using them I've come across a couple of practical issues:

I have seen twice a pattern that makes your migrations unusable for a fresh install, it goes like this:

  1. Define table Ts and initialize some records using AR-class T.
  2. Add column c to Ts later in some other migration.
  3. Add a filter to T that uses c, for instance a before_save.
Gah! When you perform a fresh install the first migration will abort because attribute c is unknown at that step.

There are variations of that pattern, instead of defining a new column, you may define a new table Ss, and use class S in an observer of T. Broken.

The other issue concerns SCMs. If you are working in a distributed team migrations need special care. Say you are developing some feature, generate a couple of migrations (015, and 016), program, test, checkin. Now, the rest of the team were working on their modules, so they have 015s as well, since the last one in the repository was 014. They have some local migrations and local schema version that needs to be undone with their local migrations. Thus, next update downloads migrations that interfere with the local sequence. That's not a very agile scenario but I don't see any workaround other than requesting the migrations lock by IM, or script migration updates somehow.

RailsConf Europe 2006

I will attend the RailsConf Europe 2006, to be held next week in London.

19 Aug 2006 (updated 19 Aug 2006 at 10:50 UTC) »

Understanding Newlines

The article about newlines is finally out in ONLamp.com! A lot of iterations have been done since that first draft of April, it has been a pleasure to work on it.

ASPgems

I don't like to blog too much about $work, but let me briefly comment that after about six years working for the same software company I quit to co-found my own, called ASPgems. We are focused on agile development using dynamic languages, Ruby and Perl by now. RoR is our platform of choice for web development, though most projects are not web-based. We have an office in Madrid for commercial purposes, but the working environment is distributed, I myself live in Barcelona and work from home.

We are self-funding and to my surprise, even launching towards the summer when nothing is sold we already have more work than we can produce! That is the problem we wanted to have :-). I start to think we will be able to bootstrap the company. As CTO of ASPgems I'll try to build a strong and specialized team.

MacBook

I've got a beautiful brand new black MacBook, with 120GB of disk and 2GB of RAM (bought separately to Other World Computing).

Advogato Backups

In case you didn't come across this before, the entire diary of any account is available at http://advogato.org/person/<account>/diary.xml.

I consider just a tiny part of my disk to be worth being kept (life is ephemeral!). A trivial shell script fetches that XML and uses pax(1) to put it together with some selected stuff into a single PAX file. The resulting archive is transferred to a memory stick I always carry with me and that's all. Because of its simplicity I even do backups regularly! Incredible!

Understanding newlines in Perl

After some email exchanging with Jarkko and Sadahiro, plus my own reading, I got the picture to write a final section about newlines in Unicode (in the context of Perl) that closes my article. That's the first complete draft, and I sent it yesterday to chromatic. I like the article!

Ruby on Rails tutorial

I'll give a tutorial about Ruby on Rails in the next V Jornades de Programari Lliure. It will be based on the one I gave a few weeks before at the University of Barcelona in cerquide's course. Since the slot is two hours here, a bit longer, I'll be able to spend more time on Ajax integration.

4 Jun 2006 (updated 5 Jun 2006 at 07:28 UTC) »

SQLite at Google

Dr. Hipp gave recently an introductory talk about SQLite at Google that was recorded in video.

Circular Permutations

I just uploaded to PAUSE a new version of Algorithm::Combinatorics with a generator of circular permutations. That was a breeze to implement fixing the first element and delegating to permutations the generation of arrangements of the rest. Additionally, that's a choice of representants that gives lexicographic order.

I noticed the sequence of numbers of circular permutations has no entry in Sloane's encyclopedia, and so I submitted it tonight.

443 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!