Home » Author Archives: Sandro Mancuso

Author Archives: Sandro Mancuso

Software craftsman, founder of the London Software Craftsmanship Community (LSCC) and author of Software Craftsmanship: Professionalism, Pragmatism, Pride.

User Story Guidelines

agile-logo

Disclaimer: This post was extracted from an internal Codurance document used to help our apprentices to learn how we work. We all understand that each project is different and that by no means we can apply exactly the same techniques and practices everywhere. However, the text below serves not only as a foundation but also as a guideline for all ...

Read More »

Rethinking Pair Programming

software-development-2-logo

By default, we always do our work in pairs. We strongly believe that the quality achieved by two people working on the same task is superior to when done by a single person. However, there are times where pairing is not very efficient. Pair programming pitfalls In a professional environment, pairing with developers who have a different software development foundation ...

Read More »

Balanced Abstraction Principle

java-logo

One of the things that make code complicated to read and understand is when the instructions inside a method are at different levels of abstraction. Let’s assume that our application only allows the logged-in user to see trips from her friends. If users are not friends, no trips should be displayed. An example:     public List<Trip> tripsByFriend(User user, User ...

Read More »

The Wrong Notion of Time

agile-logo

No one wakes up in the morning and say “Today I’m gonna screw up. Today I’m gonna piss my boss and all my team mates off writing the worst code I could possibly write”. Well, there are always exceptions but normally no one does that. If that is the case, how come Agile projects are now failing? How come do ...

Read More »

Best approach to software development

software-development-2-logo

Today, talking about doing a big design up-front (BDUF) sounds a bit ridiculous, right? Who would do that? That’s not craftsmanship, is it? However, in the past, that would be considered the norm. Writing requirement documents, drawing architectural and very low level detail diagrams was the right thing to do. Well, that’s what very smart guys proposed on the 1968 ...

Read More »

Testing legacy code: Hard-wired dependencies

software-development-2-logo

When pairing with some developers, I’ve noticed that one of the reasons they are not unit testing existing code is because, quite often, they don’t know how to overcome certain problems. The most common one is related to hard-wired dependencies – Singletons and static calls. Let’s look at this piece of code: public List<Trip> getTripsByUser(User user) throws UserNotLoggedInException { List<Trip> ...

Read More »

Test-driving Builders with Mockito and Hamcrest

mockito-logo

A lot of people asked me in the past if I test getters and setters (properties, attributes, etc). They also asked me if I test my builders. The answer, in my case is it depends. When working with legacy code, I wouldn’t bother to test data structures, that means, objects with just getters and setters, maps, lists, etc. One of ...

Read More »

Extract, Inject, Kill: Breaking hierarchies – Part 2

software-development-2-logo

 In part one I explained the main idea behind this approach and  I started this example. Please read part one before reading this post Although the main ideas of Extract, Inject, Kill is already expressed, it’s good to finish the exercise just for completion’s sake. Here is where we stopped: Let’s have a look at the VoucherPricingService, that now is the ...

Read More »

Extract, Inject, Kill: Breaking hierarchies – Part 1

software-development-2-logo

Years ago, before I caught the TDD bug, I used to love the template method pattern. I really thought that it was a great way to have an algorithm with polymorphic parts. The use of inheritance was something that I had no issues with. But yes, that was many years ago. Over the years, I’ve been hurt by this ‘design ...

Read More »

Frustrations and aspirations of a software craftsman

software-development-2-logo

For a while I’ve been thinking about what makes me like or dislike a project. Having spent a very big part of my career working for consultancy companies, I was exposed to many different environments, industries, team sizes, processes and technologies. There were projects that I absolutely loved, some projects were OK and some were a real pain. There were ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close