https://www.sandordargo.com/Sandor Dargo's BlogSandor Dargo writes about about C++, software development, books and stoic philosophy applied to software craftsmanship 2024-03-16T23:12:15+01:00 Sandor Dargo https://www.sandordargo.com/ Jekyll © 2024 Sandor Dargo /assets/img/favicons/favicon.ico /assets/img/favicons/favicon-96x96.png Tidy First? by Kent Beck2024-03-16T00:00:00+01:00 2024-03-16T00:00:00+01:00 https://www.sandordargo.com/blog/2024/03/16/tidy-first-by-kent-beck Sandor Dargo Let’s start by explaining what tidying means when it comes to software development. Maybe a decade ago, this book would have been called “Refactoring first?”, but the term “refactoring” got inflated when people started to refer to long pauses in feature development as such. Even worse, the most essential part of refactoring - it shouldn’t change the system’s behaviour - is not always respected.... Three key philosophies behind C++2024-03-13T00:00:00+01:00 2024-03-13T00:00:00+01:00 https://www.sandordargo.com/blog/2024/03/13/3-key-philosophies-behind-cpp Sandor Dargo Recently, I had to refresh some training material for software engineers who are not new to programming but are new to C++. It’s a short introduction by all means and as participants are expected to know how to program in a C-like language (usually Java, Kotlin or Python), I don’t have to focus on syntax basis. I decided to follow this agenda for this first part of the course: A little bit ... My late discovery of std::filesystem - Part II2024-03-06T00:00:00+01:00 2024-03-06T00:00:00+01:00 https://www.sandordargo.com/blog/2024/03/06/std-filesystem-part2-iterate-over-directories Sandor Dargo Last week, we started to discuss the main parts of std::filesystem and we discovered how to work with paths, how to navigate up through the directory structure and how to move files and directories around. This week, we are going to see how to iterate over a directory structure based on different needs and expectations. Let’s start by simply listing the contents of a single directory. Iterat... My late discovery of std::filesystem - Part I2024-02-28T00:00:00+01:00 2024-02-28T00:00:00+01:00 https://www.sandordargo.com/blog/2024/02/28/std-filesystem-part1-paths-and-operations Sandor Dargo I know that this is not a new topic at all. But this blog in its roots is to document what I learn, and I haven’t used the filesystem library up until a few weeks ago. After the initial encounter, I deliberately spent a bit more time exploring it and I want to share what I found. I don’t want to go over the C++ Reference documentation and I also don’t want to simply repeat what Bartek already ... How to write unit tests in C++ relying on non-code files?2024-02-21T00:00:00+01:00 2024-02-21T00:00:00+01:00 https://www.sandordargo.com/blog/2024/02/21/cpp-tests-with-resources Sandor Dargo Recently we had a coding dojo with my colleagues where we were working on the second part of the Racing Car Katas, called TextConverter. To sum up the problem, the HtmlTextConverter class takes a filename, reads the file into memory and converts its content into a not-very-sophisticated HTML text. The goal is to test the class and potentially refactor it if you find any good reason for that. I...