The long way through Software Craftsmanship

How I read Apprenticeship Patterns

Apr 25, 2015 - 1 minute read - Comments - apprenticeship-patternsreading-guidebook

At the Craft Conf 2015 I saw someone with the book Apprenticeship Patterns by Dave Hoover and Adewale Oshineye and asked them about the book. After praising the contents, they asked me how to approach the book. I recalled reading it non-sequentially, and explained it to them: Read the introduction, preface, etc first When you get to the patterns, pick one at random 10: Read it and navigate through the see also.

Demand for TDD and Refactor

Apr 25, 2015 - 2 minute read - Comments - ideaoverheardjason-gormantddrefactorworkshopquote

When I went to the Jason Gorman’s TDD workshop (experience report here), he said something interesting regarding refactor and TDD: In job offers / advertisements, TDD is much more in demand than refactor. But the latter is included in the former as an integral part. Jason Gorman I agree with the second thought: you cannot properly do TDD without refactoring, as it is an integral part; also the third phase.

Talks I have attended at the Craft Conf 2015

Apr 25, 2015 - 1 minute read - Comments - craft-conf2015attended-talksbudapest

These are the talks I’ve attended at the Craft Conf 2015: Thursday 23th Opening keynote by Dan North and Jessica Kerr Writing testable code - A functional programming point of view, by Alvaro Videla Coding Culture, by Sven Peters OnConnectionLost: the life of an offline web application, by Stefanie Grewenig and Johannes Thönes Concurrency: It’s harder (and easier) than you think, by Paul Butcher Testing and Integration (the remix), by Inés Sombra Beyond Features: Rethinking agile planning and tracking, by Dan North Closing keynote by Alf Rehn Friday 24th Opening keynote: The New New Software development game: Containers, Microservices and Contract tests, by Mary Poppendieck Apprenticeship patterns, revisited, by Dave Hoover Interaction Driven Design, by Sandro Mancuso The hidden dimension of refactoring, by Michael Feathers Why is an API like a puppy, by Adewale Oshineye Microservice antipatterns, by Tammer Saleh I couldn’t attend the last talk nor the keynote as I had to get to the airport

What legacy code is about

Apr 21, 2015 - 3 minute read - Comments - legacy-codetrustclean-codemichael-feathersquotedefinitionupdate-definitiontestsunit-testworking-effectively-with-legacy-codewelcwewlc

In his book Working effectively with legacy code, Michael Feathers describes: […] legacy code as code without tests. It is a good working definition, and it points to a solution […] M Feathers, in the preface of Working effectively with legacy code I really like this definition. It is objective and measurable. But this is also a downside. Let’s take any concurrent code, for example: you can achieve 100% coverage on a single thread and the program could have defects when executed in parallel.

Annotations and Aspects in Java

Apr 21, 2015 - 2 minute read - Comments - javaaspectaspectjspringannotationsnippet

I’ve written a sample project with an annotation and an aspect to intercept it and decorate it. The code provides a way of doing try|catch, specifying an exception to be caught. The source code is available here In the process This has taken me approximately one hour to prepare the spike and half more to refactor and massage a bit. If you want to see the raw details, the refactor has been committed step by step (the spike hasn’t).

Logging is a feature

Apr 19, 2015 - 3 minute read - Comments - logginglogfeaturehypothesisclientchallengesplunk

At a client, we’re facing this challenge: we cannot access production logs, as we don’t have access to production environments. The solution we’ve chose is to implement the logging component as a layer on top of Splunk. This formatter layer –per component– accesses a generic layer –for the whole company– that accesses splunk. In this manner, it is very easy to reuse the splunk connection and configuration and inject mocks. Also helps with the local environment: you always log to console (even if in production you don’t have access to it) and can disable this in local, not needing a local splunk installation.