TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

"No Dashes Or Spaces" Hall of Shame

72 点作者 vijaydev大约 15 年前

12 条评论

jrockway大约 15 年前
I am not sure that this is a hall of shame for implementors, it is more of a hall of shame for users. The first web app I ever wrote did reporting on NMR machine usage; the users were scientists with advanced degrees and years of teaching (and computing) experience. The way you specified the date range for reports was via two text fields; the start date and the end date. Originally, I used a date parser that would accept pretty much any input. You could say "yesterday" to "today" or "4-2000" to "9-2005", etc. I listed examples in the description text, but I had several users ask me exactly what the date format could be. When I showed them "anything", they were amazed, but claimed it was confusing.<p>I changed the text to read "specify all dates in YYYYMMDD format, no spaces or slashes" and everyone loved it afterwards. I kept the intelligent parsing as an easter egg.
评论 #1203986 未加载
评论 #1204083 未加载
评论 #1203840 未加载
评论 #1203891 未加载
patio11大约 15 年前
Relatedly: telephone numbers. (555) 555-5555 is understood by every American above the age of like six. Why can't your website figure it out? phone_number.gsub!(/[^0-9]/, "") prior to processing, pretty_print_phone_number(phone_number) in the view, and you're freaking done.<p>Relatedly but of less obvious salience to most Americans: if you tell me to write my name in hankaku kana and I write it in zenkaku kana then rather than telling me to rewrite it, call your zenkakuToHankaku function on my input, see if it contains anything other than kana, and if not just coerce the input over. I have been on a crusade to do this at my day job.
评论 #1203675 未加载
评论 #1203853 未加载
pg大约 15 年前
Back in our Viaweb days this was my quick test for whether a competitor was worth taking seriously.
评论 #1203824 未加载
评论 #1203457 未加载
评论 #1204261 未加载
raganwald大约 15 年前
My beef is with credit card fields that won't allow dashes IN THE NAME FIELD (and yes, I am shouting). The irony of a web application that refuses to allow Tim Berners-Lee to use his credit card to make a purchase is mind-boggling.<p><a href="http://weblog.raganwald.com/2007/09/you-suck.html" rel="nofollow">http://weblog.raganwald.com/2007/09/you-suck.html</a>
评论 #1204238 未加载
评论 #1204203 未加载
pwk大约 15 年前
You also don't need to ask for the card type (Visa, MasterCard, etc); it can be automatically determined based on the number.
评论 #1203821 未加载
评论 #1204162 未加载
评论 #1203559 未加载
ajuc大约 15 年前
Also - why do people disallow characters such as ,./:;'"[{]}\|-_=+ in passwords on theirs sites. I can't understand this. I would understand banning non-ascii, but normal ascii characters should be allowed everywhere.<p>Now every site allows different subset ot such characters, so every site forces user to have different password to it, if user wants non-alphanumerics in password.<p>I would like to have 3 passwords - trash password for social sites, etc; better password for e-mail; and good password for important things. It would be managable.<p>Thanks to arbitrary restrictions I have to remember many more passwords. Which is bad for security.
评论 #1203810 未加载
评论 #1203981 未加载
评论 #1203874 未加载
imd大约 15 年前
Who else thought this would be a hall of shame for Unix apps that don't work with files that have spaces in their names?
评论 #1203659 未加载
cliveholloway大约 15 年前
Why just stop at dashes and spaces?<p>s/\D//g
评论 #1204837 未加载
prodigal_erik大约 15 年前
"No spaces or characters", I'll have to remember that next time I make a form that shouldn't be used.<p>I used to have a fifteen-digit number on a visa or mastercard (not amex), which was a little weird, but I was amazed how many vendors couldn't handle it. Aren't there standards for this stuff?
elblanco大约 15 年前
And the truth of it is that it's like a 1 or 2 line data sanitization fix in most languages nowadays to normalize the data value to the expected one.<p>1) strip whitespace off the front and backend. 2) eliminate unexpected characters in the middle of the string like - or spaces.
ilkhd2大约 15 年前
Great page - many of criticized resource are very useful.
benologist大约 15 年前
I'm so glad there was like 100 examples, I wasn't quite certain what the guy was on about till the last few.
评论 #1203548 未加载