Hacker News Comments on
Beautiful Code: Leading Programmers Explain How They Think (Theory in Practice (O'Reilly))
·
1
HN points
·
10
HN comments
- Ranked #23 this year (2024) · view
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this book.I kinda dislike the premise of your question, but https://www.amazon.com/Beautiful-Code-Leading-Programmers-Pr... has some good candidates. Chapter 1 for example is a regular expression matcher that appeared on HN recently: https://news.ycombinator.com/item?id=32589311
During my undergrad I semi-randomly picked out "Beautiful Code" [0] from our university library. Not sure why it never features in such lists but I thoroughly enjoyed it. :)[0]: https://www.amazon.com/Beautiful-Code-Leading-Programmers-Pr...
⬐ anupj+1 I really enjoyed these books. I wish there were more books in this series⬐ dongeckoI really love this book. Beautiful data and beautiful visualizations are also nice reads, but beautiful code has a special place in my heart.
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...
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.
⬐ tomcooksThank you very much, challenge accepted
> 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.
⬐ erreAh, 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⬐ bcantrillThis 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.⬐ agentSI 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.
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.
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.
⬐ jdolinerThis 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...
⬐ JustAGeekThanks 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... ;)