3 ms·
He trades like he codes. He deserves prison for his coding ability if nothing else. He introduced more bugs at Netflix than any engineer in history.
by tdhz77 5y ago
He trades like he codes. He deserves prison for his coding ability if nothing else. He introduced more bugs at Netflix than any engineer in history.
- stefan_ 5y agoThe trades beat the market though.
- philosopher1234 5y agoThis guy is well known inside netflix?
- par 5y agoSounds like a PIP is in order, a .... puts on sunglasses... prison initiation plan.
- swyx 5y agoperhaps during those periods he was short $NFLX. did he cause any outages?
- nabakin 5y agoYou can't leave us without context! We must know!
- tdhz77 5y agoOk, context is required here. try { int i = 0; while(true){ someArray[i]; i++; } } catch (IndexOutOfBoundsException ex) { //done }
- kovrik 5y agoHow did this pass code review though?
- fisherjeff 5y agoI mean... That's so bad it's almost good?
- ggrrhh_ta 5y agoThat particular piece of code is too verbose and I believe will not even be particularly more efficient (even for very large arrays); BUT, the idea behind it, i.e., recklessly loop and just catch the exception is the most idiomatic way of both looping over collections and checking if one item exists in Visual Basic. It is, in fact, the most efficient general (works for all kinds of collections) way to check for "item x is in collection C" both in VB and python.
- arc-in-space 5y agoA few simple timings tell me this isn't actually fast in Python for finding an item in a list, compared to a bounded loop, (and, since I was curious, neither is a sentinel approach where you insert the expected item at the end of the given list), I guess CPython just heavily optimizes range-for loops, and maybe this was true in an old version of it. (Yes, list.index exists. I know. Thank you.)
- ggrrhh_ta 5y agoThat is why I put the word "general"; C could be a dict, etc. I know that there are better ways for specific types, but the following code is a snippet that works for fast prototyping and I have found it to be idiomatic in VB for collections (but I do very occasional VB, less than once a year). # pythonic pseudocode def exists(x, C): try: C[x] except: # could be more specific # IndexError, KeyError, etc... return False return True