HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
Beautiful Code: Leading Programmers Explain How They Think (Theory in Practice (O'Reilly))

Andy Oram, Greg Wilson · 1 HN points · 8 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "Beautiful Code: Leading Programmers Explain How They Think (Theory in Practice (O'Reilly))" by Andy Oram, Greg Wilson.
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
How do the experts solve difficult problems in software development? In this unique and insightful book, leading computer scientists offer case studies that reveal how they found unusual, carefully designed solutions to high-profile projects. You will be able to look over the shoulder of major coding and design experts to see problems through their eyes. This is not simply another design patterns book, or another software engineering treatise on the right and wrong way to do things. The authors think aloud as they work through their project's architecture, the tradeoffs made in its construction, and when it was important to break rules. Beautiful Code is an opportunity for master coders to tell their story. All author royalties will be donated to Amnesty International. tion.
HN Books Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
I thought I had seen it before. Verified you can actually see the whole chapter in a nicer (book vs web) layout in Amazon's "Look inside" feature since it's at the beginning of the book.

https://www.amazon.com/Beautiful-Code-Leading-Programmers-Pr...

Nov 14, 2019 · kybernetikos on Build Your Own React
I have once already: https://www.amazon.com/Beautiful-Code-Leading-Programmers-Pr...

I liked it, but I'm not going to be paying for this sort of thing often. I think a lot would hinge on having content that was high quality, and being able to persuade me that it would be high quality before I paid for it might be challenging.

tomcooks
Thank you very much, challenge accepted
Apr 11, 2014 · olalonde on HMO: Help Me Out
> How to write English (non-native language)

I suggest writing a blog in English. Practice is probably the best way to learn. There is also http://english.stackexchange.com if you have specific questions.

> Program well in c in userspare (Currently reading 'The Linux Programming Interface')

In my experience, reading other people's code is the best way to get better at a language. I don't have much experience with C but I guess there are a few projects that would be interesting to read here: https://github.com/search?o=desc&q=language%3A%22c%22&ref=si...

Relevant links: http://stackoverflow.com/questions/925754/resources-for-lear..., http://www.amazon.com/Beautiful-Code-Leading-Programmers-Pra...

> Embedded development (I don't even know where to start that one...)

I am currently learning embedded development (maybe we could help each other?).

guimobob
> I am currently learning embedded development (maybe we could help each other?).

I would love to!

And thanks for the links, I will try/read them.

For those who don't know, this is Rob Pike's chapter of Beautiful Code, a thoroughly enjoyable book: http://www.amazon.co.uk/Beautiful-Code-Leading-Programmers-P... . Every now and then I read a different chapter, and it's always interesting. I particularly liked Rob Pike's one, and the one about Python's dictionary implementation.
erre
Ah, and Jon Bentley's chapter about quicksort, along whose lines there's a (also very interesting) Google Tech Talk: http://www.youtube.com/watch?v=aMnn0Jq0J-E
bcantrill
This code is beautiful, but it's also busted [1] -- albeit only for extraordinarily pathological input. As to whether this ultimately dents its beauty is up to the beholder, presumably; for me personally, I confess to suffer from a utilitarian sense of beauty when it comes to software -- for me, broken code can't achieve absolute beauty.

[1] http://dtrace.org/blogs/bmc/2007/07/11/beautiful-code/

agentS
I believe Kernighan acknowledged that: "[snip] The depth of recursion is no more than the length of the pattern, which in normal use is quite short, so there is no danger of running out of space. [/snip]".

If you're going to judge this code based on both pathological haystacks but also pathological needle regexs, then you have to admit that this code, which has linear space usage in the pattern length is far better than PCRE, which has exponential time in the pattern length[1].

Considering its succinctness, I find that pretty impressive.

[1] http://swtch.com/~rsc/regexp/regexp1.html

You might be interested in http://www.amazon.com/Beautiful-Code-Leading-Programmers-Pra...

I believe one of the examples they gave in C was the diff algorithm from Subversion.

Feb 05, 2011 · lukesandberg on Delta Debugging
Chapter 28 in Beautiful Code (http://www.amazon.com/Beautiful-Code-Leading-Programmers-Pra...) talks about delta debugging, how it was invented and developed. its really a great chapter in a great book. i can't recommend it enough.
jdoliner
This chapter actually has a much cooler implementation of delta debugging that what has been discussed here. We're generally thinking of delta debugging in which we take the changes to the source as the search space and use some form of binary search to find the offending change (for which git bisect is great). The chapter in beautiful code begins with this but then moves on to runtime delta debugging in which the techniques are used to compare the memory in use by two instances of the program (one buggy and one not) until a specific piece of the programs state can be isolated as the cause.
I've heard this book was good http://www.amazon.com/Beautiful-Code-Leading-Programmers-Pra.... It asks 30 different developers for pieces of beautiful code. I read an excerpt or two back when it was released and put it on my to read list. Unfortunately haven't gotten to it yet, but still plan too.
Have a look at the book 'Beautiful code'

http://www.amazon.com/Beautiful-Code-Leading-Programmers-Pra...

JustAGeek
Thanks but I already know that book. It's great yet I'm specifically interested in real code bc a book and real code is probably something very different... ;)
May 15, 2007 · 1 points, 2 comments · submitted by mf
andre
Looks like it's coming out in June
mf
Good looking out. I totally missed that. I thought I read January 2007. Are you familiar with any of the contributors?
HN Books is an independent project and is not operated by Y Combinator or Amazon.com.
~ [email protected]
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.