Digging into Drupal

Submitted by gwolf on Thu, 12/06/2007 - 12:06

As of late, I've shifted quite dramatically my sysadmining/development activities. On the development front, although Perl is still my mother tongue and I maintain many systems I wrote with it (and my main involvement in Debian is through the pkg-perl group, of course), I've been largely switching over to Ruby - both under the Rails framework and doing standalone stuff.

But somehthing that's new to me (well, relatively - it has been observed I have been playing with the idea in and out for some more time) is entering this maze of twisty little passages, all alike called Drupal. What can I say? I'm quite surprised by it. It is such a reach CMS, and so twistable for almost-anything, that it still defeats me.

I've been asked (ordered? pushed?) to propose a complete plan to replace my Institute's current static-and-butt-ugly-HTML site with something dynamic and manageable, so, of course, this last week has been an intensive Drupal crash-course for me.

Drupal itself is quite complex, yes, and I thought I had it mostly mastered for the trivial tasks. But then, I started looking for some I-thought-quite-simple extra thingies - And I started discovering its user-contributed modules. I've been having quite a bit of fun with them, and as I hate messing up my clean and nice installation, I've even set up a Drupal5 modules APT repository for Etch, where I'm putting the modules as I process them.

As I'm really not into PHP, and I still lack enough of the Drupal framework understanding to really step forward and become responsable for them, I'm not yet even suggesting packaging them for Debian - but a time might come where I upload them as well ;-)

BTW, in case somebody is wandering about this Jaws-to-Drupal scripty I mentioned that other time: It basically works for blog entries (as you can see in my test site - barring some trivial latin1-UTF discrepancies). I have not yet migrated because I'm also trying to migrate my Phoo photo galleries to Acidfree albums... And it's quite a more challenging task than just migrating blog+comments. But soon, I hope - I have a bit more time than in the last weeks to be able to play with it. Anyway, here it is as it is.

( categories: )

Welcome on board!

Submitted by gwolf on Thu, 12/06/2007 - 11:40
Yes, yes, I know I already said so, and surely in a more visible site, and even he also announced his victory over DAMnation... But still, having more Mexicans in this little project I call home makes me very happy. So, welcome on board, Rodrigo!
( categories: )

Is it already December!? Oh, crap...

Submitted by gwolf on Fri, 11/30/2007 - 19:38

Last weekend, Nadezhda and me went to the the San Nicolás Totoloapan park, a beautiful area in the slopes of the Ajusco mountain. We cycled only for a short while, as we are not really used to slopes nor to non-paved roads - But all in all, it was very fun and a very nice time.

But, only now I realize, thanks to the oh-so-always-nice Rodrigo, that, because of having fun while being at the Ajusco, we completely missed November's Ciclotón.

Crap.

Cycling over 30 Km in Mexico City is very fun. Nadezhda loved it when she did it in August, just the day I came back from Vienna. I loved it when I did it last month, when she was in Monterrey. But, being together, we insist on missing it. Bah. Anyway, this Sunday we will have the short (~15Km) ride in Coyoacán.

( categories: )

Klezmerson!

Submitted by gwolf on Sat, 11/24/2007 - 20:10

Yesterday I went with Nadezhda to the always interesting teatro/bar el Vicio. as she found that Klezmerson were going to play there. We tried to get some more friends to join, but gave too short notice, and ended up having a great night out just by ourselves.

Just as a side rant: I just hate that places I want to refer to, and I want other people to get to know, have Flash-only sites! You can read some more things about Klezmerson at -ugh- their MySpace site, even get some of their music there.

Their name give away their basic lines: Klezmer and son. The common line to all of the songs they performed is a strong Klezmer feel. Benjamín Shwartz and María Emilia Jimenez (violin/keyboard and flute respectively) are responsible IMHO for most of that spirit, as their instruments are the most traditional ones, and they carry the melodies. But the rythms they play to are plain crazy and extremely well engineered - Cuban son, Colombian cumbia, jazz, rock, and... Well, I'm not a musician. But I really, really enjoyed them. Of course, bought their CD as well.

Congratulations to a very surprising and unexpected band!

( categories: )

Runners of the world, unite!

Submitted by gwolf on Sun, 11/18/2007 - 09:16
Yay, the club seems to be getting bigger and bigger. While I've been mostly away from this blog, Bubulle has joined the group. Also, the long-disappeared Evan promises to be back, and running as well. I didn't get to see him, but Gaby told me she saw Mauricio (making a IMHO very nice 0:51:33 time for 10Km) on last week's Nike race. Of course, I was also at the race, with a 1:07:36 total time. Not bad for such a strange period!
( categories: )

Life in the tropic

Submitted by gwolf on Sat, 11/17/2007 - 08:23

Ok, this is the first time of the year also for me - H0lger was the first to remind me that, as proud inhabitant of the not-precisely-warm tropic, once again this year I won't get a chance to get my first snowfall yet (although the volcanos around the city do get their share of snow, and as a child I've been there to play with it... Imagine a city of then-almost-20 million people rushing to the three nearby volcanos just to get a taste of what snow feels like - Yes, heavy traffic is the foremost sensation I remember)...

Sigh... But, sadly, that's not the main concern right now. My life feels quite upside-down, inside-out, wrongside-right. I hope to be out of this situation soon. It is just not sustainable.

( categories: )

Lucas killed ries!

Submitted by gwolf on Mon, 11/05/2007 - 18:19
Is there a causality relation between Lucas' posting and ries.debian.org's (a.k.a. ftp-master.debian.org) sudden demise? Grmbl...
( categories: )

Mini-post-mortem of a failed mini-Debconf

Submitted by gwolf on Sun, 11/04/2007 - 13:04

Over one year ago, still at DebConf 6, the Latin American Debian people (and by people I mean just interested people, regardless of whether they were/are official DDs or not) held a BoF session. One of the ideas we discussed there was that, in order to increase Debian presence in our region (which is by no means small - Let alone the geographical aspects, I'm guessing we are about 350 million people, roughly split in half between [officially] Spanish- and Portuguese- speaking countries). Yet, this is an area with very little involvement in Debian in particular, and with Free Software in general.

One of our first issues seems to be language - Just by its scale and economic importance, we cannot even put in the same scale Brazil and the Spanish-speaking countries... So I'll focus on Spanish-speaking Latin America, as (I recall) we did in that session.

So, we agree: We need more local involvement in each of our communities. And, so far, we have seen quite relevant results. The number of people directly involved in Debian in Argentina, Chile, Perú, Colombia, Venezuela, El Salvador and Mexico (excuse me if I forget you in another country!) has notably risen since I brought this topic up, together with Christian Perrier, back in DebConf5, Helsinki. An undeniable fact is that distances in our continent, however, are huge. In the 2006 BoF, we agreed we should promote regional meetings, that would serve both for working focused on Debian topics (i.e. hack sessions, as we do in DebConf) and for spreading our work to the local population, to help them see that it is not needed to be super-skilled or anything like that to contribute to a real, important and large Free Software project such as ours. Of course, taking into account the distances in the continent, we thought it would be sensible to split it in two - and to try and hold regional mini-debconfs - One for the Northern half (i.e. Perú, Ecuador, Colombia, Venezuela, Central America, Cuba and Mexico), and one for the Southern half (Bolivia, Chile, Argentina, Uruguay, Paraguay). And, for logistical reasons mainly, I strongly advocated having our first Northern meeting in Panamá. Why Panamá? Because it is a place cheap and easy to get to. They have a very important international airport, connecting to most if not all countries in the region, and -as they have risen as a business center- have good connectivity. Visa is required for many of the interested countries, but trivial to get (as opposed to what happened here in Mexico :-( ). Of course, other countries also looked interesting (there was some argument pushing Venezuela, but in the end, we all conceded it would be in Panamá.

I have to strongly thank Guillermo García - He is not (yet? :) I hope he still wants to get involved with this bunch of people) in Debian in any way, but after I contacted him, he agreed to start looking for a way to get us the right facilities in Panamá. He coordinated with a team which did most of the organization - A very nice web site is still available so you can look at their work - Quite a good job, I must add.

They contacted Universidad Tecnológica de Panamá, started talking with several potential sponsors, got information regarding hotels for us... But in the end, it flopped. Why? Because, although many of us were originally interested, in the end very few people (only three, none of them officially a Debian Developer, according to their last press release) confirmed their intention to attend.

Which brings me again to the question: Why?

First and foremost, I think it was lack of involvement. For one reason or another, all of the people that in the beginning pushed for this miniDebConf ended up busy doing other stuff, and didn't get at all involved in organization. It would have been a great present from our Panaman friends, yes, but quite unfair. And, of course, with no Debian people involved in organizing it, we got an chicken-and-eggesque situation... Where it didn't grab the attention of other Debian people.

Second, what they offered us was quite different to what we intended in the first place - At least, to what I imagined. On my first messages both to debian-devel-spanish and to Guillermo, I tried to get something close to what we had in mind: Something as informal and as intimate as it could be. My original request to Guillermo was just to get us a room where we could hack and talk, and probably sleep with sleeping bags.

Of course, I can perfectly imagine that when he requested the space to the university, on one hand, they didn't feel at ease having International Guests (with capital I and G - Very important for most Latin American universities!) sleeping on the floor. And, on the other hand, they would love to be able to show us around! Having an international project focus on a university in a non-technologically-well-known little country is quite something to show off!

Anyway... What happened? I was among the instigators, but Real Life called me away (I've been mostly inactive in Debian since September! :-( ). The miniconf was scheduled for November 14-17. I also insisted originally on having the miniconf on a long weekend (say, Friday through Sunday), as -being a miniconf and not the Real Deal- it'd be much easier for most of us to rob one day off work than a full week. In the end, this was the most important point for my decision not to join: I cannot afford more time off my work, not at this time of year. About the other involved people? I do not want to speak for any other people.

In the end, sadly, Guillermo had to inform us they cancelled - No, not postponed, but definitively cancelled. Why? Because -and I have to agree- next year we will have DebConf in Argentina... And many people in the region will focus our time and money on getting there.

Ok, making this whole story short: I'm very, very ashamed and sorry, with you personally, Guillermo, and with your whole team. And I hope we can resurrect this idea - be it in Venezuela (as it was suggested once) or elsewhere.

Sixth Ciclotón - Finally!

Submitted by gwolf on Sun, 10/28/2007 - 19:03
I just love my city.
Mexico City, chaotic, unknowable, imposible to understand, so huge, so varied, so broken, so feared, complex, unique... I think few people realize how easy it is to fall in love with this city, to drink its beauty, which leaps up always when you least expect it. Today, it was a good day for loving it. For one thing or another, I've missed the five previous ciclotones, which are held on the last Sunday of each month, 7:00 to 14:00. Today, finally, I made it.
What is it? It is a 32 Km route circling roughly around the mid-South and Center of Mexico City:

The weather is abnormally cold lately in Mexico City - We have reached temperatures around 5 Celsius in the last two weeks, which is agreeable for December/January, but certaiunly not for October. Anyway, today it was quite chilly from the early morning. I did this ciclotón on my own, as Gaby is out of town - I left home at around 11:30, and headed North towards the nearest point of the route, ~5Km north from here (Circuito Interior and Universidad). The chosen circuit is quite good and varied. And quite enjoyable, too.
And how did I fare? Well, not bad at all, I think... I did the ~37Km (32Km of the Ciclotón, plus the ~5 to get there - I came back by metro, as I was already too tired to be alert while driving in the traffic) in 2hr 13 minutes. According to my trusty Polar watch, I used 1831 Kcal (which is a bit less than what I eat per day), averaging at 138 heartbeats per minute.
Very enjoyable. This is one of the ideas that I most like that have been promoted by our local government: As Mexico City citizens, we need to claim back our streets. Also, we have to be responsible and think about different ways of moving around than by burning gasoline - Biking is fun, and it is not riskier than driving or walking. Try it!
( categories: )

This blog has not seen activity for a full month

Submitted by gwolf on Sun, 10/21/2007 - 23:37

That does not mean I'm dead yet, of course - It just means I've been too tied up with real life. Yes, I do feel to be close-to-MIA in Debian as in most other projects I work in out of personal interest... It's that bureaucratic point in year where we have to get all of the paperwork sorted out in order to enjoy another year working in the University. And, of course, it's a huge PITA - but all in all, it's worth it.

That point by itself is not the only reason why I was drawn away from my usual posting, mind you - My blog was broken for some time because of a b0rken table in MySQL... And it has been at least three weeks since I noticed, but I only got around to fix it today. And, BTW, how come did I fixed it? Because I'm working on a migration tool. Migration? What? Why?

Back in 2004, when I started this blog, I chose JAWS as the software to run it on. It was started by a group of good friends of mine, and they keep developing it. It is a very nice piece of work... But I've had several problems with it (and yes, I have not bothered to submit bug reports - shame on me. Anyway, I think they are related to how I made some mistakes while upgrading), and I do miss some bits of functionality... So, yes, I'm migrating away to Drupal. After all, I'll be setting up several sub-sites at my real-life work with Drupal, so I'd better get familiar with it... And, of course, as migrating a three-year-old blog is not easy (and even less migrating four sites I have lying around), so today I've been working on a nice migration script covering the components I use (blog, comments and photos). I expect it to be ready for prime-time after one more session (which I don't know when will happen).

Anyway, Jaws guys: You do rock. Thanks a lot for all the fish!

( categories: )

Click-through GPL sucks!

Submitted by gwolf on Fri, 09/14/2007 - 10:16
I completely agree with Adrian's comment. I've recently installed a lab full of OpenOffice for Windows. Of course, the installation is easy (but you have to explicitly accept the GPL to get on with it - why?), but what's really annoying is that the first time each and every user starts the program for the first time, they are also prompted for license agreement. Even worse, they are expected to fill out a quite lengthy survey (which I filled once, of course, but still is too much to ask for the vast majority of our users!). Free Software should be exempt from the stupid click-through nonsense!
Anyway... also echoing Adrian and Otavio: Robert Millan's work on win32-loader just kicks ass. If you are not reading me through Planet Debian, please take a look at this ogg video file (Windows users: you can use VLC) showing what happens if you insert the (Sid) Debian installer CD into a Windows system. No more fiddling around trying to get the stupid machine to boot off your favorite media! Good job!
( categories: )

BLOBs in MySQL: Binary Laughable OBjects?!

Submitted by gwolf on Thu, 09/13/2007 - 08:00
Bah, MySQL keeps insisting on being a fun way to waste your time.
One of my clients hosts its systems at Dreamhost, a quite nice hosting company, which has... Well, a couple of strange details :-/
Anyway, people who work with databases know that a BLOB (or its equivalent) is the right datatype for storing images or, in general, files, right? After all, BLOB is just an acronym for Binary Large OBject. And if somebody has a BLOB field in the DB and searches on it, most RDBMS-bound programmers will at very least chuckle at a design flaw - BLOBs are just to be stored and retrieved, that's it.
Well, the system I wrote for this client uses a BLOB field - Ok, to be clear: I just declared it as a :binary in the corresponding migration. That should do the trick, and should allow me to keep my system RDBMS-independent, right? So I can still work on my development system using nice-and-trusty PostgreSQL
Anyway... My client said some documents were being corrupted. And that is Not NiceTM... Documents were being truncated at 63Kb. The bug was consistent across the three instances of my system in Dreamhost, but could not be reproduced at my machines - It didn't take too long to find out it must be the DB (and that's partly because I don't really trust MySQL :) ).
Turns out that, in MySQL speak, there are four types of blobs: TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB. Forgoodnessake, WHY?! The stupidiest one is the tinyblob: A Binary Large OBject limited to 8 bits (255 characters). Regular blobs are 16 bit long (65535 characters - Aha! That's your 63.99Kb limit!). Mediumblobs are 24 bits (16 million), and longblobs are 32 bits (4000 million). And, of course, the blob datatype is not large at all.
Bah.
Anyway... At least this is an open and known issue already to the Rails people, and I do expect them to change the migration equivalencies to something saner.
Bah again.
( categories: )

Do good things come to those who wait?

Submitted by gwolf on Sun, 09/09/2007 - 06:56
So they say.
So, yes, lets wait, even if that means waiting with the trembling heart of the foreigner in Juan José Arreola's "El Guardagujas". Sometimes, the wait will be only eight minutes long - who knows? Sometimes, the wait will last for months, even a lifetime - be ready, stay at the nearby hotel, and be ready to rush out once the moment comes.
What cannot ever be guaranteed, though, is what happens after the train has arrived - Whether it will travel according to your personal (and extremely naïve) plans, or it will take you to a whole different life you never envisioned before. So... Well, I'm waiting for my train to R. We shall in due time see about it
( categories: )

Database abstraction, ORMs and RDBMS-agnostic coding

Submitted by gwolf on Wed, 09/05/2007 - 13:31
I came across John Wang's posting titled Database Abstraction - code vs infrastructure. In it, he talks about the problems many people face when migrating applications tied to a specific RDBMS to another one. He recommends:
One solution of modern programming is to move database abstraction from the code to the infrastructure using a ORM (Object-Relational Mapper) or Data Mapper. A ORM and Data Mapper abstracts the database for you so you no longer have to do tie db abstraction to each app. Not only does it let you code once for multiple databases it lets your users migrate their data from one database to another. This blog runs Typo which is based on Ruby on Rails and ActiveRecord. I've been contemplating migrating Typo from MySQL to PostgreSQL and I've been told that it would be as simple as exporting the data with YAML, updating the database.yml file and importing the data.
Umh... Thing is, you often want to use your DB as way more than a data store - At least, when using Postgres, I do. There are many things that can be done inside the DB (such as guarding the programmer against his own mistakes by keeping sanity checks which often go beyond just referential integrity. Constraints and triggers. Oh, and of course, user-defined functions and views. Of course, most times you can go by without using several of such tools - but when they would come in handy, you can sorely miss them.
On the other hand, John mentions (right after the previous paragraph):
ActiveRecord is a data mapper and isn't as flexible as a full blown ORM but it gets the job done for the most part. For a full-blown ORM, I think of Perl's DBIx::Class which provides a full OO interface to the RDBMS allowing you to code just once for multiple DBs without limiting you when you want to use some esoteric database-specific SQL
Currently, I'm among the many that have jumped on the Rails bandwagon - And so far, I really like it. But yes, ActiveRecord -although great for some tasks- is way under what I'd like for many actions I've got used to making.
I might be seen as a backwards guy for this, but until before I started with Rails, I prefered not to use full ORMs (not that I tried too hard anyway - Probably starting a project with DBIx::Class would be all it takes for me to become a convert, from what I've read), but to do the SQL myself - Only, of course, keeping well in mind that I should separate front-end from back-end (or using other jargon to say the same, separating cleanly what should be in a Controller and what should be in a Model - Of course, no one in their right mind would put SQL on a template or a View!). It's not so hard as many people seem to think, although mixing syntaxes for two different languages (and even more if you, as I do, like to keep your code under 80 columns) is sometimes dirt-ugly. Still, on to my last bit of rant:
There are PHP frameworks out there like Symfony and Cake but do any of them have stand-alone ORMs? If so, could Drupal move to something like that and solve their maintainership problems once and for all? Drupal is part of the Go PHP5 effort so there should be no issue using PHP 5 OO. Something to think about for the Drupal folks if a PHP ORM is available
Umh... Even if there are some great ORMs in PHP... Choosing an ORM is something you do when you start a project. I doubt the Drupal people can now just decide to move over to using a ORM, as they potentially have hundreds or thousands of points where they have DB interaction. And although for most of them moving over to an ORM should even be automatizable, every ORM has some very special features which make it damn hard to craft several kinds of query.
( categories: )

Glúcklich in Österreich!

Submitted by gwolf on Wed, 08/29/2007 - 14:37
Good comrades, great chat, greater motivation.
Some good Scotch whisky, a good friend who was lumped along with me in .br by mere chance. A very good time.
A strong whisky aftertaste and numbness in the mouth. My first couple of pages of Terry Pratchet - Thanks a bunch!
My mind wanders, I go over all the nice and dear things and people
Maybe tomorrow I should restart my reading? I know Pratchett is not supposed to make much (rational) sense, but still... Although I've enjoyed this couple of pages, I'd rather let the whisky wear out before continuing with the gollem owner's life and tribulations, with his friendly treatment for his plausible but honorable assassin...
Today I saw quantum superpositions mixed with special relativity in a small (less than 200 lines) Perl module. Positronic variables go back in time, yay! Damian Conway rules.
Time to sleep, yes, if tomorrow you want to be in time for the lightning talks. Oh, BTW: great honor, great honor: One of the lightning talkers requested /me to sit on the front row "to have a friendly face to look at". Have to comply, have to do.
But... Last reflection before going away: What a better way to describe bliss in Vienna (oder auf Deutstch, ich glaube - glúcklich in Österreich;) than to go to sleep while listening to the neighbour's fucking-loud music? Of course, his fucking-loud-music is just the-Balkan-music-you-seem-to-love, so everything's úberfine!
Thanks to everybody who made this possible. Specially to the Austrian friends.
( categories: )
Syndicate content