Well, here they are, 4 reasons why Facebook’s “Hacker Cup” sucks (big time):

1. You are not warned that a countdown will start after you download the input file and you will not be able to send a solution after the countdown ends. Of course if you read the FAQ very carefuly, it is there, but who the hell reads the rules? A big red warning or confirmation message should be displayed, talking about user friendly guys! Of course, a warning is posted on the wall one hour after the contest started, but I downloaded the input file in the first few minutes of the contest.

2. Of course, I am a bastard using the Chrome browser (you know, from Google guys), but there is a problem when downloading the input file, so I almost missed the second problem too. This time, there is nothing in the rules/FAQ about what browser to use for participating in the contest. Of course, a message posted on the wall after the contest started, warns about this kind of problems. Again, who the hell reads the wall before having problems? No user-friendly here neither.

3. I learned my lesson from 1, so I first created the program, tested it with some data and just then downloaded the input file. Uploaded the solution in like 10 seconds and a nice message saying something about “the solution being evaluated at the end of the round and that I can upload more solutions, bla bla…” was displayed in a pop-up. Then the pop-up is closed and the interface is exactly the same, the countdown is counting down, no message that I have uploaded a solution or something, nothing… Well, I said to myself, the counter probably has to finish before the solution being considered, so I’ve waited… Finally the time has expired, but omg, the solution was not recorded anywhere, the displayed message is the same as on the 1st problem (“time expired”), I have no checkmark in the scoreboard for the sent solution, NOTHING. WTF?

4. If you carefuly read the FAQ (like a good guy that doesn’t want to end up like 1.), you will see that you also have to upload the source code, so last night, for some time, I tried to figure out how the hell should I do this? There is no file-upload section/link/whatever on the problem’s page. WTF again? Well, of course there is a tiny post on the wall stating that for this round ONLY SOLUTIONS are to be sent, no code. I already hate you guys!

I have one more solution to send (and qualify in the next round), but I’ll keep it until the very last hours of the
round, hoping that the issues with submitting will be solved, so I don’t miss my last chance.

Good luck guys! Shame FB !

Update: Today (10th Jan 2011), two days after competition started, FB decided to lift the time limit for sending a solution. They also recognized some over issues and apologized in a notice posted on the contest’s page.

Update #2 (11th January 2011): Two hours ago, I received an e-mail from FB, the subject was “Hacker Cup Results” saying that “You passed the following problems: Double Squares, Peg Game, Studious Student” so I qualified to the next round. Great, I said, but I had to learn the hard way that with FB, nothing is for sure :) Just a few minutes ago, I just received another e-mail, with the subject “Hacker Cup Results – Corrected“, stating that “You passed the following problems: Double Squares”. WTF ??? I saw users that posted on the contest’s page saying that they received 3 emails ! 2 saying that they passed and 1 saying that they failed ! OMG, I just can’t wait and see how this day’s events unfolds :)  This is just like a thriller movie (and even a good one) in which you never know what actually happened until the very end. I’m going to get my popcorn…

MRU Tab navigation is one of the most requested features for Google Chrome. Unfortunately the developers marked this request as “wont fix” and IMHO this missing feature is keeping many of the potentially Chrome users away from this good browser.

What is MRU Tab navigation ?

MRU is an acronym for “Most Recently Used” and it basically describes the order in which something happens (in our case, it basically says that when pressing CTRL+TAB, Chrome should switch tabs not in the creation order, but in the order I viewed them – actually reverse order ). Let’s see a small example:
- I open 3 tabs, in this order: Tab 1, Tab 2, Tab 3
- in current Chrome implementation, pressing CTRL+TAB will cycle through tabs in this order: 1, 2, 3, 1, 2, 3, 1, ….
- the usability problem comes if for example, I want to copy some parts of text from Tab 2 to Tab 3, so I have to cycle between Tab 2 and Tab 3, without having to go through over tabs (Tab 1 in our case). In FF if I am viewing Tab 2 and then switch to Tab 3 and then press CTR + TAB, the browser switches to Tab 2, which is my last viewed Tab (Most Recently Used – MRU)

Fixing the issue

Since Chromium developers are not planning to fix this issue, at least not in the near future, we have to find a workaround for this and make Chromium somehow a little more usable by those used with MRU tab navigation. Since version 3 (I think) Chrome comes with extensions support enabled by default. An extension is a little program (add-on, plugin) that enhances the browser by adding, modifying or even removing certain behaviors, features, etc.

In October 2009 I have created such an extension that replaced the Chrome’s default tab navigation with MRU navigation. It worked by injecting a small JavasScript snippet in HTML pages that intercepted the CTRL+TAB key combination and called a custom handler. Unfortunately I had a big surprise when Chromium developers decided to remove support for intercepting key combinations already used by the browser (like CTRL + TAB) in the next dev version. I left the extension untouched while waiting for the Chromium developers to implement another widely requested feature (this time by extension developers) which is the possibility to define custom global key events for extensions. Since the time passed by and I saw that in the last couple of weeks there were many posts in the dedicated item opened in Chromium issues tracking system, I thought I should give some alternative to CTRL +TAB, without actually using CTRL+TAB. The answer came from one of the posts that was referencing an extension that was reordering tabs and used another key combination. I know, I know this should have been the first solution that should have been coming into my mind, but it wasn’t :) Anyway, I changed the key combination to CTRL+` since the ` key is very close to TAB and I think the migration should be easy.

Extension

Name: Chrome MRU tab navigation
Version: 0.1.5
Install: click here
Usage: press CTRL+` instead of CTRL+TAB to switch between tabs. CTRL+TAB still works but in default behavior.
Tested on: Chrome 4.0.249.78 and 5.0.307.1 (drop me a line if you tested it in other version and it works)
Known issues:
- since the extension is relying on injecting JavaScript into pages, it works only on tabs that contain HTML pages. This will be fixed when Chromium developers will decide to add global hot keys handling;
- it seems like the keyCode generated for the ` key is different across keyboard layouts  and hardware. I managed to find a second keyCode (thanks Tom), but there may be others, so if you install the extension, but nothing happens when you press CTRL+` and want to help me fix the problem, just leave me a message at hpuiu {a.t.} xentra {d.o.t.} ro since v 0.1.5 you can now set any key combination you want via plugin options page, so this is no longer an issue;
- I found out that the extension doesn’t work in GMail (v0.1.3), I’ll look into it This issue was fixed in 0.1.4 .

Changelog

v 0.1.5
- added options page to allow user to select a custom shortcut for tab switching

v 0.1.4
- fixed a bug that prevented tab navigation in pages containing one or more frames/iframes when they had focus (like GMail)

v 0.1.3
- fixed a bug that prevented tab navigation for some keyboard layouts (like uk)

v 0.1.2
- changed hotkey to CTRL+` since CTRL-TAB is no longer accessible for extensions (at least for now)

v 0.1.1
- fixed a bug that was causing incorrect tab switching after last tab in the list
- added update support
- fixed some ‘undefined’ checks

Hope you enjoy it and if you feel like something can be changed to make it better, just leave a comment.

Denumire aplicatie: Extensie Mozilla Firefox – Trafic.ro Infobar

Descrierea aplicatiei:
Vazusem mai zilele trecute pe Twitter , ca reactie la extensia pentru Google Chrome – Trafic.ro Infobar, ca ar fi fost bine ca acea extensie sa fie facuta pentru Mozilla Firefox. Am facut ceva research si m-am gandit ca nu ar trebui sa fie mare lucru sa o portez. Mare greseala ! De doua ori am fost pe cale sa abandonez proiectul, dar in cele din urma am reusit. O sa scriu, probabil zilele urmatoare, despre experienta avuta si o comparatie Chrome vs. Firefox din punctul de vedere al unui dezvoltator, ce e drept incepator, de extensii pentru browsere. Extensia este aproape identica cu versiunea pentru Chrome, existand totusi unele mici particularitati (dar foarte mici :) ) caracteristice extensiilor Firefox.

Observatii:

Nu stiu daca mai era nevoie sa spun, dar totusi Mozilla Firefox poate fi descarcat de la adresa urmatoare

http://www.mozilla.com/en-US/firefox/firefox.html

Adresa de la care se poate descarca extensia este ( v 0.1.1 ):

http://xentra.ro/chrome-extensions/traficro/traficro.xpi

Extensia se instaleaza ca orice extensie Firefox, nimic particular (poate o sa apuc zilele urmatoare sa fac si un filmulet cu instructiuni de instalare si prezentare). Dupa ce ati instalat extensia, aveti trei moduri de a activa Trafic.ro Infobar:

  1. Din meniul Tools al browser-ului (daca aveti interfata in limba romana, probabil ca meniul se va numi “Unelte”);
  2. click-dreapta pe orice pagina vizitata, in meniul ce va aparea veti avea si optiunea de a afisa Infobar-ul;
  3. dati click-dreapta pe toolbar-ul cu iconite (acolo unde este si iconita de Back, Refresh, etc), apoi alegeti “Customize…” (imi pare rau, dar nu stiu cum se numeste in interfata in limba romana). Va aparea o fereastra cu multe iconite/programe pe care le puteti adauga la acea bara. In acea lista veti gasi si iconita Trafic.ro Infobar (o veti recunoaste usor, pentru ca este chiar iconita site-ului www.trafic.ro ). Trageti acea iconita, cu mouse-ul, din fereastra si puneti-o in bara de iconite (poate chiar langa adress-bar, locul unde scrieti numele site-ului pe care doriti sa-l accesati). Gata, de acum puteti activa Infobar-ul dand click pe acea iconita.

Eu am testat extensia doar pe Firefox 3.5.4 pe Windows 7, dar ar trebui sa mearga fara probleme in orice Firefox mai nou de 2.0 (inclusiv). Daca reusiti sa o testati, lasati si voi un comentariu ca sa actualizez articolul.

Probleme cunoscute:

  • extensia nu isi face update automat (probabil ca o sa fac un cont pe AMO si o voi urca acolo, astfel incat update-urile se vor face automat. Ar mai fi o varianta, dar e mai nesigura, asa ca o prefer pe aceasta;
  • am gasit un mic bug din cauza caruia daca se gaseste doar un link similar, acesta nu este afisat, ramanand in loc doar mesajul de incarcare. E ceva foarte simplu de rezolvat si cu siguranta va fi indreptat in urmatoarea versiune;
  • avand in vedere ca nu am mai folosit jQuery ca la extensia pentru Chrome, ci am rescris o mare parte din cod de la zero, nu mai exita fade-in/fade-out la activarea/dezactivarea Infobar-ului, dar presupun ca nu este asa de grav si oricum probabil ca va fi rezolvata si aceasta problema in una din versiunile urmatoare;

Astept comentariile voastre fie ele pozitive sau negative.

Daca va place si credeti ca merita, dati un vot in concursul trafic.ro API. Multumesc !

Updates

v 0.1.1 :

  • am dezactivat extensia pentru GMail deoarece interfera cu e-mail-urile trimise. Voi incerca sa gasesc exact cauza, dar pana atunci am facut un quickfix (multumiri lui Cristian Ditoiu pentru bug-ul raportat si detaliile trimise);

PuYa.

Denumire aplicatie: Extensie Google Chrome – Trafic.ro Infobar

Descrierea aplicatiei:
Dupa cum spune si numele, aplicatia este de fapt o extensie pentru Google Chrome. Aceasta monitorizeaza paginile pe care utilizatorul navigheaza si daca observa ca pagina/site-ul curent este inscris pe trafic.ro, afiseaza o iconita trafic.ro in partea dreapta a address bar-ului. Daca utilizatorul da click pe aceasta iconita, peste site apare o mica interfata ce afiseaza:

  • sumar statistici site vizitat
  • link-uri catre alte site-uri din aceeasi categorie ca si cel vizitat (sunt afisate primele 10 site-uri din acea categorie, mai putin site-ul curent, daca acesta se afla in top 10). Pe langa link-ul catre site se afiseaza descrierea site-ului (on over pe link), dar si pozitia curenta atat in categorie cat si in topul general.
  • link-uri similare – de fapt aplicatia ia cel mai cautat cuvant ce a dus la site-ul curent, executa o cautare pe site-ul trafic.ro si afiseaza rezultatele cautarii, in mod similar cu link-urile de la categorii.

Observatii:
M-am gandit sa fac o astfel de extensie deoarece am incercat sa gasesc care ar fi utilitatea pentru un utilizator de rand a unei aplicatii pentru trafic. ro. E adevarat ca pe noi, cei mai tehnici, ne incanta sa vedem cifre, evolutii, grafice, etc., dar pentru utilizatorul de rand acestea nu au o foarte mare importanta. In schimb sunt sigur ca pe acestia i-ar interesa sa foloseasca aceasta extensie pentru a gasi si alte site-uri similare cu cel pe care il viziteaza. De ex. daca sunt pe pcgarage.ro si caut sa cumpar o placa video, dar nu o gasesc, pot deschide infobar-ul trafic.ro si la site-uri din aceeasi categorie, mai am cel putin inca 5-6 locuri in care pot cauta produsul ce ma intereseaza, exemplele pot continua, nu doar in domeniul comercial.

Avand in vedere ca Google Chrome este in plina dezvoltare si in versiunile anterioare suportul pentru extensii este ca si inexistent, extensia functioneaza doar in Chrome 4.x.y ce poate fi descarcat de aici:

http://www.google.com/chrome/eula.html?extra=devchannel

Adresa de la care se poate descarca extensia este :

http://xentra.ro/chrome-extensions/traficro/traficro.crx

Extensia a fost testata doar pe sistemul de operare Windows, daca o puteti testa pe Linux sau aveti informatii ca ar merge, tineti-ma la curent…

Pentru a vedea cum se instaleaza (dureaza 10 secunde) sau daca doriti sa vedeti cum functioneaza fara sa trebuiasca sa o instalati, am facut un mic filmulet de prezentare:

Cuvant de incheiere:
Binenteles ca extensia poate fi imbunatatia in multe privinte, mai exista unele bug-uri atat in Chrome cat si in API-ul trafic.ro (patesc de ex. pentru aceleasi cereri primesc ba raspunsul corect, ba eroare 102 – site inactiv/inexistent), dar presupun ca ideea concursului este aceea de a prezenta concepte pe baza carora sa se poata dezvolta ulterior si nu produse finale, gata de pus in cutie :)

Daca aveti intrebari sau sugestii referitoare la modul in care aceasta extensie ar putea fi imbunatatita, va stau la dispozitie cu cea mai mare placere, comentati !

Daca va place si credeti ca merita, dati un vot in concursul trafic.ro API. Multumesc ! :)

PuYa.

Later edit: As dori sa multumesc tuturor celor care au votat pentru aceasta aplicatie in concursul API trafic.ro, sa stiti ca de multe ori aprecierile celorlalti fac mai mult decat va inchipuiti. Va multumesc inca o data.