Quantcast
Channel: Carlos Ble & Associates » Clean code
Browsing latest articles
Browse All 20 View Live

Image may be NSFW.
Clik here to view.

First 10 minutes of the day: review and refactor

Do you want to know something that works really really well for me? I spend the first 10 to 15 minutes of the day reading the code  I (or we) wrote the day before. I always find out something to...

View Article



Image may be NSFW.
Clik here to view.

A method is an abstraction

The name of a method must have a higher level of abstraction than the body for the method to be worth it. The name should explain what the method does but not how. If the name communicates exactly the...

View Article

Image may be NSFW.
Clik here to view.

Refactoring towards a meaningful domain model

Today has been a special day. Not because it's my 34th Birthday which I never really celebrate (although I do appreciate all the greetings and warm words from all my friends and family!) but because...

View Article

Image may be NSFW.
Clik here to view.

DTO vs Domain Models – Part II

As we learn more about the business and the domain we are taking the time to improve the design of the software. The first handful of features have been deployed into production, now it's a good time...

View Article

Image may be NSFW.
Clik here to view.

Polymorphic Equality

The default generation of Equality members provided by Resharper let you choose three different implementations when overriding the "Equals" method in a class (Alt+Insert -> Equality Members): The...

View Article


Image may be NSFW.
Clik here to view.

Remove data structures noise from your tests with builders

Among other qualities good tests should be easy to read, quick to understand. When the test requires complex data structures to be sent to the SUT or to be part of a stubbed answer, it takes longer to...

View Article

Image may be NSFW.
Clik here to view.

Using C# Collections

There are many ways to work with collections. We are following Microsoft Guidelines for Collections  plus some ideas that Kent Beck explains in Implementation Patterns. I've created a repository with...

View Article

Image may be NSFW.
Clik here to view.

EventBus in a Windows 8 app

How to communicate different pages of a Windows 8 App? How to manage the life cycle of the pages? Pages are instantiated by the framework when asked to navigate: *.xaml.cs:...

View Article


Image may be NSFW.
Clik here to view.

Object references, state and side effects

C#, Java and other languages have the same behaviour when it comes to reference types. public class SomeClass { public string someField;} var instance1 = new SomeClass(); // instance1 is a reference to...

View Article


Image may be NSFW.
Clik here to view.

Learning with Peter

Last week I was lucky to host my good friend Peter Kofler in his visit to Gran Canaria, where he came to facilitate the Glodal Day of Code Retreat and also to work together a couple of days in our...

View Article
Browsing latest articles
Browse All 20 View Live




Latest Images