[HN Gopher] Ask HN: Concepts that clicked only years after you f...
       ___________________________________________________________________
        
       Ask HN: Concepts that clicked only years after you first
       encountered them?
        
       I'm reading Petzold's _Code_ [1], and it dawned on me that I didn
       't understand logic gates intuitively until now. I took a Computer
       Architecture course back in college, and I understood what logic
       gates meant in boolean algebra but not empirically. Petzold
       clarified this for me by going from the empirical to the
       theoretical using a lightbulb, a battery, wires, and relays (which
       he introduces when he talks about the telegraph as a way to amplify
       a signal).  Another concept is the relationship between current,
       voltage, and resistance. For example, I always failed to understand
       why longer wires mean more resistance while thicker wires mean less
       resistance.  [1]: https://www.codehiddenlanguage.com/
        
       Author : luuuzeta
       Score  : 256 points
       Date   : 2023-01-01 13:50 UTC (9 hours ago)
        
       | nycdotnet wrote:
       | I didn't really understand HTTP until I started using Fiddler
       | which was probably 10 years after I had written my first web
       | server application. "What do you mean I can't change the headers
       | because they've already been sent?"
        
       | ofcrpls wrote:
       | Fourier Transform.
       | 
       | I'd been writing DSP code in C and MATLAB during undergrad while
       | thinking I knew every possible aspect thanks to the deep study we
       | had as part of coursework across all the transforms methods in
       | our ECA & Communications coursework in India. Also, dad was a
       | self-taught hands-on Analog electronics whiz whose day job was in
       | Telecommunications Training, and I had uncles and aunts in the
       | Telecom/Electronics/ATC industry, so I had all these resources
       | from a very young age to revisit the concepts that were being
       | taught to me in school, against practical applications over and
       | over.
       | 
       | In week 2 or 3 of ECE490 at UofR, Prof. Heinzelman[1] broke a
       | barrier that I did not know existed in my understanding of DSP.
       | It was pinned to me realizing that the intuition between Fourier
       | and Laplace transforms being the same. It was a moment that I
       | haven't experienced since, in that I felt my brain got re-wired
       | within that hour. It must help that her father[2] basically wrote
       | the textbook on speech processing.
       | 
       | [1] http://www.hajim.rochester.edu/ece/heinzelman/
       | 
       | [2] https://www.ece.rutgers.edu/lawrence-rabiner
        
         | bonzini wrote:
         | Interesting, Fourier transform has never been an issue for me
         | but Laplace never clicked. I know it's kind of similar
         | (convolution, exponential and all that) but I miss the
         | connection with the frequency domain that is there for Fourier.
        
           | dannymi wrote:
           | The frequency is the imaginary part of the Laplace parameter
           | s (and the attenuation is the real part of the Laplace
           | parameter s).
           | 
           | Laplace transforms work on systems with attenuation--that's
           | the main advantage.
           | 
           | Because the kind of transform was swapped out anyway, people
           | used the chance to often only define one-sided Laplace
           | transforms that only work for t > 0 (because as an engineer,
           | thats the systems you want anyway).
           | 
           | There's a direct correspondence between the (usual) one-sided
           | Laplace transform and the (unusual) one-sided Fourier
           | transform for that reason.
           | 
           | Since you usually have systems where f(t) = 0 for all t < 0
           | anyway, the distinction one-sided or not is not so important
           | in practice for understanding.
        
       | ranting-moth wrote:
       | Music theory. I'm not claiming I understand it all.
       | 
       | I've had many eureka moments when I suddenly realise what or why
       | this thing from years ago is important.
       | 
       | I think teaching music theory with both _what_ and _why_ (with
       | examples) is essential.
       | 
       | I still have haven't found a book that does a good job of it and
       | keeps it interesting. Any recommendations?
        
       | criddell wrote:
       | For me it was Microsoft's COM and how it's all powered by
       | interfaces. It took a long time before it clicked for me.
       | Fortunately, it didn't really matter because 20+ years later,
       | it's still relevant. I've had plenty of time to work it out.
       | 
       | The other Windows-related idea that took an embarrassingly long
       | time to work out is device / printer / memory contexts.
        
       | btrettel wrote:
       | It took a couple years in college for me to understand entropy.
       | 
       | Entropy in classical thermodynamics is presented in a mysterious
       | way that leads to confusion.
       | 
       | Entropy in statistical thermodynamics, however, is logical. Once
       | one understands basic statistical thermodynamics, entropy isn't
       | mysterious.
       | 
       | The book in my statistical thermodynamics class was _An
       | Introduction to Thermal Physics_ by Daniel Schroeder, which is an
       | excellent book that I 've referred to many times since.
        
         | luispauloml wrote:
         | I had to study entropy twice in college for different courses
         | that were 2 years apart from each other, and I still remember
         | this one quote I read somewhere:                 The first time
         | you study entropy, you won't understand it. The second time you
         | study it, you'll think you understood it until you realize you
         | didn't. By the third time you study it, you just don't care
         | anymore and just use it.
         | 
         | 10 years after graduating, and I haven't encontered entropy
         | again after the second time, so you can guess where I'm at in
         | this quote. But thank you, for now I know how to attack it if I
         | ever need it again.
        
           | btrettel wrote:
           | Entropy is basically a useful quantity. It's no more
           | mysterious than enthalpy or Gibbs free energy, both of which
           | have also caused me confusion in the past.
           | 
           | To me, the issue with entropy is that it's initially
           | presented without clear justification, so people don't know
           | _why_ it 's important. Statistical mechanics made it clear to
           | me that the state with the most entropy is the most likely to
           | occur in equilibrium. (Statements about entropy representing
           | "disorder" and whatnot in my opinion are handwavy, often lead
           | to confusion, and should be avoided.)
        
         | atemerev wrote:
         | I also have chosen entropy for my most memorable grokk! :)
        
         | lambdatronics wrote:
         | For me, it was approaching it from the information-theoretic
         | perspective. E. T. Jaynes' paper was what made it all click for
         | me: https://bayes.wustl.edu/etj/articles/theory.1.pdf
         | 
         | Edit: but that was only after I had grokked Shannon's paper on
         | information theory, which I felt was pretty intuitive.
        
       | dplgk wrote:
       | Steely Dan
        
         | ilvez wrote:
         | (got a smile out of me, both because the band name and original
         | meaning) Do you mean whole discography? Because I really like
         | their earlier stuff but lost interest at one point. Asking
         | since if there was enlightenment with whole discography then I
         | have more interest to take new dives.
        
           | ilvez wrote:
           | Actually skip the question .. I took their albums not
           | linearly and got to Aja, so basically I already got nearly
           | everything but have skipped few. Still a smile:)
           | 
           | I thought they did more stuff on 80s..
        
       | dudul wrote:
       | A lot of the math I learned in high school didn't make any sense
       | until I revisited it in college. The difference between stupidly
       | copy/pasting rules and theorems without understanding them and
       | having to demonstrate them from the ground up before being able
       | to apply them made a humongous difference for me.
        
       | TheAceOfHearts wrote:
       | It felt like my understanding of pointers was a bit vague until I
       | learned assembly. I think programmers would benefit from starting
       | off with a simple virtual machine that runs a tiny set of
       | instructions with everything presented cleanly in a visual format
       | which can be inspected and stepped through.
       | 
       | The biggest a-ha! moment I've experienced was in my Comptuer
       | Architecture course when it finally clicked how you could build
       | up a bunch of logic gates into a real modern computer.
        
       | lakeshastina wrote:
       | (1) Pointers
       | 
       | (2) Recursion
        
       | jmorenoamor wrote:
       | Orbital mechanics. It was after playing KSP that I had that
       | "woah! this makes sense!" moment.
        
       | brunooliv wrote:
       | The biggest one has to be design patterns in OO design!
       | 
       | I was fortunate to have a great teacher which taught OOP by
       | focusing on design patterns, dynamic dispatch, composition over
       | inheritance, etc, etc, the really foundational concepts.
       | 
       | I was too young and naive to fully understand all the concepts, I
       | just thought writing Java was cool! Ah.
       | 
       | Many years later, I really realized how to apply design patterns
       | to solve real problems in a large production codebase and it all
       | clicked then and in retrospect that teacher was really amazing, I
       | just was too naive to realize it back then...
        
       | ww520 wrote:
       | Shader and OpenGL programming. It was many foreign jagons,
       | concepts, and computation models. Took me a while and couple
       | tries to get a hang of it.
        
         | atentaten wrote:
         | What were you trying that allowed you to get the hang of it?
         | Also were there any online resources that helped?
        
       | nkrisc wrote:
       | Two concepts that I never really understood until I encountered
       | them together: functional programming and recursion.
       | 
       | When I first encountered recursive functions when I began
       | learning programming I had a really hard time understanding what
       | the function would do and how it would play out as it called
       | itself. I couldn't think through the recursion and imagine what
       | would happen. Nor did I really understand how to usefully apply
       | one to a situation. I would either use a loop or a recursive
       | function that utilized lots of external state to work.
       | 
       | When I later encountered functional programming, having learned
       | programming with OOP languages, it was a real mind-bender. I
       | finally started to understand it but when I encountered the need
       | for recursion in FP, it really threw me for a loop. How the hell
       | was I supposed to do this without external state? So it was that
       | restriction that really let me understand how to create a
       | recursive function that could return something useful with
       | nothing more than the initial input. This new understanding also
       | gave me a better appreciation of functional programming and the
       | idea of pure functions.
        
         | sokoloff wrote:
         | I had a similar experience with tail recursion that I only
         | fully grokked much later when I had to implement some stack-
         | trickery in C for a computer game. I realized then that tail
         | recursion was typically optimized as a jump to code within the
         | same stack frame rather than creating a new stack frame.
        
       | abyesilyurt wrote:
       | Specification vs Implementation: There could be only one
       | specification, but many implementations. There is only one Python
       | specification, but it has many implementations, cPython being the
       | most popular.
        
       | hydroid7 wrote:
       | OOP on Java.
        
       | a_c wrote:
       | People never change because of YOU. This applies to work,
       | relationship and family.
       | 
       | It made me click about the saying that science advances one
       | funeral at a time. It is easier to rally people of similar
       | thought than to change people of opposite opinion. Not
       | impossible, just more difficult. It explains a lot of thing in my
       | opinion.
       | 
       | 1. It is easier to start a start up than to convince your boss to
       | take a certain product direction. E.g to not pursue certain
       | pursuit, as outlined by John carmack's departure from meta. The
       | ultimate judgement will be whether YOUR idea survive rather than
       | whether your boss buy your idea. And I prefer bootstrap, at least
       | for now, for that reason.
       | 
       | 2. Never attempt to change your spouse. Find the common ground
       | instead.
       | 
       | 3. Empathy is mostly about experience sharing. You can't have
       | people feel something they never experience before. If you can
       | empathize, it means you have experience to draw similarity
       | between. Imagine teaching a 18yo to be a father, that's how
       | preaching people to be empathetic felt like.
        
       | 99failures wrote:
       | "The Innovator's Dilemma". I read the book and I took the class
       | in b-school.
       | 
       | At the moment I thought it was OK, fast forward a decade and it's
       | one of the pillars of my business thinking.
        
       | ttul wrote:
       | When we think about history over any time scale, we tend to think
       | about one region, person, group, etc within that period of time.
       | In reality, "everything" was going on during that time.
       | 
       | History is far richer than we tend to realize. So much is going
       | on all the time; it's impossible to grasp it all.
        
       | 23B1 wrote:
       | Simple one: understanding probabilistic vs. deterministic
       | thinking = the serenity prayer*
       | 
       | The former is for dealing with any situation where we can't
       | control the inputs and outputs. The latter is for when we can.
       | 
       | *"Grant to us the serenity of mind to accept that which cannot be
       | changed; courage to change that which can be changed, and wisdom
       | to know the one from the other."
        
       | jeffreyrogers wrote:
       | Dynamic programming made very little sense to me when I first
       | encountered it, then a few years later I read the DP section of
       | Algorithms by Dasgupta, Papadimitriou, and Vazirani and it
       | somehow clicked for me. Now I enjoy dynamic programming problems
       | when I get them in interviews because they are usually pretty
       | easy once you understand the trick.
        
         | mesarvagya wrote:
         | DP is just overlapping recursion with caching. That's it.
         | 
         | Richard Bellman just wanted to give a fancy name for
         | mathematical work he was doing without being suspected of
         | it.[1]
         | 
         | [1]https://en.wikipedia.org/wiki/Dynamic_programming#History
        
         | sethammons wrote:
         | This one is always interesting to me. People mention "dynamic
         | programming" and my gut says "code that writes code" and every
         | single time I remind myself it is just caching earlier
         | calculations. DP is just caching.
        
       | mumblemumble wrote:
       | The monitor model in second language acquisition. Or, more
       | accurately, the more contemporary synthesis that it's developed
       | into in the decades since it was first proposed.
       | 
       | The model itself is easy enough to grasp. But concretely
       | understanding what it implies about how I should be studying took
       | much, much longer.
        
         | igammarays wrote:
         | Very intriguing! Any links you can share on this theory? A
         | quick Google search gave me an overview, but I don't see how
         | this is particularly useful for second language acquisition.
        
           | mumblemumble wrote:
           | The big take-away is that explicit study of grammar rules,
           | and even vocabulary to some extent, is kind of a waste of
           | time. They encode information in a format and region of the
           | brain that generally isn't accessible to the areas that are
           | used in fluent communication.
           | 
           | The way our brains have evolved to build up a functional
           | language model is by observing lots and lots (and lots) of
           | examples of the language being used for communication. Which
           | implies that, even from the very beginning, graded readers,
           | level-appropriate dialogues, etc. should be the foundation of
           | a language study program and not, as most language
           | instruction courses and apps make it, just a little bit of
           | icing on top.
           | 
           | The primacy of input is also kind of a big deal, and, at
           | least for me, it took a long time before I was willing to let
           | go of forced production exercises such as "translate this
           | sentence into your target language". Perhaps in part because
           | they're so endemic to language learning resources. You can't
           | abandon them without also abandoning Duolingo and most formal
           | classroom programs. But the problem with these kind of
           | practice exercises is, we now know that it's normal for there
           | to be a long delay between when someone can comprehend a
           | grammatical structure, and when they can use it in a natural
           | setting. (Anyone with kids over a certain age should be
           | familiar with the phenomenon.) Forced production relies on -
           | and reinforces - that aforementioned misplaced encoding, and
           | there's a mountain of research demonstrating that skill in
           | performing those sorts of exercises simply doesn't correlate
           | with the development of communicative fluency.
           | 
           | Tangentially, the transformer architecture that's taken
           | natural language processing by storm has some interesting
           | similarities to the leading model among SLA researchers for
           | how language is represented in the human brain. Which isn't
           | the monitor model itself, but might hint at a mechanism for a
           | few parts of the model. Acquisition order, for example.
        
             | djmips wrote:
             | Given you eureka moment, besides what you didn't do (as you
             | outlined), what did you do to increase your second language
             | real world examples with feedback? Did you try immersion?
        
               | mumblemumble wrote:
               | "Immersion" is a tricky word that I don't feel
               | comfortable using without qualification.
               | 
               | What I like to do is spend at least an hour a day
               | reading, listening to podcasts and audiobooks, or
               | watching videos. A good day for me is a day when 100% of
               | my media consumption for entertainment purposes is
               | happening in my target language.
               | 
               | And that really is it.
               | 
               | I don't really bother soliciting explicit feedback. I
               | suspect that it's potentially harmful because it can
               | trigger the affective monitor. I've also encountered some
               | SLA researchers saying the research indicates that it's
               | not actually helpful. I'm becoming increasingly enamored
               | of Bill VanPatten's conceit that, in a language learning
               | context, there's no such thing as errors, there are only
               | differences between the learner's interlanguage and their
               | target language. Which is something that should be
               | embraced as a natural and essential part of the process
               | rather than a problem that needs explicit correction.
               | 
               | So what I do instead is just pay attention to whether
               | successful communication has happened. When getting
               | input, that means I'm focused on whether I understood the
               | content or not. I want it to be a little bit difficult,
               | enough so that I'm not getting bored, but not so
               | difficult that I feel I'm really straining to comprehend.
               | (There's nothing scientific to that, it's just personal
               | taste.) When I'm having a conversation with somebody, I'm
               | just interested in whether or not I am having a
               | successful interaction. In a sense, what I'm trying to do
               | is set up a feedback loop that optimizes for pure
               | enjoyment, which, for me, seems to be a very good proxy
               | for learning effectiveness.
               | 
               | To that end, I don't really intend to shit on Duolingo
               | and practice exercises and whatnot. A lot of people enjoy
               | those approaches to language learning, and the single
               | most important thing is that you enjoy what you're doing.
        
       | pcurve wrote:
       | object oriented programming, with public, private, classes.
       | inheritance, parameters... ugh. It took much longer to
       | internalize these than I'd care to admit.
        
       | samhuk wrote:
       | Computer 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 particular order:
       | 
       | * Perfect is the enemy of good enough. Did n't really appreciate
       | this idea until around 2 years into my career.
       | 
       | * How to be professionally displeased at something. Early on my
       | career I would get way too angry at incompetent colleagues peeing
       | in the pool, e.g. bad code, design, management, etc. I would
       | complain quite a bit! It only clicked ~2-3 years later into my
       | career when I figured that one's displeasure at a situation
       | should be a function of _both_ how bad the situation is _and_ how
       | able you are to improve it. When you offer constructive solutions
       | to incompetence (suggest alternative algo, management style,
       | library, tool, etc) whilst not actually mentioning what is wrong,
       | instead of just fruitlessly reminding people of what they did
       | wrong, people become far more cooperative and receptive, etc.
       | 
       | My tin-foil-hat pet-theory is that the relatively recent tyranny
       | of low expectations and "participation award" society has on
       | average made younger people much more sensitive to negative
       | comments about their work. The extension of that is that people
       | end up robbed of more detailed reasoning about what they did that
       | was wrong.
       | 
       | People are interesting!
        
         | wellthisisgreat wrote:
         | > 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.
         | 
         | Hey thanks for sharing! Can you maybe expand on this in any
         | form? I'd love to get that kind of analogy. Maybe you have a
         | blog post about it? That'd be amazing!
        
           | [deleted]
        
           | ruune wrote:
           | This[0] blog post explains the basics of IPs, ports, etc.
           | using that analogy
           | 
           | [0] http://www.steves-internet-guide.com/tcpip-ports-sockets/
        
         | ruune wrote:
         | I've heard it with a door for every port, but one door where
         | you ask for that specific port works too!
        
           | layer8 wrote:
           | I think "door" works better because any function can be
           | behind any port, and it is a matter of convention, not of
           | asking for a specific thing. I.e. when you connect to port 80
           | you don't ask for HTTP, you just hope that's what's available
           | at that port.
        
       | darawk wrote:
       | Tensors. Years ago, I would read the Wikipedia page about them
       | every so often, and completely fail to understand what they were.
       | 
       | Then one day I was modeling something in a spreadsheet, and I
       | thought to myself "you know, what I really need here, is 3rd axis
       | to this spreadsheet". And for a few minutes, I thought I had
       | invented a new form of spreadsheet/structure, and was considering
       | trying to build a 3d spreadsheet program.
       | 
       | But, of course, suddenly everything I'd read about tensors and
       | not understood before snapped into place, and I realized that
       | this is exactly what they are (to be precise, this is a special
       | case of a tensor, the contemplation of which caused me to
       | understand what the general case is, and why e.g. a scalar is a
       | rank 0 tensor, a vector is rank 1, a matrix is rank 2 my 3d
       | spreadsheet idea is rank 3, etc).
        
         | ninthcat wrote:
         | It sounds like you are describing a multidimensional array,
         | which can be used to represent a tensor, but is not
         | conceptually the same thing. A tensor is an element of a tensor
         | product.
        
       | harimau777 wrote:
       | Socialism
       | 
       | When I got out of my middle class bubble, made friends with
       | people working multiple jobs and struggling to make ends meet,
       | and experienced a period of financial instability; I began to
       | realize that something wasn't working in our current system.
       | 
       | Then I started struggling with burnout and other issues and found
       | that corporations were happy to just replace me. I also found
       | that management wanted programmers to be replaceable cogs instead
       | of professionals. At that point I started to suspect that the
       | idea of a dignified professional lifestyle may not be true.
       | 
       | I observed that technology and products were getting worse over
       | time. For example, Google search has become mostly useless and
       | it's hard to find products that are made to be repaired. I
       | concluded that the invisible hand and/or the price theory of
       | value were not true.
       | 
       | Then I saw Republicans gain power and run up the national debt. I
       | also observed that when wages actually started increasing the
       | economy fell apart and the Fed started taking steps to prevent
       | wage increases. I concluded that "free market" rhetoric was a
       | lie.
       | 
       | At that point I looked for alternatives and found socialism. In
       | particular the "social democracy" strains of socialism as opposed
       | to those advocating central planning or anarchist organization.
        
         | rramadass wrote:
         | >In particular the "social democracy" strains of socialism as
         | opposed to those advocating central planning or anarchist
         | organization.
         | 
         | Yes; Most people get hung up on terminology and/or specific
         | interpretations but i am convinced this is the natural order of
         | things for the Human species. The balance without going to
         | extremes is what is important.
        
           | zozbot234 wrote:
           | > Most people get hung up on terminology and/or specific
           | interpretations
           | 
           | Because terminology matters, and some terms are quite
           | misleading. What some people tend to miss about the
           | "Socialism with Scandinavian Characteristics" that folks
           | claim to like these days is that Scandinavian countries are
           | actually near the very top rankings by economic freedom and
           | lack of excess regulatory burden. I.e. they're actually some
           | of the _most_ free market and capitalist, while applying
           | effective redistribution after the fact (leading to
           | moderately high tax rates). So I don 't get why people decry
           | capitalism and free enterprise while praising Scandinavia as
           | "successful" socialism? It makes no sense.
        
             | api wrote:
             | I've thought for years that the ideal would be a very free
             | market with very little regulation combined with a basic
             | income and a strong social safety net.
             | 
             | Let people go wild and try stuff and do whatever but raise
             | the floor up to the point where people can recover from
             | failure and where the less fortunate are not suffering.
             | 
             | This kind of "social capitalism" could be freer and less
             | regulated than what we have now.
        
               | zozbot234 wrote:
               | Sure, but the whole issue is how to get from here to
               | there given the current regulatory environment. Adding
               | even more red tape and wasteful government spending as in
               | the orthodox "socialist"/"anti-capitalist" approach is
               | unlikely to be helpful.
        
         | xigoi wrote:
         | Interesting. Here in Czechia, "socialism" and "social
         | democracy" are two very different things -- one is the
         | oppressive regime we had decades ago, the other is the current
         | system that works reasonably well.
        
           | zozbot234 wrote:
           | Czechia is still undergoing catch-up growth, much like
           | Germany during the _Wirtschaftswunder_ (that made their
           | "social market economy" widely popular) and emerging
           | countries today. When people say "social democracy" doesn't
           | work all that well compared to leaner approaches, they mean
           | countries where that growth process has concluded. With an
           | overregulated economy and a high burden of all sorts of
           | excess red tape, they tend to get stuck in a middle-income
           | trap that leads to widespread unhappiness.
        
         | timnetworks wrote:
         | This is not an attack on you, you are free to your opinion and
         | to voice any or all of it to whom you choose, largely because
         | you don't live on a socialist society.
         | 
         | My opinion, however, is that my parents did the right thing to
         | drag me out of such a system and into a capitalistic one. I am
         | watching my peers suffer.
        
         | api wrote:
         | A big one for me not necessarily for "socialism" but for
         | questioning the bog standard capitalist narrative was seeing
         | how the quality of content often goes _down_ when creator
         | monetization is added on a platform.
         | 
         | That's not supposed to happen. Adding a way for people to make
         | income is supposed to incentivize better content and allow
         | people to invest in that content. Instead what you get is a
         | flood of addictive and sensational / tabloid trash.
         | 
         | ... or another way of looking at it is that you do get "better"
         | content but better is not defined in a way that truly benefits
         | anyone.
         | 
         | YouTube is the most dramatic example. The quality of the whole
         | platform tanked hard when monetization was added.
         | 
         | After seeing this a few times I have started noticing it
         | everywhere. The profit motive just doesn't incentivize quality
         | the way we are taught that it should. It can when the
         | incentives align but they often do not.
         | 
         | Another common example is actual reductions in quality to drive
         | more spending like engineered obsolescence or "nerfing"
         | software to drive lock in. The incentive is to produce an
         | inferior product since that is most profitable.
         | 
         | This doesn't mean I think the answer is a government
         | bureaucracy running everything like a single monopoly. That
         | leads to a whole other set of perverse incentives and an
         | inability to go elsewhere.
        
           | zozbot234 wrote:
           | > ... Adding a way for people to make income is supposed to
           | incentivize better content and allow people to invest in that
           | content. ...
           | 
           | What it does is incentivise _more_ content. More is not
           | always better for everyone, and is even less likely to be
           | better for those who were early adopters to the platform -
           | but what it is usually is more _popular_. It 's just
           | democracy in action: the largest numbers decide, and
           | sometimes privileged minorities lose out.
        
             | api wrote:
             | It's not quantity. It's a change in the nature of the
             | content. People start chasing the algorithm and trying to
             | amp up the addictiveness of content. You end up with a
             | cross between a casino slot machine and a supermarket
             | tabloid.
        
         | pintxo wrote:
         | Observing the debate in the US from the outside, I believe the
         | term "socialism" has to die. It's carrying so much baggage it's
         | a major reasons the US cannot have a sensible debate over what
         | alternatives there are to full-blown free-market capitalism.
         | 
         | While also somewhat contested in Germany, and not free of
         | (some) valid criticism, I would advocate to try and use the
         | term "Social market economy" [1].
         | 
         | [1] https://en.wikipedia.org/wiki/Social_market_economy
        
           | mike_hock wrote:
           | > full-blown free-market capitalism
           | 
           | Well, full-blown free-market capitalism would be _one_
           | alternative to the current US system, albeit probably not the
           | best.
        
       | andrewflnr wrote:
       | call-with-current-continuation. First ran into it as a teen and
       | the concept pretty much completely bounced off my brain. I think
       | it took a couple more tries before I started getting it, and
       | arguably I'm still working on it.
        
       | catears wrote:
       | I have one example and an anti-example. Both are related to
       | algorithms and computer science.
       | 
       | A) Packing a binary tree into an array. Anyone that has attended
       | an algorithms course has likely created a binary tree with nodes,
       | leaf nodes, left and right child etc. Seen the pine-tree like
       | sketch with a larger example where each node except the leaf
       | nodes have a left and right child. So how do you pack this tree
       | into an array and traverse it efficiently?
       | 
       | Well you turn it 90 degrees side-ways, slightly shift all nodes
       | on the same level so that none align and put them into an array
       | by going from leftmost to rightmost. (or other way depending on
       | if you shifted 90 degrees or -90 degrees). Congrats, you've
       | packed nodes into an array. How do you traverse it? Our root node
       | is at index 1 and if you packed the array correctly then `idx =
       | (idx * 2) + 1` will move down one side and `idx = (idx * 2) + 0`
       | moves down the other. I don't have a good visual explanation of
       | this but you can think of the integer/index as a bit-sequence
       | describing when in the tree a left vs. right path was taken (with
       | the exception of the root node).
       | 
       | B) Anti-example: Ford Fulkerson algorithm for finding shortest
       | paths between all nodes in a graph. The algorithm is basically
       | just three for-loops stacked on top of each other, but I still
       | can't grasp why it works. Something with dynamic programming and
       | incrementally building on prior established intermediate paths.
       | The algorithm is truly the product of a beautiful mind.
        
         | arjvik wrote:
         | A) I've seen this before but I've never thought of the "index
         | as a bit-sequence describing when in the tree a left vs. right
         | path was taken" before! This is a very nice intuitive
         | explanation that'll really help in describing this to others.
         | 
         | B) Did you mean Floyd-Warshall's?
        
       | Tade0 wrote:
       | Singing.
       | 
       | I was part of a choir in high school and early college, but never
       | managed to get good at this, even though I knew well how skilled
       | singing should sound.
       | 
       | More than a decade later, when I was really exhausted after
       | tending to my infant child I let out a sigh of the same type that
       | we did as exercise back in the choir("Aaaaaaaah"). To my surprise
       | it was almost effortless despite making quite the sound due to it
       | being more or less at the resonance frequency of the bones in my
       | skull.
       | 
       | And then it dawned on me. It's essentially turning yourself into
       | an elaborate fart pillow.
       | 
       | Of course there's much more to that in things like posture and
       | the mentioned resonance, but I had that covered from years of
       | training. The only piece missing was using the diaphragm
       | correctly.
       | 
       | Now I sing daily and while my range is pretty average, I don't
       | strain myself any more and can do it for hours. Also the tone is
       | just so much better now.
        
       | rolenthedeep wrote:
       | 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
       | letting it manage its own state it all just clicked. I started
       | with this massively complex functional-like system that managed
       | four or five different motions, but once it was broken into
       | objects most of the code just fell off and it became a nice clean
       | system.
       | 
       | I was super proud of it at the time, but it's pretty bad by my
       | current standards.
        
         | rileyphone wrote:
         | I had a similar shift in perspective recently, that went from
         | viewing objects from the outside as things to be manipulated,
         | to viewing them from within as independent entities with
         | boundaries. What made it click for me was watching Alan Kay
         | talks and reading "Object Thinking" by David West. Now, I think
         | the idea is due for some sort of renaissance. Though the
         | culture of programming has turned against it in favor of FP,
         | OOP continues to underlie the most important languages,
         | organizations, and products in a way that speaks to its
         | ultimate potential: to build evolvable, growable, maintainable
         | software systems in service of human flourishing.
        
         | zabzonk wrote:
         | I've always found OO programming completely natural. n fact,
         | it's the only kind of programming i've ever really done -
         | create a structure with data members, and then create functions
         | to work on that structure. you can (and should) do this in low-
         | level languages such as C and assembler.
         | 
         | Of course, if you want to go the whole polymorphic route, i'd
         | suggest using something like c++, but the key ideas are really
         | structures, and functions that operate on those structures.
        
           | sureglymop wrote:
           | I've always had a hard time because I was thinking.. why
           | would I carry the performance hit of instantiating objects
           | for a bunch of stuff?
        
             | zabzonk wrote:
             | you have to instantiate variables anyway. grouping those
             | variables in objects simply makes your code more
             | understandable - there is really no extra cost.
        
             | rolenthedeep wrote:
             | Why accept the performance hit of copying structs when you
             | could use a reference type?
             | 
             | It's a tradeoff. OOP makes sense for certain types of
             | problems, and functional programming solves other problems.
             | It's very much a case of selecting the right tool for the
             | job.
             | 
             | I recently transitioned from C# game programming to C++
             | embedded system firmware. Objects don't make much sense for
             | what I'm doing now, and I'm coming to see the elegance of
             | functional programming.
             | 
             | There is no one answer, just a box of tools. What makes a
             | good programmer is understanding each of your tools well
             | enough to decide which one will solve your problem in the
             | way you want.
        
           | opportune wrote:
           | As someone who started programming in BASIC, OO is a really
           | good way to think about stuff (it introduces the abstraction
           | of "conjoined data" that is typed and has functions) but it
           | was not natural. It just feels natural now that I've spent so
           | long in school and at work dealing with OO languages. I
           | imagine if you had started with BASIC you'd feel the same
        
         | opportune wrote:
         | My first job was doing mostly Lego-pieces greenfield
         | development. I learned a lot, but also didn't learn as much as
         | in my second job where I started having to work with a much
         | more complicated, slightly "legacy" system with a big codebase.
         | 
         | At small code sizes, OO does not really have any apparent
         | advantages to doing everything imperatively or in a hacky way.
         | In fact I'd argue it tends to overly complicate and obfuscate
         | things. But there is a point at which you really start wanting
         | OO instead because you can no longer reason about the binary as
         | a whole, and need to start thinking in terms of interfaces with
         | separation of concerns. Even if you did understand the whole
         | state, there are too many people working on it to keep up with
         | changes to the whole state in a way that lets you reason about
         | the thing as a whole.
         | 
         | At my first job (and in college) code never reached such levels
         | of complexity so OO always seemed like some dumb fad to make
         | things more complicated than necessary. I still that is often
         | the case, but now I absolutely see the benefits when they
         | present themselves.
        
         | AndyNemmity wrote:
         | This one is the same for me. I'm not even sure I still totally
         | get it.
         | 
         | It feels like something used an awful lot in ways that don't
         | really add any value. But again, it must just be my lack of
         | understanding. Maybe one of these days it'll click in.
        
           | rolenthedeep wrote:
           | In my animation system, I had a laser beam projecting from a
           | fixed point to a movable point in space. There are also
           | sprites which travel up and down the beam.
           | 
           | Moving the beam endpoint required an animation to bring the
           | width to 0, change the endpoint, then ramp the beam width
           | back up. The sprites each have their own animation in
           | different conditions, and moving them along the beam is
           | another animation.
           | 
           | The real key for me was the sprites. I built a class which
           | takes in the start and end points of the beam and an update
           | method. Once you start the sprite up, you just have to poke
           | it every frame with the time delta and it manages all of its
           | own animations.
           | 
           | Likewise, the laser itself was an object that managed its own
           | animations and the sprites related to it.
           | 
           | This resulted in a bunch of objects with just a little code
           | in them. But because the concerns are separated, it results
           | in less code overall than it would take to manage everything
           | all at once.
           | 
           | Is this the best, or even a good way to do this? Probably
           | not, but it was a very beautiful solution in the moment
        
         | moloch-hai wrote:
         | You don't really understand OOP until you recognize it as one
         | style among many that you may use in different parts of each
         | program. Some parts are naturally OO-y, others DD-y, others
         | declarative, often an unholy mix in each place. The problem
         | dictates elements of the solution. Shoehorning a solution into
         | a particular style makes a bad solution.
         | 
         | Never forget who is in charge. Deferring to a style dodges
         | responsibility for your choices.
        
           | ShredKazoo wrote:
           | DD?
        
             | bitwize wrote:
             | Domain-driven or data-driven (not sure which).
        
             | dopidopHN wrote:
             | My guess would be domain driven design.
             | 
             | I remember that being all the rage 10ish years ago? I think
             | it works, but I don't see it much anymore
        
         | czx4f4bd wrote:
         | 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 main feed, or a
         | bunch of other things. In all of these cases you can also take
         | advantage of this kind of dynamic dispatch to inject mock
         | objects for testing, as well as theoretically have an easier
         | time swapping out a layer if you want to change a dependency.
         | 
         | What really frustrates me is that almost none of the OOP
         | instruction I've encountered ever showed these kinds of real,
         | practical examples. They always over-emphasize harmful
         | inheritance-based approaches and never really explain
         | composition. In college we learned about OOP by building a
         | little text-based RPG thing with different types of monsters
         | implemented as subclasses of an abstract base class, which left
         | me feeling like there wasn't much practical use for it outside
         | of game development.
         | 
         | It wasn't until my first internship that I saw a real-world use
         | of OOP, in the form of a giant Spring Boot monolith with tons
         | of dependency injection. Eventually, after staring at that for
         | a few months, OOP finally clicked for me, but I still find it
         | annoying that nobody ever tried explaining this using
         | practical, small-scale examples.
        
         | analog31 wrote:
         | I read the earliest articles on OO and SmallTalk in Byte
         | Magazine, which IIRC would have been the early 80s. OOP was
         | totally and utterly bewildering to me, a BASIC and Pascal
         | programmer.
         | 
         | It "clicked" much later, in two stages, using languages that
         | were "kind of like" OOP, even if not rigorously so: LabVIEW,
         | HyperCard, Visual Basic. I think VB had a decent strategy for
         | introducing OO to the rest of us. Out of the box, it was
         | "object based," meaning that you could use classes that had
         | been created by someone else. For a bit more money you could
         | buy the version that let you do full OO, but I never did that.
         | But by being a _user_ of objects, it gave you an idea of what
         | you 'd want if you could create them for yourself.
         | 
         | Nowadays of course people range from being bullish to bearish
         | on OO, and I've had the experience of doing it badly and making
         | a mess of things, when a procedural or functional model would
         | probably be better.
         | 
         | Kind of a lesser issue is that I finally grasped how to work
         | with a modern OS after laying my hands on the first couple
         | volumes of the Win32 programmer's manuals, which I think were
         | vastly less forbidding than _Inside Macintosh_.
        
           | layer8 wrote:
           | > the first couple volumes of the Win32 programmer's manuals
           | 
           | What books exactly are you referring to here?
        
         | gurchik wrote:
         | 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 examples online that are written
         | using classes that don't need to be. I imagine this is the
         | reverse problem: people from languages like Java thinking
         | everything has to be in a class.
        
           | kevinmchugh wrote:
           | Yes, looking back I was shocked to realize how little my oop
           | education and work had talked about state
        
       | narag wrote:
       | That Pareto is everywhere and, when applied to knowledge, a
       | comprehensive study plan, like courses or a book, for most
       | subjects, tend to obscure what's the meat.
       | 
       | Waking call:
       | 
       | https://sive.rs/kimo
       | 
       | Corollary: a place where there's a fat-ass book of "best
       | practices" has probably lost its focus.
        
       | bsuvc wrote:
       | Unit 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.
       | 
       | Unfortunately I still encounter customers who haven't bought into
       | it and as a result have untestable code. It's so hard to go back
       | and retrofit testing.
        
         | everybodyknows wrote:
         | > dependency injection
         | 
         | The term is unfamiliar to me -- is it related to "fault
         | injection"?
        
           | gavinray wrote:
           | Going to steal a description I wrote for a blogpost several
           | years ago, when I had recently understood DI for the first
           | time so it was very fresh in my mind:
           | 
           | https://hasura.io/blog/build-fullstack-apps-nestjs-hasura-
           | gr...
           | 
           | Dependency Injection solves the problem of when you want to
           | create something, but THAT something also needs OTHER
           | somethings, and so on.
           | 
           | In this example, think about a car.
           | 
           | A car might have many separate parts it needs:
           | class Car {         constructor(wheels: Wheels) {}       }
           | class Wheels {         constructor(tires: Tires) {}       }
           | class Tires {         constructor(rims: Rims, treads: Treads)
           | }            class Rims {         constructor() {}       }
           | class Treads {         constructor() {}       }
           | 
           | We can manually construct a car, like:                 const
           | car = new Car(new Wheels(new Tires(new Rims(), new
           | Treads())))
           | 
           | But this is tedious and fragile, and it makes it hard to be
           | modular.
           | 
           | With dependency injection, it allows you to register a sort
           | of "automatic" system for constructing an instance of "new
           | Foo()", that continues down the chain and fetches each piece.
           | class NeedsACar {         constructor(@Inject private car:
           | Car) {}       }
           | 
           | And then "class Car" would have an "@Inject" in it's
           | "constructor", and so on down the chain.
           | 
           | When you write tests, you can swap out which instance of the
           | "@Injected" class is provided (the "Dependency") much easier.
        
             | sanderjd wrote:
             | The first example is also dependency injection. The rest of
             | what you described is why a dependency injection
             | _framework_ often becomes useful in a system with a large
             | dependency tree.
             | 
             | The alternative to dependency injection is for functions to
             | instantiate dependencies internally rather than having them
             | be passed in from the calling context.
        
             | lamontcg wrote:
             | I'd probably reach for a Builder pattern first for that
             | rather than go full DI container.
        
             | TillE wrote:
             | I know the car is a classic, cliche OOP example, but for
             | any semi-experienced programmer, I feel like it's a really
             | bad choice of analogy which only serves to obscure how you
             | would use a technique like DI in actual real-world code,
             | rather than an artificial toy example.
        
             | jacobsimon wrote:
             | I think you might have it backwards. The first example _is_
             | dependency injection, too, since you are passing the
             | required instances into the constructor. The non-DI
             | approach would be for the Car class to import and
             | instantiate the Wheels class inside its constructor
             | function.
        
           | dymk wrote:
           | You'd do fault injection by injecting dependencies that
           | respond with / throw faults.
        
           | rozap wrote:
           | People would have way fewer opinions on it if it was just
           | called "passing stuff in"
        
           | itronitron wrote:
           | 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 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.
        
             | kagakuninja wrote:
             | 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.
        
           | la_fayette wrote:
           | No it is a design pattern to structure code. It is also known
           | as the hollywood principle (don't call us, we call you).
           | Meaning that dependencies of a class are provided from the
           | outside, the class itself doesn't know how to create
           | instances of dependencies, just relys on the dependency
           | container (also named inversion of control)...
        
           | okino wrote:
           | Good series about the approach from a functional perspective
           | https://fsharpforfunandprofit.com/posts/dependencies/
        
           | ngc248 wrote:
           | It is a pattern where you inject the dependencies of a class
           | into it rather than create the instances of the dependencies
           | within the class. for more info -->
           | https://en.wikipedia.org/wiki/Dependency_injection
           | 
           | it makes the code cleaner and testable.
        
             | everybodyknows wrote:
             | What I find troubling about that page is that it does not
             | qualify up front whether the dependencies are:
             | 
             | A. Also depended upon by other, coequal unrelated classes,
             | possibly maintained by others, OR
             | 
             | B. Depended upon only by a single class (of higher
             | functionality)
             | 
             | Situation A is sometimes called a _portability_ interface;
             | B might be called an _internal structuring_ interface.
             | 
             | The difference has crucial implications for social power
             | relationships between the human developers and users
             | involved.
        
           | azeemba wrote:
           | Let's say Class A depends on Class B. A lot of people have
           | the instincts to have A construct B so that the callers of A
           | don't have to worry about it.
           | 
           | But this makes testing A in isolation difficult. When testing
           | A, you want to mock out B with an instance the test can
           | manipulate.
           | 
           | So we want A to not create B, instead we want B to be
           | "injected" into A. The general strategy of having B passed
           | into A is called dependcy injection.
        
           | k__ wrote:
           | The idea of DI is that you creat resources indirectly, and
           | don't call the named constructor in your code. You then use
           | interface types to interact with the resource.
           | 
           | This way, your code isn't bound to a specific implementation.
           | 
           | Some DI frameworks even go so far and define all resources in
           | a config file. This way you can switch out the implementation
           | without a recompilation.
        
           | [deleted]
        
           | Simon_O_Rourke wrote:
           | I think the poster is referring to Guice or something similar
           | - that there's a framework which selects which instantiated
           | runtime object gets injected as a dependent into another,
           | thereby automatically "figuring out" what object needs to get
           | instantiated first, and then next etc.
        
         | groundcoffee wrote:
         | +1 to this. It doesn't help that some dependency injection
         | frameworks' (ahem, looking at you Dagger2) error messages can
         | be convoluted and hard to understand.
        
         | rr808 wrote:
         | Agreed, this has taken me years. It also is tough because lots
         | of people over use it IMHO. When the logic keeps bouncing
         | around dozens of classes its too hard to follow, even if its
         | easy to test.
        
         | lamontcg wrote:
         | 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 your backend.
         | 
         | But that's a long way from glorious full DI containers where
         | you never call 'new' in your code anywhere and all object
         | creation can be dictated by config. I suspect that must be only
         | the kind of thing that people who maintain 1,000,000 line
         | codebases that are at the center of massive bureaucracies.
        
           | mrfox321 wrote:
           | At my bigco, there's no service-level DI (c++)
           | 
           | Just vanilla C++ classes, and virtual interfaces if we need
           | to mock things for unit tests.
           | 
           | No automatic wiring of the hierarchy.
        
         | number6 wrote:
         | Can you explain the concept? I feel I didn't grok it fully
        
           | ericlewis wrote:
           | Not sure about poster above, but I found a large amount of
           | value in writing tests when developing API backends. I knew
           | the shapes and potential data. Was easier to write tests to
           | confirm endpoints looked right than manually hit the api
           | endpoints.
        
             | latchkey wrote:
             | Always amuses me when I see tests spin up a http server,
             | just to call a function.
        
               | pintxo wrote:
               | 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?
        
               | ericlewis wrote:
               | technically this would be considered an integration test
               | I think.
        
               | latchkey wrote:
               | /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 your tests run _a
               | lot_ faster (and easier) not having to spin up an entire
               | http server, just to test the function.
               | 
               | As for the middleware... that is also tested separately
               | from the business logic. You don't want to tie your
               | business logic to the middleware, now do you? That
               | creates a whole dependency chain that is even harder to
               | test.
        
               | ericlewis wrote:
               | Sorry, I probably wasn't clear. I wasn't spinning up the
               | server itself, just testing the endpoints via their
               | functions. Though this likely falls more under
               | integration vs unit tests.
               | 
               | As for unit tests... I mostly add them to projects with
               | something egregious happens or a very hard bug to spot
               | can occur - just to prevent anyone else from foot gunning
               | themselves (here be dragons or whatever).
        
               | latchkey wrote:
               | You were clear. I was agreeing with you.
        
               | grogenaut wrote:
               | It used to be hard. I just spent a day in c# and gql
               | figuring out how to do API level tests with a new
               | framework. But when you get it working it's ever so much
               | faster.
               | 
               | https://github.com/gaffo/CSharpHotChocolateZeroQLIntegrat
               | ion...
               | 
               | Still playing around with the right level for this but
               | this is currently nice as it gives me compiled type
               | checking and refactoring. This is an example/extraction
               | from another project which uses react as the client.
               | Wasn't big on cross language api level tests yet for
               | speed of development, as that's a tradeoff. Redundancy vs
               | even more framework.
        
           | niklasd wrote:
           | I found this explanation very helpful:
           | https://hakibenita.com/python-dependency-injection (if you
           | program in Python)
        
         | closeparen wrote:
         | 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.
        
           | grogenaut wrote:
           | I call those lockdown tests and they're a smell. You don't
           | want to dictate the implementation, just the inputs and
           | outputs. The former leads to very brittle code, the latter
           | describes and validates the contract. It's also important
           | where you put the logic of the test in the code base when you
           | have multiple layers. This latter part is harder and system
           | dependent.
           | 
           | In many cases mocks are now over used where previously they
           | were important in say 2008. Especially now with languages
           | that support functions as objects, better generics, and other
           | features which weren't common a while back. Likewise
           | frameworks are and languages are generally way more testable
           | now which means you're doing less backflips like static
           | injecting wrappers for DateTime.now into libraries to make
           | tests work. This further allows more contract and less
           | implementation specific testing.
           | 
           | As with most things there is a lot of nuance/art to doing it
           | well and smoothly
        
           | bsuvc wrote:
           | Yeah, the mere presence of unit tests is not enough. It has
           | to actually assert something useful.
           | 
           | When I code review, I try to make sure I call out "fake
           | tests".
        
             | lscharen wrote:
             | That's a great point. Seeing lots of mocks and assertions
             | that certain functions are called is often much ado about
             | nothing since no actual code functionality is exercised. I
             | do sometimes see the return value functionality of mocks
             | used as a stub, just because the dev hasn't internalized
             | the distinction and can "make it work" with a mocking
             | library.
             | 
             | One of the only legit use cases for mocks that I have
             | personally come across is validating things like a sequence
             | of API calls to an external service, or queries to a
             | database where there is a check that certain efficiencies
             | are guaranteed, e.g. verify that an N+1 select problem
             | doesn't creep in, or knowing that a app-level caching layer
             | will prevent redundant API calls.
        
             | closeparen wrote:
             | The useful assertion to be made about gateway/repository
             | layer code is that it gets the expected behavior out of the
             | dependency. This is not an assertion you can make when
             | you've mocked out the dependency. You must make it in an
             | integration test, not a unit test. Unit tests in these
             | layers just make assertions about "it calls this method on
             | the client" or "it sends this string," which tells you
             | nothing about whether doing that is actually correct.
             | 
             | It's relatively uncommon for handler/controller code to
             | have logic worth testing, most of the time it's just
             | maintaining the separation of layers and concerns by
             | wrapping gateway/repository calls. All there is to assert
             | about it is that "it calls this function in the next
             | layer."
             | 
             | Every once in a while there's nontrivial functionality to
             | test in the middle, and unit tests can often be a good fit
             | for that, but in my experience it's more the exception than
             | the rule.
        
           | sanderjd wrote:
           | 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
           | whatever) rather than the details of its execution.
        
             | Scubabear68 wrote:
             | Amen. I have been frustrated at many jobs where developers
             | were so proud of endlessly writing mocks and spending more
             | time on their tests than on core functionality.
             | 
             | Over time I have favored very basic unit tests and leaning
             | in more on automated integration and regression tests. I
             | know the theory of unit tests catching things earlier, I
             | just don't think it matters in practice.
        
               | sanderjd wrote:
               | I think in practice unit tests are both the most and
               | least useful tests. Unit tests of code that just
               | generates output as a function of input are the most
               | useful, and unit tests of code that just glues together a
               | bunch of side effects are the least useful. I like to
               | find ways to structure things so that it is mostly
               | comprised of the first kind of code, and has so little
               | logic in the second kind of code that it's easy to
               | justify not unit testing it.
        
               | alpaca128 wrote:
               | I once saw type checking presented as kind of an
               | alternative to unit tests which doesn't rely on the
               | assumption that developers write good tests, and I really
               | like that viewpoint. A powerful type system can prevent
               | many bugs, doesn't need additional test code and doesn't
               | make any assumptions.
               | 
               | Of course it's not necessarily a full replacement, but
               | it's definitely better and more time efficient than bad
               | tests.
        
               | sanderjd wrote:
               | Yes, static analysis of types can eliminate a big class
               | of unit tests (basically just checking pre- and post-
               | conditions on types), which is a big part of why it's
               | great. But _most_ unit tests should be for logic. But
               | that 's why they aren't very useful for "glue" methods
               | which just thread things through different dependencies -
               | they shouldn't have much interesting logic.
        
             | [deleted]
        
             | closeparen wrote:
             | 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.
        
               | sanderjd wrote:
               | Yeah I have no qualms about writing mostly-BS unit tests
               | when the existing structure of a project makes it
               | infeasible to write good ones. When in Rome! But when I'm
               | starting from scratch or have a chance to do refactoring,
               | I move toward the "functional core" approach as much as
               | possible.
        
             | delecti wrote:
             | How are mocks a smell if "unit testable with (possibly
             | fake) dependencies" is okay? That's what mocks are.
             | 
             | Or do you mean specifically "expecting" interactions with
             | those mocks? Because I agree that's usually not that
             | valuable.
        
               | sanderjd wrote:
               | Basically what Cyph0n said, fakes and mocks aren't the
               | same thing.
               | 
               | But it isn't quite as smelly when I see a mock (or "stub"
               | more typically) used as an expedient way to create a fake
               | to pass in as a dependency.
               | 
               | Like you said, it is asserting on the interactions with a
               | mock that is what primarily smells bad to me. I very
               | rarely (honestly I think maybe never) see this done in a
               | way that isn't just rewriting the implementation of the
               | method as expectations in the test.
        
               | Cyph0n wrote:
               | Fakes are not mocks. A fake is an actual implementation
               | of the dependency that runs in-process/in-memory. This
               | means that, unlike with mocks, your test code does not
               | dictate the behavior/outputs of the dependency.
               | 
               | Ideally, service/library owners would write and maintain
               | the fake to ensure that it stays in sync as changes are
               | made to the actual service.
        
           | Izkata wrote:
           | 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.
        
             | closeparen wrote:
             | Every damn day. It's the thing that puts me most at risk of
             | falling out of love with software engineering.
        
             | the_only_law wrote:
             | I had a take home test a year or two ago and I got grilled
             | during the interview for not writing crap like that.
        
         | monero-xmr wrote:
         | Another solution is to eliminate classes and only use structs
         | or similar plain objects. Makes mocking and testing functions
         | much easier. At this point I see no reason for OOP whatsoever
         | and consider it a big mistake.
        
           | [deleted]
        
           | alpaca128 wrote:
           | OOP tends to encourage thinking in more abstract ways than is
           | often necessary imho. I feel like learning a language with
           | only structs had a positive effect on my coding ability (as
           | someone who more or less started with Java).
           | 
           | The few times I had to use Java afterwards I felt the same -
           | all OOP features were unnecessary or at least didn't feel
           | like the most straightforward approach. Nowadays I never use
           | classes in Python, JS etc., it's just not needed - and in the
           | case of Python it makes JSON insanely cumbersome.
        
           | sanderjd wrote:
           | This seems totally orthogonal to me.
           | 
           | Using a totally non-OOP functional style, you can either
           | instantiate state within a function or pass it in from the
           | calling context, which is the same trade-off that dependency
           | injection targets.
        
             | monero-xmr wrote:
             | If you work on a legacy code base with tens of many
             | millions of lines of code, the non-OOP will be a better
             | code base. My opinion.
        
               | sanderjd wrote:
               | I wasn't disagreeing (or agreeing) with that opinion.
               | It's just orthogonal to whether or not dependency
               | injection is a useful approach.
        
           | optymizer wrote:
           | Getting rid of data abstraction and encapsulation is throwing
           | the baby with the bath water.
           | 
           | The abstract concept of OOP (messages between complex
           | objects, as defined by Alan Kay) is an attempt at mimicking
           | biological systems. Most modern languages implement data
           | abstraction, but call it OOP, where they encapsulate some
           | functionality with the data it operates on. Really helped
           | with varying data formats in the AirForce in the 60s,
           | apparently. There isn't anything wrong with this abstract
           | concept either - it's a way of structuring a solution, with
           | trade-offs.
           | 
           | Support for unit testing and mocking has little to do with
           | OOP, and everything to do with the underling platform. Both
           | C++ and Java, for example, do not have a special runtime mode
           | where arbitrary replacement of code or data could occur. This
           | is necessary for mocking functionality that is considered
           | implementation detail and hidden by design. The hidden part
           | is great for production code, not great for testing.
           | 
           | For example, if an object in java has a field like 'private
           | final HttpClient client = new CurlBasedHttpClient();' this
           | code is essentially untestable because there is no way in
           | Java to tell the JVM "during testing, when this class
           | instantiates an HttpClient, use my MockHttpClient".
           | 
           | Kotlin fixed some of that with MockK, which can mock the
           | constructor of a Kotlin object, and you can return your mock
           | implementation when the constructor is invoked.
           | 
           | Clearly, it's a platform issue. There could be a world where
           | you could replace any object in the stdlib or any method or
           | field with a mock version. JavaScript is much more flexible
           | in that regard, which is why unit testing js code is much
           | easier.
           | 
           | The root of it all stems from the fact that unit tests need
           | to change some implementation details of the world around the
           | object, but production code should not be able to, in order
           | to get all the benefits of encapsulation.
           | 
           | If you get rid of modern OOP, you are swinging the pendulum
           | in the opposite direction, where your tests are easy to write
           | on any platform, because everything is open and easily
           | accessible, but your code will suffer from issues that creep
           | up when structures are open and easily accessible, such as
           | increased coupling and reduced cohesion.
        
             | taffer wrote:
             | OOP does not have a monopoly on abstraction and
             | encapsulation. What OOP does, namely object-level
             | encapsulation, is just a very extreme way of structuring
             | code around mutable state. IMO the better alternative is to
             | avoid mutable state as much as possible and keep data and
             | code separate. Code structured as pure functions is easy to
             | test and encapsulation can be done at the module level.
        
               | kagakuninja wrote:
               | OOP does not require mutable state. OOP has its origins
               | in imperative languages, and so in the past OOP often
               | involved poor management of mutable state.
               | 
               | I am a Scala programmer, and our code mixes OO and FP.
               | Almost all of our classes are completely immutable.
               | 
               | In the end, you will always need to encapsulate data and
               | functions in some manner. The FP approach involves module
               | systems, but as I understand it, objects in Scala
               | actually provide a better module system than found in
               | pure FP languages.
        
               | optymizer wrote:
               | My point is that improving the state of unit testing has
               | little to do with OOP, and everything to do with the
               | environment that the code runs in.
        
             | monero-xmr wrote:
             | I believe that combining state and functionality - the root
             | of OOP - is a mistake. Tons of programming patterns and
             | concepts exist to solve this fundamental mistake. When you
             | stop using classes all of your code becomes so much
             | cleaner, easier to reason about, test, debug, and so on.
             | You can never create only pure functions in the real world
             | but you get closer to this ideal.
             | 
             | I stand by my statement that OOP is totally unnecessary.
        
               | sirsinsalot wrote:
               | Yes but if you represent 2 functions over some state a(s)
               | and b(s) then you have the same issue with this as if it
               | was:
               | 
               | Class s: fun a(self)... fun b(self)...
               | 
               | The problem is mutability not how state is bound to a
               | function.
        
               | JanisErdmanis wrote:
               | The idea is to make the functions pure and return the
               | state 'a(s_1) -> s_2, value'. Makes so much easier to
               | test and write concurrent programs.
               | 
               | Though it's not always practical, like when needing to
               | push an element to an array for making updated state. It
               | is nevertheless possible to shave of pure parts
               | considerably making mutability easier to maintain.
        
               | maphew wrote:
               | I don't understand but am intrigued. Can you point to
               | some resources that elaborate on and demonstrate what
               | you're talking about here?
        
               | optymizer wrote:
               | You can believe that the world is flat, announce that
               | boldly and stand by your statement. It doesn't mean it's
               | true in reality, only that it's true in your mind.
               | 
               | Edit: This is more blunt than I intended it to be. For
               | what it's worth, I happen to agree with you in principle,
               | but I also think you're taking the roof off the car here
               | and boldly claiming that the experience is so much better
               | in the summer. What about winter? What about when it
               | rains? What are the trade-offs? Not mentioning the
               | downsides means that you either haven't found them,
               | haven't thought about them or are intentionally omitting
               | them from the discussion.
        
             | Olreich wrote:
             | Recursion is an obfuscated way to run a loop with a stack.
             | At first it seems like magic, and makes things so much
             | easier. When trying to replicate it the first time actually
             | using a loop and stack it's really hard to get right. But
             | by the time you've done it two or three times, it's as easy
             | as breathing.
             | 
             | Similar, OOP is an obfuscated way to run a function with a
             | context. The first time you separate the data in the
             | context from an object, it'll be hard to get it right and
             | make it easier than to just use Objects and Methods. But
             | once you've done it two or three times, it's as easy as
             | breathing.
             | 
             | You can optimize loading the context to be better than
             | copying a bunch of unaligned data in lots of ways, but
             | polymorphism is a common way to get there.
        
           | adlpz wrote:
           | I agree with OOP not being needed at all, but I don't agree
           | on this being an alternative to dependency injection.
           | 
           | However you structure it, there will always be "glue code"
           | that ties the nice inmutable code with the _outside-
           | interacting_ bits, and if you want to unit test those,
           | dependency injection (with functions or state, not classes or
           | instances) is still the way to go.
        
             | mrloba wrote:
             | True, but there might not be a big need for unit testing
             | the glue code. By its very name it doesn't contain much
             | logic to test. Integration tests are more valuable in this
             | case.
        
         | Traubenfuchs wrote:
         | I'll add to that: the difference between "offline" unit testing
         | and spring integrarion testing with test containers and real
         | application contexts + all the related concepts like @SpyBean,
         | @Mock, @MockBean...
         | 
         | I always hated testing and I still do, but every time I commit
         | to doing it right I catch so many errors before QA.
        
       | rubicon33 wrote:
       | Eating fiber.
        
       | em-bee wrote:
       | object oriented programming.
       | 
       | i must have encountered it during my computer science classes and
       | i certainly did some form of oo programming with LPC in MUDs, but
       | only when i was programming modules in Pike for the Roxen
       | webserver, it really clicked how oo programming worked.
       | 
       | in Roxen each http request causes a request object to be
       | instantiated which lives for the lifetime of the request.
       | further, each Roxen module gets instantiated as an object for the
       | lifetime of the server process. the request object would call
       | module objects to process the request. the modules would make
       | changes to the request object which would produce the response to
       | the http request, whereas storing data in a module object caused
       | it to be persistent.
       | 
       | i have been working on this for a while when one morning i woke
       | up with a literal eureka moment as i realized how objects and
       | encapsulation worked.
       | 
       | this happened a few decades ago and it was the most clear moment
       | of this kind that i can still remember.
        
       | thyrox wrote:
       | The power of follow ups (especially in sales)
       | 
       | One thing which held me back for a very long time was not
       | following up with people who didn't show much interest initially.
       | 
       | I wasted so many good leads thinking it is impolite to follow up
       | with people after contacting them once. My whole life changed
       | once I understood the power of follow ups and understanding that
       | most people are so busy that it takes at least 6 reminders before
       | most people will take any substantial action.
       | 
       | The reverse is also true. People say a lot of things and most of
       | the times you never cross the bridge or reach it. Nowadays, I
       | rarely argue about anything and don't act on stuff until a person
       | reminds me once or twice. This small filter can be like a miracle
       | for saving your time and energy.
        
         | satvikpendem wrote:
         | Agreed. When I was doing sales, I would follow up with people
         | seven times before they replied. I used to feel bad until I
         | realized that it worked, then I just automated that part and
         | didn't think about it further, the leads once they replied were
         | sent to my CRM where I could then set them up on a call or some
         | other action.
        
         | aj7 wrote:
         | You were not trained well.
         | 
         | The principal element in sales is asking for the order.
         | Everything, and I mean everything, follows from that. If you
         | had been trained this way, following up would be second nature.
        
       | krosaen wrote:
       | The Kalman filter. I felt like I understood it watching some
       | videos but it always turned out I didn't really understand it
       | well enough to put it to use or explain it to others.
       | 
       | Gaining a better understanding ultimately just took a lot of time
       | playing with the equations and understanding how measurement and
       | process noise/uncertainty get incorporated into the Kalman gain,
       | and how that in turn affects the updated state estimate - e.g if
       | you have zero noise in the measurement, you end up fully trusting
       | your measurement. This tutorial [1] is the one I ended up
       | studying. This is a case where memorizing the equations (with the
       | help of Anki) helped me reflect on them and keep everything in my
       | head long enough to improve my understanding.
       | 
       | http://www.cs.unc.edu/~welch/media/pdf/kalman_intro.pdf
        
         | passion__desire wrote:
         | > This is a case where memorizing the equations (with the help
         | of Anki) helped me reflect on them and keep everything in my
         | head long enough to improve my understanding.
         | 
         | Dr. Mark Colyvan once preparing for his test couldn't
         | understand a proof. So he went ahead and tried to memorize it
         | anyway but in the process of memorizing he understood the proof
         | so he had no need to memorize it now.
         | 
         | https://www.youtube.com/watch?v=KqYh1h2t8WU
        
       | mustafabisic1 wrote:
       | For me it was basic statistics. Statistical significance and
       | variability.
       | 
       | Had Statistics in college, but only understood it now that I use
       | it to understand data.
        
       | _huayra_ wrote:
       | Pretty much anything related to _personal growth_ (however you
       | define it) takes time to click, but it took a while to understand
       | two things at a deep enough level to begin to make change:
       | 
       | * everyone has a set of habits that served them well during
       | childhood, but may be maladaptive as an adult (e.g. getting angry
       | is almost universal a sign of this maladaptive childhood habit
       | rearing up). Book recommendation [0]
       | 
       | * the _fear of hope_ is a key thing to understand when it comes
       | to why people (myself included) hold themselves back. Taking the
       | first step can feel terrifying because it demonstrates that one
       | is responsible for creating one 's own life. Book recommendation
       | [1]
       | 
       | The only way out of this is to deliberately design your days so
       | that you get the most out of them, even if it is fumbling at the
       | start. Add in some times to relax here and there, but if you have
       | a plan, it's much easier than staring at a blank Saturday with
       | the vague goal of "I MUST learn JS/Rust/Go/Scala or my career
       | will be over!!!" and then getting nothing done.
       | 
       | [0] https://www.goodreads.com/book/show/23129659-adult-
       | children-...
       | 
       | [1] https://www.harpercollins.com/products/how-we-change-ross-
       | el...
        
       | thesnide wrote:
       | Working with others.
       | 
       | Really.
       | 
       | I was super annoyed and insanely annoying to work with for years.
       | 
       | Then I understood that difference is hard to cope with, but more
       | often than not, good. As it trades some short term efficiency to
       | long term one.
       | 
       | Same with your output. If it is dumbed down to a level everyone
       | can understand it, you _really_ learned it.
        
         | mattbaker wrote:
         | That's cool, what kinds of things helped you learn this? I bet
         | those things would be really valuable to a lot of people if you
         | felt like sharing.
        
           | thesnide wrote:
           | I'd say _parenting_ is the one that really made a difference.
           | 
           | Not because I had a strike of common sense, but because I
           | actually cared very much and started to listen to others. I
           | didn't want to be horrible to my kids.
           | 
           | So "starting to listening to others". Every troll has a
           | kernel of truth. And sometimes what you consider a troll
           | isn't one in the first place.
           | 
           | Which is very apropos those days, where everyone is confined
           | in their own echo chambers by all those clever social media
           | algorithms that always favor short term bliss.
           | 
           | And yes. Trying to explain things to my kids enables me to
           | understand those things _way_ deeper.
        
       | tezza wrote:
       | 1/2) Trusting Institutions
       | 
       | Institutions such as Police, Universities, NHS, Scouts, MsF,
       | Religions, Churches, YCombinator et alia have a hierarchy of
       | internal loyalties in strict precedence:
       | 
       | * The Staff Member
       | 
       | * The Staff Member's Family
       | 
       | * The Friends of the Staff Member
       | 
       | * The Colleagues of the Staff Member
       | 
       | * The Group within the Institution the Staff Member belongs to
       | 
       | * Wider Groups in the Institution
       | 
       | * The actual powerbrokers within the Institution
       | 
       | * The acknowledged Leadership of the Institution (may be
       | different to actual powerbrokers)
       | 
       | * The actual goals of the Institution
       | 
       | * The acknowledged goals of the Institution (may be different to
       | actual goals)
       | 
       | * Helping YOU in accordance with what the acknowledged goals of
       | the Institution are...
       | 
       | Only when all the loyalties in that list are satisfied is there
       | the slightest chance you may get anything positive from the
       | Institution.
       | 
       | Despite the long list of higher precedence loyalties it is still
       | frequently possible to have positive outcomes...
       | 
       | But because it is a long list of loyalties far more important
       | than helping YOU, there are often breaks.
       | 
       | And because people and families and relationships are involved
       | they can change at any moment.
       | 
       | So trusting Institutions to do the best for you or act honourably
       | needs to be carefully weighed against the likelihood that will
       | happen
       | 
       | 2/2) Mortgages
       | 
       | How mortgage repayments change over time as you pay off some of
       | it (YMMV)
        
         | _huayra_ wrote:
         | > How mortgage repayments change over time as you pay off some
         | of it (YMMV)
         | 
         | This is a big one people buying houses recently due to FOMO
         | don't understand: you're really not building equity the first
         | few years because almost all of your monthly payment is going
         | to interest. The "irrecoverable cost" of owning a home can
         | often be higher than renting in some HCOL areas now, although I
         | understand that people buy for more emotional reasons (e.g. not
         | wanting to yank their family around to a new place each year to
         | avoid being at the mercy of a bad landlord on each lease
         | renewal).
        
       | LAC-Tech wrote:
       | I'm currently doing a dive into classic distributed systems
       | papers, mainly from the 70s (actor model, logical clocks, that
       | kind of stuff).
       | 
       | I'd "understood" the concepts before, but now because I am:
       | 
       | - brushing up on my math to understand every equation or proof
       | they drop in there
       | 
       | - reading them in combination with applied stuff that uses the
       | same concepts, ie the "designing data intensive applications
       | book"
       | 
       | - reading over them slowly, I want my fundamentals to be strong
       | and etched into my head
       | 
       | Things are clicking in a way they never did before.
       | 
       | TL;DR - studying compsci concepts, slowly, from multiple angles
       | (completely mathematical to practical engineering) is just a
       | different level of understanding from doing one or assuming your
       | mind will bridge the gap.
       | 
       | YMMV.
        
       | Nimitz14 wrote:
       | Fourier transform
        
       | nathanmcrae wrote:
       | For me it was lambda calculus. I remember in high-school going
       | through the motions of beta-reduction but having no idea what it
       | meant. Much later I think I finally saw an implementation of
       | natural numbers and addition using bare lambda calculus and it
       | clicked that you really can represent any computation with just
       | variables, abstraction, and application.
        
       | gpsx wrote:
       | 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 they just say that?" I looked back
       | at the book and they said exactly what I would have said. I guess
       | sometimes words are not enough.
        
       | apienx wrote:
       | Bayes theorem really clicked when I saw 3Blue1Brown's visual
       | representation. https://youtu.be/HZGCoVF3YvM
        
       | dionidium wrote:
       | I was at a Denny's around 2AM once and in an instant became
       | totally convinced that I understood the Ontological Argument
       | perfectly and that it was 100% correct and undeniable proof of
       | the existence of God. But then I lost it.
        
         | 082349872349872 wrote:
         | which of the many Ontological Arguments?
         | 
         | (eg Godel's
         | https://en.wikipedia.org/wiki/Godel%27s_ontological_proof#Ou...
         | is an exercise in order theory, in which one proves that a
         | certain axiomatically presented mathematical structure has to
         | have a maximum, which then, for the religiously inclined, could
         | be identified with God)
        
       | mixmastamyk wrote:
       | Not my click exactly, but hearing the "Unicode sandwich"
       | described ~15 years after studying Unicode and using it in
       | production was the last piece of the puzzle no one ever mentioned
       | before. Or perhaps in not so clearly.
        
       | user3939382 wrote:
       | f(x) = y etc in linear algebra in school. By the time I was
       | learning this in high school I'd already been programming for
       | several years and perfectly understood the concept of function
       | inputs and outputs. It wasn't until my early twenties that I
       | realized this was just an alternate notation for functions and
       | was so simple.
       | 
       | Sad that my math education was just focused on "memorize steps"
       | for concepts that weren't clearly explained.
        
       | klysm wrote:
       | The expression problem. I had vague notions of "horizontal" and
       | "vertical" abstraction but they weren't concrete enough to
       | discuss or make informed decisions about.
        
       | djmips wrote:
       | 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.
        
         | [deleted]
        
         | richardw wrote:
         | 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.
        
           | peterfirefly wrote:
           | I remember that we found that entirely obvious (well, most of
           | us) in my high-school physics class.
           | 
           | What I still don't understand, though, is how photons can
           | "wave" or how "long" a photon is (or how they can have any
           | "length" at all).
           | 
           | What I also didn't understand back then was how light can be
           | slower when there is matter present -- or how a photon could
           | somehow know that it was supposed to cause another, very
           | similar, photon to be released in just the right angle when
           | it hit something that, if zoomed out enough, looked like a
           | mirror. How on Earth could the photon know that the photon it
           | was hitting was part of a flat surface and what its
           | orientation was? I even started using that mirror question as
           | a litmus test of physics students once I started at uni
           | (comp.sci.) -- pretty much all of them failed, not by not
           | knowing the answer but by not understanding that this was
           | even a question that required an answer.
           | 
           | I now know that the photon -- the wave(s) in the
           | electromagnetic field -- cause atoms (and in particular their
           | electrons) to move about a bit, which in turn cause waves in
           | the electromagnetic field. And by adding up all these waves,
           | we get the resulting wave which moves slower than c and which
           | might seem to have been reflected at an angle. Why my physics
           | teacher in high-school didn't tell us that, I don't know.
        
         | 7373737373 wrote:
         | I'm not sure how this works out in media which slow down light
         | 
         | https://en.wikipedia.org/wiki/Cherenkov_radiation
         | 
         | There, e.g. gravitational waves will be at c (in a vacuum), but
         | wouldn't photons experience time there?
         | 
         | Edit: I suppose the photons are still actually moving at c
        
       | mattsears18 wrote:
       | Functions in calculus... I never understood them until I learned
       | about functions in programming several years later. They're the
       | same damn thing! I really wish I had learned to program before
       | learning calculus.
        
         | peterfirefly wrote:
         | Hopefully, you learned about functions long before calculus...
         | 
         | When we learned about functions back in something like 5th
         | grade, I noticed that my classmates were very confused by the
         | concept. I also remembered that I found the explanations in the
         | book and the ones from our teacher quite unclear.
         | 
         | My guess back then was that the notation was partly to blame
         | for that -- and I still think that's true.
         | 
         | So, my questions to you are:
         | 
         | 1) were you taught the "f(x) = 3x + 2"-style notation? 2) have
         | you seen the "x --> 3x+2"-style before? Or the "f: x -->
         | 3x+2"-style, where we give the function the name f? 3) did you
         | find it confusing that f(x) was sometimes used to refer to the
         | function and sometimes to its value when applied to x? The
         | notation of question 2 should eliminate that confusion.
         | 
         | I'm guessing that part of the confusion was also that your
         | teachers were unclear on what functions could be used for --
         | but didn't they ask you to draw graphs for various functions?
         | And didn't they also introduce functions like sin/cos/tan?
        
       | hammock wrote:
       | >longer wires mean more resistance while thicker wires mean less
       | resistance.
       | 
       | Intuitively (perhaps incorrectly) I would assume that it's like
       | trying to force a fluid through a skinny long pipe vs a wide pipe
       | - the skinny long pipe will have higher pressure inside.
       | 
       | Or, the long thin wire has more distance for the current to
       | travel (= more resistance), while the thicker wire has more
       | "options" for the current to choose a path of least resistance
       | (literally), tending towards a lower overall resistance compared
       | to a thinner wire of the same length
        
       | richardw wrote:
       | In OO, the interface. It seemed like the most useless construct.
       | Zero implementation. Why make something with no implementation?
       | 
       | Later I realised that the benefit isn't the code, it's the
       | freedom you gain later in choosing the implementation. You can
       | create an interface and add a simple implementation, then later
       | swap it out for something more robust. All you're agreeing to now
       | is the contract of what needs to be done, without any
       | restrictions on how.
        
       | ergonaught wrote:
       | Basic music theory.
       | 
       | Almost no one I encountered bothered to actually explain
       | anything. They simply regurgitated things and I guess expected me
       | to somehow intuitively understand something or other.
        
         | parasti wrote:
         | I recently learned what solfege actually is from a simple
         | ChatGPT conversation after hearing about it for many years.
        
         | myself248 wrote:
         | Oh my god. Music and photography are my two pet peeves. They
         | have their own twisted vocabulary for everything that surely
         | exists for historical reasons, but might as well be purpose-
         | built to obstruct polymaths from connecting their concepts to
         | other concepts in other fields.
         | 
         | My single largest goal when I'm teaching, is to find an
         | appropriate analogy to a concept that my student already
         | grasps, and bridge it to the new concept. Some fields make this
         | super easy -- MechE and electronics, for instance, if you
         | understand one, you're well on your way to understanding the
         | other -- and some make it super hard.
        
         | linuxlizard wrote:
         | Sadly, mathematics classes are like that as well. Instructors
         | start throwing equations on the board, expecting us to somehow
         | connect it all together. The best math textbook (Theory of
         | Algebra) I ever read had little sections about the person who
         | revealed a particular subject, why they were studying it, and
         | how the subject is used.
        
           | luuuzeta wrote:
           | Sadly many professors fall victim to the Curse of Knowledge.
           | It doesn't help they need to follow a tight schedule and
           | intuition isn't something you can develop in a single
           | lecture. I suppose self-study and repetition is the most
           | likely solution.
           | 
           | >The best math textbook (Theory of Algebra) I ever read had
           | little sections about the person who revealed a particular
           | subject, why they were studying it, and how the subject is
           | used.
           | 
           | I've found the best type of books provide motivation for
           | concepts, how they have evolved, etc.
           | 
           | Take Computer Science for example, many of its concepts were
           | area of research for decades but from a student's perspective
           | it seems these concepts were always here instead of being
           | constantly refined until the states they're now in.
        
           | gen_greyface wrote:
           | Do you remember what the book was called, or the writers.
        
         | passion__desire wrote:
         | I can't find the link. But I saw a minidocumentary about a
         | person who trained his ears to listen to harsh noises. Once he
         | attuned his ears, he could write music in those new musical
         | notes.
        
         | fooblaster wrote:
         | Any good resources that do it the right way?
        
           | ShredKazoo wrote:
           | This site is nice https://www.musictheory.net/lessons
           | 
           | Music theory is not inherently complex, but the notation adds
           | incidental complexity -- it's sort of like the QWERTY
           | keyboard; once you're stuck on a suboptimal way of doing
           | things it's hard to move off.
        
           | marmetio wrote:
           | I've been using Punkademic and I'm very happy with it.
        
             | amelius wrote:
             | Looks like I have to pay before I can see what "Tools you
             | will need to learn Music Theory quickly and efficiently".
             | 
             | https://www.punkademic.com/course/music-theory-
             | comprehensive...
        
               | marmetio wrote:
               | That's how a paid course works?
        
               | amelius wrote:
               | Yeah, but I'm not going to start a course if I don't know
               | what tools and equipment I need for it, upfront.
        
           | Myto wrote:
           | Michael New on Youtube.
        
       | sokoloff wrote:
       | Systems in equilibrium. A lot of my college engineering courses
       | had these (what seemed to me to be) hand-wavy assertions of
       | equality and what seemed like just an assumption that the system
       | would converge to that point.
       | 
       | I was probably in my late 30s or early 40s before I really
       | grokked _why_ that tended to be true. (I could blindly accept and
       | grind through the equations to get the answers in college, but it
       | was decades later that I developed a feel for _why_.)
        
       | Overtonwindow wrote:
       | Staying out of debt. A simple concept that took me until I was 37
       | to appreciate and understand.
        
         | djmips wrote:
         | Yes, don't rent money unless you have a very good plan.
        
       | vegetablepotpie wrote:
       | UML
       | 
       | When I first saw it, I thought it was a _process_ step that was
       | unnecessary.
       | 
       | Then I thought it was a way to program visually, but generated
       | code only works in narrow domains.
       | 
       | I realize that UML is tool to define your system, and it lays
       | bare your assumptions, which is one of the hardest problems in
       | computing.
        
         | urthor wrote:
         | UML is hard.
         | 
         | Any abstraction can evolve into wasted time not making the
         | thing.
        
       | jonsen wrote:
       | Recursion. I tried and tried and tried. Only when I untried the
       | exact same number of times did it click.
        
       | hospadar wrote:
       | Voltage and amperage for me, years after a college electronics
       | course and a childhood of soldering kits I finally started to get
       | it. I was always tripped up with analogies about how it's like
       | water in a pipe or something, which can be useful, but aren't
       | quite right.
        
         | clarkdale wrote:
         | I would love to hear this in a way other than water in various
         | sized pipes.
        
         | marshmellman wrote:
         | Can you share what helped it click? I'm in the same boat,
         | trying to understand it through analogies.
        
           | carapace wrote:
           | 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 knows.
           | That's just the way it is.)
           | 
           | 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...)
           | 
           | When electricity moves it obeys a (very simple) Law called
           | (Ohm's Law) e.g.:                   E = V/R
           | 
           | The current (E) is the Voltage divided by the Resistance.
           | 
           | E.g. is I have a 5 Volt power supply and I put a 100 Ohm
           | resistor across it (remember that voltage is always between
           | two points) then 5/100 Amperes of current will flow through
           | it.
           | 
           | Also, If I take just the resistor and drive 0.05 Amps through
           | it, it will develop a voltage of 5 volts, as measured from
           | one end of the resistor to the other end.
           | 
           | Now if that doesn't help you, remember the advice of John Von
           | Neumann to Felix Smith: "Young man, in mathematics you don't
           | understand things. You just get used to them."
        
       | rolisz wrote:
       | Differential equations took a couple of years to grok. I first
       | encountered them in high school, while preparing for physics
       | Olympiad. I could solve basic differential equations by following
       | the "rules" (such as for dampened oscilator), but I didn't
       | understand what was going on under the hood. When in university I
       | did some more math courses, suddenly differential equations
       | clicked and made sense (and I could even derive some of the
       | rules)
        
         | atonse wrote:
         | I failed calculus twice in college.
         | 
         | Then a summer went by before the third time I took it.
         | 
         | When I stepped into class that third time, everything clicked
         | and it all felt very obvious to the point where I could
         | anticipate where the lecturer's equations were headed.
         | 
         | I stopped attending class and still got an A. I even ended up
         | helping classmates in a study group.
         | 
         | I still can't explain what that brain process was that resulted
         | in the pieces subconsciously lining up over the summer.
        
         | rramadass wrote:
         | Any books you could recommend?
        
       | I_complete_me wrote:
       | Two are very pertinent for me at the moment:
       | 
       | 1. The Monty Hall problem
       | 
       | 2. The Wason Selection Task.
       | 
       | I read about the first one eons ago and was impressed that
       | Marilyn Von Savant was vindicated. Shoutout to her!
       | 
       | The name Wason was unknown to me but I bought a book called The
       | Oxford Companion to The Mind (new in 1987!) and his 'task' was
       | featured in it (pg. 639 in my edition). I spent a lot of time
       | satisfying myself as to the answer and kind of got there. This
       | Christmas I am reading Stephen Pinker's "Rationality" and the
       | description of both have allowed the penny to fully drop. I
       | hadn't been thinking about these puzzles for ages and then when
       | they cropped up "unexpectedly" I grokked them easily. They
       | "clicked". There is a certain type of wisdom that comes with
       | passed time.
        
         | rubberband wrote:
         | Oh thank goodness. Another human not cool enough to "get" the
         | Monty Hall problem at first. I thought I was the only one...
         | Took me years...
        
       | sdenton4 wrote:
       | Lie Groups... I signed up for a grad level course in my second
       | year, and had no idea what was going on. Eventually I did my PhD
       | on algebraic combinatorics, which works with Lie Groups quite a
       | lot, but it took years to internalize all the ideas needed to
       | have any intuition at all.
       | 
       | https://en.m.wikipedia.org/wiki/Lie_group
        
         | fooblaster wrote:
         | Although I still don't understand liegroups with significant
         | mathematical rigor, I do think I finally understand why they
         | are used in code for computer vision and state estimation. It
         | took me a shockingly long time to understand why.
         | 
         | This paper was the catalyst to me finally grasping some of the
         | details: https://arxiv.org/abs/1812.01537
        
       | atemerev wrote:
       | The relationship between entropy and states of matter (including
       | pressure and temperature). How "degrees of freedom" are
       | calculated and compared for gas molecules, if they are infinite.
       | All that stuff.
        
       | nmca wrote:
       | The meaning of "adaptive" in the sense of evolutionary theory,
       | and the capacity of species to evolve to extinction. Reading the
       | selfish gene as a youth I missed the point; "an alien god" [0]
       | and some Hanson articles got the point across finally.
       | 
       | [0] https://www.readthesequences.com/An-Alien-God
        
       | ruune wrote:
       | Long time ago, but mathematical functions.
       | 
       | In hindsight stupid, but it took me embarrassingly long to
       | understand that a function just takes a value for x, calculates
       | it with the rest of the numbers in the function and that way
       | basically assigns a y-value to every x-value. No idea why it took
       | me so long, I didn't have any similar problems with high school
       | math
        
       | W0lf wrote:
       | Discrete mathematics and all sorts of its application in real-
       | world (software development) related problems. Also how any given
       | solution to a problem in one problem domain can be transferred to
       | a problem in another unrelated domain. Think Galois theory but
       | waaaay less fancy :-)
        
         | philjohn wrote:
         | When I did Mathematics A-Level's, we had to select four
         | modules. I chose pure 1, pure 2, stats 1 and, new that year,
         | discrete 1.
         | 
         | So many useful groundings in various super important comp sci
         | concepts.
        
       | mablopoule wrote:
       | "The road to hell is paved with good intentions.", "Perfect is
       | the enemy of good", and more generally idioms that sound like
       | either paradoxical assertions or obvious platitudes.
       | 
       | It wasn't until late teens/early twenties that lots of those
       | piece of wisdom went from "cliche phrases you've heard all your
       | life", to (often) deeply impactful aspect of human conditions.
       | 
       | The "road to hell" idiom explicitly didn't click until I had
       | enough experience with counter-productive efforts who looks good
       | on the outside, but actually fail to take into account a more
       | nuanced reality.
       | 
       | It also kinda works with the distinction between "values I
       | believe in" and "arguments articulated around shared values".
       | Being able to disagree on something even when (especially when)
       | it's invoking values I believe in is one of the most important
       | thing I've gained as I matured, and yet it needs experience to
       | 'click'.
        
         | jrockway wrote:
         | I never remember the right "direction" for these platitudes. I
         | feel like "good is the enemy of perfect" is just as valid as
         | "perfect is the enemy of good". Meanwhile, the road to heaven
         | is also paved with good intentions. Good paving material, it
         | turns out, but asphalt is cheaper.
        
       | [deleted]
        
       | JanisErdmanis wrote:
       | 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 superconducting phase" ;)
       | 
       | Quantum computers. I was so deceived by all the hype that it took
       | me long to see it as SU(N) matrix product accelerator.
       | 
       | Zero knowledge proofs and Shamir transform to non-interactive
       | protocol. The tunnel analogy did quite a harm to me, also the
       | math was just unbearable (defining set of languages and etc).
       | Only a year ago when I got an old paper on "Observational
       | wallets" describing how to prove 'log_g A = a' and 'log_g A =
       | log_g B' the whole 'proving statement without revealing secret'
       | after long frustration and angst made sense to me. If I had
       | encountered finding Vodo analogy first, It would have clicked
       | much quicker to me.
        
         | peterfirefly wrote:
         | 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.
        
       | screye wrote:
       | 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 non-services based value ?
       | 
       | - How can there be any economic value in middle-men ?
       | 
       | - Is speculation on artificially limited assets (housing) just a
       | pyramid scheme ?
       | 
       | - How is it NOT a zero sum game ?
       | 
       | - Is a Fiat currency just 'vibes based economics' ?
        
         | bbayles wrote:
         | Here's something to think about: suppose you buy an assortment
         | of candy from the grocery store and distribute a uniform
         | collection of pieces to a room full of middle school students.
         | 
         | Some students will like the sour candy; others won't. Some will
         | like coconut; others won't. Some will love nuts; others will
         | hate them.
         | 
         | Now you let the students talk to each other and trade candy.
         | The ones who like sour candy but hate coconut will trade with
         | the students with the opposite preference, and so on.
         | 
         | At the end of the trades, everybody is happier with their new
         | bundle - why would they have traded otherwise? So value has
         | increased. But this is magic - no new candy was produced!
         | Through trade we have increased overall value - the exercise
         | was positive sum.
         | 
         | With some effort you can see that a middle man might add value
         | by expediting trades - connecting people who like coconut with
         | people who hate it (suppose there are thousands of students in
         | the class who all speak different languages).
         | 
         | And you can see how fiat currency might make things easier.
         | Rather than having to come up with the barter value of coconut
         | candy and sour candy to nuts, you can convert both to a single
         | unit and then trade units.
        
         | db48x wrote:
         | I can answer two of those. Middle-men are useful whenever there
         | is fan-out or fan-in. A producer wants to sell to consumers, so
         | there is a lot of fan-out. The producer could get the consumers
         | to come to the factory and to buy good directly, or they could
         | go door to door, or they could use middle-men: retail stores.
         | The stores buy the goods wholesale and take on the work of
         | selling them to individual customers, in exchange for a portion
         | of the total profit. Customers visit stores for the same
         | reason, to avoid having to visit every factory for every
         | producer of the goods they want. With time and effort saved on
         | both sides, the stores benefit both the producers and the
         | consumers.
         | 
         | The economy is not a zero-sum game because we are summing the
         | value, not the prices, of the goods that are traded. If I grew
         | wheat and you grew apples, then we can trade between us to
         | mutual advantage, because after the trade we can both make
         | apple pie (assuming we can find some cinnamon). The total
         | amount of wheat and apples hasn't changed, but their value has
         | gone up. Every trade involves two parties who must both believe
         | that they will gain value by the trade. Of course it is
         | possible for either party to be mistaken (or even deliberately
         | swindled by the other party), but as long as the majority of
         | trades have net positive value then the economy as a whole will
         | be a positive-sum game.
        
         | xvedejas wrote:
         | 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.
        
       | theptip wrote:
       | Domain Driven Design. The book by Eric Evans lays out a bunch of
       | concepts and as a developer that had not owned the architecture
       | of a big domain, it was hard for me to see exactly where they
       | fit. But after reading the book a couple times, and then
       | encountering a few tricky domain modeling challenges, I started
       | to see where these patterns add value. Also, as I started trying
       | to describe the cohesive domain architecture of the system to a
       | growing engineering organization, I also clicked on the advantage
       | of having a standardized set of terminology for the problem,
       | rather than inventing your own. It's nice to be able to link to
       | an existing explanation of what a Repository is for, instead of
       | having to name and document your own ad-hoc architectural
       | patterns (or more likely, end up with you ad-hoc architecture
       | being under-documented).
       | 
       | Things like Repositories, Aggregates, Bounded Contexts, and so on
       | are going to be a net drag on your system if you only have a few
       | 100 kloc of code in a monolith. But they really start to shine as
       | you grow beyond that. Bounded Contexts in particular are a gem of
       | an idea, so good that Uber re-discovered them in their
       | microservices design: https://www.uber.com/blog/microservice-
       | architecture/.
       | 
       | (Edited to clarify the book author)
        
         | danielvaughn wrote:
         | The terminology really turned me off because I found it
         | difficult to comprehend. But I loved the idea of ubiquitous
         | language and always meant to return to the book and give it
         | another shot.
        
           | theptip wrote:
           | Indeed, some of the names are just bad; "Anti Corruption
           | Layer" is actually a quite useful concept for explicitly
           | translating between concepts in different Bounded Contexts
           | (do the translation explicitly at the edge so the mappings
           | between BCs are explicit, instead of mixing terminology), but
           | man I feel like something more snappy could have been used.
        
         | eckza wrote:
         | 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 at explaining things from first
         | principles, without veering off into "monad tutorial"
         | territory.
         | 
         | https://pragprog.com/titles/swdddf/domain-modeling-made-func...
        
           | theptip wrote:
           | 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.
        
           | cpeterso wrote:
           | Evan's book is a bit of an academic slog, but I finally felt
           | like I understood how object-oriented design should work.
           | 
           | An easier introduction I recommend is InfoQ's "Domain Driven
           | Design Quickly", available in print or a free PDF ebook:
           | https://www.infoq.com/minibooks/domain-driven-design-
           | quickly...
        
         | shortlived wrote:
         | This is the book by Eric Evans?
        
           | theptip wrote:
           | That's the one. (I edited in a clarification to my original
           | post.)
        
         | feoren wrote:
         | I had the exact opposite reaction to this book. It seemed like
         | great stuff when I first read it, but over time, I realized
         | it's really misguided in a lot of ways:
         | 
         | - Aggregates are too heavy. You need to make the decision about
         | what is or is not an aggregate way too early in the design
         | process. Boundaries are fuzzy.
         | 
         | - Actual concepts don't exist in nicely packaged bounded
         | contexts. Concepts overlap a lot. You need to make the decision
         | about which concept fits into which bounded context too early
         | in the design process. Boundaries are fuzzy. Things are kinda
         | like other things. The definition of "Employee" is not the same
         | in the Scheduling context as the HR context as the Payroll
         | context, yet they do overlap a lot, and you can't just treat
         | them as completely separate things. If you break everything
         | down into tiny contexts to deal with this, you just make
         | Contexts and Aggregates the same.
         | 
         | - Repositories are not original to DDD and I think are very
         | likely to foster absolutely horrific SELECT N+1 or even SELECT
         | N^2 or N^3 performance. You simply can't let one bounded
         | context do all its expensive operations in a vacuum; not when
         | you have lots of contexts and lots of operations. In a complex
         | system, most parts need to be _planning_ , not _doing_. The
         | results of most operations should be a plan that you can
         | compose with other plans, analyze, and possibly even have an
         | "optimization pass" if you need one.
         | 
         | - Ubiquitous language is the right idea. If you take nothing
         | else from DDD, take this.
        
           | theptip wrote:
           | Fair enough; YMMV.
           | 
           | I've not found that Aggregates need to be designed at the
           | beginning; I've found it works fine to define an Aggregate
           | after you start seeing performance issues with query patterns
           | (i.e. define an Aggregate and forbid direct access to sub-
           | objects when you see pathological access
           | patterns/deadlocking).
           | 
           | Personally I've found Repositories to be a good way of
           | enforcing that N+1 queries DO NOT happen. For example, in
           | Django you can have the repository run
           | select_related/prefetch_related and `django-seal` on the ORM
           | query to forbid unexpected queries. This somewhat neuters the
           | flexibility of the ORM, which can be a big cost, but lets you
           | build much more restrictive queries that are guaranteed to
           | perform well. It's a trade-off and I don't think it's a clear
           | win for every use-case, but particularly when dealing with
           | Aggregates I think having a limited number of ways to query
           | is beneficial. (This might mean you're running some sub-
           | optimal SQL queries, over-fetching etc., but for most line of
           | business applications, that's actually a viable trade in
           | exchange for simpler domain interfaces and protection against
           | N+1 queries.)
           | 
           | Regarding "planning" vs. "doing", that seems to fit quite
           | well with doing most of your work in POJO/POPO domain models,
           | then only rendering those into DB writes at the edges. I
           | think Repos can help with that. (IME you get N+1 selects when
           | you use ORM models that abstract away the SQL queries and
           | have application code interacting directly with ORM models;
           | if you remove the ORM from your core domain logic and force
           | it to live at the edges in Repos, this is not possible.)
        
             | feoren wrote:
             | I suspect these different design "paradigms" all look
             | somewhat similar when done really well and thoughtfully,
             | but tend to have different gotchas and failure modes. Happy
             | vs. unhappy families and all that. The worst design
             | decisions we've seen are very salient in our minds, and
             | these bad decisions are more shaped by the paradigm than
             | the good ones are, so they look like the fault of the
             | paradigm. Therefore we tend to compare paradigms based on
             | how they go wrong, and people see bad design and think "wow
             | we need a new paradigm". In that sense: YMMV indeed, and if
             | DDD works for you, go for it. It's definitely worth
             | learning, even if only so you can disagree with it! There
             | are a lot of good smaller points in the DDD book even if
             | you disagree with the larger paradigm.
             | 
             | As an example, when I think "Repository", I think a class
             | with methods like "GetEmployee(employeeId)" that hit the
             | database immediately, and probably call other
             | GetSingleThing methods in other repositories, possibly in a
             | loop. That's how you get SELECT N^2s and up. That is, of
             | course, their worst possible use, and you can have much
             | better-thought-out services and still call them
             | "repositories".
             | 
             | That all being said, there _are_ some near-universal  "good
             | ideas" I've learned, but they probably don't make a good
             | textbook, and they certainly don't make a singular
             | "paradigm" to follow. Things like: make decisions as late
             | as possible (but no later). Do less, plan more ("do"
             | meaning something with a side effect; planning is side-
             | effect free). Work with sets instead of individuals.
             | Separate identity from data. Raise the ceiling (empower
             | smart people), not the floor (don't design for stupid
             | people), but also realize that everyone is both sometimes.
             | I use these general rules to evaluate paradigms, and I
             | think DDD strongly fails the "make decisions as late as
             | possible" rule, and doesn't tend to foster the "do less,
             | plan more" rule unless you really reinterpret a lot of its
             | directives.
        
               | theptip wrote:
               | I strongly agree with the general principles you're
               | putting forth, and agree it's hard to build an
               | architectural philosophy which bakes in "good sense" as
               | well. To some extent these can be orthogonal. (At the
               | very least, your architectural philosophy had better not
               | be opposing good sense, but I think it's fine for the
               | philosophy to not encode every best-practice of good
               | sense.)
               | 
               | > all look somewhat similar when done really well and
               | thoughtfully, but tend to have different gotchas and
               | failure modes.
               | 
               | I do agree with this to an extent, although I also think
               | that "what does this theory tell me to do that differs
               | from some other theory" is a quite valuable question; I
               | do think there are some structural aspects of DDD which
               | could be "bad" in other approaches.
               | 
               | Perhaps most obviously, the meta-approach of having well-
               | known named concepts in your architectural framework is
               | in some sense opposed to the "pragmatic design" or
               | "framework-less" approach of just using good taste and
               | experience to come up with the right design for each
               | situation. The latter perhaps being "better" for
               | experienced architects, but harder to teach IMO.
               | 
               | > when I think "Repository", I think a class with methods
               | like "GetEmployee(employeeId)"
               | 
               | Not to beat a dead horse, but on this object-level point
               | -- in my understanding DDD explicitly contemplates both
               | singular fetches like `GetEmployee(employeeId)` and
               | plural like `GetEmployees(createdAfter)`. I think the
               | book (Evans, 2003) has examples of each (though I could
               | be mis-remembering and drawing from some of the other
               | practical DDD-by-example books).
               | 
               | But I can see where a team might use a sub-optimal
               | combination of existing Repo queries rather than writing
               | their own new ones.
        
       | jethkl wrote:
       | The axiom of choice, Tychonoff's theorem, and the open mapping
       | theorem [0, 1, 2]. Each one took me, in my view, much too long to
       | grasp.
       | 
       | [0] https://en.wikipedia.org/wiki/Axiom_of_choice
       | 
       | [1] https://en.wikipedia.org/wiki/Tychonoff%27s_theorem
       | 
       | [2]
       | https://en.wikipedia.org/wiki/Open_mapping_theorem_(function...
        
         | kccqzy wrote:
         | The axiom of choice is the topic of one whole quarter of set
         | theory in my undergraduate years. I still don't think I fully
         | understand it. By "fully understand it" I mean achieving the
         | level of proficiency of my professor who, upon hearing
         | seemingly any theorem encountered in undergraduate study, would
         | immediately tell you whether it requires Axiom of Choice,
         | merely Dependent Choice, Countable Choice, or doesn't require
         | Choice.
        
       | evanpw wrote:
       | This is true of almost everything in math. You learn some
       | definitions and techniques in one class, and it doesn't all
       | become clear what's going on until you've used those to as the
       | base layer for solving some other problems in the next class.
       | Part of it is just that it's hard to teach you need the first
       | concept in order to understand the second, but you need the
       | second to understand why you should care about the first, so it's
       | all a bit circular.
        
       | recursivedoubts wrote:
       | i didn't really understand hypermedia, and, in particular, the
       | uniform interface/HATEOAS until a few years after i started
       | building intercooler.js (htmx predecessor)
       | 
       | https://intercoolerjs.org/2016/01/18/rescuing-rest.html
       | 
       | much later:
       | 
       | https://htmx.org/essays/hateoas/
        
         | NeutralForest wrote:
         | I'm reading the HyperMedia book right now, thanks!
        
       | shrimpx wrote:
       | I studied functional programming and I took terms like
       | "expression", "evaluation", and "value" for granted until it
       | clicked that these terms have intuitive meaning when interpreted
       | in colloquial/human terms.
       | 
       | - Expression as in someone expressing themselves, a tentative
       | gesture.
       | 
       | - Evaluation as in scrutinizing something to learn what it's
       | really about.
       | 
       | - Value as in "valuable".
       | 
       | We don't know if an expression is valuable until we subject it to
       | evaluation, or we get an interpreter to interpret it for us.
        
         | dehrmann wrote:
         | Have you ever studied compilers? You'll gets a good idea of
         | these concepts from a toy compiler for an imperative language.
        
       | olalonde wrote:
       | It took me a long time to grasp market economics. I knew it
       | worked somehow but I didn't quite understand why. What really
       | made it click was Milton Friedman's "Free to Choose" TV
       | series[0].
       | 
       | [0]
       | https://www.youtube.com/watch?v=dngqR9gcDDw&list=PLXD32Z5YYi...
        
       | sowbug wrote:
       | Taking the point of view of others, and learning to view a
       | situation from a "perspective-less perspective."
       | 
       | It's easy to think you have people skills because you listen to
       | others and repeat their point of view back to them before telling
       | them they're wrong. And unfortunately you can get quite far in
       | the business world simply by being good at demolishing other
       | people's positions.
       | 
       | As a mental exercise, a few years ago in meetings I started
       | deleting the names from the running transcript I keep in my head.
       | "Joe said X and Jane said Y and then I said Z" was replaced with
       | "we said X, then Y, then Z." It was a remarkably effective device
       | to rise above the "who's going to win?" attitude and instead
       | think about the best way for everyone to proceed as a group. I
       | suddenly started to get what people say about meditation and
       | removing the "I" perspective from your life. If instead of being
       | you, you're a quadcopter hovering near the person you call
       | yourself, it's so much easier to get your ego to shut up and
       | start listening for once.
        
         | nathias wrote:
         | mine is the opposite, you can't get anywhere in life with the
         | perspectiveless perspective
        
           | sowbug wrote:
           | Maybe it works best as a blend of looking out for yourself
           | and looking out for the group.
           | 
           | Or, cynically, maybe it's effective to adopt the group-first
           | mentality once you have the personal momentum from years of
           | being self-centered.
        
             | hyperthesis wrote:
             | observe selflessly, act selfishly
        
       | college_physics wrote:
       | 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
        
       | dqpb wrote:
       | Data structures are more interesting than algorithms.
        
       | anacleto wrote:
       | Krebs cycle.
        
       | ISL wrote:
       | That professors were thinking real hard about which problem sets
       | to give us in hopes that we would actually learn something.
       | 
       | I don't think I really understood that completely until I started
       | TA-ing.
        
         | luuuzeta wrote:
         | Tangentially related but that's something I've come to realize
         | too as of recent. Asynchronous programming in JavaScript is new
         | to me so as an exercise, I'm writing a document where I explain
         | the concepts to myself and once I shifted from "how I
         | understand" to "how I would this to someone else", figuring out
         | a good enough scenario/problem harder.
         | 
         | Good problem sets that aid studets' intuition aren't easy to
         | come by, oftentimes they're either too easy or too hard.
        
       | throwaway81523 wrote:
       | The purpose of C++ template generics only made sense to me after
       | I started using Haskell.
        
         | rrgok wrote:
         | I have to agree. I couldn't understand templates until Haskell
         | introduced me to it. But Haskell is expressive enough that the
         | intuition comes naturally.
        
       | hawski wrote:
       | Parenthood. Now I see how much my mom was right, but couldn't put
       | things in proper words.
        
       | CSDude wrote:
       | Sadly, React. Was using Angular 1, and Vue made much more sense.
       | I'm not a Frontend Developer though, but needed to learn React
       | but it happened to late. At least, when I needed to learn,
       | components were not classes anymore but functions which made
       | learning curve somehow simpler for me although its not much
       | difference.
        
       | lebaux wrote:
       | theory of reliativity, took me a while, but now I think I got the
       | main gist
        
         | 7373737373 wrote:
         | I'm not sure if this even possible, but I'd appreciate a
         | "relativistic simulation for dummie programmers" handbook
        
       | throwaway98797 wrote:
       | blockchains as a single source of truth
       | 
       | always seemed like a shitty expensive database for 7+ years
        
         | pintxo wrote:
         | What made you believe that they are not a "shitty expensive
         | database" after all?
        
           | throwaway98797 wrote:
           | in the ecosystem of a single blockchain, they are the single
           | source of truth that is an open api-like thing that no
           | company _can_ control
           | 
           | therefore it's safer to build then on twitter, facebook,
           | apple, etc.
           | 
           | the entire ecosystem _may_ be a fraud, but if it is not then
           | it's incredibly enduring. i have more faith that i can get
           | what the balance of an account is in 10 years from ethereum
           | than i do from my banks api staying stable or open.
        
       | amorroxic wrote:
       | the null concept being referred to as "the billion dollars
       | mistake" - until discovering optionals and gradually opening up
       | to FP, category theory, etc
        
         | bazoom42 wrote:
         | The "billion dollar mistake" was not the null concept itself,
         | it was having all reference types be nullable, i.e no
         | distinction between nullable and non-nullable in the type
         | system.
        
       | pfoof wrote:
       | 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.
        
       | machina_ex_deus wrote:
       | 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 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. And history shows that in fact, those stories
       | being told and repeated aren't just interesting minor curiosity,
       | but they have shaped the direction of humanity and they are
       | driving it. A single person with a single story can change
       | history in such a way that it would be completely different
       | without it. And some stories about stories need to be told as a
       | warning so that people will not fall for those kinds of stories
       | again.
        
         | satvikpendem wrote:
         | Regarding literature, I'll give an opposite opinion. Being
         | forced to read the classics in school led me to not caring
         | about them at all because I just couldn't relate at all, I had
         | not had the requisite life experience for them to make an
         | impact on me. Now, being an adult and having the life
         | experience, reading them again makes me think more deeply and I
         | can actually relate. So I think in school, we actually
         | shouldn't read high literature lest we hate reading them as
         | adults, which is really when they should be read, not before.
        
           | josephcsible wrote:
           | I agree in general, but for me it wasn't so much just having
           | to read them as it was having to do a bunch of silly
           | assignments based on them. My high school completely ruined
           | The Great Gatsby for me that way.
        
         | thewebcount wrote:
         | 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
         | what it is was something I could related to and seemed actually
         | useful. I still don't care for military history, though.
        
         | 9804 wrote:
         | I think people come out of school hating reading because nobody
         | likes being forced to read specific books, as everyone's tastes
         | are different. It sounds like this might have been what
         | happened to you.
        
           | mabbo wrote:
           | I completely agree with this. I loathed Shakespeare in
           | school. Now I try to get a visit every year to the Stratford
           | Festival (in Stratford, Canada) to see at least one or two
           | Shakespearean plays.
           | 
           | I also remember reading 1984 on my own time in high school-
           | it wasn't in the curriculum the year I might have. It blew me
           | away. But if I'd been forced to read it, I probably would
           | have been bored.
        
             | Balgair wrote:
             | For other HN readers:
             | 
             | I was like this too. I had no interest in ol' Bill. Then I
             | read his 'best' works. And then I read them again. It takes
             | a bit to get really used to iambic pentameter, to the old
             | words, to the places and people he was writing for, to his
             | limitations of candlelight and lack of amps, etc.
             | 
             | Reader, _it is totally worth it_.
             | 
             | There are very many very good reasons that he is still
             | produced and studied. I encourage you in this new year to
             | give him a solid try. Not just a play or two. Read him and
             | watch the plays at the same time. There are hundreds of
             | productions on YT for every play of his, all free, most
             | very good.
        
           | machina_ex_deus wrote:
           | I never hated reading, it's just that I didn't get the point
           | of it. What are we even doing here and why?
           | 
           | What's the point? Math has clear purpose. I do enjoy some
           | books. I just didn't get the point of studying them beyond
           | reading. Why are they babbling about ? Is there any use for
           | this information or is it just a torture in memorization? Why
           | would I ever care about all these abstract literature terms?
           | 
           | Ironically they missed telling the meta story: why would
           | anyone care about stories.
           | 
           | If stories are just something you read for fun, why would
           | anyone care to teach me how to analyze them?
           | 
           | EDIT: To be clear, these were the questions that weren't
           | answered back then.
           | 
           | Only now, years later with life experience the purpose is
           | clear.
        
             | [deleted]
        
           | dehrmann wrote:
           | My issue was the volume we were expected to read, or at least
           | volume on top of books I wasn't interested in reading.
        
       | ahmadnoid wrote:
       | That sometimes the extreme needs to manifest in order to pull
       | toward the middle
        
       | DylanSp wrote:
       | Matrix multiplication. First encountered it in high school, where
       | the textbooks presented matrices without any real motivation, and
       | matrix multiplication just seemed like a weirdly-defined
       | operation. Once I got to linear algebra in college and matrix
       | multiplication was presented as the way to compose linear
       | transformations, it made a lot more sense.
        
         | Jasper_ wrote:
         | The easiest way to describe matrix multiplication is nested
         | function composition.                   f(x) = 2x         g(x)
         | = x + 5
         | 
         | It should hopefully be obvious that "nesting" the two isn't
         | commutative:                   g(f(x)) = (2x) + 5 = 2x + 5
         | f(g(x)) = 2(x + 5) = 2x + 10
         | 
         | One miraculous fact here is that no matter how many functions
         | we stack, we only ever have two terms: x and a constant term.
         | Thus, we can represent this 'linear system' in terms of its
         | coefficients, as long as we agree on an order: e.g. 2x+5 might
         | become "2,5" in our system.
         | 
         | You can do "multiplication" on these packs to compose them
         | together, and even though the rules feel obtuse in abstract,
         | they follow the logic of function composition. A matrix
         | represents a similar function transform, only it's in 3
         | dimensions, and in order to handle rotation, it needs to swap
         | around x/y/z. So an identity matrix is really saying:
         | f(x) = 1x + 0y + 0z + 0        f(y) = 0x + 1y + 0z + 0
         | f(z) = 0x + 0y + 1z + 0
        
           | [deleted]
        
         | Sharlin wrote:
         | Matrices are funny. You can encounter them as a teenager
         | reading 3D graphics tutorials on the internet, learn that they
         | can compactly represent scalings, rotations, and translations,
         | and that several transformations can be conveniently "stacked"
         | using this thing called matrix multiplication which looks like
         | this... and that's it, now you can use them for a cool
         | practical purpose, but the tutorials never derive or attempt to
         | justify _why_ mmul looks like that, often because the author
         | doesn't know either!
         | 
         | Or you can learn about them in school and be given neither a
         | real-world use case nor a rationale or derivation for mmul.
         | 
         | Or you can encounter them in college, and there the experience
         | depends on whether it's a good or bad kind of a linalg class.
         | But even there - after all the painstaking definitions and
         | lemmas and derivations - it's easy to end up not grokking _how_
         | mmul does what it does _even_ if you grasp all the building
         | blocks - vector spaces, bases, how matrices can represent bases
         | _and_ systems of linear equations _and_ linear operations on
         | vectors _and_ how they're all kinda equivalent.
        
           | boricj wrote:
           | It reminds me of a funny story back when I was a student.
           | 
           | We had a week-long group project in the first year whose
           | theme was "a 360deg pong". Our group decided that it meant
           | the paddles had to travel in a circle around the playfield
           | and I've decided that matrices and stacked 2D transformations
           | were the way to go. The other students gave me blank stares,
           | I basically said "trust me, you don't need to understand them
           | to use them" and off we went coding.
           | 
           | We ended up with the most impressive pong clone out of all
           | the groups, as nearly all of them had axis-aligned
           | rectangular paddles going around a rectangular path, whereas
           | ours had a stretched half-circle paddle going around a circle
           | path always facing the center of the playfield, alongside
           | extra features like walls and a level editor.
           | 
           | First class the Monday morning after, the math teacher
           | announced that the next topic was matrices. We stared at each
           | other in the group and grinned manically.
           | 
           | If anyone wants to stare at an old C codebase from 10 years
           | ago by a bunch of first year students:
           | https://code.google.com/archive/p/pong-norris/
        
           | aj7 wrote:
           | And a lot of dynamics is e to a matrix.
        
         | rkp8000 wrote:
         | A big one for me was realizing that a matrix times a vector
         | returns a weighted sum of the matrix columns, with the vector's
         | elements as weights. It's not particularly profound but it has
         | definitely clarified my intuition around a number of matrix
         | problems.
        
         | enkid wrote:
         | It took me taking a class in neural networks in my thirties to
         | really understand matrix multiplication
        
           | jliptzin wrote:
           | Which class?
        
             | enkid wrote:
             | It was Andrew Ng's machine learning class on Coursera
        
             | thamer wrote:
             | A sibling comment to your mentioned Andrew Ng's class, and
             | I actually had the same experience as them with the same
             | class. You can find it by searching for Stanford CS229; the
             | lectures are available on YouTube.
        
           | arcturus17 wrote:
           | I did a fairly rigorous linear algebra course in school, and
           | it went over my head despite passing it.
           | 
           | Saw it explained in a single slide of Andrew Ng's ML course
           | and everything clicked perfectly.
           | 
           | Where I lived math was taught like fucking shit, it was all
           | algebra and zero context as to why it could be useful in
           | real-life scenarios, zero abstraction such as visualization
           | or metaphor. Everyone involved in concocting that pedagogic
           | aberration should feel terrible about it.
        
             | enkid wrote:
             | The Coursera one? That's the exact course I was thinking
             | of.
        
         | bgoated01 wrote:
         | Linear algebra in general for me was kind of one of these
         | concepts. Aced my university linear algebra class with no idea
         | what the heck I had learned. It didn't start to click for me
         | until I started using it for tangible problems.
        
         | divbzero wrote:
         | Matrix multiplication is the first example that came to mind
         | for me too. I learned it as compositions of linear
         | transformations (the professor "taught" it through a question
         | on the take-home final) but it felt abstract to me and took
         | years to become intuitive to the point where I could actually
         | explain it from scratch.
        
       | leftcenterright wrote:
       | Visual thinking! [1]
       | 
       | I had read a bit about different types of thinking but I didn't
       | really understand it so well until I saw a kid who had amazing
       | visual thinking capability and could visualize years' old
       | memories in a very detailed manner. It has also been related to
       | photographic memory according to some research.
       | 
       | [1] https://en.wikipedia.org/wiki/Visual_thinking
       | 
       | Nikola Tesla's Creative Thinking Secrets: https://www.sers.si/wp-
       | content/uploads/2014/10/angle%C5%A1%C...
        
         | satvikpendem wrote:
         | You should read Moonwalking with Einstein and look into memory
         | palaces. I have memory palaces I can still walk through and
         | remember after a decade.
        
       | zenmacro wrote:
       | Central Banking 101 by Joseph Wang does a great of explaining the
       | repo and reverse repo markets.
       | 
       | https://books.google.com/books?id=wPs_EAAAQBAJ
        
       | robg wrote:
       | The 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 colleagues, relationship
       | struggles, and overall health and wellness like sleep and
       | nutrition. Yes, the system reverts to a baseline over time but
       | how much that baseline varies is obvious in tracking resting
       | heart rate.
        
         | rramadass wrote:
         | Any books you could recommend?
         | 
         | I presume you already know of this book: _The Body Keeps the
         | Score: Brain, Mind, and Body in the Healing of Trauma by Bessel
         | van der Kolk._
        
           | robg wrote:
           | That's a great one. I've been looking for something that
           | links the physiology with knowledge work and life demands,
           | but I haven't found it yet.
        
           | sirsinsalot wrote:
           | Thank you. Bought and reading.
        
         | rzzzt wrote:
         | "Understanding Stresses and Strains" from 1968 presents a good
         | depiction of the mechanism with familiar-looking cartoon
         | characters:
         | https://archive.org/details/understandingstressesandstrains
         | 
         | The caveman pressing the alarm button is something I think of a
         | lot.
        
       | jefftime wrote:
       | For me it was pointers. I used C throughout college and I never
       | really grokked the "address to a value" description, but one day
       | it finally just clicked and now I love pointers
        
       | hakanderyal wrote:
       | Power of static typing, that it allows one to develop complex
       | programs faster and better, not slower.
        
         | klysm wrote:
         | I think the develop faster thing is a poor argument for static
         | typing. The refactoring piece of the equation is the most
         | important to me. Static types provide confidence (and speed)
         | while making sweeping changes to code.
        
           | hakanderyal wrote:
           | That's what I meant by developing faster. Refactoring is an
           | indispensable part of the building process.
        
             | klysm wrote:
             | Yeah totally agree that refactoring is part of development
             | but I don't think people frequently think about in
             | comparison to maintenance.
        
       | rramadass wrote:
       | The use of Predicate Calculus in coming up with the Proof along
       | with the Program.
       | 
       | Predicate Calculus is used to show that the path followed by a
       | Process through a Cartesian Product space (created from all the
       | memory variables in a Program) is the one you had in mind w.r.t.
       | its Specifications. Suddenly you start to understand basic Set
       | Theory, Types, Relations (Functions) and Logic.
        
       | linuxlizard wrote:
       | Blue Noise dithering based on a HN post from @todsacerdoti.
       | https://news.ycombinator.com/item?id=25633483 At my previous job
       | we had an ASIC hardware block to implement blue noise dithering.
       | No one, even the people who created it, could explain to me how I
       | needed to use it. Years latter, I read their blog post and a
       | light bulb went on.
        
       | whacked_new wrote:
       | I love this as a research topic. Here are a few examples close to
       | me.
       | 
       | 1. The nature of variance in regression methods. The first time I
       | heard about "soaking up the variance" in modifying stat models in
       | brain imaging I had no idea what was going on. Then I spent a few
       | years doing brain imaging and modified models to "soak up the
       | variance" differently. Over the few years I came to grok the
       | concept. I had a electrical engineering PhD colleague with an
       | impressive resume who would argue with me about the effects of
       | models. I realized that he knew the textbook stuff (which I
       | didn't), but he didn't actually grok the concepts (which I did).
       | 
       | 2. Once in an office was I mystified by hot spots and cold spots
       | of wifi signal. One of my colleagues, a brilliant engineer, then
       | explained to me what might affect the shape of the hot and cold
       | spots, which is why he sits in certain places. I asked him if he
       | had an intuition of how RF fields are distributed and he said
       | yes, so I asked him how. He said, "I used to do a bit of tensor
       | calculus".
        
         | jeffreyrogers wrote:
         | I used to work in an office where I only got cell service on
         | cloudy days, I assume it had something to do with the clouds
         | reflecting the signal.
        
       | tobyhinloopen wrote:
       | Shaders.
       | 
       | I tried shader tutorials multiple times for years and they only
       | started to click recently.
        
         | baby wrote:
         | Any good resource on that? Bonus if it's for Unity
        
           | mmcconnell1618 wrote:
           | Ben Cloward - Shader Graph Basics for Unity - https://www.you
           | tube.com/watch?v=OX_6_bKpP9g&list=PL78XDi0TS4...
        
       | fortituded0002 wrote:
       | 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 it didn't fully click until
       | years had gone by and I realized I had unconsciously held myself
       | back from pursuing a wide range of things because I just didn't
       | see anyone like me there.
       | 
       | 3. Rules in life are just constructs that we as humans have
       | created.
       | 
       | Starting a business helped the most on this one. That's when I
       | started to see that "rules" or "procedure" are all made up and
       | exceptions can always be made.
       | 
       | (Edit: typos)
        
         | throwaway1777 wrote:
         | #1 is a fallacy called main character syndrome
        
         | jackthetab wrote:
         | Any suggested reading for #1 ("learn how to navigate \$THIS.")?
        
           | texuf wrote:
           | It's old and perhaps a little controversial, but " NLP: The
           | New Technology of Achievement" has good examples and
           | abstractions that could help you with #1
        
             | icepat wrote:
             | 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.
        
               | carapace wrote:
               | > 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 rubric of NLP one
               | can do amazing things.
               | 
               | - - - -
               | 
               | It is strange that academic research psychologists seem
               | to have trouble with it. But that's their problem, it
               | doesn't change the fact that people all over the world
               | are learning and using this stuff every day. If academic
               | psychologists can't understand it that just makes them
               | irrelevant, it doesn't change the facts.
        
         | concordDance wrote:
         | > 2. Representation matters.
         | 
         | As a well represented person I can tell you this has nothing to
         | do with representation, its just that the vast majority of
         | humans in the modern world have close to zero agency and/or
         | don't think they can actually change things.
        
           | DrewADesign wrote:
           | > _As a well represented person I can tell you this has
           | nothing to do with representation, its just that the vast
           | majority of humans in the modern world have close to zero
           | agency and /or don't think they can actually change things._
           | 
           | As a well-represented person, you're _probably_ making
           | assumptions about the effects of representation that are less
           | informed than you realize.
        
         | jahnu wrote:
         | 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."
        
           | tootie wrote:
           | Sapiens by Harari covers this extensively. So much of human
           | development is our ability to ascribe fictive boundaries and
           | definitions to things. Rules, authorities, myths, money,
           | culture, countries, companies. What are any of them? They're
           | all made up. We could just stop believing in all of them
           | tomorrow.
        
         | chrisco255 wrote:
         | For #2, I would alter this to say: connections matter.
         | 
         | We are more likely to pursue careers or interests if we know
         | someone (and are friends with them or related to them) that is
         | interested in the same thing or has had experience in the same
         | thing.
        
         | vidanay wrote:
         | #3 really hits home when you realize _we have rules for killing
         | each other_ (war). And we have separate legal trials to
         | determine if someone broke those rules while trying to kill
         | someone else. The penalty for breaking the rules about killing
         | someone often is to be killed.
        
         | quickthrower2 wrote:
         | What does representation mean in this context?
        
         | bcrosby95 wrote:
         | I've noticed #2 with my 4 year old. She won't do anything
         | unless there's a girl doing it. My other kids don't seem to
         | care though.
        
           | PartiallyTyped wrote:
           | There are some interesting studies about girls and women
           | playing chess. When blind, the two sexes perform on average
           | about the same, but when they know the gender of their
           | opponent, girls and women underperform.
           | 
           | It is hypothesised that the reason behind this is because
           | chess is a boys' club, so to speak, and thus there is not a
           | lot of representation.
           | 
           | Absence of representation means that it may seem that you are
           | the only one doing XYZ, which in and of its own can be
           | terrifying because we often feel that the odds are stacked
           | against us (which is a self-fulfilling prophecy), or that we
           | are held to much higher standards than others.
           | 
           | Personally, I enjoy seeing diverse representation even if I
           | am not represented. I want people to not be afraid to pursue
           | their dreams and goals, I don't want implicit prejudices due
           | to lack of representation either.
        
         | nivethan wrote:
         | 2. Hits home for me as I've begun to realize the same thing.
         | Not seeing any person of color in an activity makes it's so I
         | don't want to be the first.
        
           | akira2501 wrote:
           | > makes it's so I don't want to be the first.
           | 
           | This makes me curious. Would you mind answering, from your
           | point of view, why do you think that is? Is it a specific
           | scenario or type of scenario you wish to avoid or is there a
           | generalized concern that comes with it? Is that due to
           | uncertainty or past experience?
        
           | [deleted]
        
           | yieldcrv wrote:
           | 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 extended to them whether it has
           | anything to do with their race or not, its pretty clear the
           | upwards mobility is not coming from this credential.
           | 
           | For people with their own capital and leverage, it amplifies
           | their ambition if they want. BIPOC don't really have this.
           | 
           | The "average salary" of MBA alumnis is not what is
           | interesting about getting one, for me or them.
           | 
           | Some, or more, examples to the contrary would make it seem
           | less like a total waste of time.
        
             | crackercrews wrote:
             | 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?
        
             | idiotsecant wrote:
             | I am not an ivy league MBA person but my understanding of
             | these sorts of things is that it's not the credential
             | itself that's useful, but the connections you make in the
             | process.
        
               | yieldcrv wrote:
               | yes, all participants were aware of this, and yet the
               | connections resulted in no improved professional access
               | or ability to exchange time for food and shelter.
        
             | threadweaver34 wrote:
             | > the BIPOC people I know haven't been able to reap any
             | professional benefits from it
             | 
             | Probably because there's almost always an Asian who's more
             | qualified or a white with better connections. The problem
             | is the key insight you get from a BIPOC is BIPOC tend to
             | not have much money (set aside equity and vicious cycles
             | for another day), so unless they're your market, you're not
             | interested in marketing to people who can't afford your
             | products.
        
           | ShredKazoo wrote:
           | 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, people talked about race _way_ less than they do
           | today. When ethnic representation became a common topic of
           | conversation, I had a hard time believing it at first,
           | because it seemed so self-evidently obvious to me that race
           | wasn 't a particularly important characteristic of a person.
           | I actually had the experience of thinking back to my time in
           | jr high/high school and thinking "wow, that friend of mine
           | had dark skin, and they weren't from India... I guess they
           | were Black, huh".
           | 
           | I'm not trying to claim that I didn't have subconscious
           | biases related to race as a kid. I'm sure I did. But I do
           | suspect they have become a lot more severe as a result of
           | people talking about race so much -- it has become a much
           | more salient characteristic. (I'm also more aware of trying
           | to mitigate my biases and avoid microaggressions and so on,
           | of course.)
           | 
           | So yeah, I'm curious to compare notes with other 90s kids in
           | this regard. I'm white, but if I was Black, I _imagine_ that
           | I 'd be way more self-conscious about it now than I was when
           | I was growing up. (Like, if I'm the only white person in a
           | group, I feel self-conscious about it now in a way that I
           | didn't feel when I was a kid.)
        
             | human_person wrote:
             | I'm not sure > 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.
             | 
             | Is as helpful as you may have intended. The comment was
             | about not wanting to be the first, even if the group is
             | welcoming, the commentator will still be the first/only
             | person of color in the group and there is a discomfort
             | inherent to that even if everyone is trying to be
             | welcoming.
             | 
             | Also re "colorblind" policies of the 90a versus the
             | explicitness of today, I think it's similar to the current
             | reckoning in journalism. We all have biases and pretending
             | we don't/acting like we are capable of pure objectivity
             | simply hides them and makes them more difficult to combat.
             | On the other hand explicitly acknowledging them allows you
             | to consider how they might be influencing your decisions.
        
               | ShredKazoo wrote:
               | For the colorblindness part, I think my core objection to
               | the cultural changes which have occurred since I was a
               | kid is not to increased awareness of biases per se, but
               | rather this phenomenon: https://ncase.itch.io/wbwwb
               | 
               | My feeling is that the best way to reduce subconscious
               | bias is to have good race relations. And the best way to
               | have good race relations is to have more positive
               | interactions than negative interactions.
               | 
               | A thought experiment: Imagine a non-Mexican person says
               | "I love celebrating Cinco de Mayo. It's an excellent
               | excuse to drink tequila!"
               | 
               | As a culture, we can decide whether that's a positive
               | interaction or a negative interaction.
               | 
               | We can make it a positive interaction by laughing and
               | clinking glasses.
               | 
               | We can make it a negative interaction by calling the
               | person out for cultural appropriation or trivializing an
               | important Mexican holiday.
               | 
               | My intuition is that making it a negative interaction is
               | a big mistake, because it worsens subconscious racial
               | biases and generally makes the world a less pleasant
               | place. I recommend playing this game
               | https://ncase.itch.io/wbwwb to better understand my
               | intuition here. (Based on what I've read about
               | Israel/Palestine, the game is an excellent description of
               | why things have been getting so bad there lately.)
        
               | ShredKazoo wrote:
               | I certainly didn't mean to invalidate their discomfort --
               | as I mentioned at the end, I feel the same way sometimes.
               | I apologize if people found it invalidating.
               | 
               | I actually wrote the initial draft of my comment with
               | welcomingness as sort of a background assumption in my
               | mind, and then I thought "wait a minute, even if I'm
               | assuming that people would be welcoming, the person
               | reading my comment might not. and given how hostile
               | online discussions can get, it seems safer to err on the
               | side of emphasizing welcomingness." That still seems
               | roughly correct to me -- I think some topics have so much
               | hostility associated with them that whatever you're going
               | to say about the topic, it probably makes sense to also
               | add in a bunch of welcomingness too, just so the
               | discussion goes well.
        
             | alphydan wrote:
             | 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.
        
               | faddypaddy34 wrote:
               | The better question is would that group let a lone white
               | guy join?
        
               | ShredKazoo wrote:
               | 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.
        
               | crackercrews wrote:
               | If I lived in a majority-Cholita area, I would not give
               | it a second thought. If I lived in an area with not many
               | Cholitas, I would wonder if there was a reason the group
               | had only Cholitas.
        
           | jasonwatkinspdx wrote:
           | Growing up this was a big realization for me the other way. I
           | was raised by evangelicals in Kansas, including going to a
           | mennonite school for most of my education. As a teenager I
           | realized how at my school, at my church, at basically
           | everything in my family's shared life, there was not a single
           | person with brown skin. Not even one. And worse, no one had
           | real awareness of this, and would not understand how it could
           | be any sort of problem if you brought it up. To them it was
           | just the natural order of the universe that their world was
           | purely white people.
           | 
           | There's plenty of evangelicals of every race, but overall the
           | communities are very segregated. It was clear no matter their
           | professed faith, in practice the community I grew up in was
           | hostile to PoC.
        
         | rajin444 wrote:
         | > 2. Representation matters.
         | 
         | Strange, I had the opposite encounter. I realized the only
         | thing keeping me from doing things was myself. There are
         | definitely real barriers (hiring quotas, affirmative action,
         | etc.) but without artificial constraints the only thing
         | stopping you is you. You might feel a little uncomfortable but
         | that's something easily overcome - and almost like a superpower
         | when you realize you can overcome an external locus of control.
        
           | human_person wrote:
           | Since you are referring to affirmative action and hiring
           | quotas as "real barriers" I would guess that you haven't
           | really been in a situation where you the first/only person of
           | your gender or race (etc) to do something. In that case
           | (since you haven't lacked representation) I'm not sure how
           | well you can speak to its importance. But please correct me
           | if im wrong.
        
           | fortituded0002 wrote:
           | This is actually how it played out for me once I recognized
           | it. I'm of the mindset now that I can jump in and do things.
           | And I think you hit on one of the most important lessons that
           | came out of it for me - the only thing stopping you is you.
           | 
           | With that said, some form of representation helped me greatly
           | with it. It doesn't need to be an exact match, but for me it
           | needed to be enough to make me break my assumptions and see
           | whatever weird walls I had put up in my thinking.
        
           | [deleted]
        
           | yieldcrv wrote:
           | most of us here have our own drive, but I've come to
           | appreciate that _other people_ are inspired by seemingly
           | superficial things
           | 
           | It clicked for me when I let my publicist go wild and she got
           | me on listicles of BIPOC founders, before, we just had lots
           | of quotes and interviews. Only people already interested in
           | the project on its own merits were following along. After,
           | there were lots of people that are interested in the
           | representation in that kind of niche who otherwise just
           | wouldn't know how to find that representation. Or just
           | wouldn't be able to tell by founder names alone.
           | 
           | and of course we got the amplified engagement from people
           | arguing about "why does race matter" in the LinkedIn
           | comments. so shoutout to the useful idiots, publicists expect
           | that to exist and calculate it.
        
             | rajin444 wrote:
             | > inspired by seemingly superficial things
             | 
             | This seems similar to adding an addictive drug to food. It
             | will certainly appeal to a lot of people, but does it add
             | value? Getting more consumers of your product should not be
             | the end goal if we want a healthy, high trust society.
             | Developing a good product should be.
             | 
             | > Only people already interested in the project on its own
             | merits were following along
             | 
             | Isn't this what we want as a society?
        
               | yieldcrv wrote:
               | save these goals for your non-profit
               | 
               | the rest of us want revenue. there is no build it and
               | they will come, its appealing to people's sentiments, and
               | the people have to know its there at all.
        
               | imwillofficial wrote:
               | Ah, questioning the morality of exploiting human nature
               | is for non profits. Got it.
               | 
               | There is a right way and a wrong way to achieve success.
               | 
               | Profit is not the only thing that matters in life.
        
             | PartiallyTyped wrote:
             | That reads like a very condescending and cynical response.
             | 
             | People enjoy representation, imho, because it helps them
             | see that they are not alone, that the deck isn't stacked
             | against them, and so on. It also helps in removing
             | prejudice against certain groups of people.
        
           | enos_feedler wrote:
           | I would tread carefully when saying any kind of discomfort is
           | "easily overcome". We are human beings after all and it's a
           | pretty generalized statement.
           | 
           | Being a white male but simply being unique in coming from a
           | poor community in a poor city was enough for me to inflict a
           | lot of unnecessary pain on myself through undergrad by seeing
           | myself as different from the majority of elites in my
           | program.
        
         | crackercrews wrote:
         | Interesting interplay between 2 and 3. Why does representation
         | matter so much if these are just human-created constructs?
         | Genuinely interested to know how the same person had both of
         | these epiphanies.
        
           | fortituded0002 wrote:
           | Ha, interesting observation. They didn't happen at the same
           | time. #2 followed by #3 much later.
        
       | slotrans wrote:
       | For me the big one was relational modeling & normalization. I
       | took a database class in college and I thought normalization was
       | idiotic. It seemed obviously foolish and wasteful and I couldn't
       | imagine why anyone would do this to themselves by choice. Then ~2
       | years later I got a job working with data, at a company with
       | quite a big database that was designed largely by experts. Within
       | a few months of starting to work with real data I had
       | internalized the Why of normalization and become a believer.
       | Ironically I've been doing database work ever since.
       | 
       | Lately I've worked for a number of companies where no one -- like
       | seriously, absolutely zero developers on the team -- understand
       | normalization. They may perform a shadow of it, because someone
       | somewhere told them to, or some article said this is how you
       | model data that looks like X, but they don't _get_ it.
       | Predictably, their data models are absolute garbage. Teaching
       | them is an uphill battle because they don 't care, they're not
       | curious, and their web frameworks ( _cough_ Rails _cough_ ) have
       | taught them to distance themselves from the database and treat it
       | as dumb.
       | 
       | The other one was Rich Hickey's "Simple Made Easy", which I first
       | watched in 2013. I enjoyed it even then but I didn't really
       | understand what he was getting it. After working with, and
       | building, some systems done in a functional style, I feel like I
       | figured most of the ideas. That would have been some time in 2017
       | so, definitely took a while to soak in.
        
       | dgudkov wrote:
       | Data visualization. I had many years of experience with data
       | analytics, but only when I read "Now you see it" by Stephen Few I
       | started understanding how data visualization is linked to the way
       | the human eye and brain work.
        
       | Simon_O_Rourke wrote:
       | The concept of decorators in Java and Python - I know what
       | they're supposed to do, but each time I find myself grinding my
       | teeth when using them, thinking there's a better way of doing the
       | same things more simply.
        
       | kozak wrote:
       | Entropy. Both in information and in thermodynamics, and how
       | brilliantly they are connected. The audiobook "The Big Picture"
       | by Sean Carroll has helped a lot.
        
       | spritefs wrote:
       | 1. Being able to derive bottom up dynamic programming leetcode
       | solutions. The only way I really "figured out" how to do this was
       | by reading the dp chapter out of the Cormen algorithms book. It's
       | crazy how illuminating (and rare) clear explanations are
       | 
       | 2. 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
        
       | ChrisMarshallNY wrote:
       | In my case, almost everything has been like that.
       | 
       | 1) I learn rote.
       | 
       | 1.1) Almost no improvement.
       | 
       | 2) I "get it."
       | 
       | 2.1) My development in that area suddenly _explodes_.
       | 
       | This has happened with almost every software concept, from
       | calculus, to Structured Programming ("Whatever will I do without
       | my precious GOTOs?"), to Object-Oriented Programming, to Design
       | Patterns, to Protocols, etc.
       | 
       | It usually only takes weeks or months, but I suspect some have
       | taken years.
        
       | progJustMath wrote:
       | [dead]
        
       | itsgrimetime wrote:
       | programming in general, i tried probably half a dozen different
       | times throughout my early teens to understand how to write
       | programs in pascal, C, python, java, and it wasn't until I was 18
       | when I found Zed Shaw's "Learn Python the Hard Way" that it
       | clicked.
        
       | itsmemattchung wrote:
       | 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
       | improving the craft, I realized that one of my biggest struggles
       | was writing cohesively. Although I've been able to get lots of
       | words on (digital) paper, eventually I'd get lost in my own web
       | of thoughts, the article itself totally incoherent, no structure,
       | no organization.
       | 
       | Constructing outlines and _reverse_ outlines[0] has helped me
       | tremendously. It 's not easy ... but the concept itself is
       | finally -- years later -- starting to click.
       | 
       | [0] - https://explorationsofstyle.com/2011/02/09/reverse-
       | outlines/
        
         | binarymax wrote:
         | I also love and need outlines. It's carried forward in not just
         | writing, but making great presentations, plans, and decision
         | making.
         | 
         | Also, obligatory RiffTrax on outlines:
         | https://youtu.be/yfcyVtD8-Dk
        
         | bitwize wrote:
         | 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.
        
         | cookie_monsta wrote:
         | I love a good outline and can't really imagine writing anything
         | above 1000 words without one. Getting the outline into shape
         | really feels like breaking the back of any piece - after that
         | it's just filling in the gaps.
         | 
         | Something I realised much too late was how delaying the move to
         | the keyboard was a useful strategy. Now I mostly start with pen
         | and paper, sometimes with a mind map if I really need to
         | organise my thoughts, and only hit the PC once I have a pretty
         | firm idea of what I'm going to say. I've even done first drafts
         | in longhand, which feels like double handling at first, but
         | there's something about that added filter of transposing from
         | paper to computer that helps you reassess objectively what it
         | is that you're writing.
        
         | catears wrote:
         | This summer I read "On Writing Well" by William Zissner which
         | was an eye opener for me. I'm far from an expert in writing
         | clear texts, but I am definitely noticing more text which are
         | just... big balls of blurb that don't actually say anything.
         | All because of that book.
         | 
         | It sounds dumb, but this year it clicked for me how big of a
         | difference a poorly written text compares to a well written
         | text.
         | 
         | Hope your training pays off, itsmemattchung!
        
           | grantc wrote:
           | This is the first book I recommend to anyone who wants to
           | improve their writing. With Minto's Pyramid Principle as a
           | follow-on.
           | 
           | My top 3: 1/ Edit ruthlessly. Every single word is reduced to
           | its simplest form and pulls its weight--it has a damn good
           | reason for being there. 2/ Aspire to write at a third-grade
           | reading level. Readers prefer simple writing even when
           | reading deeply technical content. 3/ Start your most
           | important conclusions up front, not at the end. You're not
           | writing The Sixth Sense. Do your reader a favor and tell them
           | the big reveal first. You can then follow through and
           | persuade the reader why your conclusions are right.
        
             | urthor wrote:
             | Bottom Line Up Front and "Anything worth reading is 10% of
             | the first draft," are the two hardest procedural skills in
             | writing.
             | 
             | It's just so much experience to avoid those mistakes.
        
           | luuuzeta wrote:
           | Zinsser's "On Writing Well" is one of my favorite books, I
           | like how clear and concise its prose is.
           | 
           | I got Joseph M. William's "Style: Toward Clarity and Grace"
           | recommended [1] so you might be interested in it. I read the
           | introduction (I'm planning to read it this year) and with the
           | few examples the author presents it sells the idea that prose
           | doesn't need to be utterly complex to communicate ideas and
           | concepts succinctly and clearly.
           | 
           | [1]: https://news.ycombinator.com/item?id=33601492
        
       | buzzert wrote:
       | For me, it was the difference between "is" and "ought".
       | 
       | It sounds obvious when you first think about it, but I spent a
       | vast majority of my 20's with a view of the world filled with
       | "oughts" instead of "is's", especially when it comes to things I
       | can't control. I.e., people "ought" to behave a certain way,
       | versus the way people actually behave. The way
       | companies/governments "ought" to operate, versus the way they
       | actually do.
       | 
       | Thinking in terms of "oughts" can really cloud your judgement in
       | ways that you might not be totally aware of. I guess this is kind
       | of like the "realpolitik" philosophy, but coming to this
       | realization in my early 30's actually made me a lot happier and
       | less confused about why the world is the way it is.
        
         | satvikpendem wrote:
         | Are you familiar with the is-ought problem? Somewhat related.
         | 
         | https://en.wikipedia.org/wiki/Is%E2%80%93ought_problem
        
       | whalesalad wrote:
       | We are all just children. As kids we always want to be adults but
       | then we become adults and ultimately everyone around us is just a
       | child who's been on the earth longer.
        
       | mmcconnell1618 wrote:
       | Compound Interest. The idea and the numbers made sense but it is
       | only with many more decades of life that I understand how much
       | impact time has on compounding. If I had understood this when I
       | was younger, I would have made different choices in regards to
       | saving more. Small sacrifices when you're younger and can easily
       | tolerate them, have massive dividends later in life.
        
       | ryanschneider wrote:
       | Calculus, even the basics like derivatives, 2nd derivatives and
       | integration didn't really click with me until I did some
       | scientific computing/signal processing with SciPy and Pandas a
       | couple years ago. Graphing the discrete versions on time series
       | data, e.g. graphing the difference between consecutive values and
       | seeing the derivative pop out, or a rolling sum for integration,
       | etc finally made it all click.
        
       | wiseowise wrote:
       | Programming languages don't matter.
        
       | lqdc13 wrote:
       | Forward-Backward algorithm before there were all sorts of
       | resources and explanations on how it works online.
       | 
       | The wikipedia page for it explains it well.
        
       | parasti wrote:
       | One of the biggest realizations recently for me was realizing
       | that a nearly all of software development is basically about
       | turning a slow, manual process into a faster, automated process.
       | Modern CI/CD stems from a bunch of shell commands that somebody
       | wrote and manually executed to test an app and upload it to a
       | server. Modern automated software testing stems from humans
       | writing small test apps and running them to confirm correct
       | behavior. Many modern development practices stem from allowing
       | small test apps to be written easier and faster. It's all just a
       | giant manual process-to-automated process time-saving machine.
        
         | tantalor wrote:
         | This is a great way to understand complex, new-fangled
         | technologies. Ask "what manual process does this speed up"?
        
         | jstummbillig wrote:
         | To add on to this, when you think in term of software
         | development, that's already pretty meta because you skipped
         | level 1: Formalizing any type of process. Something that is the
         | entry level requirement to get, well, anything done via
         | programming, is actually only done sporadicly in a lot of not-
         | software fields.
        
         | __s wrote:
         | In fact a well designed system I work on (database service) is
         | built to give people sufficient monitoring & control that
         | operators handle anything out of the ordinary until they get
         | annoyed enough to automate it
        
         | urthor wrote:
         | Save humans time with a workflow.
         | 
         | Save humans time.
         | 
         | Save humans time.
        
       | tails4e wrote:
       | The fourier transform. Encountered it first in my undergrad
       | engineering degree, it was presented as dry mathematics, with no
       | real explanation, just threw complex exponentials at us, and
       | pages of derivations. Years later I actually use it in my job,
       | and through that and other material can see its beauty, and how
       | its actually not that complicated. Some great resources like this
       | helped a lot:
       | 
       | [0] https://betterexplained.com/articles/colorized-math-
       | equation...
        
         | rramadass wrote:
         | In case you didn't already know; _Who Is Fourier?: A
         | Mathematical Adventure_ is an excellent illustrated book on
         | this.
        
         | sjaak wrote:
         | This is what made it click for me, can recommend it:
         | 
         | 3Blue1Brown -- But what is the Fourier Transform? A visual
         | introduction.
         | 
         | https://www.youtube.com/watch?v=spUNpyF58BY
        
           | kippinitreal wrote:
           | That video did the same for me. I also like the reducible
           | video for Fast Fourier Transforms as well as the Veratasium
           | piece that shares some fun history.
           | 
           | Reducible - FFTs the most ingenious algorithm ever
           | https://youtu.be/h7apO7q16V0 Veritasium - The Most Important
           | Algorithm of All Time https://youtu.be/nmgFG7PUHfo
        
       | deepersprout wrote:
       | Haskel monads.
        
         | jvans wrote:
         | There is a common saying that if you can't explain something to
         | someone else then you don't really understand it yourself.
         | Monads made me realize that some things need to be experienced
         | in order to be understood.
        
       | sampo wrote:
       | Eigenvectors
        
       | iddan wrote:
       | Someone once told me he derives his self-confidence from the
       | dialogue with himself. It took me a few years to understand it:
       | 
       | 1. A clear dialogue with oneself is establishing certainty about
       | the inner self
       | 
       | 2. Certainty with the inner self enables one to see the outside
       | in a clear way
       | 
       | 3. That clarity contributes to confidence in one's actions.
        
       | skatanski wrote:
       | I think I've read about git multiple times before I started using
       | it. And even then at first it was with a dash of scepticism. I
       | can't put my finger on that moment, the moment of clarity but it
       | had to be quite glorious. Before, I was "what else do you need we
       | have svn". Sounds horrible now that I think about it.
        
         | rubberband wrote:
         | Pfft. I believe that anyone who read about git, and responded
         | "yeah, duh, it's so obvious" is a dirty, dirty liar.
         | 
         | An explanation of "interactive rebasing" to me might as well
         | been an explanation of quantum entanglement to a learning-
         | disabled ant.
         | 
         | Sometimes it still trips me up. I have an embarrassingly large
         | number of copies of source folders, despite git's safety net of
         | "don't worry, you can always restore it; pinky swear..."
        
           | quickthrower2 wrote:
           | I would never rebase at the command line and avoid rebasing
           | generally to the chagrin of team mates. A merge retains the
           | information to reconstruct the rebase anyway so might as well
           | use the simpler option. Unless there are a lot of commits
           | such that in aggregate they conflict but individually they
           | apply smoothly.
        
       | grogenaut wrote:
       | It took me 4 tries over 10 years to get antlr to work/grok.
        
       | colinwilyb wrote:
       | Formal logic.
        
       | ojr wrote:
       | Objective-C message passing/variable declaration's the syntax is
       | so different from C, C++, Java, Javascript, Ruby, Python and
       | other popular OOP languages
        
       | furyofantares wrote:
       | Gender as a social construct, separate from biological sex.
        
       | ngalaiko wrote:
       | for me it was functional programming. and not just fp as is, but
       | it's relation to another popular concept - oop.
       | 
       | i was properly introduced only to oop, and grasped a little of fp
       | here and there, especially learning go and javascript.
       | 
       | what i consider a 'click' for me is when i realised that all of
       | these paradigms are interchangeable. like, an abstract method is
       | just a function, or a function signature is the same as in
       | interface with a single method.
       | 
       | after that i write code however it feels more appropriate for the
       | situation i am in and don't think too much about fancy words and
       | patterns. it really feels like programming languages are becoming
       | 'native' for me.
        
         | satvikpendem wrote:
         | 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.
        
       | khaledh wrote:
       | 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.
        
         | [deleted]
        
         | coffeebeqn wrote:
         | 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 navigate because I could
         | never find any actual concrete code.
        
           | fullstackchris wrote:
           | 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
        
       | adamnemecek wrote:
       | The fact that essentially all concepts in math, programming,
       | physics etc. are just applications of fixed points which is
       | predicated on the idea of nilpotence. Fixed points go by many
       | names like invariance, spectra, diagonalization, embedding,
       | braids etc.
       | 
       | By fixed point I mean something like the "Lawvere's fixed point
       | theorem".
       | https://ncatlab.org/nlab/show/Lawvere%27s+fixed+point+theore...
       | 
       | I have a braindump on this https://github.com/adamnemecek/adjoint
       | 
       | I also have a discord https://discord.gg/mr9TAhpyBW
        
       | lamontcg wrote:
       | Big bang didn't happen in a single point in our space-time like a
       | firecracker, it happened everywhere and was just a uniformly much
       | hotter and denser universe that didn't really explode into
       | anything, but space-time just expanded to make the universe less
       | dense.
        
         | namrog84 wrote:
         | Don't some people prefer to say the slow expansion over using
         | the term big bang? Although it hasn't taken off as a term. Or
         | something like that?
        
       | antiquark wrote:
       | The idea that atheism is a form of religion.
        
         | apienx wrote:
         | Or just a personal relationship with reality. :P
        
       | aj7 wrote:
       | That the integral I-V relations for an inductor and capacitor are
       | the fundamental forms, not the differential relations.
        
       | tevon wrote:
       | Anyone who is excels is out of their depth.
       | 
       | By definition if you continue to progress (in career or life),
       | you will be doing something you have never done before. This
       | means everyone that we look up to who appears to be on a upward
       | trajectory is making it up as they go.
        
       | revskill wrote:
       | Everything is a monoid to be useful.
       | 
       | Now i understand more about why 1+1=2.
        
       | mejutoco wrote:
       | Complex numbers, as a convenient representation for certain
       | operations, in the same way as we use negative numbers to
       | represent debts.
        
         | klysm wrote:
         | The certain operation almost always being rotation in my
         | experience
        
       | bob1029 wrote:
       | I'd have to say... Linear Algebra & SQL.
       | 
       | SQL is something that is a permanent journey for me. It is a
       | domain-specific language, so the nature of its use depends almost
       | entirely on how the domain was modeled in the first place. Much
       | of my interest has been drawn towards the modeling aspects and
       | how we can arrive at schemas that business experts can tolerate.
       | 
       | Linear algebra properly clicked for me when I started getting
       | into writing my own 3d rendering software. Systems of linear
       | equations are absolutely everywhere. I didn't really tie together
       | their use in control theory, DSP and graphics until I was forced
       | to learn them "for real" to achieve my project goals.
        
         | pfdietz wrote:
         | Something in linear algebra clicked for me when I realized the
         | infinite dimensional case is different from the finite
         | dimensional case.
        
           | bob1029 wrote:
           | What are some applications / examples for the infinite-
           | dimensional case?
        
             | pfdietz wrote:
             | The continuous Fourier transform, for example, or more
             | generally linear operators in functional analysis.
        
             | sampo wrote:
             | Quantum mechanics
        
       | andyjohnson0 wrote:
       | The attachment theory of adult relationships [1].
       | 
       | Sometimes you just have to go on the journey to understand what
       | stopped you getting to your intended destination.
       | 
       | [1] https://en.m.wikipedia.org/wiki/Attachment_in_adults
        
       | erdos4d wrote:
       | Frechet differentiation.
        
       | 2devnull wrote:
       | The importance of play.
        
       | iancmceachern wrote:
       | The simple beauty of the calculus integral.
        
       ___________________________________________________________________
       (page generated 2023-01-01 23:00 UTC)