Ask HN: Concepts that clicked only years after you first encountered them?
281–290 of 946 posts
Re: Ask HN: Concepts that clicked only years after you first encountered them?
#282Unit testing and using dependency injection to write test-able code. I'm not sure if it was years, but it wasn't immediate. I just didn't understand why dependency injection was good at first, and not just someone's weird personal code style choice. I thought it was just people being "Enterprisey" which I'd encountered many times over the years. Once I committed to unit testing, I realized how necessary it is. Unfort…
> dependency injection The term is unfamiliar to me -- is it related to "fault injection"?
If you've ever written a constructor for a class that has arguments (within the constructor signature) that are used by the instance of the class when instantiated then you have done dependency injection, or put more simply 'passing stuff in' which was eloquently stated in another comment on this thread.
Re: Ask HN: Concepts that clicked only years after you first encountered them?
#283Re: Ask HN: Concepts that clicked only years after you first encountered them?
#2841. 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…
Any suggested reading for #1 ("learn how to navigate \$THIS.")?
Re: Ask HN: Concepts that clicked only years after you first encountered them?
#285Unit testing and using dependency injection to write test-able code. I'm not sure if it was years, but it wasn't immediate. I just didn't understand why dependency injection was good at first, and not just someone's weird personal code style choice. I thought it was just people being "Enterprisey" which I'd encountered many times over the years. Once I committed to unit testing, I realized how necessary it is. Unfort…
I keep looking for a reason to write software using a proper DI container framework. In talking to Java devs most of them just mention injecting mocks for your database. You don't really need a full DI container for that you could use a service locator instead or some even lighter DI pattern. If you have that particular hammer though and know how to use it, then it becomes easy to achieve and use config to inject you…
Just vanilla C++ classes, and virtual interfaces if we need to mock things for unit tests.
No automatic wiring of the hierarchy.
Re: Ask HN: Concepts that clicked only years after you first encountered them?
#2862. The chain rule. I knew the actual rule from a calc class, but the intuition behind it didn't make sense to me until I read a couple pdfs on backpropagation
3. Money brings out the worst in people
Re: Ask HN: Concepts that clicked only years after you first encountered them?
#287Shaders. I tried shader tutorials multiple times for years and they only started to click recently.
Any good resource on that? Bonus if it’s for Unity
Re: Ask HN: Concepts that clicked only years after you first encountered them?
#288I got wrapped up sitting there memorizing ins and outs of each language and the ecosystem, others compositions in the form of Apache and the like.
Now it seems bizarre we’d think of it as anything but add, div, compare of electrical state in a memory address. It’s not a 1:1 machine translation but it’s the abstraction that’s made me most productive.
A whole lot of baggage comes with software that I’m hopeful ML libraries will allow us to retire. Currently wrapping UI around OpenCV to make my own “Photoshop”, for example.
I really can’t see any other way of approaching programming as anything but a waste of human agency. There are social problems we could be focused on if we were less focused on butts in chairs cranking out code.
Re: Ask HN: Concepts that clicked only years after you first encountered them?
#289Computer networks. For years I was dumbfounded how IP addresses, VPN, ports, etc, all worked and tied together. Then, when I was interning as a software developer a fair while ago, a colleague drew the analogy of "IP address" = house on street, "port" = something you ask for when you knock on the door of a house. Then it all just clicked. I still remember that day all these years later. Other notable mentions, in no…