Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What strikes me is how many sites won't accept a login name, credit card number, phone number, or other field with leading or trailing spaces. This for something where the speed of the code doesn't matter at all. I can't think of any explanation other than incredible laziness or incompetence for not stripping off spaces.

You might not notice this if you use a password manager or browser autofill, but it's a lot of sites, including companies like major airlines for example.

Never mind that -- it's just a miracle when you can enter a credit card number formatted as 4123 4567 8901 2345 rather than squished together.



I have an excellent example of this.

I worked at a small technical training company in early 2001. We had an in house application which was used for scheduling classes. If you entered a trailing space the program would beep 3 times and display a dialog box warning you in capital letters that trailing spaces would corrupt the database. The button to close the dialog box was labeled "I understand and will obey". It probably took the developer more time to create the dialog box than to sanitize all inputs.


You hit the issue in a roundabout way:

The very premise of the article 'how quickly can we remove whitespaces' is rooted in the intellectual foundations of CS. As a culture, we are are obsessive about 'performance'.

This is because back in the day, it's always been important - and even today 'under the hood' it's always important. And of course there are situations in which it's still important (complex algs, limitations of mobile devices).

But in reality - these things are never the issue.

The 'issue' is the pragmatic application of basic algorithms to do a number of basic things elegantly, which together form the foundation of a good user experience.

Yes - the issue of 'no spaces' in card numbers etc. is a clumsy thing, and it's laziness by developers.

Also - things like 'performance' are objectively measurable, you can get cool data for it etc..

A 'bad experience' is sometimes difficult to define.


As a culture, we are are obsessive about 'performance'.

My purely anecdotal impression is quite the opposite. Speed of delivery and convenience for the developer (not the end user) seem to be the norm.

Frameworks, scripting languages, browser-based desktop and web apps: none of these have the characteristics of being small, nimble, lightweight, or performant. They certainly make life easier for the developer. Whether users get a 'good experience' out of the end result is open to debate.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: