Giving hints to the user
Posted by Jorge Bernal August 07, 2007

I just had to share this screenshot. This is what happens when you create a new page in Backpack. The arrow disappears once you do your first edit.
Posted by Jorge Bernal August 07, 2007

I just had to share this screenshot. This is what happens when you create a new page in Backpack. The arrow disappears once you do your first edit.
Posted by Jorge Bernal August 01, 2007
Found while blaming the whole IE team:
Posted by Jorge Bernal July 20, 2007
The last edition of the famous Spanish magazine “El Jueves” has been removed from the streets. All because of this cover (NSFW)
Copy says: If you get pregnant, this will be the nearest thing to work I’ve ever done
(these are caricatures of the prince and princess of Spain). The cartoon refers to the amount now offered by the Government for every birth in Spain.
This is one of the times I feel ashamed to be Spanish. No surprises here, we are a monarchy in the 21th century. In fact this might be the only magazine who has the guts to laugh at the Royal Family.
Posted by Jorge Bernal July 18, 2007
Bizarre. At this moment, google is missing its groups

The home page is returning random 500 errors and individual groups are accessible but empty
Discussions aren’t available right now. We’re sorry. Try again shortly.
Posted by Jorge Bernal July 11, 2007

Do you think proprietary licenses suck? Try reading a typeface’s EULA. From typotheque:
4. You are permitted to make a single back-up copy. The Typotheque Font Software or documentation may not be sublicensed, sold, leased, rented, lent, or given away to another person or entity.
So it seems if you buy a typeface the author wants to have a saying in your backup policy. I’m also wondering why a typeface should be licensed by CPU
Posted by Jorge Bernal July 01, 2007
I’ve wrote about young enterpreneurs before (see: the youngest grocer in America), but this kid is amazing. He speaks with more confidence than most of the people I know, and the idea is quite cool.
Posted by Jorge Bernal June 25, 2007
For what I’ve seen, it seems some of you also have photography as a hobby. Some days ago I found a review for Understanding exposure at Understanding Exposure by Brian Peterson – a Reader Review
Easy to read and straight-forward, Understanding Exposure offers the basics of aperture, lighting and shutter speed, photography’s basic triumvirate, to beginning and intermediate photographers. The book is divided into these three topics, as well defining exposure, special techniques, and a discussion of film vs. digital. This is not a highly technical book and any technical points are well-written and easy to understand.
My question now is if any of you have this book and recommend it. Should I get it or it has nothing I can’t found reading photography blogs and forums?
Posted by Jorge Bernal June 15, 2007
One of the basic advantages of using open source software is having the ability to change its behaviour to suit your needs. That’s awesome, but what happens when it’s a web application like trac? Sure you could change it, but if it’s your company trac you might be the only one wanting fo change a specific behaviour.

One of the things that most annoys me is having to use the mouse to create a ticket. If I fill the fields using only the keyboard (the day I learned to use the Tab key to switch between fields was a major breakthrough in my digital life) and hit Enter to submit the ticket, trac does a preview instead of creating it. I’m not sure if you can override this behaviour using some special attribute, but the button used with Enter is the first one to appear in the HTML. So I had to turn it into this:

I’ve used Greasemonkey for this. Greasemonkey is a Firefox extension which lets you write JavaScript code to modify the pages you visit, so I did a quite simple user script to switch the buttons order in any trac ticket page.
If you find this interesting, download the script:
[switchtracpreview.user.js]
Posted by Jorge Bernal June 14, 2007
From Urban Dictionary’s word of the day:
“Laughing quietly to myself.” A more accurate representation of the human response to funny things seen on the interweb.
When people type lol, rarely are they laughing aloud for the whole world to hear, but merely smiling and laughing quietly to themselves.
Posted by Jorge Bernal June 14, 2007
Let’s say when you have to run a batch process monthly, you can survive with times like 10 minutes. I can imagine a lot of seasoned DBAs right now ROFL about my insignificant 10 minutes. The point here is I was developing this process and some test cases, so my usual trial/error methodology doesn’t scale very well with 10 minute offsets.
So I borrowed an idea from a colleague: why not moving all the database to memory? It’s not so big and I have 2G of ram. But, could I change all tables (~20) to MEMORY in one line or so?
Since this was a Ruby on Rails project, I used the rails console to be able to mix SQL and Ruby. My first try:
conn.tables.each do |t|
conn.execute "ALTER TABLE #{t} ENGINE=MEMORY"
end
First error: foreign keys couldn’t be migrated from InnoDB to MEMORY
Maybe there is a more MySQL-esque way of dropping all the foreign keys on a database but this one worked quite well:
>> res = conn.execute "SELECT TABLE_NAME, CONSTRAINT_NAME
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE K
WHERE table_schema = 'app_development'
AND REFERENCED_TABLE_NAME IS NOT NULL"
>> res.each_hash do |h|
conn.execute "ALTER TABLE #{h['TABLE_NAME']}
DROP FOREIGN KEY #{h['CONSTRAINT_NAME']}"
end
>> conn.tables.each do |t|
conn.execute "ALTER TABLE #{t} ENGINE=MEMORY" rescue nil
end
Still I had some problems with a few tables using BLOBs, but they were not used on the process/tests so I ignored them. That’s what the rescue nil is for.