It’s easy to find a book about a specific programming language, but I’d be thrilled to know of a book or resources that will provide someone with a solid foundation for good software engineering principles, regardless of the language being used.
Another vote for Code Complete. But coming from someone who's bought and gifted a few books, I'm thinking instead of the quote ...
"If you want to build a ship, don't drum up people to collect wood and don't assign them tasks and work, but rather teach them to long for the endless immensity of the sea." Antoine de Saint-Exupery
Pragmatic Programmer is still a good book, not as revealing as before but still has lots of good advice.
Code Complete is a problematic book. It has some good ideas but also has some very bad ones (cone of uncertainty, 10 times productivity in good programmers, etc).
Design Patterns is mostly obsolete. Functional programming techniques made a lot of Object Oriented techniques irrelevant (e.g.: observer pattern vs callbacks with lambdas).
Art of Computer Programming is the book everyone mentions but no one reads. A classic that people actually read is Structure and Interpretation of Computer Programs.
My recommendations: "Code" by Charles Petzold,"Don't make me think" by Steve Krug, Working Effectivelly with Legacy Code, by Robert Feathers, Clean Code by uncle Bob,..
I'm curious about your heartburn with the "cone of uncertainty" from Code Complete. I think it's a very reasonable model for understanding software estimation uncertainty. What don't you like about it?
It is a dream situation, an abstraction too simplistic and dangerously optimistic. In all projects I've been the project takes "one more month to finish" for the next 15 months. The cone metaphor simply ignores all unknown unknowns.
The Pragmatic Programmer was a good broad spectrum intro 20 years ago, I don't know how well it's aged, but they have just released a 20th anniversary update so maybe check out reviews for that.
Warning: Software engineering can be quite boring to someone who has done little programming. In my opinion, when your starting out it is better write anything that compiles and runs, then to write incomplete "proper" programs. Software engineering principles make more sense after you've hacked yourself though a bunch of badly written code.
It might be a good thing to define what you think Software Engineering means. The comments section shows that there is little agreement between HN readers. Software Engineering, particularly for large and complex systems, seems to focus on human management and interaction issues almost entirely. The technology of programmed systems plays a minor how those systems get put together. Mel Conway got it right: systems (recursively) mimic the organization that built them. See https://en.wikipedia.org/wiki/Melvin_Conway
The best gift given you requirements would be `Elements of Computing Systems` [1] aka `Nand2Tetris' and a better gift would be if you can mentor that someone while he works through it.
Also any book that covers soft skills aspects while emphasising the importance of having good career plans and good mentors is critical.
People seem to forget that Software Engineering is a social endeavor as much as it's an engineering endeavor. Successful engineers have to be able to sell their ideas to their peers and management as much as they need to be able to create software. This is why I always recommend that engineers read, "How To Win Friends And Influence People." Reading it and practicing what it says will do wonders for anyone's life and career.
while I agree that it's a useful book for existing engineers who lack those skills, it's not something I'd recommend to people just learning to build stuff
It's a great book simply as a book. It's something people tend to rationalize not buying. That makes it a good gift. It will provide a lifetime of reading and learning (just as it has provided Knuth a lifetime of writing).
And it meets the spec: there's no more solid foundation and it is language independent. It's plausibly one of the most important books of the 20th/21st centuries.
If there is anything on a separate subject that you feel relates closely to software engineering might be useful. Personally I found software engineering boring until I saw how it could be used in other industries
A subscription to Safari would be the equivalent of a focused gift card. You would give access to thousands of books. I usually read 4+ at a time when trying to understand a particular concept.
Other than that, The Art of Computer Programming set. ;)
I always thought TAOCP was for showing off on the bookshelf and not actually for reading. Whenever I make comments about it when I see it on someone's bookshelf they say they haven't read it.
I think this is the natural outcome of having free money but not enough free time. I find myself buying up supplies for a new project idea as step 1, but not having the time to ever complete them.
Amazing book, but it's mostly about programming in the small (using properties of the number system). Software Engineering is more about large programmed systems and the people who build them.
Code Complete would be a great gift. This is the book I read when I first got out of college and it has had a very important influence on my coding style and thinking.
"If you want to build a ship, don't drum up people to collect wood and don't assign them tasks and work, but rather teach them to long for the endless immensity of the sea." Antoine de Saint-Exupery