Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
davidtgoldblatt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
61.
▲
by
davidtgoldblatt
14y ago
It's a testament to the speed at which technology moves that, despite being not very much older than the author (he's 16, I'm 23), I feel separated by a significant age gap. I'm still often shocked that Youtube can afford all the bandwidth
62.
▲
by
davidtgoldblatt
14y ago
This is really neither here nor there, but I never understood why factorial is always used as an example of a naturally recursive function, as opposed to, say, sum. It's not as though "product of the numbers from 1 to n" and "sum of the num
63.
▲
by
davidtgoldblatt
14y ago
Something I find amusing is that the ability the author demonstrates here, to notice that a task is repetitive and has a programmatic solution, is itself a skill that has to be learned, and one that's different than programming. Once, when
64.
▲
by
davidtgoldblatt
15y ago
It's relatively well-documented that sleep deprivation has effects similar to those of alcohol intoxication, but coming in to work drunk is a firing offense, while working to the point of sleep deprivation is regarded as heroic. Of course,
65.
▲
by
davidtgoldblatt
15y ago
Rvalue references allow you to "steal" the resources from an object when it's safe to do so. One use for this is to optimize functions returning large complicated data structures, but that's just because memory is a particular type of resou
66.
▲
by
davidtgoldblatt
15y ago
There's the following algorithms class CS 261 (upper-level undergraduate/masters) and CS 361b (mostly aimed at phd students, though undergraduates take it). 161 covers all the material you would expect to see in an undergrad algorithms clas
67.
▲
by
davidtgoldblatt
15y ago
The reason for this is that the parts of "Stanford" (an organization comprising tens of thousands of people) involved in each push are basically unrelated. The paid-certificate program is run by the Stanford Center for Professional Developm
68.
▲
by
davidtgoldblatt
15y ago
My impressions: CS 221 (AI) is taken mostly by sophomores and juniors who are interested in AI, but come from all areas within CS. CS 229 (ML) is taken mostly by juniors and seniors who are on the AI track. CS 229 has a reputation for being
69.
▲
by
davidtgoldblatt
15y ago
On the contrary, for almost all types of common array code the compiler is really good at optimizing away the bounds checks (see http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.86.96... ). Things only get tricky when you have, for
70.
▲
by
davidtgoldblatt
15y ago
In fact, since the fibonacci sequence grows as O(phi^n), we need O(n) digits to hold the n'th fibonacci number, so the fastest possible algorithm to compute the n'th fibonacci number must run in time Omega(n).
71.
▲
Embrace WTF
(blog.regehr.org)
1 points
by
davidtgoldblatt
15y ago
|
0 comments
72.
▲
by
davidtgoldblatt
15y ago
For these types of problems you usually assume that every element is unique. The fix is just making two passes through the array instead of one, so it's still O(n). It's typically easy to reduce solving such a problem with duplicates allowe
73.
▲
by
davidtgoldblatt
15y ago
If you don't mind sharing your email I can send you a solution sketch. I don't want to post one online since homework problems tend to get reused from year to year.
74.
▲
by
davidtgoldblatt
15y ago
I suspect your parent poster is being facetious (if we fix k, then just keep a buffer of the k largest elements we've seen so far. For any new element we see, check if it's larger than the smallest element in the buffer and if so remove the
75.
▲
by
davidtgoldblatt
15y ago
Also worth reading: the paper that found bugs in the proven-correct compiler: http://www.cs.utah.edu/~regehr/papers/pldi11-preprint.pdf (okay, so only a portion of the compiler is proven correct, and they didn't find any bugs in that port
76.
▲
by
davidtgoldblatt
15y ago
In a confusing bit of ISO trivia, std::list implementations can do either - the standards draw a distinction between "should" and "shall". If an implementation "shall" do something, it's a requirement, and if it "should" do something, it's
77.
▲
by
davidtgoldblatt
15y ago
Most of the optimizations that got them big wins in C++ (using hash maps instead of tree-based maps, dynamic arrays instead of linked lists, .empty() rather than .size() > 0 on a linked list) are "library knowledge" issues more than mem
78.
▲
by
davidtgoldblatt
15y ago
An interpreter isn't a fair comparison though - in assembly you can use a few tricks like threaded code ( http://en.wikipedia.org/wiki/Threaded_code ) to get a big speed boost, but these techniques aren't really broadly applicable to progra
79.
▲
by
davidtgoldblatt
15y ago
I'm a little bit confused - it seems obvious to me that Uber is running an unlicensed dispatch service. What's their argument here? http://search.municode.com/html/14143/level2/DIVII_ART1100RE...
80.
▲
by
davidtgoldblatt
15y ago
My reasons for being a vim user a lot more practical than those I see on these "top 10 reasons for trying X": - In the long run, it's faster to learn and use an "efficiency" editor, so I need to learn one of vim, emacs, notepad++, etc. The
81.
▲
by
davidtgoldblatt
15y ago
What I don't like about this sort of advice is that it's almost completely non-actionable. "Don’t just sit and stare at it: think hard; until you’re exhausted; then come back the next day and try again" is the piece of advice to the stuck s
82.
▲
by
davidtgoldblatt
15y ago
I haven't used them personally, but my understanding is that BDD's are increasingly used for formal hardware verification.
83.
▲
by
davidtgoldblatt
15y ago
I take issue with this: "Line up elements in groups of five (this number 5 is not important, it could be e.g. 7 without changing the algorithm much)." The correct statement is that you can replace 5 with any larger number and the algorith
84.
▲
by
davidtgoldblatt
16y ago
The paper addresses this. To summarize - The judges don't know the order of upcoming cases, but do pick when they're going to get food breaks. When they take these breaks shows considerable variation. - Scheduling usually happens based on t
85.
▲
by
davidtgoldblatt
16y ago
http://static.arstechnica.com/2011/03/08/teddy_bear_ruling.p... The tapes ultimately came to light because of discovery requests for relevant evidence. I couldn't quickly find any relevant information about discovery rules in Nebraska cou
86.
▲
by
davidtgoldblatt
16y ago
Here are the reasons I was disappointed in Watson's showing (despite handily beating the human competitors). The most obvious was that Watson' auto-clicker was a big advantage over human thumbs, so that Watson got 100% of the points for clu