TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Tom, Dick & Harry

153 pointsby ubasuover 12 years ago

18 comments

dxbydtover 12 years ago
Author here. Story is loosely based on my real life. As in, I was/am the Harry. At bofa, my previous employer, I tried to be a nice quant &#38; find math-y solutions to what turned out to be plain accountancy problems that a simple nested sql query or a stored procedure could have solved.<p>So I quit, and here at my current employer, once again I mess around with monoids, rings &#38; vector spaces, though I'm not really sure how any of this adds to my employer's bottom line:)<p>Matter of fact, my latest pull request (<a href="http://bit.ly/14EXMaA" rel="nofollow">http://bit.ly/14EXMaA</a> ) allows you to do weird shit like<p><pre><code> add("twenty three", "two million three thousand four hundred fifty five") to get "two million three thousand four hundred seventy eight", because add is defined like so - def add(a:String, b:String):String = EnglishInt(EnglishInt(a).asInt+EnglishInt(b).asInt).get</code></pre>
评论 #5180433 未加载
tikhonjover 12 years ago
You'd think a reasonable math person--or any halfway competent programmer--would not throw in a call to math.random in the definition of their monoid! (Or, really, deep inside any normal code at all.) He deserved to be fired just for that :P.<p>Anyhow, if we're playing at parables, chances are Harry took advantage of the job market and his knowledge and went to work for a trading shop or hedge fund, making more money than any developer at the old company (150,000, really?) and not being hated for knowing stuff. And hopefully using a nicer language like Haskell or OCaml.<p>Also, if Dick's a "systems" programmer, chances are his code would actually be written in C, longer than the monoid Scala code and harder to read. It <i>would</i> be fast though.
评论 #5180371 未加载
评论 #5180313 未加载
评论 #5180198 未加载
astanglover 12 years ago
Am I the only one who finds the requirement ambiguous?<p>Oldest guy who has been at the company the longest time? If I got a requirement like that I would first push back for a clarification, i.e., if employee A is older but employee B has been with the company longer, which is more of a candidate for elimination?
attoover 12 years ago
Interestingly, Dick's code is by far the fastest using those implementations. For a sample size of 1,000,000 employees (to highlight the efficiency difference):<p>Tom (sorted version): 1510ms<p>Dick (min-linear version): 113ms<p>Harry (monoid version): 995ms
评论 #5180508 未加载
评论 #5180359 未加载
评论 #5180410 未加载
评论 #5180169 未加载
kernoover 12 years ago
If the point is that Harry solved the problem but failed to consider the politics of the solution, and so was fired, wouldn't it make more impact if he was the only one to declare that the Boss should be fired, instead of all three of them doing so?<p>If that isn't the point, then I don't know what the point is meant to be.
评论 #5179915 未加载
评论 #5179927 未加载
评论 #5179945 未加载
unreal37over 12 years ago
I was hoping this was someone who actually thought that was a good idea, not a dig at math nerds who know what a monoid is.
评论 #5179944 未加载
评论 #5180402 未加载
randallsquaredover 12 years ago
After the title switch, this link is essentially opaque. This has to be automated. No one would carefully consider whether this title was more informative than the preview title and decide it is.
评论 #5181531 未加载
officemonkeyover 12 years ago
&#62;Fire the oldest employee who is not making six figures<p>And, if you're in the U.S. and the employee is over 40 years old, you automatically set yourself up for an age discrimination suit.
评论 #5180355 未加载
mquanderover 12 years ago
The sample code doesn't show up for me, but I don't agree that using foldl is some kind of weird egghead solution. You don't need to know about monoids in the abstract to write that code.
评论 #5180319 未加载
myhfover 12 years ago
It seems like all of the programmers interpret the business decision backwards. Doesn't the company want to eliminate the biggest cost center (greatest salary under $100k), not the smallest cost center (least salary over 35 years old)?
评论 #5180191 未加载
评论 #5180040 未加载
javertover 12 years ago
I feel like the punch line was ruined. Harry should have been the employee whose number was selected.<p>The boss thing is cool, but it just doesn't fit with the suspenseful and ironic narrative that is being set up.
ajrossover 12 years ago
Hm... I read through this twice before it occurred to me that it was sarcasm. Does it say more or less of me that I really wanted there to be some deep truth in there about monoids or foldLeft()?
daenzover 12 years ago
None of the sample code is rendering for me.
yen223over 12 years ago
If it were the company I'm working in, the problem neatly reduces to "Fire the oldest engineer".
tomcoatesover 12 years ago
I'm sorry, this may sound like a stupid thing to say given that I understand absolutely nothing about the maths involved in this joke/parable/whatever-the-fuck-this-is, but seriously, "Fire the oldest employee who is not making six figures?!" I must be missing, something, right? Seriously? Please god someone explain to me how this isn't as unbelievably dickish as it sounds.<p>What sort of terrible, euthanasia-based, Logan's run-like, horrific fascist company are you describing in this bizarre little parable, and how come more of you people aren't looking at this with horror?! Are you so interested in the maths that the fact that the narrative surrounds it is so completely fucked invisible to you?! It's like a bloody survivalist post-apocalyptic zombie horror company. I'm surprised none of you are advocating mulching the thirty-five year old and using him to fertilize the office plants!<p>Why don't we shift it around a bit, Republicans are a bit dumb, right? And they care about money a lot. So if they're not earning 100k, they're definitely shit! Or maybe women? Not many of them are engineers, so clearly if they're earning too little, it's probably because their breasts get in the way of the keyboard.... Oh hang on, no, those things I just said were crazy insane. Like firing a thirty-five year old who doesn't earn very much.<p>There are people in the world who don't want loads of responsility, don't want to rise up a company and still do good work. People who want to spend time with their family and not work twenty-four seven and still do good work. There are people who are valuable holders of institutional knowledge, but are content to be junior engineers or whatever. If they do a good job, who the fuck cares how old they are?! How is that even relevant?!<p>And while we're at it, have you ANY idea how entitled this makes engineers in Silicon Valley sound?! I mean, engineers in the rest of the US don't make half as much money as the ones in the Bay Area. Even in London, a very expensive city, most engineers are not earning the equivalent of $100k within a few years of leaving college.<p>This story and the responses to it WEIRD ME OUT. It sounds like something that young dicks in the banking industry would talk about to make themselves feel really important. "Yah cos like he was only bringing home like three-hundred grand and he was like thirty five, so what a loser, right? Ha Ha. We totally got him fired and laughed at him because he's like totally old and by the time I'm thirty five, I'll be totally different because I'm really amazing and special and important, right??"<p>This whole thing is so depressing. Ive been wondering to myself for a while why it is that such a large proportion of twenty-somethings in tech around SF behaved like such idiots, and this has made me wonder even more. I'm halfway seriously thinking after reading this that all sensible companies should start thinking about how you should always fire any engineer under thirty earning more than 100k because, lets face it, they're fucking precious, self-important, entitled, whiny little unproductive fuckers who can't keep their genitals to themselves, get drunk too often during the week, and who've never had to do an honest days work for a reasonable salary and will remain smug, boorish twats until the day a proper grown up gives them the spanking they so clearly need.
评论 #5180490 未加载
评论 #5180674 未加载
评论 #5180577 未加载
评论 #5180675 未加载
gsgover 12 years ago
Of the three solutions, minBy is the only one likely to handle the empty sequence/database case at all gracefully. Returning a fake "zero" is particularly awful.<p>It probably doesn't matter much since it's a throwaway problem and the database is known not to be empty, but it bugs me.
Kiroover 12 years ago
10,000 employees all making over $85,000? Where do I apply?
jbrichterover 12 years ago
Real math majors find all this weird category-theoretic jargon in programming pretty dumb. Just so you know.
评论 #5180403 未加载