Koke’s

My English alter-ego

NeoOffice gone nuts

Posted by Jorge Bernal March 27, 2007

Yesterday, I read about the release of NeoOffice 2.1. NeoOffice is a port of our beloved OpenOffice.org for MacOSX.

The new version is quite nice. It has a look’n'feel way more consistent with the rest of the OS (it uses native libraries) and it’s like twice faster. But there is somethin quite strange:

NeoOffice gone nuts

I think I may not have the Bitstream Vera Sans typeface. The really bizarre thing is that switching off bold gets me a sans font, but turning it on gets me that gothic font.

AddThis Social Bookmark Button   AddThis Feed Button

[QOTD]: Math

Posted by Jorge Bernal March 26, 2007

…in mathematics you don’t understand things, you just get used to them.

J. von Neumman

AddThis Social Bookmark Button   AddThis Feed Button

Get a random del.icio.us link

Posted by Jorge Bernal March 24, 2007

I use del.icio.us a lot. I have one tag topost to save those things I find on the Internet which I want to write about later, but I have around 100 right now, so I was interested in picking random links from that list.

Bad news you can’t do that neither from the del.icio.us interface nor the API provided, so I took a different approach. I downloaded MySQLicious, a set of PHP scripts to mirror your delicious links into a local MySQL database. Once you edit your connection parameters, it’s quite easy to use:

$ ./mirrorlog.php
Update may be needed. Checking now.

Updated http://members.ebay.com/ws/eBayISAPI.dll?ViewUserPage&userid=*starlightstarbright*
Deleted eacb873e503b1b407c2ec69e541b8838

1 updated.

1 deleted.

You can also put that command into a cron task to update regularly.

Then to get a random link, you can use the following script:

#!/usr/bin/php -q
<?php
// mirror.php MySQLicious implementation
// Mirrors del.icio.us bookmarks.
// v1.01 - 8/6/2006

// MySQL configuration
$MySQL_Host		= "127.0.0.1";
$MySQL_Database	= "delicious";
$MySQL_Table	= "posts";
$MySQL_Username	= "root";
$MySQL_Password	= "";

// import the MySQLicious code
$currentDir = dirname(__FILE__)."/";
require $currentDir."MySQLicious.php";

$dbh = mysql_connect($MySQL_Host , $MySQL_Username, $MySQL_Password)
            or die("Could not connect to database server.");
mysql_select_db($MySQL_Database, $dbh) or die("Could not use database.");
$res = mysql_query("SELECT url,description
  FROM $MySQL_Table
  WHERE tags LIKE '%topost%'
  ORDER BY RAND() LIMIT 1");
$row = mysql_fetch_array($res);
printf("%s\n%s\n", $row["url"], $row["description"]);

?>

or the following command:

$ mysql -e 'SELECT url,description FROM posts WHERE tags
    LIKE "%topost%" ORDER BY RAND() LIMIT 1\G' delicious
*************************** 1. row ***************************
        url: http://www.lifehacker.com/software/podcasts/search-audio-with-pluggd-223280.php
description: Search audio with Pluggd - Lifehacker

AddThis Social Bookmark Button   AddThis Feed Button

L337 advertising

Posted by Jorge Bernal March 24, 2007

l337

Advertising is evolving in strange ways. It took some time to recognize the language (looks like C, but the this suggest OO, so C++ was a candidate), but it runs when compiled as C++.

#include "stdio.h"
#include "string.h"

struct cool {
  char p1, p2, p[5];
  cool(int c) : p2(c++), p1(c) {
    strcpy(p, "v_ga");
    p[1]=p2; p2=p[3]; p[3]=c;
    printf("www.%s.com/feladvany", this);
  }
} leet('n');

int main (int argc, char const* argv[])
{

  return 0;
}

[via: coolz0r]

AddThis Social Bookmark Button   AddThis Feed Button

Serendipity

Posted by Jorge Bernal March 23, 2007

A weird thing just happened to me while waiting for the bus. I was listening to the audiobook from Larry King How to talk to anyone, anytime, anywhere when some man approached me asking for a lighter. I was wearing a long black coat which might be the reason why this man was convinced I was some kind of sarge of the army, or even a higher officer. Maybe he was just crazy.

He starts telling me something I couldn’t hear very well and then spends five minutes telling me in detail some ranks of the Spanish Army, and how each soldier has to approach their superiors when talking. After listening carefully to this bizarre speech, he just leaves and I plug my headphones and hit Play again.

Just a few seconds of audiobook later, Larry is explaining how to approach your boss and colleagues properly, using army ranks as an example, and telling the exact same thing than this anonymous man just have told me. The only different is that the first man sounded like a crazy one while Larry King sounds like an expert.

That was my dose of confusion for today

AddThis Social Bookmark Button   AddThis Feed Button

Goodbye Typo

Posted by Jorge Bernal March 23, 2007

I don’t know if it was typo’s fault, Dreamhost’s fault, or just the weird combination of both, but I can’t take anymore Application error every single time I visit my blog. I wonder how much percent of the time it was actually online.

So I’m back with WordPress.

AddThis Social Bookmark Button   AddThis Feed Button

An engineer is born

Posted by Jorge Bernal March 15, 2007

Does this video ring a bell for you?

The Knack

AddThis Social Bookmark Button   AddThis Feed Button

Boss/employee relationships

Posted by Jorge Bernal March 03, 2007

Nacho writes about a nice article at Note from boss to employees. If you follow through the original article, you can find a comment reversing the meaning of the letter (from employee to boss).

I guess both are true. And I guess there are two conclusions to extract from the letter and the replay:

  1. We are all human. We all make mistakes
  2. Since we all fail, fluent communication is vital for the health of a company (or any other kind of organization)

So I think you can ask an employee some level of empathy if you aren’t offering the same, and viceversa. It’s not so difficult. Remember, just be nice. There’s always a story behind.

Update: via Lifehacker I found an article called A Manager’s Guide to Growing Happy Employees. The key points in this case are:

  1. Manage people first, do your own work second.
  2. Delegate your best work.
  3. Help people get recognized.
  4. Make projects relevant to people, not companies.
  5. Align yourself with your boss.
  6. Work reasonable hours.

And I think the last paragraphs summarize all the previous steps quite well

The best way to think about management is to treat everyone like an unpaid intern.

Each day, your employees ask themselves, “Am I getting enough out of this job to keep doing it?” And each day, you need to give them a reason to say, “Yes.”

AddThis Social Bookmark Button   AddThis Feed Button

Economics for dummies

Posted by Jorge Bernal March 03, 2007

Principles of economics, translated for non-economists. Real fun

AddThis Social Bookmark Button   AddThis Feed Button