Earlier quoted context omitted.
You should learn Haskell, that's what I'm doing now, in order to learn functional programming from the ground up. Languages like JS which have FP concepts aren't really functional programming fully.
i don't care about idealistic concepts
Ask HN: Concepts that clicked only years after you first encountered them?
771–780 of 946 posts
Re: Ask HN: Concepts that clicked only years after you first encountered them?
#772Earlier quoted context omitted.
You (and many technical people) do, but most people don't, that's why it works. Reminds me of this comment I saw a while ago: https://news.ycombinator.com/item?id=25825917#25828439 > On HN, people hate cold emails. In real life, I've found that most people will respond or ignore. Like a tiny minority will act like you killed their mother, but that's life. > I know you know this, if you're in sales, but I, like many o…
That's good to know, thanks for the tip Man oh man, it really disgusts me that people are so stupid though. They just let companies blast them with popups, e-mails, text messages, etc all day when it takes so little effort to cripple the spammers and cut them off completely.
Re: Ask HN: Concepts that clicked only years after you first encountered them?
#7731. Everyone is the main character in their own story. This manifest in all sorts of ways - from people not being there when you need them the most, from friends dying off as soon as proximity changes, to how and why get people get promoted in jobs. This isn't necessarily bad, but if you don't know how to navigate this it can be quite painful and confusing. 2. Representation matters. I knew this for a long time, but i…
Re: Ask HN: Concepts that clicked only years after you first encountered them?
#774Earlier quoted context omitted.
Yep, I think mocks are mostly a smell. The "functional core" of a module should be entirely or almost entirely unit testable with (possibly fake) dependencies passed in. The glue code ("imperative shell") should be tested at a higher level - "integration" or "end to end" or whatever you want to call it - which looks at the externally observable effects of running the code (database changes or API responses or whateve…
This is the way, but it’s tough to sell “we’re not going to unit test this part” in a professional setting where there are incentives to look more responsible than thou, directors are looking at unit test coverage reports, etc.
I think it’s reasonable to disavow expecting single unit tests for nearly every method on every class with mock/boilerplate/copy-paste hell. However, I would still expect “local integration” unit tests that exercise broader chunks of code and keep code coverage up.
So it should be “I don’t need to write a new unit test for this because an existing unit test calls the method that calls this method without it being mocked and you can see it’s covered in the code coverage.”
Re: Ask HN: Concepts that clicked only years after you first encountered them?
#775Earlier quoted context omitted.
Good for you but you're such a vanishingly small part of the population that it won't stop anyone in sales and marketing from continuing to follow up on people (which, by the way, is not illegal). You effectively don't matter. And good follow up software will also stop once a reply has been sent from the recipient, which is then forwarded to a salesperson to triage.
From a typical starting pool of 100 leads, what percentage respond positively having received (up to) seven emails?
Re: Ask HN: Concepts that clicked only years after you first encountered them?
#776Earlier quoted context omitted.
These are physical properties that can be experienced (although there is some risk) for voltage you can touch a Van de Graaff generator, for current you can touch a battery to your tongue. That's the way to understand electricity without analogies. :) Anyway, voltage is always measured between two points (one is typically called "ground" but that's not important here.) It's a difference. (A difference of what? No one…
>Current is always measured through a single point. It's a count of the charge flowing past a point per time unit. (What is charge? No one knows. "Charge" is just a name for the mysterious something that "voltage" is a difference of...) I think you're being overly mysterious here. It's the number of electrons passing through the wire per second. And charge isn't the thing that voltage is a difference of; it's potenti…
Maybe, but I feel electricity is mysterious, eh? I mean, we don't know what it is, nor why the Universe has it, and we aren't likely to ever figure it out, eh? Really that's all I was trying to point out with that: we know how electricity behaves but we don't know what it is. Sometimes people get hung up on that.
In any event, I usually recommend William Beaty's 'What Is "Electricity"?' http://amasci.com/miscon/whatis.html
Re: Ask HN: Concepts that clicked only years after you first encountered them?
#777Earlier quoted context omitted.
What specifically amuses you? Todays http servers may have any number of request altering/enhancing "middleware" calls between the incoming request and the actual business logic/function. How do you ensure that your api works as designed if you only test (pure) business functions? Or do you re-create the middleware chain of functions manually for you test?
/api/foo -> fooApi() You don't need to test the call to /api/foo, you only need to test the call to fooApi(). It doesn't/shouldn't require a http server to do that. Just call the function directly. If you want to test that /api/foo exists, that is essentially a different test and only requires a mock version of fooApi(), because you've already tested fooApi() separately above. The benefit of this approach is that you…
See also: Frontend development that requires running the entire stack in order to test it.
Re: Ask HN: Concepts that clicked only years after you first encountered them?
#778Earlier quoted context omitted.
[flagged]
Obviously I understand my childhood community in far more detail and depth than your rather transparent question. My conclusions of their racism are based on far more than I mention, but yes, it has since then proven to be a very clear smoke signal. Other places I've seen the same thing but not as severely are snow sports and auto racing. I have no desire to retread the 101 of how "white" cannot be treated as logical…
This is clearly from someone who hasn't experience other cultures. White, black, asian, latino labels were all made up around 1700-1800s and all have been argued who's included all over the world even now, is a human created concept that has changed over time. Like most Americans your clearly making up for any biases of an all white upbringing and systemic racist past by being anti-white now.
Re: Ask HN: Concepts that clicked only years after you first encountered them?
#779Earlier quoted context omitted.
> "talk about race less" (as a way to treat people more equally, and reduce discrimination) seems like a reasonable hypothesis to test. This was the status quo for a very long time. Mentioning people's race was like mentioning people's weight. It didn't work. > I'm also not convinced that what we're doing now is working better than what was done in the 90s and 00s. The 2005 study "Are Greg and Emily More Employable T…
I'm not sure the 2005 study tells us much. Our question is which strategy works best for reducing discrimination. To answer that, we'd want to measure the level of discrimination over time to estimate the trend. Imagine we found an identical study from 1995 that showed that white people received 100% more callbacks at that time, and a study from 1985 that found that white people received 200% more callbacks at that t…
Re: Ask HN: Concepts that clicked only years after you first encountered them?
#780The autonomic nervous system and the adrenal cortex. Homeostasis is taught as a textbook fact, the body reverting to a baseline over time. What’s not taught is how much the impacts of daily life events drive a continuous stress response. Fight or flight is not just a reaction to deadly threats. It’s active every moment of every day to ensure survival. The adrenal cortex is always active, to traffic, your boss and col…