Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
andyg_blog
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
andyg_blog
3y ago
If this article is to be believed, they are storing user passwords in plaintext.
32.
▲
by
andyg_blog
3y ago
Tldr; they lost
33.
▲
by
andyg_blog
3y ago
What a black and white viewpoint to have, I feel bad for you. Should we also execute (on the spot, no less) jaywalkers, children with unlicensed lemonade stands, and people who ask for water cups but then get a fountain drink? Consider a li
34.
▲
by
andyg_blog
3y ago
What's interesting is that this was created by Max Howell, creator of Homebrew who made waves a little while back for getting rejected by Google despite Homebrew's success. He talks about that here: https://www.quora.co
35.
▲
by
andyg_blog
3y ago
Sometimes it takes an existential event in our lives to really drive home what actually matters. On your death bed you won't wish that you spent more time delivering value to a company (even a great one) than spending time nurturing re
36.
▲
by
andyg_blog
3y ago
This comes across as a little racist.
37.
▲
by
andyg_blog
3y ago
It's like a modern cannonball. They say a 20kg "solid sphere" traveling at 4x the speed of sound could disable a tank by exerting forces on bolts that connect the pieces together, but otherwise leaving the tank with the appe
38.
▲
by
andyg_blog
3y ago
https://archive.is/p2Xi7
39.
▲
Chinese researchers claim to be able to disable US tanks with fast-moving ball
(pubs.acs.org)
4 points
by
andyg_blog
3y ago
|
6 comments
40.
▲
by
andyg_blog
3y ago
Really stellar, well-sourced article that comes across as unbiased as possible. I especially enjoyed the almost-throw-away link to "the bitter lesson" near the end, the gist of which is: "Methods that leverage massive compute
41.
▲
by
andyg_blog
3y ago
Regardless of how awesome this may be, I cannot get over how there are 6 (!) Levels of nesting in the code sample. I hope it's simply for the sake of keeping the sample short, but this kind of "Chevron programming" is general
42.
▲
Smart Constructors
(gieseanw.wordpress.com)
1 points
by
andyg_blog
3y ago
|
0 comments
43.
▲
by
andyg_blog
3y ago
The C++ standard measures the time complexity of lower_bound and binary_search by the number of comparisons performed. So yes, it's possible on e.g., a linked list like std::list (by this definition)
44.
▲
by
andyg_blog
3y ago
This is not a valid drop in replacement for lower_bound. Accessing iterators as front[index] is only for random access iterators like vector has. The author may have realized this if they benchmarked on other containers.A forward iterator m
45.
▲
by
andyg_blog
5y ago
Nice article. I'll add "write unit tests" to this. Especially if the system isn't already under test, getting it there will really force you to understand the expected inputs and outputs. As a bonus it becomes trivial to
46.
▲
You need to use sqrt to properly sample points in a circle
(gieseanw.wordpress.com)
2 points
by
andyg_blog
5y ago
|
0 comments
47.
▲
Cracking the code review (Part 3): Be proactive
(gieseanw.wordpress.com)
1 points
by
andyg_blog
6y ago
|
0 comments
48.
▲
Cracking the code review (Part 2): Make them seem small
(gieseanw.wordpress.com)
1 points
by
andyg_blog
6y ago
|
0 comments
49.
▲
Cracking the Code Review
(gieseanw.wordpress.com)
1 points
by
andyg_blog
6y ago
|
0 comments
50.
▲
by
andyg_blog
7y ago
The SRP is a bit fuzzy when it comes to algorithms, though. What counts as "one thing"? Bob Martin covers this in Clean Code. "If a function does only those steps which are one level of abstraction below the stated name of th
51.
▲
by
andyg_blog
7y ago
It's not objects necessarily; they're simply a way to group a set of related functions. It's functions. Separate functions can be separately unit tested. Then you can write an integration test that uses each of those function
52.
▲
by
andyg_blog
7y ago
One reason to break up a function is deep logic nesting. If you consider the Code Coverage metric a valid metric, then it says we'd need 2^N independent tests to validate each possible branch of logic in a function. Breaking that nesti
53.
▲
by
andyg_blog
7y ago
I agree with x=10.0 etc, but not all languages have named arguments :-) This is but one way to simulate them. Note that Fowler was using what appears to be a Java factory. Breaking up the large function into smaller functions is ultimately
54.
▲
by
andyg_blog
7y ago
I'm interested in learning more about your thoughts. Please elaborate?
55.
▲
by
andyg_blog
7y ago
Although the examples are predominantly Python, the approach is useful in any language where functions aren't forced to be in a class.
56.
▲
by
andyg_blog
7y ago
I perform many code reviews a week, and as a result I see very long functions with a lot of nesting more often than I'd like. I'm even guilty of it myself. This post let's me point at all the reasons for using a class rather
57.
▲
Algorithms as objects
(gieseanw.wordpress.com)
2 points
by
andyg_blog
7y ago
|
1 comments