Live data from Hacker News

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

news.ycombinator.com

371–380 of 946 posts

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

#371

YAGNI and KISS. When I was a junior developer I used to overthink and overdesign solutions, most of which was never needed. It took many years and a lot of battle scars to realize that less abstraction is more. Today I see a lot of juniors do the same mistake and I ask them to revise their designs to keep it simple.

I use the rule of threes to kill off any premature abstractions. ie. Don’t think you need to make this generic if you have one or two different variants of it. Most often it’s one- so it’s very easy to see that you’re just solving imaginary problems at this point. Each abstraction has a mental cost for reading and understanding the code so I try to be sparing. Too many code bases in my youth were a nightmare to navig…

Also don't forget that code (including the complexity you want to add to it) will probably have only something like an aggragate ~1/3 chance of still being used in a production scenario 5 years or so away anyway (for any number of reason, product change, feature removal, company bought / sold, the list goes on and on...) of course these numbers are anedotal but the point is it can be detrimental to think your code will run as is for the next million years, especially after the first draft

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

#372

1. 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…

Regarding #3, the following David Graeber quote always stuck with me:

“The ultimate, hidden truth of the world is that it is something that we make, and could just as easily make differently.”

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

#373
Graph theory. For the longest time I thought it is an interesting and even beautiful branch of mathematics but somewhat "recreational" and disconnected from my various bread-and butter workhorses for applied work (from linear algebra and PDE's to differential geometry etc). So I never bothered to dig and connect the dots.

At some point I realised the connections between the two worlds e.g., graph operations as linear algebra [0] or the transition from continuous Laplacian to graph Laplacian via a discrete Laplace operator [1]

[0] https://graphblas.org/

[1] https://en.wikipedia.org/wiki/Discrete_Laplace_operator

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

#374

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…

When I was younger I had a lot of trouble with OOP. It probably didn’t help that my two strongest languages at the time (PHP and Python) allow you to use them fully iteratively if you want. For some reason I never found an explanation that focused on state. A lot of the examples I saw I remember thinking it made a lot more sense to just rewrite the functions so they aren’t part of a class. I still frequently see code…

Yes, looking back I was shocked to realize how little my oop education and work had talked about state

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

#375
post #339

Related : I have a request for the 1 major concept that has never clicked for me --> Can someone help me understand 'productive value' in an economy ? I have tried hard, and can't for the love of me understand what lies at the bottom of trade, what is the base value of assets / activity. It just doesn't click. Questions like: - Can a services based economy work if the consumers of the services weren't producing some…

I can try some of these

> Is a Fiat currency just 'vibes based economics' ?

I'd think of it more like contract-based/trust-based. If a government has promised you can pay your taxes and debts in a fiat currency, and you believe them, then you'll value that currency. You may need it some day. When the trust erodes, so does the value. I don't think this is simply "vibes", it's people behaving rationally about what they expect the future to hold. And in fact this is just what "value" means for all things generally. Someone thinking rationally about how to value a gold-backed currency is still asking themselves whether they expect gold to be worthwhile in the future.

> How is it NOT a zero sum game ?

A zero-sum game would be one where there's just a fixed amount of value to allocate however, and you're stuck to the pareto frontier; that is, there is no re-allocation which would leave someone better-off and nobody worse-off. But in reality there's obvious misallocation all of the time! That's why you would ever buy or sell something: because two parties both believe they benefit from that exchange. Whether that exchange is actually positive or negative for society depends on externalities. But it seems pretty clear to me that a lot of activity is a negative-sum game (if it cause pollution, addiction, etc), and a lot of activity is a positive-sum game (most other things), and almost nothing is actually zero-sum. How is it NOT NOT a zero sum game?

> Is speculation on artificially limited assets (housing) just a pyramid scheme ?

Kinda.

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

#376
The importance on clean code, architecture and testing. That was during my university when we had a serious diploma group project on the last semester.

Also importance of reading books even later. My mother told me this all the time but school books were not the best choice. In high school I started reading fanfics, then occult books and finally I landed on self-helps and ones related to my SWE career.

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

#377

The power of an outline when writing. Over the past few years, I've been teaching myself how to write better. I'm not talking about elementary syntax or grammar. I'm not talking about writing the traditional, American English five paragraph essay. I'm talking about writing longer pieces of prose, articles or blog posts or short chapters with word counts ranging anywhere between 1500-3000 words. On this journey of imp…

Using org-mode's powerful outlining functionality has done wonders for my writing. I can ramble on and on and on, then use headings and subheadings to create conceptual "bins" and move chunks of my prose into the bins depending on topic, then smooth my words over with more transitional language so the thoughts flow more naturally.

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

#378

Superconductivity. I did four PhD projects regarding superconductivity properties at nanoscale without really getting hold on the concept. For instance, how zero resistance is related to cooper pair tunnelling and BdG Hamiltonian. Only when I was forced to write introduction a month before my thesis submission I gave my best last try for the farewell and it clicked. Note the title of my thesis “Quantum effects of sup…

Old papers are great. I have often deliberately sought out old papers to get a quick and good introduction to a subject. It doesn't always work -- sometimes a newer paper with better abstractions/examples/terminology wins, of course.

I no longer know when I figured out this trick, but I have been using it for at least twenty years. I wish I had known about it earlier.

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

#379

Earlier quoted context omitted.

> dependency injection The term is unfamiliar to me -- is it related to "fault injection"?

Dependency injection is one of those technical terms that are made up to describe something that has been done for decades but with a new name because the creators of the new term don't have much experience and/or they want to gain notoriety for creating a new programming technique. If you've ever written a constructor for a class that has arguments (within the constructor signature) that are used by the instance of…

I believe the term Dependency Injection was coined by Martin Fowler, as the meaning of the pattern name Inversion of Control is less obvious. I'm going to assume that Martin Fowler has quite a bit of experience, although you might accuse him of wanting to gain notoriety...

In any case, DI is not at all a new trendy term. Inversion of Control dates back to the gang of 4 patterns book from the '90s. Yes, constructor parameters are one way to implement DI, but not the only one. I'm ambivalent on the whole pattern movement, but they are a great educational tool for novice programmers, and it is good to have some standard terminology for core patterns.

To put it another way, constructor based DI is not simply the use of constructor parameters, it is understanding the OO design principle that side-effecting code should be isolated into objects, rather than just dumping a bunch of DB queries into your functions, like we did back in the stone age.

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

#380

Earlier quoted context omitted.

As a white guy, I'd certainly encourage you not to worry about this -- if we're talking about an upper middle class, professional-ish activity, you can be fairly sure that all those white people feel self-conscious about their group being so white and would welcome you to join them. Anyway, I'd be interested to hear more about the psychology of this. I remember when I was growing up in the 90s and 00s in California,…

The better question to ask yourself (you the white guy), is would you join a group [insert som hobby like hiking] composed 100% of Cholitas. If yes, are you sure? if not, why not? *Not singling out Cholitas, but it's a group that may feel "other" to you.

As I stated, I've had the experience of feeling self-conscious in a group where I was the only white person (or one of just a few). That never happened when I was a kid, but it has happened a few times as an adult.

With regard to the Cholitas thought experiment, I think my major source of discomfort is that at least one of them would look at me and think to herself "he's a patriarchical colonizer" and feel hostility from that. I'd feel more comfortable if I had a friend in the group who could vouch for me. Otherwise I'd worry the Cholitas didn't want me to be there.

I suppose that works in reverse as well -- an ethnic person might look at a group of white people and worry that one of them was present at Jan 6 or what have you.

What I miss from my childhood was the feeling that we're all in this together as human beings and race just isn't important. In the time & place I grew up, if someone was to start denigrating others on the basis of race, everyone would consider them to be an unimportant wacko. In that cultural context I wouldn't feel as much apprehension joining a group of Cholitas.

Post reply on HN