4

更激進的考慮使用者會混淆的問題

 1 week ago
source link: https://blog.gslin.org/archives/2024/04/24/11754/%e6%9b%b4%e6%bf%80%e9%80%b2%e7%9a%84%e8%80%83%e6%85%ae%e4%bd%bf%e7%94%a8%e8%80%85%e6%9c%83%e6%b7%b7%e6%b7%86%e7%9a%84%e5%95%8f%e9%a1%8c/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

更激進的考慮使用者會混淆的問題

前陣子寫的「UUID 的 UX」考慮到了人眼會把 0Oo 以及 1IiLl 看錯的問題,這篇則是更激進的想辦法去避免類似的問題:「Understanding and avoiding visually ambiguous characters in IDs」,對應的討論可以在「Understanding and avoiding visually ambiguous characters in IDs (gajus.com)」這邊看到。

作者有提到,這是用在人類需要寫下或是溝通時,避免錯誤的發生:

Any time that the ID might need to be communicated verbally or written down[.]

這就不只是前面提到的 0Oo1IiLl 問題了,包括看起來有機會誤會的字,像是 2Z 以及 8B 這種也要避開。

如果是大小寫都放進去的話是 53 個字可以用,但如果希望大小寫意思一樣的話就只剩下 22 個字可以用了:

Assuming that you are going with case sensitivity, you have 53 characters to choose from (adjusted for visually ambiguous characters). On the other hand, if you decide to make your IDs case-insensitive, you have only 22 characters to choose from.

他給出了這 22 個字:

[
  "a",
  "b",
  "c",
  "d",
  "e",
  "f",
  "h",
  "i",
  "j",
  "k",
  "m",
  "n",
  "o",
  "p",
  "r",
  "s",
  "t",
  "w",
  "x",
  "y",
  "3",
  "4"
]

後續還提到 rnm,以及 vvw 的相似問題,不過這邊的 generator 就更難搞了...

搞到這樣,乾脆用數字就好?使用者的 UX 也比較好?

Related

UUID 的 UX

在「The UX of UUIDs (unkey.dev)」這邊看到的紋章,原文在「The UX of UUIDs」。 裡面有不少是有幫助的建議,像是第一個建議是把 UUID 裡面的 - 拿掉,這樣對於 copy 比較方便 (畢竟大多數人應該是 copy UUID,不會是念出來?)。 第二個建議是加上 prefix,這點不一定侷限在 UUID,只要是 token 上面都很適合。這個在不少系統上應該都有看過,像是 GitHub 的 token,或是 AWS 的 token 都算是這類。 文章裡面沒有提到,但這個建議也可以幫助你在 CI 上設定 regex,擋下把 secret token 寫進去的行為。 第三個提到用 base58,一方面是減少長度,另外一方面是想要避免 1IiLl 與 0Oo 的問題,這點我覺得還好... 既然都是 copy & paste 了,我覺得拿 base62 (i.e.…

April 12, 2024

In "Computer"

字形的問題

很多字只要夠大都很好看,不論是新細明體,Simsun,或者是其他字形。 WordPress 內建的 Theme 以及其他人所寫的 Theme 是以英文字為主,由於英文字母本來就比較簡單,字小小的其實還蠻容易看清楚,但如果同樣的大小拿到中文字用,就會糊成一團,看起來就很吃力。 舉個例子來說,A List Apart 的 The ALA Primer Part Two: Resources For Beginners (內文是 11.4667px) 與學弟的 XMLHttpRequest (內文是 12.4667px) 這兩篇比起來,雖然學弟那篇字比較大,但還是不夠大,中文字看起來就不太舒服。 再舉個例子,同樣是 K2 Theme,你可以看我的 Blog (16.2667px) 與 ericsk 的 (15.2667px,也是 Simsun) 與 pctao 的 (12px)。你可以感覺看看字體大小所產生的差別。 布丁 曾經在聊天的時候聊到,有次他問他未婚妻覺得網站 (http://hlb.yichi.org/blog/,16px) 如何,他未婚妻只說「字很大,看起來很好」。 PS:我看 ALA 與學弟的網站都會用 Ctrl-+ (in Firefox)…

October 11, 2006

In "Browser"

Social Network Search in Taiwan

事先說明:我是 Pixnet 的技術顧問,在這篇文章裡提到的這項服務與 Pixnet 以及 Pixnet 競爭對手有關。 網址:http://sn.hasname.com/。 前陣子看到「玩WARM人脈搜尋網 竟抓到劈腿男」這篇文章後,我第一個想法是「這個東西也能當研究?」,如果連這種幹壞事的事情都要教授指導才能研究的話... (後面三千字省略) 我在思考了一下整個架構後,似乎沒有技術上的問題,至於 Similiarity (好友相似度) 的部份,在 IRC 上跟 lwhsu 討論過後也已經知道方向在哪裡,就跳下去寫,看看要寫多久。Social Network Search in Taiwan 這個網站就是這樣的產物。 目前只做了無名小站的部份 (先跑一陣子看看),未來希望能再加上其他站台。另外有打算直接開放 API (預定是 JSON 與 SOAP) 以及 feed (應該還是會用 RSS 2.0)。 以下補充一些題外話。 以我個人的習慣,系統當然還是 FreeBSD + Apache (不是 lighttpd) + MySQL + PHP 組成的 (FAMP 架構),整個…

October 21, 2007

In "Blog"

a611ee8db44c8d03a20edf0bf5a71d80?s=49&d=identicon&r=gAuthor Gea-Suan LinPosted on April 24, 2024April 24, 2024Categories Computer, Murmuring, ProgrammingTags character, experience, id, user, ux

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment *

Name *

Email *

Website

Notify me of follow-up comments by email.

Notify me of new posts by email.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More)

Post navigation


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK