Category: General

Chinese stealing my code

This page was part of my last project which I developed in my company: Buff catalog.

And this page was part of the website of our client’s competitor in China, recently published: KranGear catalog.

The funny thing is that their javascript files even include MY comments, in Spanish.

The idea was to use a thermometer as the scroll bar, reflecting the different temperature protection of every product. The original page was developed around December 2006. I spent a couple of weeks tweaking the details, to get the smoothest result. I think it was an innovation, because the design department wanted to make it with Flash, and I showed them that this can be made with just javascript (including the zoom-in effect when you pass over the designs). And now a Chinese competitor copies me… hence I did a good job (even I could have done far better, but we were in a hurry to publish the website).

This reminds me of another UI effect, made with javascript, which I programmed for the Whisher home page (now they have a new website, but my work can be seen, without images, at webarchive’s capture). The idea was some kind of quick movement between slides, and I spent a couple of days creating the correct framework (divs, css, and javascript) to make it alive. Now it’s a quite common effect, that most javascript libraries have (like this example), but in those days it was new stuff.

Curious, because my most innovative work was in this area (javascript), when my position at the company was more server-side focused (php + mysql, mainly).


The big IEEE fault

Somebody sent me a link to an article about Computer Go, appeared in the “IEEE Spectrum” magazine. It’s quite unbelievable that the author (who was involved in the Deep Blue development) wrote this overall article about the subject, mostly focusing the solution in brute-force… “Brute-force computation has eclipsed humans in chess, and it could soon do the same in this ancient Asian game”. He is saying something like… “just wait 10 years”. He shows no idea about the real state-of-art of Computer Go, the new approaches, or the ways to almost avoid brute-force. While he waits for faster hardware, other people research in interesting ways to solve or simplify the problem, in a more real AI focus. Did I tell you he works for Microsoft? ;-)

Even I totally disagree with the article, I thought for a moment about joining IEEE, just to receive this magazine. But when I was in the process of registering, after a silly survey, I suddenly read this:

We see you are using Firefox … Our site is best viewed with Internet Explorer 6.0 on Windows. We recommend you download now.

What? Are you telling me I can’t use Firefox? And you are recommending me an old browser… I can’t take these people seriously. They’ve spent some time developing a browser detector, instead of developing a cross-browser website. I’m not in… I’ll not join.


The cooking company

Imagine a big restaurant, with a lot of cooks. There are some bosses managing all the work: assigning the dishes to the individual cooks. So far, this seems quite correct. But imagine the bosses decide to start a individual plate with 3 cooks, who start to heat the frying pan, and then the bosses decide to remove these 3 chefs, and assign another 2. In the middle of the cooking, for some weird reason, the managers change the orders for creating this dish, modifying some ingredients, and reassigning other cooks to the task. Can you imagine the final result? Well, actually I don’t really know how a big restaurant manages all its tasks, but… you guessed it, I’m thinking about software companies.

It’s curious to read, from a brilliant article by Paul Graham, this idea:

There is a contradiction in the very phrase “software company”. The two words are pulling in opposite directions. Any good programmer in a large organization is going to be at odds with it, because organizations are designed to prevent what programmers strive for.

The software industry doesn’t have yet a good frame or structure for organizing / managing / assigning the projects to programmers. Everybody knows (even some bosses) that the fact is: the more programmers you assign to a project, the less quality you obtain. But most companies prefer considering programmers just as flat resources. “Assign this resource to that project”, they used to say. The problem is that programmers are not resources, like machines. Also programming is somehow an art.

In Spain, the big companies create a lot of job levels, like: junior programmer, senior programmer, junior analyst and senior analyst. The lower level inhabitants are reassigned from time to time to different tasks, messing them up. Even worse, everybody assumes that programming is bad (because the high levels inhabitants don’t program, and everybody wants to climb levels); so imagine that: engineers who have just finished the degree who want to program the least as possible! A really unhealthy industry. In the rest of Europe, things are a bit better, as are in America. But, of course they haven’t found the holy grail.

Some people say the future is pair programming, and others say small groups (3 or 4 persons) is the best option. Also, we can observe another way to manage projects: the methodology (or lack of it) in the open source projects. I’d like to see some analysis from the projects at sourceforge: statistics putting in relation things like number of (key) developers, activity, and… let’s dream, quality (maybe measured using bugs count plus features accomplished plus something). We might find the key to create a software company, or the key to avoid creating them.


A week configuring Ubuntu with 2 screens on an Acer Travelmate laptop

[Disclaimer: This is not a normal post in my usual style. It’s just a technical reference text. I’ve spent the whole week trying to figure out how configure my laptop and an external screen. Eventually, I got it running! So I’d like to share my config here and in some ubuntu forums]

I installed Ubuntu Feisty in my Acer Travelmate 3000 (actually 3004). The first problem I faced was the panoramic resolution of the laptop screen, 1280×800. Ubuntu tried to display 1280×1024 and the aspect ratio was squeezed. Then I looked at internet and found a recipe with 915resolution (something like “915resolution 49 1280 800 24″). Later I tried to tweak the X server configuration file, xorg.conf, to get 2 screens running (the laptop one, and an external flat panel with 1280×1024). I read on Internet several posts about people trying to configure similar hardware, and all the problems they got: nothing running at all, some screen clipping, etc. Actually I had the same problems… but finally I realized where the problem was, and I got it working! Some details as follows:

Restarting gnome and checking log
First at all, you should go to tty1 with Control+Alt+F1 and do all the editing with the root user (in this case, the best option is using “sudo -s”). To restart the gnome, the command is “/etc/init.d/gdm restart”. I ran this several times, with different configurations, and then read carefully the log file (“/var/log/Xorg.0.log”) to try to understand the errors.

915resolution
This program hacks the Bios, showing different resolutions to the X server. The most common recipe seen on Internet is to overwrite mode 49 with 1280×800 and 24 bits (normally editing the /etc/default/915resolution). But this just desconfigure some modes that (in my case) are needed for the second screen!! Don’t blindy follow Internet recipes!! So, you have to choose carefully which is the best option. Look at the original options (with “915resolution -l”), and try to overwrite an unused mode, and look at the results again with “915resolution -l”. Be sure you get all the resolutions that you need. Moreover, verify in the Xorg.0.log that the needed resolutions are operative.
In my case, I’ve chosen mode 45, 1280×800 and 32 bits. This leaves the other resolution that I need (1280×1024) unchanged. So, my /etc/default/915resolution is:

etc/X11/xorg.conf
If you get the previous step working, you just need minor tweak on the X server configuration file. Just add another Device (with Screen 1), another Monitor, and another Screen. Attention: X server considers pipe A (or Screen 0) as the external one, and pipe B (Screen 1) as the built-in screen. That confused me firstly. Another thing you should add is the horizontal and vertical refresh rate for both monitors… it didn’t work if I left it empty. So finally, the interesting part of this file is:

I hope this helps people to enjoy 2 screens!!


Helping your online reading

Recently I was asked about different issues regarding NLP, due to my PhD studies in that field, and I’ve started reading again about this…

Natural Language Processing is a part of the Artificial Intelligence which studies how a computer could understand natural human languages, like English. There are a lot of subjects in NLP, but in my personal case I used syntactic analyzers to detect the parts of the phrases and the relations between them. For example, to discover if a noun is modified with the surrounding words (“the blue car in the parking lot“). This information were used in a Information Retrieval system (which is something like Google or Yahoo search), to help the system to “understand” what the user is asking for. It was an interesting application of syntactic analyzers.

Visual FormattingAnother amazing use for syntactic analyzers is Visual Text Formatting.

I found an interesting article about “Visual-Syntactic Text Formatting” and a commercial website with some examples. Basically the idea is to use the syntactic information (obtained from NLP tools) to format the text in a way that is easier to read. The result seems quite effective. Surprising idea!


Stupid robots generating the Spanish Congress’ website

The thing to speak about this week in Spain is the end of the football league. But I don’t follow it!!

Let’s restart: the thing to speak about this week in Spain, regarding the “web world”, is the new website of the Spanish Congress, www.congreso.es. This new version was worth a bit less than 200 thousand euros. And it’s probably the worst HTML I’ve ever seen… just thousands of lines of tag soup. Just try to see the source code (right click in the page, and “View Source Code”)… even if you don’t know anything about HTML, you can see some really weird things, like a thousand of lines of CSS definitions that are stupid. It’s quite impossible to do it worse!

The truth is that it’s quite clear that some kind of robot has generated all this tag soup. Humans are not in this magnitude of stupidity. Finally, all the government’s websites must follow (by law) standards and usability guidelines: I guess they haven’t any idea of what this really means.

“Welcome to Spain”… What a shame!


Client requirements applied to national flags

A good example of what a client can suggest to change…
National flags with clients’ comments (Flash animation)
Sadly true!

Found via: Information aesthetics


Ubuntu rules

I can claim:
Ubuntu is the OS with the quickest and painless installation that I’ve ever installed in a PC

· I need only some hours to install Ubuntu (with some extra programs).
· I used to need a weekend to install Windows (with the pain of looking for drivers).
· I used to need some weeks to install older Linux versions.

I’m not the kind of geek who installs the OS of his computer offen. I normally install it when it’s really necessary (normally once every 2 or 3 years). But seeing the installation of Ubuntu, I can’t understand how people still think that Linux is complicated…


On keyboard layouts

Typing hardSomebody at the office played a joke on me. This morning I found my keyboard with 2 exchanged keys: the “Y” and the “I”. It was interesting however. I tried to work without putting them back to their original positions, and the result was quite surprising: if I typed without looking at the keyboard, I did it well; but if I looked at it (even for just a second), I started typing incorrectly. And this is quite dangerous if you use VIM and try to “Ynsert”. So finally I’ve moved them to the correct positions.

But are the keys of the keyboard in the best positions? Of course not.

The current keyboard layout is inherited from the mechanical typewriters, where they configured the key positions trying to avoid hits between the arms of every character. Speaking about keyboard layouts, the Wikipedia has some information about them which is worth a visit. Specially I suggest reading about Dvorak Simplified Keyboard, which is an optimized one for speed and ergonomy (reducing fatigue). And don’t miss the one-hand versions!!


Experience

“Good judgement comes from experience.
Experience comes from bad judgement.”

A couple of years ago I was working on an (NLP aided) Information Retrieval system, for my PhD. It was somehow a prototype, with lots of wild modules merged. Now if I try to look back, I can see lots of mistakes in that system.

Yesterday I met up with Yenory, a PhD colleage who still works on developing that system. Better said, now she works on a quite better version, rewritten in C++ with STL. The old system is now called “Franky” (short for Frankenstein), how funny!

When we started 4 years ago, we had no idea of what path was the correct one. Now she is on the good path, thanks to the experience of making mistakes. But I warned her: maybe the current system will become another Franky in the future :-P Life’s law!