Live data from Hacker News

How These Things Work – A book about CS from first principles (2016)

reasonablypolymorphic.com

31–40 of 62 posts

Re: How These Things Work – A book about CS from first principles (2016)

#31
post #5

I never heard of "first principles" until Elon Musk used it. (Not a native English speaker) Now I see it everywhere. Must be the new overhyped term. "We start from first principles, just like Elon Musk". After looking at Google trends, I might be wrong, so nevermind ;) https://trends.google.com/trends/explore?date=all&q=First%20...

First-principles is a physics/math way of thinking, and is common parlance in the mathematical modeling world.

When we say a model is a first-principles model, it means it is derived through fundamental equations like conservation of mass/energy, and other known relationships. This is in contrast to a data-driven model, where the underlying phenomena are not explicitly modeled -- instead the model is created by fitting to data.

Elon Musk became associated with it because he applied this form of thinking to business problems, i.e. by establishing the "fundamental equations" (as it were), questioning some basic assumptions and coming up with conclusions that are necessarily true but that no one else has arrived at.

Data-driven models (or the human equivalent: reasoning by analogy) are convenient to build and work well in the space the data has been collected in (~interpolation). However, they do not extrapolate well -- you cannot be sure they will work outside of the space of training data that the model has seen.

First-principles models (or the human equivalent: reasoning by principles) are generally more difficult to build and test (I worked on first-principles physics models for a decade -- they are a pain), but because they are built on a structure of chained principles/truths, they often extrapolate well even to areas where data has not been collected.

This is why if you want to improve efficiency and operations in known spaces, you use data-driven models (fast to build and deploy, accurately captures known behavior).

But for doing design and discovery (doing new things that have never been done before), first-principles models/thinking will carry you much farther.

Re: How These Things Work – A book about CS from first principles (2016)

#32
post #5

I never heard of "first principles" until Elon Musk used it. (Not a native English speaker) Now I see it everywhere. Must be the new overhyped term. "We start from first principles, just like Elon Musk". After looking at Google trends, I might be wrong, so nevermind ;) https://trends.google.com/trends/explore?date=all&q=First%20...

It's all over the place in physics and chemistry, and as a consequence on the engineering areas that are based on those (AKA, nearly all of them).

It is rarer to see it in CS, but it's more because CS used to deal with very simple theories up to recently than because of some fashion. As CS theories start to construct up from the earlier ones, it's appearing more.

Re: How These Things Work – A book about CS from first principles (2016)

#33

I love this kind of Books! In a much more general tone, there is "The Knowledge: How To Rebuild Our World After An Apocalypse" by Lewis Dartnell. This explains the first principles of a lot of things we take for granted in the modern world, from agriculture to food and clothing, medicine, chemistry and more. This book about CS principles is a great complement to that!

Oh, puh-leeze! THE book on rebuilding civilization is How to Invent Everything: A Survival Guide for the Stranded Time-Traveler[1] by Ryan North.

[1] https://www.amazon.com/How-Invent-Everything-Survival-Strand...

Re: How These Things Work – A book about CS from first principles (2016)

#34
post #16

I recommend Code: The Hidden Language of Computer Hardware and Software by Charles Petzold [1]. It is far more comprehensive than the OP, goes from pre-computer code, to electrical circuits, to an overview of assembly. No prior knowledge needed except how to read. 1. https://www.amazon.com/Code-Language-Computer-Hardware-Softw...

The amazing thing about Code is how it traces the connection of formal logic (in the Aristotelian sense) to the, as you say, pre-computer code of braille and even flag signals to form the foundations of modern computing.

I am a self-taught developer and probably had 10 years experience in web development when I first read Code. I would have these little moments of revelation where my mind would get ahead of the narrative of the text because I was working backwards from my higher level understanding to Petzolds lower level descriptions. I think of this book fairly often when reading technical documentation or articles.

I recently listened to Jim Keller relate engineering and design to following recipes in cooking [1]. Most people just execute stacks of recipes in their day-to-day life and they can be very good at that and the results of what they make can be very good. But to be an expert at cooking you need to achieve a deeper understanding of what is food and how food works (say, on a physics or thermodynamic level). I am very much a programming recipe executor but reading Code I got to touch some elements of expertise, which was rewarding.

https://youtu.be/Nb2tebYAaOA?t=1351

Re: How These Things Work – A book about CS from first principles (2016)

#35
post #25
post #16

I recommend Code: The Hidden Language of Computer Hardware and Software by Charles Petzold [1]. It is far more comprehensive than the OP, goes from pre-computer code, to electrical circuits, to an overview of assembly. No prior knowledge needed except how to read. 1. https://www.amazon.com/Code-Language-Computer-Hardware-Softw...

Code 's good but it doesn't cover Kleisli categories and Kleisli composition, Peano arithmetic, parametric polymorphism, sum types, pattern matching, or any of numerous other things covered in Maguire's How These Things Work . So it's not accurate to say Code is "far more comprehensive"; Code mentions FORTRAN, ALGOL, COBOL, PL/1, and BASIC, but the example programs it contains are written in assembly, ALGOL, and BASI…

It's very depressing that I've been a developer for 8 years and I've never heard any of those terms you mentioned. I'm self taught but I've always felt like I should go back and really learn the fundamentals.

Re: How These Things Work – A book about CS from first principles (2016)

#36
post #5

I never heard of "first principles" until Elon Musk used it. (Not a native English speaker) Now I see it everywhere. Must be the new overhyped term. "We start from first principles, just like Elon Musk". After looking at Google trends, I might be wrong, so nevermind ;) https://trends.google.com/trends/explore?date=all&q=First%20...

UK here - I remember it back in college thirty+ years ago as in "build X from first principles", which could mean (e.g.) implement an algorithm without out using library calls.

[deleted]

Re: How These Things Work – A book about CS from first principles (2016)

#37
post #12

One of my favorite books on subject is The Elements of Computing Systems: Building a Modern Computer from First Principles by Noam Nisan https://www.amazon.com/Elements-Computing-Systems-Building-P...

Would you say that this book is still relevant, now that it is 15 years old?

Re: How These Things Work – A book about CS from first principles (2016)

#38
post #12

One of my favorite books on subject is The Elements of Computing Systems: Building a Modern Computer from First Principles by Noam Nisan https://www.amazon.com/Elements-Computing-Systems-Building-P...

Would you say that this book is still relevant, now that it is 15 years old?

yes, its structured in a way that's very hands on

Re: How These Things Work – A book about CS from first principles (2016)

#39
post #25

Earlier quoted context omitted.

Code 's good but it doesn't cover Kleisli categories and Kleisli composition, Peano arithmetic, parametric polymorphism, sum types, pattern matching, or any of numerous other things covered in Maguire's How These Things Work . So it's not accurate to say Code is "far more comprehensive"; Code mentions FORTRAN, ALGOL, COBOL, PL/1, and BASIC, but the example programs it contains are written in assembly, ALGOL, and BASI…

It's very depressing that I've been a developer for 8 years and I've never heard any of those terms you mentioned. I'm self taught but I've always felt like I should go back and really learn the fundamentals.

I'm not saying you shouldn't always strive to learn new things (for your own personal growth and curiosity), but I think it's important to point out that the link between being a developer and knowing about these things-- esoteric topics of applied Mathematics-- is pretty weak.

Imagine a carpenter spending their time getting a chemistry degree in order to better understand how wood glue works.

Re: How These Things Work – A book about CS from first principles (2016)

#40
post #16

I recommend Code: The Hidden Language of Computer Hardware and Software by Charles Petzold [1]. It is far more comprehensive than the OP, goes from pre-computer code, to electrical circuits, to an overview of assembly. No prior knowledge needed except how to read. 1. https://www.amazon.com/Code-Language-Computer-Hardware-Softw...

I'm reading Code right now and it's fantastic. I'm a bit more than 1/2 the way through and so far it's only been about how computers work and not really about computer science. I heard an expression this weekend that I think is apt - a computer is to computer science as a telescope is to astronomy.

Dijkstra is supposed to have said something like this though the origin is disputed.

"Computer science is no more about computers than astronomy is about telescopes."

Post reply on HN