Live data from Hacker News

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

news.ycombinator.com

461–470 of 946 posts

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

#461
I self taught myself c++ many years ago as my first lang (no idea why, I must have googled how to make games and it came up). No internet, just some downloaded word docs and html pages I saved on flash drive and went to a friends house. I was so bad when I think back that it's actually funny now that I've become so proficient in it. I used to think the runtime was the compiler and my very first hello world was done in Word so you can imagine the torture I went through trying to get that to compile.

So the topic that took me about 2 years to get at this inefficient setup, (had finally gotten a sam's teach yourself in 24 hours at some point iirc) was pointers. I could never grasp them. It suddenly came to me one night when reading something about letters that it clicked, the concept had something to do with delivering letters to houses and each house has an address. Can't recall the exact details but man was it an enlightening moment.

I googled pointer mailbox analogy and this is very close if not what made it click for me - https://www.eskimo.com/~scs/cclass/notes/sx10.html

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

#462
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…

Plenty of people all over the world are learning and using the teachings of Scientology. That doesn't make them right or even useful

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

#464

It took me an embarrassing amount of time to fully grok what object oriented programming really means. It's one thing to have someone tell you what an object is, but it's another thing entirely to build a fully object oriented system. I remember what made it click: I was designing an animation system, which had a bunch of different interdependent moving parts. Once I started treating each part like an object and lett…

I doubt you're the only one, and I actually feel that a lot of people that find themselves having to program in an OOP language don't really understand OOP fully or what its motivations are. I personally don't think it's possible to really grok OOP without first understanding the motivations for its origins and how it compares to doing everything in a purely imperative fashion. The best way to actually understand its…

Very much agreed. My main problem with school was being told "how" and not "why".

If I were to teach programming, I'd start with straight up assembly. Give people a taste of what the cpu is actually doing under all your abstractions. Probably a few weeks, enough for hello world, fibonacci numbers, and an intro to branching. Then introduce C, get used to pointers and basic high-level language concepts. Really hammer in the idea of thinking like the CPU and being mindful of the resources you're using.

From there, guide them towards building a real application in imperative C or C++. After that the overarching theme is rewriting the application in an object oriented language, with attention to why and when you should and shouldn't use these new tools.

IMO, understanding the fundamentals of how a cpu works is absolutely essential for writing good code at any level of abstraction, and it seems a lot of new programmers are missing that.

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

#465

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…

> You can't tell someone what it means to be good or bad, or to give them a course in philosophy and they will become good people. But you can tell them a good story, that engages with them emotionally, and it will change their perception.

Is that actually true? Do we have good reason to believe that people who study history/literature behave more ethically?

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

#466
post #224

Earlier quoted context omitted.

Seven years into my career I'm increasingly convinced that the emperor has no clothes with respect to unit tests that are just transcripts of the code under test with "mock.EXPECT()" prepended to everything - 95% by volume of the unit test code I've ever read, written, or maintained.

I think my favorite of these was a function that called 4 other functions and didn't do anything else, its unit test mocked out all 4 other functions and asserted that each was called.

How would you unit test that?

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

#467

It took me an embarrassing amount of time to fully grok what object oriented programming really means. It's one thing to have someone tell you what an object is, but it's another thing entirely to build a fully object oriented system. I remember what made it click: I was designing an animation system, which had a bunch of different interdependent moving parts. Once I started treating each part like an object and lett…

I didn't fully grok OOP until I saw how composition and dynamic dispatch can be used in real code to create abstractions and flexibly swap out different implementations for your interfaces. You could build a chatbot that supports Discord, Slack, and IRC dynamically at runtime, or a web app that can use multiple different database engines, or a social network with multiple types of posts that can all be rendered in a…

For me, the issue was that OOP in an academic context was always toy examples. OK, Dog and Cat are Animal that can MakeNoise, Eat, and HaveFur (except sometimes not). Yeah, I get it. It's a ridiculous amount of boilerplate compared to just throwing some functions in and getting it done.

The issue was that anything they taught had to be dumbed down to the point to fit in a classroom and they basically stopped there. We also never wrote code that would be looked at by more than one person. I didn't "get it" until I spent years in a real job, with systems complex enough for this to matter, and practical examples like Dependency Inversion etc as you say. There was also a complete lack of Composition and (at the time I did it) multiple-inheritance which is a bit more controversial these days.

Our traditional Comp Sci course also worked on a variety of languages but nearly zero UI or web programming back then, which are both natural fits for OOP that we largely ignored.

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

#468

Earlier quoted context omitted.

Similarly this gives me pause about Ivy League MBA programs. Although a small sample size, despite their ambitions the BIPOC people I know haven’t been able to reap any professional benefits from it. Whether from access to executive roles, getting taken seriously by venture capital firms, or in their attempts to join venture capital firms. There is a level of discretion in these team forming situations that is not ex…

So even with all the BLM advocacy, there is no pipeline for Black people with MBAs from Ivy League schools? That doesn't fit with what I've seen in other industries. Companies fell all over themselves to hire Black people. Is this not happening in MBA-land?

read it again, its not about getting hired, its about getting capital and decision making roles that skip the corporate ladder.

these have an overrepresentation of Ivy League MBAs in them with a pedigree that has nothing to do with promotions. People see the Ivy League MBA as key to this and aren’t interested in the other things an MBA can do. The jobs these disillusioned alumni have were attainable without the MBA.

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

#469
post #212

Earlier quoted context omitted.

It's a solid book. I was chugging through it a bit at a time, until I discovered Scott Wlaschin's Domain Driven Design Made Functional. I've dropped the Evans book (as it's mired in mid-00's Enterprise Java patterns) and am enjoying this one quite a bit more. Both books are great. Read whichever one aligns with your practice best. I recommend Wlaschin's book for anyone curious about FP, without hesitation. He's great…

Thanks, I hadn't seen that book -- will give it a read. I'm interested to see how DDD gets applied to the functional programming paradigm, as it seems quite deeply ingrained in OOP to me.

You'll be impressed, I think. It feels very natural - at least, it does to me.
Post reply on HN