Lurker News
Until now I've read:

- The Healthy Programmer
- Clean Code
- Test-Driven Development by Example
What should I add to my library?

Comments (337) 132 threads

Show all comments

Showing thread 1 of 132

DoofusOfDeath6 replies#
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 Viswanath.
* "Genetic Programming: An Intrduction" by Banzhaf et al.
* "Applied Crytography" by Schneier.
EDIT: A few additional comments:
(1) Although these books are problem-domain specific, some of them had benefits outside of their problem domains:
* The Dataflow book has some great coverage of fixpoint algorithms. It's really helpful to recognize when some problems are best solved by fixpoint analysis.
* The "dragon book" takes a lot of the mystery out of compilers. That's somewhat helpful when writing code that needs to be fast. It's super helpful if you want to work with compiler-related technologies such as LLVM.
* Understanding the fundamental challenges of transaction processing helps you avoid massive misadventures when dealing with databases or concurrent / multithreaded systems.
(2) YMMV, but I've found it hard to soldier through these books unless I had a need to for my job or for school.

sethrin4 replies#
> "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.
eof#
And just abandon all that domain knowledge your garnered along your journey?
jerf1 reply#
I would assume that any book about the internals of a database would be suitable. MySQL is plenty real enough to be educational to learn about its internals, yea verily, even its quirks, and to learn a lot about how other databases work. Even the "NoSQL" databases will use many of the same primitives.

An equivalent substitution for another database would be fine; anyone have any suggestions? Then again, such a substitution is really solving a non-problem.

DoofusOfDeath#
It may very well be the case that looking at the internals of some database other would provide a different set of lessons.

IMHO, MySQL is especially ugly due to an attempt to insert an abstract interface around its storage engines. IIRC that interface is leaky, and its documentation is pretty spotty. Also, the InnoDB storage engine has a lot of complexity that seemingly duplicates what's provided on the storage-engine-agnostic side of that interface.
One of the big lessons I took away from studying MySQL's internals, and partially confirmed by the "internals" book, was this: Be careful when designing a plugible storage-engines framework for a DBMS; MySQL has some examples of what can go wrong.
That's something you're unlikely to find mentioned in a generic DBMS-implementation book, but is very good to know about regardless.

fipar1 reply#
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 familiar with its internals too.

sethrin1 reply#
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.

Continue this thread — 1 reply

DoofusOfDeath#
That's a good point; let me clarify.

It's definitely a good idea to have prior general knowledge of database internals before reading an "internals" book.
I'm not sure if it's out of date, but my favorite book on the topic was "Database System Implementation" by Garcia-Molina et al. I found it to be super-readable.
What I like about the "internals" book is you get to see a real, specific database up close, warts and all. It gives you a different perspective from an overview book like the one mentioned above.

barrkel6 replies#
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's also got the lexical and parsing end of things, but a bit better done, but still quite theoretical.
One of the best books I read on programming is "Concepts, Techniques, and Models of Computer Programming"; it's not strictly speaking language agnostic, based as it is on Oz, but Oz isn't a language you'd ever use in production and is a reasonable base to introduce you to ways of programming that will probably be completely unfamiliar, like constraint programming, dataflow, concurrent logic, etc.

eastWestMath2 replies#
Writing a parser is broadly applicable to a wide range of problems, not just writing a compiler.
barrkel1 reply#
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.

Continue this thread — 1 reply

k__#
yes.

Wrote many for XML/json based configs.

snakeanus#
CTMCP is awesome indeed, one of my favourite along with SICP I would say.
beat3 replies#
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), when we had to write our own stream formats. It really changed my whole way of thinking about a fundamental class of programming problems.

DoofusOfDeath#
I also found my theory-of-computation course in college to be a wonderful help in understanding parsing.

Being familiar with the Chomsky Hierarchy ([1]), and the kinds of language recognizers required for each level in that hierarchy, can save parser authors a lot of wasted time.
E.g., "regex's can't count!"
[1] https://en.wikipedia.org/wiki/Chomsky_hierarchy

eru#
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.)

astrange#
The Dragon book is not good at teaching parsing, but is obsessed with the idea and spends 2/3 of the time talking about it, so you'll just be left thinking it's really difficult. The whole thing is extremely boring and lacks confidence.

Try "Parsing Techniques: A Practical Guide" and then a more concise book like Muchnick.

timtadh#
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!

aalhour#
Hey, I seconded this, the Dragons Book is not the best textbook or introduction to the topic, there are a lot of better ones. The Dragons Book is more of a classic. If you want to read a good book on compilers construction then you're better off reading "Engineering a Compiler" by K. Cooper and L. Torczon or "Modern Compiler Implementation in ML" by A. Appel.

If you want more resources on Compilers other than books, such as tutorials, guides, talks and papers, then go ahead and check the Awesome Compilers vertical I compiled a while ago: https://github.com/aalhour/awesome-compilers
Cheers!

glangdale#
Do note that there are multiple editions of the Dragon book and later editions have a far better codegen section.

One of the more famous compiler writers from that era once told me that the Dragon book's original codegen section wasn't even historically how anyone wrote a compiler and it certainly didn't reflect modern practice even back in the 90s.
However, the update significantly improves it with the addition of Monica Lam's contribution. I don't know if it's state of the art for codegen (probably not), but I'm not sure what book is (Muchnick is great too, but this is also quite old now).

TallGuyShort2 replies#
I would recommend Schneier's Cryptography Engineering (or its predecessor) Practical Cryptography over Applied Cryptography, given the question. I agree Applied Cryptography is a very interesting book, but that's because I'm a crypto nerd. For someone looking to improve general software engineering skills, I think the other books do a better job of presenting best practices and the understanding behind them, with a bit less mathematical theory, etc.
schoen#
Also, Applied Cryptography includes a ton of totally obsolete stuff, which tptacek has complained is still leading people astray by giving them seemingly attractive choices that are in fact broken or deprecated. Even at the time, with its focus on breadth of coverage, it presented technology which wouldn't have been a state-of-the-art choice, while today many techniques there are even less appropriate (and some good new crypto has been invented in the interim).

Applied Cryptography was an important political statement that we can and should have access to cryptographic technology, but I don't think it can be recommended as an appropriate introduction to the field in 2017.

therealdrag0#
Is there a best security book that is even more high level than those? Just like security patterns or something. What you need to know about TLS and securing data at rest, etc.
pvg#
You can probably make a book out of the recommendations for better books than dragon and applied crypto you can find just online.
tannhaeuser#
+1 for the "dragon book". Though the criticism about it being too focused on lex/yacc-era compilers and not being relevant today might have a point, I still find the mix of pragmatism and formal language theory absolutely worth the read, stylish/Unix-y, and even entertaining - for me, truly a hallmark of "American-style" comp.sci. standard literature (as opposed to more theoretical expositions to the topic).

Also, Donald Knuth's "The Art of Programming" (at least the fundamental and sorting/searching algorithms books), plus a book about graph theory and algorithms.

Continue this thread — 1 more reply