585 karma · joined November 4, 2019
Can someone give a bit more justification for this? It seems like the average rate shouldn't be constant and is heavily dependent on time/date.
If not, is there another justification for why sales mean should equal sales variance?
I wonder if it's better understood now and can cost less R&D time.
The exceptions were "How to Win Friends and Influence People" (rank 8) and "Harry Potter" (rank 9).
I am actually pretty shocked by this. I didn't expect a self-help book (15 million copies sold) to beat harry potter (120 million copies sold, 500 million if you include the entire series, making it the best-selling series in history). I guess people who love the franchise would rather own the book?
Building a transform tool should be a pretty well understood problem. Just take a look at what photoshop's transform tool does and you will see all the possible extensions you might need to support in the future (rotate, skew, distort, perspective, warp, transform origins, a bajillion modifier hotkeys, etc).
Of course don't go ham and support all of them up front. But with those future use cases in mind, it's pretty hard to write yourself into a corner. I would say Dan's refactoring looks fine other than needing more customization for positioning and handle behavior. But it seems easy enough to just add them later.
Link to the question: https://code.google.com/codejam/contest/2437491/dashboard#s=...
The gist of it is: You are given 4*N points on a 2D plane. Can you draw two perpendicular lines to separate them into N points per quadrant?
I think Dan's missing context is that google code jam questions always have a small and large dataset. In this case, small is N=10 which makes a lot of bruteforce solutions possible and not much different from any other bruteforce puzzles common in interviews. Being a geometry question is the more unfair part if this is a generalist role (but not unfair if your role involves graphics, computer vision, self driving car mapping, etc).
Expecting a solution for the large (N=2500) is ridiculous of course. See analysis: https://code.google.com/codejam/contest/2437491/dashboard#s=...
Doctors have suggested it before but since I am borderline I don't really need to be on meds yet. I think it sounds worse than needing to take pain killers occasionally.
They usually just put me on a concoction of various pain killers (e.g., migraine specific stuff like sumatriptan). These prescriptions actually work great. But so did OTC aleve/advil/tylenol too.
The problem was that I didn't really care for more effective pain killers. What I really want is to fix the root cause and stop having these headaches.
So yea, I can totally see why something like this would fail. If the solution is still qualitatively the same, a small percentage improvement is just micro-optimizations that most doctors and patients won't care much for.
So no, browsers don't have these problems solved out of the box. And it seems like what they are implementing will suffer from the exact problem I described here too.
I think you might also be thinking of bad implementations of infinite scroll which isn't what I am talking about. Have you never use something like photos.google.com? Scrubbing/scrolling to an arbitrary point in time is honestly a great user experience. Would you rather wait hours/days for a webpage to load all the past photos images you've ever taken? Or have to deal with pagination and click through hundreds of pages to find what you want?
For a javascript example I ran into recently, say I am firing off a fetch for each image that comes into view in a large gallery. If I suddenly scroll down to the 1000th image, a naive implementation might fire off 1000 fetches for all the images we scrolled past. Then you'll be waiting a long time before the images in your current viewport is loaded.
Backpressure can save you a little bit here. Say you do the semaphore trick mentioned in the article and only allow a max of say 10 fetches in flight at once. Then if you quickly scroll through, all the subsequent fetches after the initial should fail, including the ones at the viewport you stop at. But since the queue is short, when the images in your current viewport retries it should now succeed.
This works but it isn't ideal. Ideally I would be able to just reprioritize the newer fetches to be LIFO instead of FIFO. Or maybe inspect what's currently queued up (and how big the queue is) so I can cancel everything that I don't need.
The backpressure solutions might just be a symptom of async tasks not being controllable in any way once started which is why you're forced to commit to it or not from the start even if that might not be the best point in time to make that decision.
But given the failure (of adoption) of dataflow programming languages I don't think there will really be that much of a jump in understanding just by visualizing stuff as graphs.
For example in clojure, sequences are implemented as 32-ary tries so insert/delete/update to any particular index will only cost around sizeOfNode * numParents=32 * log_32(n). This comes with a cost that indexing is now log_32(n) but it's usually a fair price to pay.
In javascript, immutable.js implement these same ideas (as least according to these talks where they talk about index tries and hash array mapped tries: https://youtu.be/I7IdS-PbEgI?t=456)
If you want native support, javascript engines are actually free to swap out their implementation of arrays! I know they already do depending on whether they think your array is sparse("holey") or not: https://github.com/v8/v8/blob/8.1.81/src/builtins/builtins-a.... I also vaguely recall someone saying that unshift (push to front) is automatically optimized by switching to a deque/circular buffer but I might be remembering wrong. Anyway, they can make these optimizations in a distant future but I don't think do today.
Otherwise it seems more flexible to just fire up a python interpreter and do it in like 3 lines of pandas (or with sqlite and .import like another commenter mentioned)
For example with stuff that are commonly assumed to be bell-curved like test scores, IQ, etc. What are the iid variables being averaged? Each test question?
You can either use battle-tested libraries or you can try to understand and reimplement them to suit your use case. The former is safer but the latter is necessary if you want to truly understand and build skills. That said, yea, not when there are deadlines (expecting guests).
Apparently I am not that great at minesweeper and guess way too often when it's not necessary. This variation kills those bad habits pretty quickly by punishing you 100% of the time for guessing. Along with undo and double checking with the debugger, I've picked up way more patterns/heuristics than in my years of playing.
Coolest thing is that if you're a perfect logician you can always win!
Link to actual game since it's not prominent in article: https://pwmarcz.pl/kaboom/
The idea that you can submit "code of ethics" to duke it out in a simulated environment is pretty fascinating.
Why is this short opportunity window unique? So you realized you missed this window but then the environment was already one where this "5x" demand no longer existed? If that's the case would it have been wise to ramp up that quickly? Maybe you did the right thing.
Is this the right list? https://slideslive.com/neurips#!feed=popular
For example the rule of "if religious, then don't include in product" is usually pretty sane.
But near a decision boundary, you will always get disagreement. A certain portion of programmers would've arrived at the conclusion that isReligious(santa) == False while some will be dead set that the answer must be True. Both side are confident that the other side is making a fatal mistake because they are confident in their logic skills. But the real problem is that binary logic can't handle these sort of high context fuzzy situation at all.