Live data from Hacker News

Ask HN: What language-agnostic programming books should I read?

news.ycombinator.com

261–270 of 344 posts

Re: Ask HN: What language-agnostic programming books should I read?

#261
post #245

Earlier quoted context omitted.

Don't read the dragon book if you're interested in compilers. It's lex and parse heavy, and is not up to date with more recent best practice on codegen. Further, the lex and parse end of it is focused on the kind of theory you need to build tools like lex and yacc, rather than stuff you need to know if you want to write a compiler. For a good intro of modern back end development, check out Engineering a Compiler. It'…

Don't read only the Dragon book if you're interested in compilers (or parsing in general). But it should be read, in addition to whatever else you read on the subject. It's classic for a reason. Most programmers don't understand parsing worth a crap, imho. Some compiler theory would do most of us some good. I read it because I was doing data stream parsing back in the olden days before XML (which was before JSON), wh…

I found the Dragon Book unbearable---and I am one of those people interested in theory. Pick something better, plenty of choice available.

'Essentials of Programming Languages' and 'Types and Programming Languages' are good choices. (But slightly off-topic for this particular subthread, since they don't deal with parsing.)

Re: Ask HN: What language-agnostic programming books should I read?

#262

Not really programming books, but these have helped me with programming jobs. -How to make friends and influence people. Anyone who works collaboratively with people needs to be able to communicate effectively. -The Elements of style. Writing understandable code is similar to any other type of writing.

There's also The Elements of Programming Style by Kernighan and Pike

https://en.wikipedia.org/wiki/The_Elements_of_Programming_St...

Re: Ask HN: What language-agnostic programming books should I read?

#263
post #139

Earlier quoted context omitted.

> "Understanding MySQL Internals" Why this, as opposed to a more general text on databases? MySQL is popular, but few would accuse it of actually being a good database. I feel like the point at which knowing about the internals of MySQL becomes relevant is probably the point at which you should use a better database.

I think a good book that helps you understand a complex piece of software is a good read for programmers, regardless of the use you make of that software. Additionally, I don't see how the need to know about the internals of MySQL means one should use a better database. PostgreSQL is normally proposed as the better alternative to MySQL if one sticks to Open Source, and all the good experts at it I have met were famil…

You seem to have misinterpreted my objection. There are better books on databases, and MySQL is not necessarily a good example of a database. It tends to do things in its own way. When you get into the sort of situation where the difference between 'how MySQL does things' and 'how things are supposed to work' matters, then typically it's MySQL that's quirky.

Re: Ask HN: What language-agnostic programming books should I read?

#264

Earlier quoted context omitted.

Writing a parser is broadly applicable to a wide range of problems, not just writing a compiler.

The criticism is that the strongest part of the book is focused on writing compiler compilers - that is, writing tools that write parsers - not writing parsers.

My criticism is that the book is unbearably imperative and doesn't actually teach you any of the theory well.

Re: Ask HN: What language-agnostic programming books should I read?

#266

Earlier quoted context omitted.

I do not understand this. It seems like a perfectly good advice, and in fact it's what I'm doing every day - leaning on my compiler, and in Java world, on my IDE. And also it seems to be something lots of programmers don't realize for some reason - many times I had to instruct people to crank up their compiler warning settings and actually read them . Especially in C-land, I can't count the number of times I solved s…

My point was that with a modern IDE we can do that without resorting to a full compile, which can be burdensome with large codebases. The IDE space has improved a lot since 2004, eg. Jetbrains' tools around refactoring and code cleanup suggestions, make things super simple. Don't get me wrong, I've read this book, multiple times, it's on my bookshelf and think it's a great book, but it was written when the state of d…

[deleted]

Re: Ask HN: What language-agnostic programming books should I read?

#268

Some of the most interesting books I've read in support of my software-development work are: * "Compilers: Principles, Techniques, & Tools" by Aho et al. (i.e., "the dragon book") * "Data Flow Analysis: Theory and Practice" by Khedker et al. * "Understanding MySQL Internals" by Sasha Pachev. * "Transaction Processing: Concepts and Techniques" by Gray and Reuter. * "Fundamentals of Wireless Communication" by Tse and V…

Don't read the dragon book if you're interested in compilers. It's lex and parse heavy, and is not up to date with more recent best practice on codegen. Further, the lex and parse end of it is focused on the kind of theory you need to build tools like lex and yacc, rather than stuff you need to know if you want to write a compiler. For a good intro of modern back end development, check out Engineering a Compiler. It'…

Most people who criticize the Dragon (Compilers etc... by Aho et al.) book seem to focus on chapters 3 and 4 which are the chapters on lexical analysis and parsing. The book has 12 chapters. Whatever your feelings on the parsing techniques, the book covers WAY more than that. It has a really good introduction to code generation, syntax directed translation, control flow analysis, dataflow analysis, and local, global and whole program optimizations.

As someone who has quite a few books on compilers, program analysis, type theory, etc... I find the Dragon book an irreplaceable reference to this day. It has a breadth of content shared by very few other books. For instance, Muchnick's classic "Advanced Compiler Design and Implementation" is really good for analysis and optimization but neglects all front end topics. The only area where I believe the Dragon book is inadequate in is type theory (I recommend Types and Programming languages [TAPL] by Pierce and Semantics with Application by Nielson for a gentler intro).

As to parsing, its chapter on parsing (4) is not as "hip" has some people want. However, it is solid and will teach you how to do parsing. There are newer and fancier techniques not covered in Chapter 4 but in general most people would benefit just having a solid understanding of recursive descent parsing!

Re: Ask HN: What language-agnostic programming books should I read?

#269
post #40

Structure and Interpretation of Computer Program (it's written in scheme but it's mostly for convenience and its lack of syntax). Definitely the best book I've read on programming.

I re-read SICP recently, because I was teaching a friend.

I had very rose-tinted nostalgic memories. They did not hold up.

"How to Design Programmes" is a much better book. (But made for rank beginners.) And for the more advanced, "Types and Programming Languages".

See "Why Calculating is better than Scheming" (https://www.cs.kent.ac.uk/people/staff/dat/miranda/wadler87....) for a critique.

Don't get me wrong, SICP is still a good book to have read. Just no longer my favourite.

Post reply on HN