Sunday, 17 August 2008

How to NOT make a web form

The 2009 trainee's program of the multinational Unilever are open. As I've graduated recently, and heard some people say very good things about employment there, I've decided to apply myself.

With that in mind, I've followed the links on the Unilever page to the register myself. This brought me to an interesting web-based form, apparently designed by Cia de Talentos, an recruitment agency around there: Instead of using standard html selection boxes (ie, select elements), they just got creative and decided to reinvent the well using input elements and some "nice" down arrow images, on which you can click to get a "lovely" popup on which you can select you choice, which then gets dutifully copyed back to the input. Of course, they also set the choice's code on an hidden input element, presumably to easy their parsing later... Oh, and some of them even have the proper code, using select element, commented above them (for easing of legibility, I suppose...)

Now that I've let everyone anxious to see such beautiful art of the web programming, I'll let you see a snippets of the code:

<input type="text" name="Text_CodPais_cand" size="30" value="" onFocus="SetSav('SavRegioes'); SetSav('SavCand'); mudaFoco('Nome_cand',-1)" style="color: #0000FF; background-color: #EEEEEE; font-size: 8pt; font-family: verdana; width: 260px"> <img src="img/SetaCombo.gif" align="absmiddle" onClick="SetSav('SavRegioes');SetSav('SavCand');setCmb('un país', 'CodPais_cand',-1,280,260,0,'Nome_cand',-1)"> <input type="hidden" type="text" name="CodPais_cand" value="31">

I haven't really parsed all of their javascript (it's long, messy...), but it seems to make some "clever" stuff like create the full html of the popup using document.write.

They also seem unable to keep track of your language around the multipage form, so I also had to guess some Spanish stuff to be able to fill it fully (and got wondering in what language I should fill some fields also... settled on keeping everything in Portuguese.

To make this long history short, the main lessons I would take from this on the top of my head:

  • Never ever make a fake select by using input and img. If you think it's the solution to your problem You're doing it wrong. Trust me, You'll look foolish, and some moron (or not) with so much time (or not) will make sure to tell the whole, lazy web on his blog.
  • Keep the language of your web pages consistent.
  • Be careful if you're going to outsource something. Some times people might notice it wasn't you which has done the foolish thing, some times not. Independently, they might chose to do business with you, or might think you aren't worth it if you can't even get a simple webpage done right. Either way it will damage your image if someone does something so messed up in your name.

Just for the record, in this case in particular I've chosen to register myself anyway; as I've got some really good references about Unilever. But I'm worried if this is the competence to be expected from their IT sector (which is also the sector I would work) - even if this wasn't their doing, there should be someone watching the quality of their outsourced work...

Wednesday, 30 July 2008

College Finished ^_^

I've finally graduated from college course recently (something like a month ago, actually). I've made a four year technological graduation course on Data Processing at the São Paulo campus of FATEC, a somewhat renowned public college around there.

The course itself is, as the name (which was recently changed) suggests, a bit outdated. It's purpose is to teach IT with focus on how it's used on the real, work life, and is partially successful at th at, even though an update to more modern technologies (such as better coverage of OOP practices in place of the over-emphasized structured analysis) would be good. As with every graduation course, it shows the tip of the iceberg, and the students need to learn the rest by themselves. No news on the teachers side also: a few very good teachers, some average ones and some really bad ones, besides a few which are so bad that calling them teachers should be a crime.

The strongest point about FATEC, and the reason that its name stay high even though the course itself isn't anything above what I believe to be the average is, in my opinion (and of some others I've talked about it) the students themselves. The high competition on the entrance exams, plus the hard classes of math right at the start of the course, makes sure that only people intelligent enough to handle themselves and learn whatever they need (plus a few flukes, of course) graduate.

Friday, 20 June 2008

Accident at the Barra Funda Metro Station

About two hours ago, there was an accident in São Paulo's Barra Funda Metro Station. I can't say I really know what happened, but it seems that an user (a women apparently) fell on the rails and was run by an incoming metro (or got some body part stuck between the platform and the incoming, most likely moving, train). Either way, by the actions of the metro agents, I would guess the victim has died from the accident (they where trying to make the rescue operations fast, and them clearly got stopped with the hurry, as if there wasn't anything that could be done anymore). Considering that the services where restored fast, without time to any kind of forensics, I would guess the victim's body wasn't too much lacerated; but all this are just speculation as I didn't see (nor wanted to) the accident scene.

I have seen some interesting things about the operations, though:

  • They seem to call this kind of accident of code A
  • All the medical stuff was behind a locked door. It took some time (at least one minute and a half) to one agent get there with the key, while there where already other agents waiting
  • Worst of all, one of security agents hit an user which tried to take a photo (or more specifically, the user's camera). Even if taking a photo in such circumstances might be of debatable taste, this reaction seems completely unacceptable in a free, democratic country which should mean people has press liberties to report whatever happens.
  • No news outlet seems to report this kind of accident; everything seems to be done in order to keep those hidden. This might support some theories I've heard that these are frequent.

Wednesday, 18 June 2008

Hardware failures...

The Bad:

When I got to work today, I've found our server (white box with Debian etch responsible for networking, files, printers, etc) powered off - most likely the UPS' battery didn't survive a power outage during the night. When I turned the server on I was greeted by all those nice lines telling me I had a hard disk problem.

The Ugly:

Instead off marking the disk showing the read errors as bad, the RAID stack (device mapper?) somehow concluded the "good" disk of the RAID 1 array wasn't synched and kicked it out...

The good

The bad sectors did take only some unimportant collectd status files with them. After some poking with dd trying to force the HD to redirect the bad sectors, the read errors vanished and the Reallocated Sector Count didn't increase according to smartctl, which seems like a good signal.