ŷ

Jump to ratings and reviews
Rate this book

Tidy First?: A Personal Exercise in Empirical Software Design

Rate this book
Messy code is a nuisance. "Tidying" code, to make it more readable, requires breaking it up into manageable sections. In this practical guide, author Kent Beck, creator of Extreme Programming and pioneer of software patterns, suggests when and where you might apply tidyings to improve your code while keeping the overall structure of the system in mind. Instead of trying to master tidying all at once, this book lets you try out a few examples that make sense for your problem. If you have a big function containing many lines of code, you'll learn how to logically divide it into smaller chunks. Along the way, you'll learn the theory behind software coupling, cohesion, discounted cash flows, and optionality. This book helps

122 pages, Paperback

Published November 28, 2023

227 people are currently reading
1,715 people want to read

About the author

Kent Beck

26books683followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
283 (31%)
4 stars
351 (39%)
3 stars
203 (22%)
2 stars
43 (4%)
1 star
13 (1%)
Displaying 1 - 30 of 123 reviews
Profile Image for Luca Grulla.
8 reviews2 followers
November 18, 2023
The book seems to be a combination of two separate papers. The first half of the book covers basic code cleaning patterns, which may not be of much use to experienced software engineers. However, the second half of the book is much more interesting, providing an insightful analysis on the cost and benefits of keeping codebases clean and organized, and how it relates to coupling and cohesion.

Although the author does provide some interesting ideas in this section, the book falls short of providing a breakthrough in the relationship between codebase quality, cost of change, and value of future opportunities.
Profile Image for Isidro López.
141 reviews26 followers
December 15, 2023
Great insights. At the same time, most of its content is nothing "totally new", but the reminders are always worthy as well as a few wisdom pearls.

Too short for the price, I would say, but I decided to approach it as a collaboration for all the amazing content shared by Kent Beck during the last years for free. I think it's totally worthy.

Only a little bit surprised by not reading a more elaborated description of the "connascence" concept, I think it brings a lot of clarity to the traditional "coupling" term.
Profile Image for Ferhat Elmas.
819 reviews12 followers
January 17, 2024
It should have been a blog post but somebody is trying to extract maximum financial value.
If you are early (2-3 years) into programming then it has specific nuggets for you (early return, new interface old implementation, explain variables, delete dead code, etc.) to do structural changes (no behavioral effect) by explaining what (part 1), how + when (part 2) and why (part 3). Otherwise, skip.
Profile Image for Padraic.
47 reviews4 followers
December 4, 2023
Not worth US $40 for only about 50 pages (given all the short chapters and associated blank break pages) and mostly obvious content.
Profile Image for Fotis Koutoulakis.
117 reviews13 followers
January 17, 2024
A cash grab masquerading as a book

I'm really irked about this one. It's really just a series of blog posts, concatenated into an O'Reilly book. Unfortunate, because O'Reilly titles were synonymous with good quality.

This is basically a cash grab (the author even admits as much in the book). It's the usual platitudes about software development (blah blah, high cohesion, blah blah, low coupling, blah blah, easy to change), weaved with a few poor and underdeveloped finance analogies with DCF and Options for good measure (so that it looks good to people who have never studied even the basics of finance, and are easily excited when a few technical terms enter the ring).

Severely lacking in substance, with basically *nothing* inside if you're an experienced engineer. Maybe if you're a junior, and this is one of the first few books on software design you read, it might be useful. But as it stands, this is just a collection of small essays on refactoring. Really not worth the £40 I paid for it.

Unfortunate, again, but the author's name on the front page sold it to me, as I was really happy with the author's previous books. This one just isn't at the same level for me.
Profile Image for Matheus Marabesi.
Author5 books2 followers
September 24, 2023
This books has a lot to say not only on software design, but also on programmer behaviors. As expected Kent Beck advocates for programmers and in this piece he tries as much as possible to close this relationship with all of us.

Luckily enough with lots of insights he won the battle between software design and programming. Some would say that there is no different some will agree with that.

The book starts with the tydings which are a decent of refactoring but with a focused area and not that much of showing concrete code, the key is to understand the concept.

In the second part Beck goes towards a more professional point of view talking about managing the tydings, the chapters in this section provides tips on how to go to start, and keep tyding the code base. Many of us (programmers) usually get lots of changes and forget about the focus of why we are tyding things, this part is to help programmers to avoid this situation.

The last part of the book is the economical part and the theory behind tydings. The approach followed and the analogies goes from defining what design in the context of software is and moving on to the economical part and why it is important.
Profile Image for Tomas Janousek.
19 reviews13 followers
November 27, 2023
Good stuff. Short sentences, short chapters (usually just one or two pages). To the point. Mostly common sense (at least to me), but will be useful when arguing with other people who don't "get it".
Profile Image for Vasya Rudas.
21 reviews1 follower
March 17, 2024
The book is a nice and modern replacement for a well known Clean Code book by R. Martin, it divided into a three chapters that can be referenced to a different skills of reader.
- The First chapter is a more about “tidyings� aka small structural changes in a code that will help newcomers to make their code better during development.
- The Second chapter can help team leaders to growth their team with tidying in mind during regular work.
- The Third chapter is more focused on management and a little bit of theory of software development and the cost of tidying in different part of dev lifecycle.

The book is a not a holy grail for experienced people, but its a good structured source for references during code review in case of structuring of code or cost of applying or rejecting that changes in a future.
Profile Image for Hynek.
25 reviews22 followers
January 23, 2024
Short, practical, unpretentious, actionable.
Profile Image for Mohamed Yamani.
38 reviews2 followers
February 23, 2024
My first book of Kent Beck. I am amazed at his writing style and the vibrant analogies he uses. A truly remarkable intellect.

The book is split into multiple parts:
- Tidyings: lists a number of refactorings we can do to improve the quality of the code (and therefore, readability and ease of change)
- Managing: how to manage these tidyings
- Theory: the part I understood the least, dives in to software design with respect to economics.

In the "Managing" part, Kent dissects when each refactoring (structural changes) makes sense with respect to behavior ones:
- never?
- before?
- should it happen before?
- later?
- right after?

Naturally, there's no definite answer, it is circumstantial, it depends on the gain/cost from it at a given moment.
Profile Image for Bodo Tasche.
97 reviews12 followers
January 1, 2024
This is hard...not sure how to rate this one. The first half is a 13/10, it gives words to things that I do based on intuition. Which is the most valuable kind of book for experienced developers. The second part somehow feels off. It tries to add a business case to the first half of the book. But fails to explain it to people who don't have some form of business background. I heard the feedback from two other developers that they didn't get that part at all. Which is sad because if they had, it would have made the book even more valuable for them. I think Kent might need to revisit that part with some feedback from readers and can make it work. There is value in those chapters. It just needs a bit of tidying up.

254 reviews30 followers
January 29, 2024
One long blog post worth of content mixed with lots of grandiose talk. It might be useful for those just starting in their careers.

Just a day before reading this, I was reading an article talking about how the LLMs are likely to affect the software profession. One of the things that hit me was that once machines start writing code for other machines, a lot of what we hold dear as our craft as software professionals will no longer have any value. Since a lot of it is geared towards making it easier for other humans to read and understand what we have written.

In that context, reading the forward of this book felt like listening to the violin on the deck of the sinking Titanic.
Profile Image for Edu Ramírez.
9 reviews
January 17, 2024
My favorite quotes:

> In theory, there is no difference between theory and practice, while in practice there is.

> Part of the tidying philosophy is that it should never be a big deal. It’s never something that has to be reported, tracked, planned, and scheduled.

> “Refactoring� took fatal damage when folks started using it to refer to long pauses in feature development.

>Review latency is also an incentive. If code gets reviewed rapidly, then you’re encouraged to create more, smaller PRs. Those more-focused PRs encourage even more rapid reviews. Equally, this reinforcing loop can run backward, with slow reviews encouraging larger PRs, further slowing future reviews.

>I encourage you to experiment with not requiring reviews for tidying PRs. This reduces latency further, incentivizing even smaller tidying PRs.

> change is the dominant cost of software development and understanding code is the dominant cost of change

>Comments are a form of communication, but tidying lets you explore the limits of communicating through the other elements of programming.

>Getting to the necessary level of safety and trust to eliminate tidying reviews is the work of months. Practice. Experiment. Review errors together.

>Behavior changes tend to cluster in the code. From Pareto, 80% of the changes will occur in 20% of the files. One of the beauties of tidying first is that the tidyings cluster too. And they cluster in exactly those spots most attractive for behavior changes.

>You have at least three options, none of them attractive: Ship it as is. This is impolite to reviewers and prone to errors, but it’s quick. Untangle the tidyings and changes into separate PRs, or a sequence of PRs, or a sequence of commits in a single PR. This is more polite, but it can be a lot of work. Discard your work in progress and start over, tidying first. This is more work, but it leaves a coherent chain of commits.

>The answer, as always, is because you are not just instructing a computer, you are explaining your intentions for the computer to other people. The shortest path to instructing the computer is not an interesting end goal.

>Software creates value in two ways: What it does today. The possibility of new things we can make it do tomorrow.

>Here are some scenarios that reduce the options value embedded in your software: A key employee quits. Changes that would have taken days now take months. You distance yourself from your customers. If you get a provocative suggestion a month instead of one every day, you have fewer options. The cost of changes skyrockets. Instead of being able to exercise an option a day, you can only exercise an option a month. Fewer options, less value.

>When geeky imperatives clash with money imperatives, money wins. Eventually.

>The more I rowed with the Stream of Commerce, the faster my boat went.

>Code review processes (which I’ve promised multiple times to trash, but now is not the time) don’t distinguish between reversible and irreversible changes. We end up making the same investment with radically different payoff profiles. What a waste.

>Coupling drives the cost of software.

>the cost of software is approximately equal to the cost of changing it. Yes there is a brief period before we can be said to be “changing� it, but who cares? That period is economically insignificant.

>Coupling, like the Lego piece in the night, often isn’t obvious until you step on it.

>You can’t be your best self if you’re always rushing, if you’re always changing code that’s painful to change.

>Unlike the risk and uncertainty of features, where you can do what you think is right and folks can still be dissatisfied, you are the audience for your tidying, and you’re very likely to be satisfied.

>Tidy first? Likely yes. Just enough. You’re worth it.
Profile Image for Scott Pearson.
780 reviews36 followers
February 1, 2025
When a software developer is writing code, she/he is often confronted with a problem: How much work should I put into writing “the best� code versus just doing a quick but serviceable job? Kent Beck, pioneer of the influential Extreme Programming: Embrace Change, addresses this question via an in-depth look at the process of “tidying� code. His answer is usually to “tidy first”� but not always. This book seeks to identify exactly when one is in those exceptional situations.

Interestingly, Beck even explores economic reasons in his analysis � a main driver of developer effort that’s not talked about much in development books. These reasons are explored at a theoretical level that incorporates a bit of economic theory.

At times, this book can seem to be overly organizational and thus a bit dreary. That is, it categorizes situations instead of constructing a narrative. This approach became an extremely obvious limitation while I listened on an audiobook format. Perhaps a written text might avoid this pitfall somewhat more, but I suspect that even then, this shortcoming will show up in the reader’s experience.

This book’s audience is limited to those engaged in the art and practice of software design and development. The size of that audience is not huge, but it is growing. Developers can continue to learn from Kent Beck, one of the most observant, self-aware software authors in the industry. Those who desire to better themselves daily will benefit from his passion and attention to detail in this book.
Profile Image for Christian Marques.
Author1 book15 followers
January 17, 2024
It was reassuring to read about good tidying practices (chapter one) and assert that those are/were everyday practices in my most recent engineering teams (continuously developing with those in mind helps in not having to tidy down the line), but despite the fact that these "commonplace" suggestions are nice to read about and consolidate, where this book really shines in my opinion is on providing a great perspective about the cost of designing software and more specifically the cost of tidying (with excellent analogies based on economics related examples) and answering the question "Tidy First?" also considering the human factor and the innate human instinct to fall prey to the addiction of tidying (or as the author puts it "Tidyings are the Pringles of software design. When you're tidying first, resist the urge to eat the next one."). Pretty good and quick read to add to your pile of books on best principles on software design together with the Pragmatic Engineer, Refactoring and Clean Code.
Profile Image for Anton Antonov.
350 reviews47 followers
August 8, 2024
It was a delightful surprise when I stumbled upon this book, an accidental find, while pushing myself to finish the 10-year marathon of technical books. I told myself it's a Kent Beck book. I might see his work in a new light that practices writing brevity.🫡

I shared my voice about Kent Beck's books, which don't hit the mark with me. "Tidy First?" is a refreshing break from that pattern. It's short, concise, and written for the new generation, and I wholeheartedly recommend reading it. It's approachable! ❤️

It's focused on software design. Therefore, it's a great read for people in the first 1,2,3 years of their careers. It's full of examples, letting the short code examples speak and applying the "show, don't tell" writing axiom.

All the advice is pragmatic, and I worry the overenthusiastic readers might even go overboard by trying to apply everything all at once. Take it easy. It's a marathon. 😉

Be patient and further develop your own values and understanding for applying these "tidyings," be that dogmatically or holistically. 🙏
Profile Image for tanyildiz cagatay.
28 reviews3 followers
March 18, 2025
This book is excellent. Even though it does not offer breakthrough ideas, it mentions common-sense topics in software engineering. I especially liked its lean explanations of complex topics. The author is straightforward and to the point. The book is filled with practical and valuable insights. I especially liked how he highlighted the similarities between the monetary system and software development. It's also very short and easy to read.

The only thing I didn't like about it is that it contains many empty pages between chapters and sections. That could have been handled better. However, that's a cosmetic complaint.

As a software developer, I'm glad to have Tidy First in my reference books. I will probably revisit it in the future.
590 reviews11 followers
May 6, 2024
In this book Kent Beck explains the various small things we can do to tidy up our code. This fills up the largest part of the book and covers small, safe steps like renaming a variable, extracting methods and getting rid of dead code. The smaller, but almost more important second part answers the question of the book title. When should we do the tidy up? Then even small steps take time and cost money. The book finishes with a theoretical part where we get to know more about the reasoning behind the clean-up.

While Refactoring addresses the more general and usually larger changes to the structure, Tidy first? is more about the smallest steps we can take.
Profile Image for Tymoteusz Jagiełło.
39 reviews
December 25, 2024
Zdecydowanie zbyt krótkie. Dałbym 3, ale znalazłem w niej problemy, z którymi się spotykałem, a których nie potrafiłem nazwać. W momencie, w którym robiło się ciekawie i książka wchodziła na wyższy level, autor zdecydował, że ją zakończy.
Profile Image for š.
58 reviews
December 29, 2024
This is a short, byte sized work of art. I loved it! It seems as if it was written for the "tik-tok brain" of this age. Maybe the most valuable part of this book is the appendix where the author lists all the books he referenced throughout the book.
Profile Image for Jeff Brateman.
369 reviews1 follower
March 3, 2024
Pretty ok! Neat formulas equating software to options trading, and comparing the cost of software to the cohesion of it.
Profile Image for Janusz  Skonieczny.
38 reviews
December 17, 2023
It's a blog post inflated into a book. Take out the preface, foreword, etc, then summarize the overly complicated rationale in the 2nd half. And you have a good article. Still worth the read if you are a junior programmer. Worth to have handy if you have experience and want the juniors to catch up.
Profile Image for Ruslan Diachenko.
76 reviews3 followers
April 24, 2024
I didn't get much value from this book, perhaps because I may not be the target audience. The book is divided into three parts.

Part 1 lists basic techniques referred to as "tidyings" that aim to improve your code. However, if you are an experienced engineer, you likely already use these techniques. I found it lacking in depth and more complex examples.

Part 2 describes how to manage changes and suggests separating structural and behavioral updates into multiple pull requests, which makes a lot of sense. However, sadly, very few people implement this in practice.

Part 3 introduces some concepts from finance into planning and deciding when to apply or avoid "tidyings." While this is an interesting perspective, I again missed a deeper explanation and more complex examples.
Profile Image for Viknesh Subramanian.
16 reviews1 follower
February 6, 2024
I came across this book at a time when I was (still am) in a refactoring mode. It’s been priceless to say the least. There are two things which stood out (I’m obviously being subjective here) - Coupling and Cohesion parts of the book which are brief but still so valuable. The second is the length of the book. It’s compact and to the point. Can’t wait for the next book in this series.
Profile Image for John.
19 reviews2 followers
February 27, 2024
I tidied some of my code. Big win.

Less convinced by the philosophical musings about how software is the same as having call options. But at least it was interesting.
Profile Image for Nuno .
12 reviews
July 17, 2024
A very short book that goes straight to the point and takes you on a very quick journey through the essentials of software design, namely how to keep it in a good shape and what are the real value implications of not doing so. Likely most of the tidyings that are presented here are not new, but it's never enough to take a refresh on those and to rethink your approach to software design.
Profile Image for Hakan.
7 reviews
Read
March 10, 2024
In his latest book, Kent Beck ventures into refactoring ideas, presenting practical insights that might resonate with less experienced software developers. However, for seasoned engineers, the content may feel more foundational than groundbreaking.

Beck frequently alludes to future volumes in the series, hinting at a broader narrative that leaves readers anticipating further depth. The book, though, could arguably be condensed into a series of impactful blog entries, as it initially introduces practical refactoring concepts but later transitions into abstract theoretical discussions, losing some of the practical connection.

Overall, the book might find its niche among those seeking a comprehensive foundation in refactoring concepts, with the promise of more to come in subsequent releases.
Displaying 1 - 30 of 123 reviews

Can't find what you're looking for?

Get help and learn more about the design.