Lurker News
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/

Comments (913) 203 threads

Earlier comments
robg3 replies#
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.
eternalban#
I had to see it. Thanks for sharing.
rramadass2 replies#
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#
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#
Thank you. Bought and reading.
chucklenorris#
I'll add one more book reccomendation on this subject: Sapolsky's "Why zebras don't get ulcers". It's a really eye opening summary of the physiology of the stress response literature. Quite scary at times.
khaledh3 replies#
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.

coffeebeqn2 replies#
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#
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
DrJokepu1 reply#
That being said, sometimes a good abstraction can really simplify a complex problem by dividing it up to a set of smaller sub-problems. In such cases, the abstraction is worth it even if there is no reuse. As always, rules like this have to be interpreted in a context.
coffeebeqn#
It’s certainly a rule of thumb, I also prefer to break things down but I try to use functions as the basic units as they’re the easiest to keep in your head when it’s clear what they do
kl4m#
My personal trick: as long as I'm confident that I will be able to refactor in the abstraction, I don't bother. I may or may not ever revisit that code.
Akronymus#
My boss constantly repeats that an 80% solution is what we should strive for, for the most time. It has to be good enough, but not perfect. It's easy to get bogged down by trying to make it the best it can be.
_huayra_#
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...

MichaelDickens3 replies#
What an algebra equation is. I could solve linear equations, quadratic equations, and systems of equations by adding/subtracting/multiplying/dividing both sides of the equation and by adding two equations together. But I didn't know why you were allowed to do any of those things, or what else might be allowed. Are you allowed to square both sides? Raise both sides to a power?

It wasn't until maybe my third year of algebra that I realized an equation means both sides of the equation are equal to each other, which means you can perform any operation at all to both sides, and the result will still be equal.

sgdpk#
This is a great example! I was fortunate enough that my father explained it to me when I was in school. An equation is like a balanced scale: whatever you do to one side, you must do to the other, to keep things balanced.

I still remember that "click".

ipnon1 reply#
It was long after I graduated and passed symbolic logic that I realized a proof is the “solution” of an equation using logical operators instead of algebraic ones. Proof writing then becomes following branches on the tree of textbook knowledge to new leaves. I envy those who grok this when they’re kids.
kamaal#
Can you elaborate more on this?
xigoi#
Just be a little careful: when solving an equation, you're usually asking when the sides are equal, not asserting that they are. So the implication has to go in the opposite order.

Load more comments