Errata

Tidy First?

Errata for Tidy First?

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
O'Reilly learning platform Page Chapter 2. Dead Code
5th paragraph

“If the code doesn’t get executed, just delete it…
But what if we need it later?” That’s what version control is for. “

Source control is not perfect for search. It will not help for the scenario “we had this functionality written before. I’ve searched a repository by relevant keywords, but I couldn’t find it”.
I suggest to change the conditions: we 1) have a lot of code that 2) isn’t used right now that 3) we want to use in the future
Then add a comment(s) explaining why it can be useful in a future and shouldn’t be deleted and separate the code in separate function/class/folder.
It can be separated by conditions/feature flags
if(FUTURE_FEATURE_IS_ENABLED)

Michael Freidgeim  Nov 10, 2023 
O'Reilly learning platform Page Chapter 10. Explicit Parameters
Bottom of the page

It will be good to mention Exception: if you have too many optional parameters, you may want to do an opposite.
“Introduce Parameter Object" refactoring. See the Refactoring Catalog.
www.refactoring.com/catalog/introduceParameterObject.html

Michael Freidgeim  Nov 10, 2023 
Printed Page Preface xix
Final paragraph

Typo in surname: Yourdan should be Yourdon

Mike  Nov 14, 2023 
Printed Page Chapter 6 - Cohesion Order (page 13)
3rd paragraph

The inequality given for decision to decouple code is given as:
"cost(decoupling) + cost(change) < cost(coupling) + cost(change)"

In my view, this should be stated as:
"cost(decoupling) + cost(change) < cost(coupling + change)"

because cost is incurred when doing the change on a coupled area of the code (right hand side), while on the left we have a cost of doing a tidying and then cost of doing the change, which should be less costly.

Vaidas Armonas  Mar 10, 2024 
Printed, PDF, ePub Page p.15 on pdf
second code

In the second code, "...some code that doesn't use a" must be placed above "int a = ...". In addition, it's better to remove "maybe" to clarify the intention.

fn()
int a = ...
...some code that doesn't use a
...some more code, maybe it uses a but doesn't use b
int b = ...a...
...some code that uses b

Anonymous  Apr 13, 2024 
O'Reilly learning platform Page 33. Conclusion
Tables, rows “you”, column How

In row “you”, column How,
it is said “ SB diffs”
It is not explained, what “ SB diffs” means.

Michael Freidgeim  Nov 10, 2023 
ePub Page 146
last sentence

I purchased Tidy First? to read on a Kobo reader. The last part of the book didn’t render at all. I have photos, but I don’t know how to submit them here.

The sentence on 146 is cut off, and nothing renders on sections 147, 148, 149.

:(

Andy Hill  Dec 14, 2023