Live data from Hacker News

I built Excel for Uber and they ditched it

basta.substack.com

61–70 of 565 posts

Re: I built Excel for Uber and they ditched it

#61

Earlier quoted context omitted.

Author here. The code was originally written outside of work hours. I offered the code to Box and they didn't want it. If Uber wants a few thousand lines of JavaScript from over half a decade ago that didn't originate with them and that they used for less than a month, they can send me a letter.

... Nothing came of it, but I took the code and shoved it into my back pocket for a rainy day ... You can't really do this. Depends on your employment contract but code you write for an employer is usually copyright to them ... My first reaction was to publish the code on Github ... You can't really do that either.

Cool -- if one of the companies wants to issue a takedown request, they're free to make the case for it.

It's funny there's this idea that a company _might_ be potentially injured over code they do not want or know they had being made open source by its actual author, even though many of those companies will gladly use open-source tooling without ever contributing anything back.

Perhaps more soundly, though, in California – where Uber is headquartered – IP/Copyright for code is a huge legal question that the state and federal Supreme Court has no clear answer to. Sure, you obviously can't secretly clone Uber's entire stack, slap a new company logo on it, and start up as a competitor. But if you, as an author, wrote some code for a company under an IP agreement, then no-longer worked at said company, and then later adapted and expanded upon that code (or even started over, with the knowledge of what you learned from others' work): are you, at the originator, not legally allowed to be inspired by your past work? That's not something you, me, or even the company could decide.

Re: I built Excel for Uber and they ditched it

#62
> He simply couldn’t believe that I’d written a full spreadsheet engine that ran in the browser.

I can't believe it either, and I don't mean this in a good way.

Apache POI lets you run headless Excel. You import and interact with sheets programmatically in Java. We used this in my old workplace for exactly the same reason (functions, cell references, the whole thing), it worked great.

You found the ‘circ’ problem with a bit of luck. What about all of the other hidden little quirks of Excel that you would ultimately run into down the road? Are you really going to build and maintain a full blown Excel clone in JS? Is this really the objective of the frontend team?

It seems to me like a bit of googling and >90% of the work here could have been avoided. As an added bonus it would have been done by the backend team instead.

Re: I built Excel for Uber and they ditched it

#63
> You see, when formulas create a circular reference, Excel will run that computation up to a number of times.

Like almost every spreadsheet before it: Lotus 1-2-3, Borland Quattro Pro, VP Planner ...

Spreadsheets iterating on circ references goes back to the 1980s.

The first spreadsheet application, VisiCalc, didn't track dependencies: it evaluated cells left to right, top to bottom, IIRC.

Microsoft had a product called Multiplan that competed with VisiCalc. Not sure if that did iteration.

I think it used to be a setting in some programs whether circular references are flagged as errors, or iterate. Maybe it's still that way in Excel?

Re: I built Excel for Uber and they ditched it

#64

ironically, I was backend at Uber 2014 - 2018 and used to ask a simple version of implementing an excel formula engine as my go-to coding interview question. Its got a nice mix of data-structures, algorithms, complexity, and implementation. Good candidates can get a reasonably efficient implementation handling cell references in an hour. nice read. made me nostalgic for the wild days of Uber-China hacking.

Amazing! I independently had an extremely similar interview question (because of this work) that also gave me great signal. That's really funny!

Re: I built Excel for Uber and they ditched it

#65
> It’s easy to treat a particularly clever or elegant piece of code as a masterpiece. It might very well be a beautiful trinket! But we engineers are not in the business of beautiful trinkets, we’re in the business of outcomes.

This spoke to me.

However, as anyone that has looked at my code can attest, I tend to also want my code (and its functionality) to be very pretty. I'm generally writing code that I will be maintaining, so it needs to be something that I can look at, in a year, and understand.

I'm currently in the final phases of a project that I will never announce here, and don't plan on taking much credit for, but it really is da schizz. It's that way, because no one is paying for it, and no one will make money from it.

Money both spoils everything, and also makes it all happen.

Re: I built Excel for Uber and they ditched it

#67
post #23

I read this article looking forward to the complex bespoke code to be ripped out and deleted - but the author clearly grew as an engineer in a way I didn’t expect: > Sometimes that’s just how it is. The devops saying “Cattle, not pets” is apt here: code (and by proxy, the products built with that code) is cattle. It does a job for you, and when that job is no longer useful, the code is ready to be retired. If you tre…

> (from the article) - Having Excel in the browser was a useful solution, but the problem wasn’t showing spreadsheets in the browser: the problem was getting a specific UI delivered to the right users quickly.

> (from the above comment) - A good engineer can solve any problem with clever code. A great engineer knows what problems aren’t really problems and probably an XLS download link updated daily would have been fine.

I saw the bullet list further down the substack page and it's still not good enough for this level of requirements gathering. Those questions describe the scenario, but asking them would not have arrived at this simple solution. Checklist thinking is a crutch and just overcomplicates the problem. All the signals here were organizational and social, and not a matter of improving a process.

This should be obvious, but people who are not involved with implementation details can't answer questions about implementation details.

"Just make it like Excel" is a super low quality answer from someone who has a completely different set of objectives. The only way forward would have been to consult with someone closer to the actual users and counter-argue from there. What's missing here is the courage to recognize weak assumptions and deliberately avoid writing any code until enough details are pinned down to get to an agreement from all parties, not just say yes to the person "in charge".

Re: I built Excel for Uber and they ditched it

#68
post #55

Earlier quoted context omitted.

Give the time and labour you're paid for, don't give emotional energy.

Short term yes, but long term, life's too short. Pursue FI, especially if you're a craftsman, so you can work on what brings you joy, without an expiration date. "Cattle, not pets" may be a good way to run a business, but not your life.

Oh on your own projects and personal passions absolutely, I think emotional investment should be high. Not for someone else, though.

Re: I built Excel for Uber and they ditched it

#69
post #62

> He simply couldn’t believe that I’d written a full spreadsheet engine that ran in the browser. I can't believe it either, and I don't mean this in a good way. Apache POI lets you run headless Excel. You import and interact with sheets programmatically in Java. We used this in my old workplace for exactly the same reason (functions, cell references, the whole thing), it worked great. You found the ‘circ’ problem wit…

To be fair, he wrote a spreadsheet engine that could run one particular spreadsheet. Admittedly a complex one, but it was a fixed set of functions that he needed to implement and not and endless tail of things that people expect Excel to do. I think I'd probably have argued more about the UI spec and down some Excel behind the scenes but it is a familiar UI if you've got lots of number inputs all over the place.

I've always enjoyed this article about building a spreadsheet in 100 lines of F#: https://tomasp.net/blog/2018/write-your-own-excel/ The expansion from that to the feature set needed here is manageable.

Re: I built Excel for Uber and they ditched it

#70
post #40

Love the part about circular references. I gotta say though - I'm having a difficult time imagining how complex these fomulas are that reimplementing Excel's formula engine is easier than just porting the formulas into JS.

The good news is that formulajs had a huge number of those functions implemented in JS already. Almost all of the time was spent on the engine, which wasn't a huge amount of code.

The problem with porting the code to JS is that a.) nothing is named, b.) there's no real way to organize the code you've written because you're going from a spatial way of organizing code to imperative script, and c.) the actual design of the spreadsheet wasn't known to any engineers (it was designed by a data scientist, or perhaps an analyst). The work of translating would have meant really understanding what the thing is so that it can be turned into functions and modules. It also would have still required getting Excel function equivalents, since there's not a 1:1 equivalence between Excel and what's available in the JS standard lib.

Post reply on HN