Live data from Hacker News

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

news.ycombinator.com

301–310 of 344 posts

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

#302
post #291

Earlier quoted context omitted.

They sound like they're echoing the kinds of things that are normally said about C++11. > I agree modern C++ is nice but it's the same language still. Well...in the same sense that any language is the same language after you add a bunch of things to it that weren't there before and shift to using those new features as idiomatic parts of the language. I would expect C++ written in 2004 to use different patterns than C…

Idiomatic sounds like preference to dogmatism rather than pragmatism which is generally the worse tradeoff. I would say generally C++ style has evolved through last decades with people understanding class based architecture as an antipattern and data pipelines based on preferably immutable data as the more robust and understandable approach. This has nothing to do with language standards or 'idiomatic' constructs - b…

> Idiomatic sounds like preference to dogmatism rather than pragmatism which is generally the worse tradeoff.

That's never been the way that I've read it, and it's not how I meant it. New language constructs allow for more-natural ways for the code to express the intent of the programmer, replacing the use of older constructs in the places that they were clumsy.

The entire point is to make the language more practical. Patterns of use in a language aren't idiomatic because of dogma (or at least, they shouldn't be). They're idiomatic because they're a clear and elegant way (or at least the most elegant way available) to implement something.

> I would not expect a legacy codebase to resemble 2017 C++ as much as 1997 C++.

Agreed, but then we come back to the fact that we might refactor a 1997 codebase differently in 2004 than in 2017.

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

#304

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'…

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

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

#305

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…

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 b…

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.

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

#306

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'…

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…

I don't remember very well, but I think both Muchnick and the Dragon books didn't cover laying out data. This confused me when trying to do code generation.

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

#307

'Implementation Patterns', Kent Beck. A semi-language-agnostic extension of his 'Smalltalk Patterns'for how to clearly and consistently express what you're saying when you code. 'Facts and Fallacies of Software Engineering', Robert Glass. Glass presents a list of things everybody knows, or ought to know, and gives both academic and opinionated support and/or critique for why they are and aren't so. 'Making Software',…

[deleted]

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

#308
post #297
post #270

Earlier quoted context omitted.

They might work for some, but I always find all the "Head First" books to be very fluffy.

I think that is part of their goal / style. They are meant to be lightweight and fun and easy-to-read intros to topics for beginners, who would get put off by more formal / less joke-y prose.

A bit like the Dummies series of books, in fact. Which is not to say that those books are not good. I've read a few of them, and they have some good matter.

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

#309
post #169

Practical Object-oriented Design in Ruby is a great read with a lot of advice on approaching design problems, approaching refactoring and thinking about how to model. It's in Ruby but I feel a lot of its advice is general.

aka "Why duck typing is better than inheritance". Yes, great book, but if you're using a language that doesn't support duck typing, some of the concepts will frustrate you and make you wish you were using Ruby instead.

You can do some (most) of the stuff using interfaces/protocols in languages that support these.
Post reply on HN