More...

The worst trait of a pessimist is his profound belief of him being a realist.

Posts from: August '09


Wizz Air and regular expressions


Sometimes I wonder - is it just me, or this world is much more complicated and confused than it needs to be?

In short:

1) I'm booking an online ticket through the Wizz Air website. I have an account, so there's no traveler information I need to fill in;
2) The surprise comes in. I'm stuck at one of the pre-filled forms - when I press the "Next" button, a JavaScript window pops up and tells me I've entered an invalid phone number. Strangely enough, their system has had accepted the same phone number the previous time I booked a ticket;
3) After some experimentation, I realize that the system won't accept neither +35988XXXXXXX nor 0035988XXXXXXX (359 is the country-code of Bulgaria, btw). Weird, isn't it? I open the page's source code and search for the error message. So I arrive at the checkPhoneNumber function:

function checkPhoneNumber(num){
var filter = /^([0-9]){10,13}$/;
if (filter.test(num) || num == "")
return true;
else
return false;
}

4) Eureka! The regex says it all - they need a number with 10-13 digits inclusive. The country-code goes bye-bye.

In conclusion, one could to ask himself - will the average Joe, when being frown upon by this automatic System, know about the piles of source code which lay behind the funky web pages? Or that the "System" actually consists of a few screenfulls of simple code, written in an interpreted language? And within this code, it is the checkPhoneNumber function that does it all (ok, this may seem easy, but you could have been an Angolan, and do not know English at all)? And that the phone number is marked as valid if it's 10-13 digits, inclusive? More generally - the whole thing comes from one source after all, so why didn't they put a clarifying text like "(10-13 digits, please)" next to the input box? Even more generally - does it have to be such an elaborate and complex explanation to every simple problem in IT? And finally, why is this world so complex, anyway?


Posted in category Technology -- clock 25 Aug 2009, 01:43, 0 comments


thought

ucbench


So, here it is - I created yet another free benchmark (as if Fract wasn't enough :)). Instead of rendering 3D scenery, this time we crack password-protected RAR archives.

Cutting the bullshit: here it is - http://anrieff.net/ucbench

Since it is advertised as a RAR cracker benchmark, it can actually crack passwords, but the cracker part is quite rudimentary (unrar crack file.rar). I hope to get it finished in two or three months time.

Anyway, happy benchmarking! :)


Posted in category Open source -- clock 21 Aug 2009, 13:43, 0 comments

Language:

bgБългарски
enEnglish


Categories:

Meta
Hardware
Technology
Fun
Open source
Interesting
Hiking/Trips
Stuff
Programming
Music
Images
Photography
All


Archive:

+ 2008 (9)
March '08 (2)
April '08 (2)
May '08 (2)
October '08 (1)
December '08 (2)
+ 2009 (8)
January '09 (2)
March '09 (1)
August '09 (2)
September '09 (1)
November '09 (1)
December '09 (1)
+ 2010 (9)
January '10 (1)
April '10 (2)
June '10 (1)
July '10 (1)
September '10 (1)
November '10 (1)
December '10 (2)
+ 2011 (10)
January '11 (3)
February '11 (1)
August '11 (2)
September '11 (2)
October '11 (2)
+ 2012 (14)
January '12 (3)
March '12 (1)
April '12 (2)
May '12 (3)
August '12 (1)
September '12 (1)
November '12 (1)
December '12 (2)
+ 2013 (1)
March '13 (1)
+ 2014 (3)
September '14 (3)
+ 2015 (5)
January '15 (1)
March '15 (3)
May '15 (1)
+ 2016 (4)
June '16 (1)
July '16 (1)
November '16 (1)
December '16 (1)


Last comments:

30 Mar 2017, 13:59 by antfarmer
26 Dec 2016, 17:52 by Private
19 Dec 2016, 23:01 by ицаци
16 Dec 2016, 19:50 by Антон
8 Dec 2016, 01:23 by anrieff
8 Dec 2016, 01:06 by Николай


Valid XHTML 1.0 Strict

Blogroll:

linkJoel on Software
linkRidiculous Fish
linkXKCD blag