Live data from Hacker News

Ask HN: Top 10 Timeless Software Books That ChangedLife as Software Engineer?

news.ycombinator.com

61–70 of 72 posts

Re: Ask HN: Top 10 Timeless Software Books That ChangedLife as Software Engineer?

#61

Earlier quoted context omitted.

I don't use the proscribed TDD process very often, but I use the TDD mindset all the time to great effect. Listing out the tests you're going to write before you write the code (even mentally) can be considered a continuation of the requirements-gathering process. And thinking about how you're going to test your code before you write it will, in my experience, improve the design. (Particularly, it seems to encourage…

>Listing out the tests you're going to write before you write the code (even mentally) can be considered a continuation of the requirements-gathering process. But this is not TDD. I've worked in HW industry where cost of bugs is high and we analyzed specs during brainstorming session as 3-5 ppl and brainstormed test cases that we want to test. It worked well because this way we we're finding way more things to test t…

> But this is not TDD.

That's true. Did you miss the part where I mentioned the "TDD process" versus the "TDD mindset"?

> Whether your code is easily testable will be challenged by writing tests regardless of the moment of writing test - before or after writing impl.

I don't want to derail the conversation, but when I'm working on projects alone then my test coverage is 100%. (Line and branch coverage.) But surely that slows me down, right? And I must have a million test cases? No, quite the opposite actually. Writing code that way is just a skill though, the same as juggling, that becomes easy with enough practice. (Along with the right practices and tools.) However, I don't aim for 100% (or even a particularly high percentage, to be honest) when I'm working on projects with other people, because the only way it's possible is if the code was designed for it from the get-go.

I encourage junior developers to learn and try to use TDD for a while because it can be useful sometimes and improve the way they write code. But I would never require them to do it.

Re: Ask HN: Top 10 Timeless Software Books That ChangedLife as Software Engineer?

#62
post #19

'Elements of Programming' by Stepanov and McJones 'Software Fundamentals' by Hoffman and Weiss, 'Writing Solid Code' by Maguire, 'Code Complete' by McConnell

Code Complete is one of the best books for beginners to improve their general, non-language-specific skills, IMO, though it does have language snippets as examples, and even though it is somewhat dated. The principles in it are timeless, though.

I have read both the 1st and 2nd Editions, many years ago. IMO Edn. 1 is better.

Re: Ask HN: Top 10 Timeless Software Books That ChangedLife as Software Engineer?

#64

@burhanrashid52 In general, we should not be using HN with LLM copy. However, I can suggest a technique for you to help you accelerate your effort towards a book and the "hard part" of getting a professional editor and publisher. Using GPT-4, which has a synthesized 'understanding' from reading endless reviews of such well known material ... 1. Provide the list of books as recapped in the comments below, with the pro…

I have used the same technique to summarize survey results and to look for new books to possibly read.

It works well for the most part. GPT with its compression leaves out all the stories and metaphors that make the content easier to remember and relate to.

Re: Ask HN: Top 10 Timeless Software Books That ChangedLife as Software Engineer?

#65
There are two books which I keep coming back to learn from:

* Structure and Interpretation of Computer Programs: SICP changed the way I view programming. It's an excellent intro to the mindset of solving problems with code and how to iteratively build up a software design. You need to be comfortable with Scheme, though, in order to get the most out of the book.

* The Mythical Man-Month: Not strictly about programming but more on how to succeed with software projects. Hence, The Mythical Man-Month is more about people than code, which is why it has aged so well: people is a fairly stable construct.

Re: Ask HN: Top 10 Timeless Software Books That ChangedLife as Software Engineer?

#66
post #14

Thanks for the list, here it is again: 1. Code: The Hidden Language of Computers (Pure Basic: Starting with Binary) 2. Working Effectively with Legacy Code (Dealing with an ugly codebase) 3. Refactoring Improve the design of the existing codebase (Making changes safely without breaking the code) 4. Test-Driven Development (TDD) (Once you’ve learned all the above, you always start writing tests first) 5. Head First De…

> 8. Your Code as a Crime Scene (Finding problems in the code using code history)

There's a brand new 2nd edition on its way: https://pragprog.com/titles/atcrime2/your-code-as-a-crime-sc...

Re: Ask HN: Top 10 Timeless Software Books That ChangedLife as Software Engineer?

#67

Earlier quoted context omitted.

Yes, this book is excellent. And it's an antidote to some common advice that really isn't very good.

I liked the books emphasis on "interface" vs "implementation", and how this affects complexity. But one tidbit I did like from the book was along the lines of "if every use case involves the same action, it would be simpler to incorporate that action". (e.g. Something like if ".delete()" were to fail if the file didn't exist, and if every invocation would be like "if .exists() { .delete() }", then it'd be simpler to…

That sounds like DRY, don’t repeat yourself. Taken to another level I try to think of this as instruction elimination. Where can I eliminate the most instructions, still pass all my tests, and then compare execution speeds?

Instruction elimination and DRY are basically the same things in practice but the former produces a more aggressive and utility focused mindset. I find when I think about large applications with instruction elimination mindset I am constantly churning on refactoring as requirements increase but the code size grows so very slowly that there is less to maintain and test automation continues to be measured between less than 7 seconds and up to 2 minutes depending upon the scenario and number of machines involved.

Re: Ask HN: Top 10 Timeless Software Books That ChangedLife as Software Engineer?

#70
post #14

Thanks for the list, here it is again: 1. Code: The Hidden Language of Computers (Pure Basic: Starting with Binary) 2. Working Effectively with Legacy Code (Dealing with an ugly codebase) 3. Refactoring Improve the design of the existing codebase (Making changes safely without breaking the code) 4. Test-Driven Development (TDD) (Once you’ve learned all the above, you always start writing tests first) 5. Head First De…

>4. Test-Driven Development (TDD) (Once you’ve learned all the above, you always start writing tests first) I've seen like bilion discussions about TDD and I still dont understand why is it so overhyped. Additionally it sucks that for some people you either do TDD or dont write tests at all (what the f...., indeed) This whole red-green step in TDD makes complete no sense when you're writing new code. The only value p…

> This whole red-green step in TDD makes complete no sense when you're writing new code.

Only viewed in isolation - the point of red-green is test calibration: be certain that your new experiment is actually measuring the thing that you think it is measuring.

Red-green isn't the only way to achieve this, of course, but it is a smooth way to achieve this.

Post reply on HN