Remembering STP
This is one of the Stone Temple Pilots’s best song.
One of the best live show ever !!!!
A lot of great bands, this is a sample (Faith No More).
As some of you know, I’m developing a web at home using RoR. This framework makes your life easier than before with all its utilities and work done by it that you don’t have to do. But there is something that can make you go crazy when you look for only a row in the database using an object. You can do it as follows:
object = Object.find(:first, :conditions=>"id = #{foo_id}")
If you forget to include the part ‘:conditions=>’ and write
object = Object.find(:first, "id = #{foo_id}")
rails will return the first row of the table, “id = #{foo_id}” will be lost in the twilight zone and you will go crazy looking for the problem (specially if you are a beginner like me).
I hope this helps to somebody.
Some people say that we are geeks, nerds, freaks and a lot of things more, we wonder why is so difficult to promote the open source and free software. This two sentences are the result of actions done by us.
Yesterday I was reading some web pages (because I am in holiday so I have a little of time) and I linked to a page from a company (I won’t put the name here) which is trying to make money using and promoting open source software (good thing). This company is based in Barcelona and offers hardware with free software, support and all the software’s vanilla flavour used is catalan (the language spoken in Catalonia).
All this is good, great, amazing and a lot of positive words more but, there is one thing which is wrong in all this situation. If you want to make money, if you want to be professional (and you need to seem professional), you can not include in your web page this image

People see this image and thing that you are a group of weirdos in a little room next to Pl. Catalunya trying to do something that other people is already doing.
That’s the reason why I thing that a big part of the success of open source is our responsability and doing this we are not helping it to success (it’s our fault not to do it seriously).
I have to say that all this post is written from RESPECT to what you are doing guys (this don’t want to be an offence).
English is not my mother language (as most of you have noticed reading my posts). The fact is that I have to check some words while I’m writing an entry in my blog, an email or other written documents. At work, where unfortunatelly I have to use HaseXP, I use a translator called babiloo, a GPL Java app which I haven’t found for linux.
Some minutes ago, I was writting a composition for my english classes and I didn’t know how to translate a word to english. Googling a little, I found an entry in a lug website named bulma, which is the mother of my lug (badopi), titled ‘Wordtrans: un Babylon para Linux‘ written in 2001 which showed me this application to translate these words that I don’t know in english.
Old articles have their usefulness too.
UPDATE: This application is available in Debian (stable, testing and unstable), which is the GNU/Linux distro I use at home.
Hi there
Lately I am working on a personal project using and learning Ruby on Rails (a.k.a. RoR). It is a very useful framework known and used worldwide (it is an impressive creation).
I am creating models and mysql tables using migrations now. To create a table RoR helps to the programmer including in it a column named id, an int(11), which is the table’s primary key (something helpful) but including the attribute auto_increment. It is the behaviour that tables have normally but now I need a table with a column named id created as the primary key but without the attribute auto_increment (because it is a table which is a specialization of another one).
This is a cumbersome task because you have to google a lot to find out how (and there are several ways to do it). The easiest way to do it is (IMHO because I’m still a newbie using RoR):
def self.up
create_table :groups, :id=>false do |t|
t.column :id, :integer, :null=>false
t.column :name, :string, :limit=>50, :null=>false
t.column :description, :string, :limit=>150, :null=>false
t.timestamps
end
execute("ALTER TABLE groups ADD PRIMARY KEY(id)")
end
My frustation in this case is that I have to use a SQL sentence ‘ALTER TABLE’ to define the column ‘id’ as the table’s primary key. I wish there was a migration’s sentence to define a column as primary key without using the execute sentence.
If somebody knows a different way to do it using only migration commands, please write a comment.
Hi there
If you want to install Ruby on Rails in a Debian Sid the only thing you have to write is:
gems install rails --include-dependencies
but if you want to install it in a Kubuntu Gutsy you will obtain the following error:
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find rails (> 0) in any repository
it’s necessary remove the parameter –include-dependencies to install it successfully.
UPDATE: Gems’s path has to be added.
PATH=$PATH:/var/lib/gems/1.8/bin
export PATH
A qui li pugui interessar
Avui m’ha tocat anar a passar el dia a Palma de Mallorca per temes de feina (de fet hi vaig sovint i quan el viatge és de més d’un dia aprofito per quedar amb gent com el muzzol, el Paco Ros i el Joan Miquel Torres i altra gent que conec de ’ses illes’).
La qüestió es que al arribar a l’aeroport del Prat he entrat a una de les tendes de ‘tengo de to de to y de to’ i he vist que hi ha havia un número del Linux Magazine versió espanyola (número 36 per ser més exacte amb un article central de portada del kernel de linux, que és allò que li agrada tant de compilar a gent com el woodyst), li he fomut un cop d’ull (boing) i he vist que portava un DVD de doble capa amb la GNU/Debian 4.0 (etch) r2 de 32 i 64 bits (dos en uno).
Cada vegada compro menys revistes de linux i llegeixo més informació de les pàgines que tinc localitzades per internet, però aquest DVD crec que és ideal per tenir a l’estoig de CDs/DVDs que tots portem a la nostra bossa.
Hi there
I have found this article included in meneame about useful pieces of software to include in a pen drive (maybe some of you have already read it ).
It’s a good enumeration to choose what you want to use in your every day tasks to make your life easier with different alternatives (for instance the three browsers to choose). If you know any other piece of software to include in that list you can add it as a comment in this blog (I want to use my 512 MB pen drive to have my own Swiss Army Knife).
The only thing I don’t like about this article is that the guy who wrote it call Freeware to all the pieces of software when there are GPL software (as are DSL or Portable Firefox).
Hi there
This is the happiest post I have written…ever. MY WIFE IS PREGNANT (12 weeks).
Yesterday we went to the gynecologist’s office and saw in the screen the image of our little baby (the word little is as precise as this word can be, he/she measures 5.3 centimetres) with his/her legs, arms, etc. (he/she seemed to be sleeping a little).
We don’t have thought about names but this is one of my options, what do you thing about it (boy->Linux, girl->Debian ;-D)? I am joking of course (don’t ask it to my wife or she will kill me, ok Maqui?)