日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

Don’t Be Cute with Your Test Data

發(fā)布時(shí)間:2024/1/18 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Don’t Be Cute with Your Test Data 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

Don’t Be Cute with Your Test Data

Rod Begbie

It was getting late. I was throwing in some placeholder data to test the page layout I’d been working on.
I appropriated the members of The Clash for the names of users. Company names? Song titles by the Sex Pistols would do. Now I needed some stock ticker symbols—just some four-letter words in capital letters.
I used those four-letter words.
It seemed harmless. Just something to amuse myself, and maybe the other
developers the next day before I wired up the real data source.
The following morning, a project manager took some screenshots for a presentation.
PROGRAMMiNG HiSTORY is littered with these kinds of war stories. Things that developers and designers did “that no one else would see,” which unexpectedly became visible.
The leak type can vary but, when it happens, it can be deadly to the person, team, or company responsible. Examples include:
? During a status meeting, a client clicks on a button that is as yet unimple- mented. He is told, “Don’t click that again, you moron.”
? A programmer maintaining a legacy system has been told to add an error dialog, and decides to use the output of existing behind-the-scenes log- ging to power it. Users are suddenly faced with messages such as “Holy database commit failure, Batman!” when something breaks.
? Someone mixes up the test and live administration interfaces, and does some “funny” data entry. Customers spot a $1M “Bill Gates–shaped personal massager” on sale in your online store.
50 97 Things Every Programmer Should Know

To appropriate the old saying that “a lie can travel halfway around the world while the truth is putting on its shoes,” in this day and age, a screw-up can be Dugg, Twittered, and Flibflarbed before anyone in the developer’s time zone is awake to do anything about it.
Even your source code isn’t necessarily free of scrutiny. In 2004, when a tarball of the Windows 2000 source code made its way onto file-sharing networks, some folks merrily grepped through it for profanity, insults, and other funny content.* (The comment // TERRIBLE HORRIBLE NO GOOD VERY BAD HACK has, I will admit, become appropriated by me from time to time since!)
In summary, when writing any text in your code—whether comments, log- ging, dialogs, or test data—always ask yourself how it will look if it becomes public. It will save some red faces all around.

總結(jié)

以上是生活随笔為你收集整理的Don’t Be Cute with Your Test Data的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。