Live data from Hacker News

Ask HN: Concepts that clicked only years after you first encountered them?

news.ycombinator.com

781–790 of 946 posts

Re: Ask HN: Concepts that clicked only years after you first encountered them?

#781

Social constructs aren't less real than other tangible concepts. For instance, I used to complain a lot about the non-sense that's to wear a tuxedo in weddings. I was the typical kid saying that I would like to go wearing my best sweatpants to weddings, and that probably my sweatpants are more expensive than some of the tuxedos there. Then, I matured and realized that what we wear have a meaning, wether we like it or…

What kind of sweatpants are more expensive than a tuxedo??

[deleted]

Re: Ask HN: Concepts that clicked only years after you first encountered them?

#782
post #777

Earlier quoted context omitted.

/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…

Obviously, you are doing it correctly and not putting all your logic in the controller. See also: Frontend development that requires running the entire stack in order to test it.

The controller in this example is fooApi(). I generally reserve this layer for taking the input parameters (ie: query/post data), and then passing that data to some sort of service which executes the business logic on that data.

For example, the business logic is what talks to the database. This way, I can test the controller separately from the business logic. Often, I don't even bother testing the controller, since it is usually just a single line call to the business logic.

Anyone who writes a lot of tests realizes very quickly that in order to write testable code, you have to separate out the layers and compartmentalize code effectively in order to allow it to be easily tested. Tracking dependencies is critical to good testing (which is where this whole DI conversation got started).

If you aren't writing code like this, then you're just making testing harder on yourself... and then we end up with tons of code which can never be modified because the dependencies between layers are all too complicated and intertwined. Don't do that.

At this point in my 27+ year career, I don't see any reason to not do things correctly. The patterns are all instinctual and no need to try inventing something new, I don't even think about it any more, I just do it from the start.

Re: Ask HN: Concepts that clicked only years after you first encountered them?

#783

Earlier 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.

> which, by the way, is not illegal As business, sending automated messages to individuals without prior authorization is spam . Pre-checked tick boxes are not consent to receive such messages, you need explicit opt-in. If you are informed that these messages are unwanted, and told to stop, and yet you continue, it becomes explicitly and knowingly illegal . > You effectively don't matter As long as I cost them enough…

Correct, if you're following CANSPAM in the US you must abide by its rules in order to remain legal, however explicit opt-in is not required. What is required is:

- No deceptive information

- Valid physical address

- Must have an easy way to unsubscribe, most often an unsubscribe link but asking the recipient to reply to stop being sent emails is also sufficient

- Promptly honor unsubscribe requests within ten days

Other countries have different laws though.

https://www.gmass.co/blog/is-cold-emailing-illegal/

> As long as I cost them enough to make sure they'll never even think of contacting me again, I'm happy.

Honestly if they're following the above rules, you won't cost them anything. And if they're not, and therefore doing it illegally, well, looks like your lawyers will have their work cut out for them.

Re: Ask HN: Concepts that clicked only years after you first encountered them?

#784

Earlier quoted context omitted.

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.

You can still get code coverage points with broader tests. 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 c…

Code coverage in Go is on a package level. A test that exercises a handler, controller, and repository can accrue coverage for at most one of them.

Re: Ask HN: Concepts that clicked only years after you first encountered them?

#785
post #90

One of the big aha moments which clicked for me only fairly recently was staring at some physics equations my own internalized realization that light doesn't experience time and then I had to tell everyone haha - but that one eureka moment unlocked a whole lot of understanding and certainly a lot more questions. This of course was after all the schooling and physics where it somehow sailed over my head the whole time…

I was going to put this as mine. It’s astounding how important this is. I woke up at 2am with the intuition that light was like a lightning strike across spacetime, with no time and no distance between the emitter and absorber. Why and how, though. What are the fully-baked implications.

This one really struck me too. I think of it from the point of view of the emitter, which is surrounded by a sphere of every final destination of a photon in every direction, with no distance in between. The photon itself, from its own perspective, is born and immediately dies, having stepped across the 0-length gap between emitter and absorber.

Re: Ask HN: Concepts that clicked only years after you first encountered them?

#786

Learning history / literature in school is important. I was a total STEM math nerd in school. I used to frequently complain how I don't get what's the point of it, or how it's a waste of time and I'm learning nothing. I still think the emphasis of school was off, but I get the point of it now. Stories are like code for humans. You can't tell someone what it means to be good or bad, or to give them a course in philoso…

I was fine with literature, but yeah, history, what a snooze-fest. Why do I care who fought what war 1,500 years ago and who won? It seemed like it mostly came down to a bunch of pompous elites having dick-measuring contests a lot of the time. Then one day the teacher didn’t want to teach and instead showed an episode of Connections, and I was blown away. Learning about how and why our science and technology became w…

Free to watch here:

https://archive.org/details/ConnectionsByJamesBurke

Re: Ask HN: Concepts that clicked only years after you first encountered them?

#787

Narcissism. My grandmother was a terrible narcissist. I loved her dearly and she had a lot of wonderful qualities, but The quality that stood out the most, sadly, was narcissism. My mother was also a narcissist to a somewhat lesser degree. It didn't occur to me that I too was a narcissist until I was about 35 years old. It took waking up in the corner of the living room in my friends one bedroom apartment Early one m…

Hey! Glad to hear you're on a better path.

Thank you for sharing.

Please continue to contribute here on HN, I really appreciated your comment and experience.

Re: Ask HN: Concepts that clicked only years after you first encountered them?

#788
post #306

This is something that clicked after a few hours rather than a few years, but it is similar in a way. A long time ago when I was a graduate student I was in the library one afternoon studying some idea in field theory (physics). It covered maybe three pages in a small book, but it wasn't making any sense. Finally, hours later it suddenly became clear, and it was so simple. I remember saying to myself, "Why didn't the…

They need to simmer a bit.

Re: Ask HN: Concepts that clicked only years after you first encountered them?

#789
post #310

Earlier quoted context omitted.

Controversial in that it's generally considered a pseudoscience. I'd advise against anyone looking to figure out how to navigate this wasting their time with pseudosciences.

> it's generally considered a pseudoscience. Only by people who have no experience with it. NLP ("Neurolinguistic Programming", not Natural Language Processing) is pre-scientific , yes, but that's not the same as being a pseudoscience, and calling it such is a disservice. We have pretty much discovered the operating system of the human mind. applying the principles and techniques discovered and systematized under the…

> learning and using this stuff every day

Anecdotal evidence isn't evidence, it's anecdote. You're basing this all off what people are saying works for them. There's a strong possibility that having learned this gives them extra confidence/trying harder, which in tern leads them to improvements. It's like taking sugar pills telling someone it's amphetamine.

Re: Ask HN: Concepts that clicked only years after you first encountered them?

#790

Earlier quoted context omitted.

> it's generally considered a pseudoscience. Only by people who have no experience with it. NLP ("Neurolinguistic Programming", not Natural Language Processing) is pre-scientific , yes, but that's not the same as being a pseudoscience, and calling it such is a disservice. We have pretty much discovered the operating system of the human mind. applying the principles and techniques discovered and systematized under the…

> pre-scientific What does that mean?

Nothing. Either something follows the scientific method, or it does not. Pre-scientific is a fancy way of saying "we have no evidence for this". Bear in mind, this field is decades old, and has been subjected already to scientific study. All of which have debunked it.

In the typical style of SCAMS (supplemental, complementary, and alternative medicines), this line really just means they're waiting for the one study to validate them in the face of countless studies that have not.

Post reply on HN