Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
gary_bernhardt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
91.
▲
by
gary_bernhardt
10y ago
There are online conferences, but they're very different from the in-person ones. Here are some properties of in-person conferences that are difficult to replace. * Some talks are long, intricate stories, and you get much more out of t
92.
▲
by
gary_bernhardt
10y ago
Yep, that was my motivation: to hint at deeper connections to programming at large, rather than focusing on technical concerns that are confined to parser implementation and therefore esoteric to an outsider.
93.
▲
by
gary_bernhardt
10y ago
It's not part of the Python grammar as specified in the file called Grammar in the canonical implementation of the language ( https://github.com/python/cpython/blob/master/Grammar/Gramma... ). Of
94.
▲
by
gary_bernhardt
10y ago
I went back and forth on that statement for exactly this reason, but kept it because the whitespace is handled in the lexer, as you mentioned. The Python grammar itself is context-free, and the grammar is the only part that I expect the ser
95.
▲
by
gary_bernhardt
10y ago
Extreme pro-Python statements about "one way to do it" are usually made by relative newcomers who are caught up in their enthusiasm for purity. (This exuberance is natural, and is a big part of the language adoption cycle.) Extrem
96.
▲
by
gary_bernhardt
10y ago
Then keep exactly your preferred high-performance database design, but derive its data from maildir, such that all mail is persisted in maildir first.
97.
▲
by
gary_bernhardt
10y ago
There's nothing stopping a mail client from maintaining arbitrary indexes, caches, etc. in addition to the maildir.
98.
▲
by
gary_bernhardt
10y ago
I will now justify some jokes that I made four years ago. Most of my work that you've praised so highly concerns improving software quality and the experience of programming. Wat is about one of the underlying causes of low software qu
99.
▲
by
gary_bernhardt
10y ago
pain is information
100.
▲
by
gary_bernhardt
11y ago
Yes, that's very common formatting (except for the whitespace immediately inside the square brackets, which violates PEP 8, but that's incidental to the question of line breaks).
101.
▲
by
gary_bernhardt
11y ago
Those are tiny screencasts, some as short as just a few frames, embedded in a Keynote file. I re-recorded some of them several times in my hotel room that afternoon to make sure that there weren't distracting typos. I can't get to
102.
▲
by
gary_bernhardt
11y ago
Thanks. It takes a lot of effort to make live coding that smooth. The initial practice run of a 12-minute screencast was often 30-60 minutes, which would be boring and usually contain less information than the shorter final version. That di
103.
▲
by
gary_bernhardt
11y ago
Huh? Imperative programming is still the dominant programming paradigm, as it's been since the first programmable computers.
104.
▲
by
gary_bernhardt
11y ago
You're talking about implementation now. The text you quoted said "references' introduction into high level languages", not "references' use in the implementation of high level languages". The quote was ab
105.
▲
by
gary_bernhardt
11y ago
Rewind to 2006. Should we implement Python in Python? Of course not; it's not useful! PyPy should not be done! It's literally 50 times slower than CPython! Fortunately, the PyPy folks have stuck with it, and PyPy is now faster tha
106.
▲
by
gary_bernhardt
12y ago
In most languages, a type mismatch would always correspond directly to a type name mismatch. In e.g. Python (since it has a clear module system), if I know that f() returns a datetime.datetime, and I know that g(t) takes a datetime.dateti
107.
▲
by
gary_bernhardt
12y ago
Mutation isn't necessary to demonstrate the problem. Consider three libraries: first, there's a basic, widely-used datetime library. There's also a timezone library depending on datetime 1.0 and a dateformat library depending
108.
▲
by
gary_bernhardt
12y ago
I was responding to your claim that "He does not say it is bad per se." Calling it "shit" seems like "[saying] it is bad".
109.
▲
by
gary_bernhardt
12y ago
DHH quote: "I think the Law of Demeter is shit and never follow it." (from http://signalvnoise.com/posts/3112-how-basecamp-next-got-to-... )
110.
▲
by
gary_bernhardt
12y ago
That sounds vaguely similar to "Functional Core, Imperative Shell". I merge state management and coordination (together, the shell) so that the logic (the core) can be composed of pure functions without coordination overhead. So f
111.
▲
Test Isolation Is About Avoiding Mocks
(destroyallsoftware.com)
78 points
by
gary_bernhardt
12y ago
|
25 comments
112.
▲
by
gary_bernhardt
12y ago
The first paragraph of the Wikipedia article on TDD is a correct definition. Write a minimal test; see it fail; make it pass with a minimal code change; refactor to improve the design, keeping the tests passing. There are things that people
113.
▲
by
gary_bernhardt
12y ago
Yes, I focus on my per-file runtime in the post, and I mention David's suite runtime in one sentence at the beginning. They are not meant to be compared. David's file runtime is four seconds. This is unacceptable to me. This is un
114.
▲
by
gary_bernhardt
12y ago
I didn't say "I have a 50 line example, therefore it works in all cases". Destroy All Software is 2,208 lines of production Ruby code, and most of it is tested in exactly that way. I could've showed you charge_purchase_s
115.
▲
by
gary_bernhardt
12y ago
My main response is that there's no "right" way to do TDD. There is a core definition, which is the red/green/refactor loop. New tests must fail; all tests must be green to refactor. Almost everything else is someon
116.
▲
by
gary_bernhardt
12y ago
I've experienced (and created) exactly those weighty, oppressive test suites. I think that they're probably more a symptom of us collectively learning to test than anything else. Even today, there are very few people who are exper
117.
▲
by
gary_bernhardt
12y ago
TDD is a way of writing tests, not a prescription about when to write them. I explicitly say in the post that I only do TDD 75% of the time for web apps and more like 50% for other code.
118.
▲
by
gary_bernhardt
12y ago
The feedback loop is my response. He positioned isolated unit testing as having drawbacks, but he never mentions (and doesn't seem to have experienced) the value of it. Others have written responses to his claims about design. I think
119.
▲
by
gary_bernhardt
12y ago
Industry standard bodies of knowledge arise from people doing, then talking about what they did, then doing some more, then talking some more. At no point did a God of Electrical Engineering hand down tablets.
120.
▲
by
gary_bernhardt
12y ago
Well, like I say in the post, mocks didn't exist back then, so they couldn't have been mocking in the sense that we are now. I wasn't there, but I believe it's true that in some cases they were doing what we'd now c
More ›