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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

We have an employee whose last name is Null. He kills our employee lookup (2012)

661 点作者 ambuj将近 12 年前

44 条评论

patio11将近 12 年前
A Japanese company once made the decision that they needed &quot;virtual&quot; employees in a particular system, for example to support e.g. adding a job to the org chart before that position had been filled (and another dozen use cases), so they had the clever idea &quot;Hey, if we need to do this, we&#x27;ll just input their &#x27;name in Japanese&#x27; as one of a dozen status flags, like XX_JOB_REQUEST or XX_INCOMING_TRANSFER.&quot;<p>One developer at this company, who was annoyed with having to tweak a particular system every time they added a new possible status flag, wrote code which was, essentially:<p><pre><code> if (InternalStringUtils.isAllLatinCharacters(employee.getJapaneseName()) { &#x2F;* no need to pay this &#x27;employee&#x27; so remove them from batch before we retrieve bank details for salary transfers *&#x2F; ... } </code></pre> Do I have to explain why I&#x27;m aware of this curious implementation choice?
评论 #6144359 未加载
评论 #6141477 未加载
评论 #6141679 未加载
评论 #6142073 未加载
评论 #6145631 未加载
glimcat将近 12 年前
As long as we&#x27;re playing the &quot;Falsehoods Programmers Believe About Names&quot; game again, here&#x27;s the relevant patio11 article:<p><a href="http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/" rel="nofollow">http:&#x2F;&#x2F;www.kalzumeus.com&#x2F;2010&#x2F;06&#x2F;17&#x2F;falsehoods-programmers-b...</a><p>If you try to validate names, or if you don&#x27;t safely escape names along with your other user-input strings, you&#x27;re gonna have a bad time.
评论 #6141500 未加载
评论 #6141218 未加载
评论 #6141338 未加载
评论 #6143687 未加载
jjindev将近 12 年前
Reminds me of a story a police reservist told me. Guy got a license plate caled &quot;none,&quot; and instantly had thousands of outstanding warrants. (The cop thought &quot;none&quot; was trying a fast one, and so deserved it.)
评论 #6141181 未加载
评论 #6140937 未加载
评论 #6140854 未加载
评论 #6140826 未加载
评论 #6144443 未加载
评论 #6141211 未加载
chiph将近 12 年前
We had a customer with the last name &quot;Echo&quot; who couldn&#x27;t make a credit card payment. Turns out that the card processor was looking for strings which were common Unix commands and not allowing them.
评论 #6141730 未加载
评论 #6143600 未加载
skrebbel将近 12 年前
This problem isn&#x27;t about funny employee names. It&#x27;s about thick, untransparent software stacks that make simple problems difficult.<p>SOAP is maybe the most popular example and this is really why it&#x27;s lost popularity against REST. However, similar &quot;It works with values W, X, Y, but not Z&quot; situations are found in any stack or standard that has too much magic going on. Rails certainly comes to mind.<p>This is the biggest argument in favour of using many small, isolated components rather than one big all-encompasing framework, in my opinion. If every piece of third party functionality you import into your project can be easily understood, problems like these shrink in size, because there&#x27;s a limit to how deep the magic can go.<p>I&#x27;m very fond of the Node.js ecosystem for particularly this aspect (even though I dislike the language). There&#x27;s a big bucketload of tiny components there, rather than 90% of the community relying on a single humongous framework, like is common for e.g. Ruby or C#.
评论 #6145281 未加载
xxpor将近 12 年前
&quot;WSDL (SOAP) from AS3 to ColdFusion web service&quot;<p>I know it probably wasn&#x27;t this guy&#x27;s choice, but whooo boy.
评论 #6141669 未加载
评论 #6141668 未加载
评论 #6143305 未加载
1qaz2wsx3edc将近 12 年前
Ah, we call him little bobby tables.<p><a href="http://xkcd.com/327/" rel="nofollow">http:&#x2F;&#x2F;xkcd.com&#x2F;327&#x2F;</a>
评论 #6141030 未加载
评论 #6140825 未加载
评论 #6140903 未加载
solox3将近 12 年前
Numerous bugs on github were attributed to the guy with user name 0. He evaluates to false in many PHP applications, too.
评论 #6140794 未加载
benjamincburns将近 12 年前
Just took a few minutes to look into it. Found a gnarly bug in the AS 3.5 XMLEncoder class[1]. Type coercion strikes again!<p>1: <a href="http://stackoverflow.com/a/18000768/203705" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;18000768&#x2F;203705</a>
评论 #6146826 未加载
manojlds将近 12 年前
A website I was building, which depended on a ColdFusion service, started breaking for Norway users. Why? Norway&#x27;s country code was &quot;NO&quot; - <a href="http://stacktoheap.com/blog/2012/12/19/why-a-feature-of-our-website-stopped-working-for-norway/" rel="nofollow">http:&#x2F;&#x2F;stacktoheap.com&#x2F;blog&#x2F;2012&#x2F;12&#x2F;19&#x2F;why-a-feature-of-our-...</a>
kabdib将近 12 年前
I had an aunt named Nan, I wonder what her disbursement checks were like :-)
评论 #6141315 未加载
评论 #6141015 未加载
ja27将近 12 年前
Vaguely related but we had a customer using some feature that split text blobs using a record separator. One time someone wanted to not split at all and set separator=&quot;none&quot; without bothering to look up how to actually turn off record splitting. It worked well enough in quick tests, but by the time we&#x27;d gotten the support call, they&#x27;d corrupted a massive database where every product with a description containing the string &quot;none&quot; was now corrupted.
hasOwnProperty将近 12 年前
Mr Null is my cousin. He breaks the backend, I break the frontend.
D9u将近 12 年前
I&#x27;ve got a friend whose last name is Null, and he used to have all kinds of issues with the phone company...<p>Obviously if your lookup app is having a problem with using &quot;Null&quot; as a string then you have data type issues.<p>It&#x27;s not rocket science.
dorfsmay将近 12 年前
If my last name were Null, I&#x27;d totally call my son Dave!
评论 #6140868 未加载
评论 #6142184 未加载
评论 #6141326 未加载
wmil将近 12 年前
There was a DailyWTF article years ago about a &quot;Robert Null&quot; who would be shown whenever you searched for employees with a blank input.<p><a href="http://thedailywtf.com/Articles/Paging_Dr_0x2e__Null.aspx" rel="nofollow">http:&#x2F;&#x2F;thedailywtf.com&#x2F;Articles&#x2F;Paging_Dr_0x2e__Null.aspx</a>
joshbaptiste将近 12 年前
<a href="https://news.ycombinator.com/item?id=3900224" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=3900224</a>
NelsonMinar将近 12 年前
SOAP: the gift that keeps on giving. I built two SOAP APIs for Google (Search and AdWords) and spent way, way too much time on this kind of data interop nonsense. I wrote up a quick summary of why SOAP sucks, it&#x27;s still my most popular blog post. <a href="http://www.somebits.com/weblog/tech/bad/whySoapSucks.html" rel="nofollow">http:&#x2F;&#x2F;www.somebits.com&#x2F;weblog&#x2F;tech&#x2F;bad&#x2F;whySoapSucks.html</a><p>XML is a terrible encoding for data. Fortunately JSON does pretty well and has mostly replaced it for new stuff.
shmerl将近 12 年前
Why would null be confused with &quot;null&quot;? It shouldn&#x27;t be a problem.
评论 #6141061 未加载
评论 #6141458 未加载
rumcajz将近 12 年前
Having observed corporate culture for quite a while, the most likely solution seems to be to fire the employee.
IvyMike将近 12 年前
Offer him a substantial bonus to change his name.<p>You could Kickstarter the money with donations from database admins around the world.
评论 #6141461 未加载
pixelcort将近 12 年前
I recently moved to Japan. My name, as it appears on my passport, is 26 characters long and consists of a-z letters and spaces. This means I run into three problems:<p>First, many computer systems here can&#x27;t fit names that long, leading to truncation, or in some cases, denial of account creation (some places have rules that whatever&#x27;s on the account must match exactly what&#x27;s on the passport; one was nice enough to add a new column to their database for the rest of my name).<p>Second, many systems don&#x27;t support a-z, so we throw the name in as katakana or double-byte romaji, depending on what works. Sometimes neither will work, and we just have to give up and go somewhere else.<p>Finally, many computer systems can only link accounts if the names match exactly, for example inter-bank transfers and bill payments. Since my name is truncated differently in different places, and is formatted differently in different systems, in many cases it&#x27;s just impossible.<p>For example, right now I&#x27;m charged a fee for transferring money between two bank accounts, since the free transfers only apply if the names match exactly. I just withdraw cash from one and deposit it into the other as a workaround.<p>Another example is my cell phone bill. To pay it by CC my name must match exactly, but all my cards have slightly different spellings.<p>Don&#x27;t even get me started on my wife, who is ethnically Japanese but came with me as a foreigner and hence has a name written using a-z letters. It literally has set of fraud detection systems.
eshvk将近 12 年前
My last name has a space in it. The three years that I have filed paper taxes, IRS has split up my last name into two words and put one of them as my middle name. This despite the fact that I clearly label the middle name box as &quot;n&#x2F;a&quot;. I was told by the IRS representative that I should change my name.
superflit将近 12 年前
Well Imagine a person has two &#x27;first names&#x27; plus his surname of his mother and by last the surname of his father. Something as<p>XXXX XXXX YYYY ZZZZ<p>The Visa papers does not support &#x27;large&#x27; names.. So he has to abbreviate..<p>Imagine this guy has the same last name and first name of FBI wanted list.<p>Now, after sep - 11 everytime he has to go to the &#x27;vip&#x27; room at border and there is large confusion as visa papers do not &#x27;support&#x27; longer names...<p>This is US...<p>Not complaining but can the Prism people flag work it out ;)
levosmetalo将近 12 年前
I remember having &quot;funny&quot; situations with with AS3 SOAP marshaling and unmarshaling. For example, in same cases it would just fail silently, providing half populated objects without without any errors. In the end, the workaround was to just invoke SOAP methods directly using HTTP and just manually parse XML response. Good old days.
WalterSear将近 12 年前
I have now decided to change my name to Null Undefined.
azurelogic将近 12 年前
I always wondered if this ever happened. Fantastic.
United857将近 12 年前
On a similar note: our company&#x27;s name ( [a•mo•bee] ) has non-ASCII characters. It has exposed bugs in more than one website...
lee_cardona将近 12 年前
Is it just me, or is this possibly the best HN post title ever?!... freakin awesome.
kogir将近 12 年前
I find it sad that the correct answer talking about the nil=true attribute is last.
visarga将近 12 年前
Just use an alternate UTF8 character for one of the letters of the name.
neutronicus将近 12 年前
Oooo. Maybe we&#x27;ll have a postmodern Ellis Island type situation.
pertinhower将近 12 年前
Not even reading the article. Just upvoting for the title alone.
jordhy将近 12 年前
Just change his name to <i>Null</i> and move on with your life.
bougiefever将近 12 年前
Are his initial M. T.?
FrankenPC将近 12 年前
Whatever you do, don&#x27;t move him to the DEV group.
zwischenzug将近 12 年前
There&#x27;s a town in China called Nan...
hcarvalhoalves将近 12 年前
This is better than fiction.
soheil将近 12 年前
I bet his first name is dev.
Zedronar将近 12 年前
Just fire the guy.
dgbsco将近 12 年前
Jerry Droptable.
adrianlmm将近 12 年前
COALESCE(LASTNAME, &#x27;&#x27;), how hard is that?
评论 #6140955 未加载
评论 #6141094 未加载
knodi将近 12 年前
Little Bobby DROP_TABLE
galenward将近 12 年前
We have an engineer whose name is &quot;john; drop table users.&quot; Man does he wreak havoc.
评论 #6141795 未加载