Started to read Kent Beck's 'Tidy First', what's on my mind?
Dictionary
Tidy(adjective)
- well ordered and cared for
- adequately satisfactory
Tidy(verb)
- to put in order
- to make things tidy
Tidy(noun)
- a container for putting small objects in, in order to keep a place tidy
If you're a reader of my blog, you'll notice that I often begin my posts by sharing the dictionary definition of a word, and sometimes its etymology. I find that doing this helps create clarity in our minds as we start reading.
When I hear the word 'tidy,' it makes me think of tidy and untidy people.
Difference between tidy and untidy people?
While this is a detailed topic, I want to share an idea that fits with Kent Beck's 'Tidy First' book, where he shows us how to clean up and organize our code.
- Learnable
We're not born with tidy or untidy traits. To become tidy, we need to learn how. It's a skill we can acquire.
Check out the Netflix show "Tidying Up with Marie Kondo" for helpful tips on organizing. (https://www.imdb.com/title/tt8115560/) 😄 - Valuable
To learn something, we need to know why it's valuable. Tidiness makes life clearer, reduces stress, and makes us feel better. - No Rush
When things are really messy, take your time. Instead of rushing, start small. Tidying up is a process. - Repeat
Being tidy is not a one-time thing. We need to keep doing it. Forming habits and repeating them helps keep things neat over time.
So, some people know how to be tidy, while others do not.
That's also what Kent Beck is teaching us—how to become tidy in code. Beck is also sharing the values of Tidy First, which will give you not just clear, but also organized and efficient code.
Memories: The Tidy Room
Back in the 90s, our house had a special room called the guest room. It was always neat, but my parents had a rule – we kids couldn't go in unless we had guests. I often wondered what made that room special. When it finally opened for guests, I found it was a comfy spot, just perfect – a tidy place made to make guests feel really welcome and at home.
Sometimes, our motivation to stay tidy goes beyond personal reasons; it includes considering others. Tidying up is not just for our own benefit, and recognizing the audience, whether it's colleagues or anyone else, becomes crucial.
The Audience
When we become really familiar with our own code, it's easy to miss its problems. That's why it's a good idea to ask our colleagues for their thoughts and also stick to the basic rules that make code easy to understand. The book has lots of good examples to learn from. Now, let's talk about where we can find more good code to read and learn.
- Open Source Projects
github.com is a hub for numerous open projects. So it's good to start from there.- License
Ensure the project has a clear open-source license. This defines how the code can be used and shared.
https://choosealicense.com/ - Code Of Conduct
Those serious about open source often incorporate a "Code of Conduct" to guide contributors, promoting respectful collaboration and ensuring an inclusive community environment.
ex: https://www.contributor-covenant.org/version/2/1/code_of_conduct/
- License
- Contributor Guidelines
Check if the project provides clear guidelines for contributors, including how to submit issues or contribute code.
ex: https://docs.github.com/en/contributing
So, these points provide an idea of whether it's a good example of an open-source project. However, you can also assess the project's quality by checking factors like repository activity, the issue tracker, and the reputation of contributors. - Programming Language Conventions
You can also enhance your understanding of readable code by following programming language conventions.
ex: https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions#style-guidelines
(Please explore conventions for any other programming language.)
I think beginning with reading open-source projects and following the programming language conventions is a good initial step.
Sercan's TODO: // Write an article about "How to measure code readability?" to delve deeper into the topic.
In summary, started to read Kent Beck's 'Tidy First' got me thinking, and I wanted to share a couple of points:
- It's possible to learn how to be tidy, and that's one reason why I suggest reading this book.
- Taking care of those who read your code is important. Open Source Projects promote a good culture of looking out for others.
Member discussion