Naming Things: The Hardest Problem in Software Engineering
Thumbnail 1Thumbnail 2

Naming Things: The Hardest Problem in Software Engineering

4.2/5
Product ID: 523225137
Secure Transaction

Description

Full description not available

Reviews

4.2

All from verified purchases

S**G

Goes well beyond stating the obvious

You’d think advice like having names be concise and easy to understand would be too trite to make a book out of, but the author identifies MANY common and entirely believable ways that people often screw up such sound common sense. Some of his advice (like avoiding abbreviations) is actually not at all obvious, but is well reasoned.This book is a quick but thought provoking read.

E**O

Concise with a good set of guidelines

The book approaches the problem of naming things in the context of software development. As somebody who prides in having named lots of classes and method, I found this reassuring on the importance of using the right names and abstractions, as it's not just a software artifact, but also helps in the understanding of the problem or domain you and your team (or the whole company) tries to solve.If you suck at naming, this will be a five star book, if you are good at naming things, this will be more of a checklist and a nice walk through the problem of naming things.

D**N

Rules you know organized into 4 principles that help you remember them and use them

This thin book, if read by software engineers, and taken to heart, would improve code quality everywhere. Just naming things properly is an incredible way to write correct code in the first place, or improve it when you find problems.And it really is the hardest problem in software engineering - it's so hard to even name things at all that coders will do things they know are wrong to avoid it: long long methods with all code inline, class names that are just some noun with "Manager" or "Factory" or "Processor" or "Action" tacked on to the end as if that was sufficient to let you know what was going on, throwaway names that don't describe the entity named, not changing test names to reflect changes in the test (many times the test name doesn't even accurately state what the test is testing!), etc. etc.Yet I have found over and over that naming things properly - and breaking things out and giving them a name - contributes significantly to correctness.The most obvious way is that a correct name breaks the connection between one section of code and another section - especially if that other section would be embedded in the first one if you didn't break it out to give it a name.* You start with the named thing: you read the name, understand what it is supposed to do, then you read the code there, locally, and decide if it does what the name says it does.* Now you go back to where the name is used - you know the name accurately describes what's going to happen so you can consider it's use right there without referring again to the code behind it.Another way proper naming works well is if you name things in such a way that uses of the name in conditionals makes everything simpler.* This is why in code reviews I constantly point out that expressions used in conditionals should be:* Broken out into a named predicate (even if only a local Predicate - maybe especially then)* And that the predicate name should be positive* Because IMO it leads to much easier to understand boolean-valued expressionsIn 30 short pages this book lists the rules you need to follow to name things properly. And you've probably heard each on of rules principles before, one at a time. The value of the book is that these rules are organized into 4 principles and explained together in a way that it all hangs together, and then the principles - and many of the rules - stick in you mind, where you can have them ready when you need to name something.There's another 30 pages on how to apply the principles/rules in various settings.$10 on Kindle and well worth it. Even pay the extra $5 and get it in paperback - it's small and thin and very easy to flip through to refresh your understanding with.

W**L

Good topic, very long presentation

I like the message and the general lessons and rules are well presented. The trouble is that they are presented over and over and over again. It's almost like this should have been a blog post rather than trying to pad it out into book length.I quit reading it about 75% of the way through, I couldn't take it anymore. I get it.

J**H

A useful book-length treatment

It's odd that a book on this topic hasn't been written before, and I'm glad it now has. This slim volume contains a wealth of good practical advice and wisdom gained through experience. There’s something to be gained for programmers at every level–it’s tempting to say it’s most beneficial to developers early in their career, but I’ve struggled through codebases written and maintained by experienced teams that were less readable than they should have been due to unfriendly naming choices. My personal challenge: slipping jokes or pop culture references into code. But as the book rightly points out, a clear identifier is “even more timeless” than name-dropping Metallica albums.When I first skimmed the table of contents I thought it might benefit from a chapter on cloud computing and naming in the context of Infrastructure as Code, but the concepts are sufficiently general as to cover that. It can be a little repetitive about the most important points it makes, but the specifics in each chapter are unique, and it’s a relatively light time commitment, so well worth the effort. I’ll be including a copy in our onboarding package for newly hired engineers.

E**E

A Great Contribution To The Field

The author's guidelines, references to studies and relevant books are commendable. However, some sections lacked depth. Overall, this book is a good attempt at addressing naming in software engineering and strategies to mitigate its negative effects.

T**E

Extended blog post

I’ll admit I was curious how the topic of variable names could justify a $19 book and the short answer is that it doesn’t. The book is nicely formatted but the content is just not worth the price of admission. It should have been a blog post, but it’s been expanded with over-long, repetitive writing to fill its still-small page count. A true book could be much more interesting. Explain the history of variable names! Where “i” as a loop variable came from! Show good and bad naming in open source code examples! Instead, it’s like a half dozen decent bullet points stretched to 100 generously-padded, small pages.

J**N

Overall, very pragmatic

I found this book pretty useful. The rules were thorough, but easy to follow and the examples were for problems I see all the time. There were some sections outside of the principles/rules that don’t seem as useful to me right now, but I can see myself reading them again later when I want to think about different naming topics. Overall, very pragmatic!

Common Questions

Trustpilot

TrustScore 4.5 | 7,300+ reviews

Sneha T.

Received my product in pristine condition. Great service overall.

1 month ago

Ali H.

Fast shipping and excellent packaging. The Leatherman tool feels very premium and sturdy.

1 day ago

Shop Global, Save with Desertcart
Value for Money
Competitive prices on a vast range of products
Shop Globally
Serving millions of shoppers across more than 100 countries
Enhanced Protection
Trusted payment options loved by worldwide shoppers
Customer Assurance
Trusted payment options loved by worldwide shoppers.
Desertcart App
Shop on the go, anytime, anywhere.
£20.50

Duties & taxes incl.

UKstore
1
Free Shipping

with PRO Membership

Free Returns

30 daysfor PRO membership users

15 dayswithout membership

Secure Transaction

Trustpilot

TrustScore 4.5 | 7,300+ reviews

Sneha T.

Received my product in pristine condition. Great service overall.

1 month ago

Ali H.

Fast shipping and excellent packaging. The Leatherman tool feels very premium and sturdy.

1 day ago

Naming Things The Hardest Problem In Software Engineering | Desertcart GB