Refactoring

Conferences Time

Autumn is usually a busy time full of conferences, and this year is no different. After a few interesting events like Devoxx Poland in Cracow, Codepot and Agile by Example in Warsaw, it’s now time for new experiences.

Read More

Natural Course of Refactoring online on InfoQ

I am so delighted that the article about Natural Course of Refactoring is live. It is a very simple, yet powerful idea about refactoring (but not easy after all) and I hope this way it will reach more people than ever before. So please retweet it and share it wherever you can.

Read More

Agile Prague 2014 Notes

It’s been almost a week since Agile Prague finished. It was a great time of interesting discussions and meetings. I had the privilege to talk with Linda Rising about patterns, their history, and current state (still under development). She also gave wonderful talks about the Agile mindset and trust.

Read More

So How’s It with Architecture - Up-Front Design or Evolutionary Architecture?

So How’s It with Architecture - Up-Front Design or Evolutionary Architecture?

Where does architecture currently stand? We can say that there are two classic approaches:

Read More

A Few Words About Naming – Methods (In Progress)

Note: This article is a work in progress!

Maybe the topic seems trivial and worn-out, as everyone knows that you need to create clear, unambiguous names. However, it’s still a greatly neglected area. Teams are still far from understanding that the most depends on naming. No refactoring has as much power as changing a name. It is primarily the names, if used correctly, that form what is called self-documenting code, creating a clear language in the source code of the system you are building.

Read More

The Natural Order of Refactoring Under the Microscope Part 5: Evolution of Architecture

Architectural Evolution

An essential next step, at a much higher level of abstraction, requires a deep understanding of the system. Based on emerging patterns and developing domain objects, over time we realize the need to modify the architecture. Architectural patterns or the introduction of other architectural mechanisms can assist us. Such transformations may include:

Read More

The Natural Order of Refactoring Examined Part 4: Refactoring to Patterns

The Natural Order of Refactoring Examined Part 4: Refactoring to Patterns

By following the steps outlined previously, we begin to see a more structured solution, predominantly consisting of methods grouped into classes. It’s now time to apply object-oriented principles, such as those encapsulated by the SOLID principles. We analyze the code for patterns of repetition, the need for flexibility, and code smells, and introduce design patterns where appropriate.

Read More

The Natural Order of Refactoring Under the Microscope Part 3: Extract Method

Analyzing Class and Method Responsibilities

In the next step, we examine the responsibilities of individual classes and methods, checking if they align with the intended responsibility of the class. It is best to analyze all methods and group them based on performing similar operations. We look for a place for these in other classes or a new class. Remember: if there is a significant private method in a class (longer than 3-4 lines), it should be moved to another class.

Read More

Natural Order of Refactoring Explored Part 2: Compose Method

Compose Method

Analyzing methods, such as the one presented in Part 1, often leads us to understand the main points of the algorithm contained in them. This insight paves the way for the next step: try to split a large method into smaller steps by extracting them into separate methods (refactoring using the Extract Method). Thus, the original method will consist of a sequence of calls to these new methods. With the right naming conventions, you can achieve code that reads like a book.

Read More

The Natural Order of Refactoring Under the Microscope Part 1

Refactoring is an age-old problem—perhaps not the best word given the relatively short existence of software engineering as a discipline. Everyone knows refactoring should be done, but nobody seems to have the time for it.

Read More

Clean Code

The Importance of Clean Code

There are ongoing philosophical discussions on whether clean code matters and if it is worth investing time to read it. I won’t engage directly in this debate. Instead, a small example should suffice:

Read More

Call for Code Samples

Call for Code Samples

I would gladly present the idea of the natural order of refactoring using an example code. Unfortunately, for obvious reasons, I cannot use our clients’ production code, and I do not have the time to prepare an example for this purpose. However, perhaps someone would be willing to allocate their piece of code, a project that doesn’t have too many (or any) restrictions on public publication.

Read More

The Natural Order of Refactoring - A Conceptual Sketch

The Natural Order of Refactoring

In software development, refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. This process, often visualized in a conceptual sketch, can help developers understand the natural flow and order in which refactoring should occur.

Read More

A Few New Concepts - Architectonic Mantra, Design Retrospective, Shared Context, Natural Order of Refactoring

Recently, several named concepts have evolved in my mind, or maybe I just understood them well. Here are a few notes that I consider an alpha draft ;-)

Read More

How to Transform Your Programming Approach Using Refactoring

Announcing My First Book

I am pleased to announce that BNS IT has published its first book, authored by me. It’s titled “How to Completely Transform Your Programming Approach Using Refactoring.”

Read More

Code Cleanup: Not Just About Refactoring

Introduction

Blogspot unfortunately disappoints me when it comes to publishing source code, which is especially important for topics concerning coding style. Perhaps some of you have experience or ideas on this matter. I use the tool http://formatmysourcecode.blogspot.com/2006/02/paste-your-text-here.html, but still, Blogspot occasionally distorts the post.

Read More

Code Cleanup: Not Just About Refactoring Part 3

Introduction

Due to formatting issues on the blogspot, it is advisable to read this article as a PDF file. You can download the PDF version of the article here.

Read More

Cleaning Up Code: Not Just About Refactoring Part 2

Due to formatting problems with code on Blogspot, it is recommended to read this article in PDF format. You can download the PDF version of the article here.

Read More

Code Cleanliness: More Than Just Refactoring Part 1

Initially, my intention was to create an article about refactoring. However, the more I pondered the subject, the clearer it became that I would not be writing solely about refactoring. It’s about something much more significant—conveying a vast amount of knowledge, essentially experience, related to code creation. Code that not only works or is well-designed but is most importantly easy to read. When we achieve this skill, we stand on the threshold of professionalism. Programming professionalism.

Read More