Tag Archives: Software-Testing

Building Microservices – by Sam Newman


TLDR: If you are looking for an introduction to and overview of the current ‘microservice’ landscape and the concepts and thinking behind it, then look no further. I would recommend this book for architect, developer, QA and operations (DevOps)

Microservices are obviously a very hot topic at the moment, and everyone and their dog appears to have an opinion about this concept. Accordingly, writing a book about microservices and keeping everyone happy is going to be a challenge (and probably impossible).

In my opinion Sam has done a great job here and manages to provide key information on a range of relevant microservice issues, such as the motivations for microservices, how to model services, integration with other systems, deployment, testing, monitoring, security and architecting/implementing microservices at scale.

I’ve seen negative comments towards this book on other sites stating that more code examples should be provided, and although I appreciate their motivations, I don’t believe this will be the book to address these issues. In my experience, code contained within a book can quickly become stale, and the diversity of language (and the associated rate of change) that is currently being used to create microservice implementations would make pleasing everyone an impossible challenge. Instead I recommend people interested in code samples have a Google, or visit InfoQ, DZone or Voxxed where there is plenty of microservice implementation code.

In my opinion I will use this book much like I did the original ‘Continuous Delivery’ book by Jez Humble and Dave Farley – the book will provide an excellent high-level overview of the issues (and potential solutions), help me to understand core concepts and how key components and methodologies relate to each other, and also provide inspiration and pointers to further reading.

Much like I didn’t expect to create a full build pipeline implementation simply from reading the ‘Continuous Delivery’ book, I wouldn’t expect to build a complete microservice ecosystem from Sam’s book. However, after reading both books I began the respective tasks with a lot more insight then I originally had, and I made much smarter decisions (and knew what to look for when searching for more knowledge) once I understood the big picture.

As stated above, I would recommend this book for any software delivery role. I’ve personally seen the benefits of a microservice architecture when deployed for the correct use case, but the nature of this architecture creates new challenges whether you are a developer, QA or operations specialist.

(In the interest of full disclosure I did provide feedback on this book as it was being published via the O’Reilly Early Access program. However, I have endevoured to write a review that takes into account only the final published book.)

I once again had the pleasure of presenting a lightning talk at the London Software Craftsmanship Community #LSCCtalks series. This time I presented a new talk I’m working on – “Crafting DevOps: Applying software craftsmanship to DevOps”.

The presentation (hopefully) does what it says on the tin, in that I talk about the ideas of applying software craftsmanship principles to DevOps . If the DevOps mantra of “Infrastructure as Code” is true (which I think it is), then I believe it makes sense to learn from the craftsmanship community – in particular TDD, BDD and continuous integration.

This is very much a work-in-progress talk, and I hope to develop it more over the coming weeks and months (please do send me your feedback!).


Thanks again to Sandro and Samir from the LSCC for inviting me to talk, and as usual, if you have any questions, then please do get in touch. In particular please do let me know if you would like to see more on this topic.


As my other blog post (will soon) reveal, my entire experience of Devoxx UK 2014 was awesome, but in particular I enjoyed presenting “Moving to a DevOps Mode: Easy, Hard or just Plain Terrifying” with Steve Poole.

Steve and I have previously presented together about the OpenJDK at JavaOne, but this was a more ambitious project. Earlier in the year we both attended a series of meetups in London, and started talking about our respective experiences with enabling agility within organisation, and working with such topics as Continuous Integration, Continuous Delivery and ‘DevOps’. Steve has plenty of experience of this with large organisations, and I have experience from working with smaller organisations, and so we figure that a joint talk combining all of our learnings would be a good idea.

Both Steve and I were very happy with the talk, and we received some great feedback and questions at the end of the presentation. We will also be presenting a very similar talk at JAX London this year, and so we will try and address all of the comments here.



You can also watch the full video recorindg of the presentation at Parleys, but in order to view the content you will need to have been an attendee of the conference or pay a subscription:

As usual, if you have any comments then please do get in touch!

So, I’m currently travelling back from my first Geecon conference in Krakow, Poland, and I must say it was an awesome experience! Firstly, I have to say a massive congratulations and thanks to all of the organisers and volunteers, and especially to Andrzej (@ags313), Konrad (@ktosopl), Adrian (@adrno) and Adam (@maneo). These guys and girls work tirelessly throughout the year in order to run Geecon, and when I heard that they do everything themselves (without paid-for project managers etc.,) I was even more impressed!

I learned so much at the conference that I’m going to try and do a couple of blog posts to brain-dump my thoughts (although I know from past experience I know that this may not happen, and so I’ll focus on the one post at the moment 🙂 ). I’ll start with a review of the conference itself, move on to key memes (that I saw), and then briefly outline the sessions and social activities that I attended:

Conference Overview

  • The organisation of the conference is superb, right from the location (an out-of-town Cinema), the sessions, the speakers, the attendees, the food, to the amazingly helpful volunteers. My only small minus (and it’s really a symptom of the great success of the conference) was that the corridors can get super crowded during break times and lunch. I was chatting to Andrzej about this, and he mentioned that so many people wanted to come to Geecon that he had to stop accepting registrations after the initial 1200+…wow!
  • Krakow is an awesome city for the conference. It has some amazing sight-seeing and historical opportunities (Old Town, Castle, Salt mines, Auschwitz). Everyone I interacted with in the city was very friendly, and the vast majority also spoke superb English (which again puts the UK’s language skills to shame!)
  • Geecon is not just a Java conference, and this makes it all the better. It may be primarily focused on Java and the JVM, but you can easily pick sessions to avoid this (if you really wanted to?), and I managed to get a nice blend of different languages over the three days
  • Geecon is at the cutting-edge of thought-leadership within software development. There aren’t many conferences that can claim a perfect mix of sessions on programming fundamentals (often ignored), DDD, crafted design and architecture, Agile good practices, Java 8, JEE 7, Spring boot, Groovy, Scala, JavaScript modularity, microservices, DevOps, Open Source Software, low latency performance and more (except perhaps DevoxxUK, but I could be biased 😉 )
  • The social events and after parties are amazing – you’ll probably learn as much at the parties as you will in the main sessions 🙂
  • Get plenty of sleep before the event, and also expect your brain to hurt after the three days of intensive knowledge injection. You know the part of The Matrix films where Neo ‘downloads’ knowledge on Kung-fu while plugged in to chair? Well Geecon is pretty much the beta version of this (fortunately without the wires plugging into your brain)

Key Memes

  • Never stop learning, and make sure you keep revising the fundamentals as well as innovating.
  • Jurgen Appelo’s awesome keynote set the tone for the first part of the above point perfectly, and I would recommend that all developers watch this talk when it is released on video by the Geecon team. The key takeaways for me were; have a goal, work relentlessly towards it (evaluating progress all the way, and adjusting were necessary); daily habits and discipline are key; be open to other people’s ideas; read more; read more; read more… 😉
  • The ever-inspiring Kevlin Henney also did a superb job at both of his talks on Thursday. The first was a call to action for avoiding the common mistakes that many of us make when writing code, and also a reminder that style and layout matter. This can be summed up perfectly by one of his quotes “Style and layout matter in programming for the same reason they matter in writing” Amen to that… The second of Kevlin’s presentations was a homage to the ‘worse is better’ work by Richard Gabriel, and reminded us all of the fundamental’s of agile development, and that often less is more when it comes to software development. Key takeaways here were strive for simplicity, completeness, correctness, consistency
  • Java 8 really is making a difference to developers. I realise that many of the people presenting at the conference are thought-leaders, and also at the cutting-edge of software design, but I could clearly see the impact of Java 8’s new Lambdas and Streams. For a start, it made a lot of the code on slides much more readable (no more crazy anonymous inner Class boilerplate), and also more expressive, which allowed for key memes to be demonstrated in a much more understandable way (for example, in the great talk about Netflix’s RxJava library by Tomasz Kowalczewski)
  • Java EE 7 is also making a clear difference to developers. Many of the JEE sessions I have attended in conferences over the last few years have been about work-arounds for JEE versions <= 6, or the promised benefit of JEE 7, but at Geecon we actually got to see clear improvements from within the developer trenches (for example, Adam Bien’s and Arun Gupta’s sessions)
  • JavaScript really is growing-up. I know that this observation is not particularly new, and the JavaScript language (and tooling) has been developing in leaps and bounds over the past few years, but again at Geecon I saw proper evidence of this. In particular, the session by Paul Bakker and Sander Mak on JavaScript modularity and the proposed enhancements in ECMAScript 6 look awesome.
  • Microservices are at the tipping-point for mainstream adoption (and are in danger of being the ‘next big thing’). Both of Sam Newman’s talks about microservices were superb, and clearly demonstrated that Sam and the guys/girls at Thoughtworks have been doing this stuff in the trenches for quite some time. Sam is clearly ahead of the game in many areas of service design, implementation and delivery that I was very pleased to hear he was writing a book with O’Reily (which I’ve now bought in Early Access format here). Key takeaway’s from Sam’s talks included; software architects should be more like town-planners than building architects, especially when designing with microservices; be flexible with the implementation of microservices, but standardise the stuff ‘in between’ – monitoring, interfaces, deployment, architectural safety; strive for resource (not data or procedure) oriented designs; distributed txns are hard and should be avoided (see CAP theorem 🙂 ); distributed tracing and correlation IDs are very valuable (I’ll second this piece of advice!); get the testing strategy correct (think Mike Cohn’s test pyramid); make thing more ‘production-like’ close to the development (vagrant, docker, packer are useful here); consumer-driven contracts are very useful for testing; semantic monitoring is a great technique for testing in production.
  • The need for well-crafted design and architecture is still as important (maybe more) as it ever was. Sandro Mancuso’s excellent ‘Crafted Design’ talk provided clear evidence for this. Building heavily on DDD-based principles, Sandro proposed a new architecture and package design for Java applications that allows more cohesive modelling of the problem domain, and promotes clear separation between the Model Domain and delivery and infrastructure mechanisms. I wouldn’t do the proposal justice if I tried to describe it here, but check out the slides on Slideshare. It’s seriously worth spending time looking at this, as creating the ideal package/module structure that represents the problem domain is somewhat the holy grail of Java developers. It’s also worth checking out Simon Brown’s related work in this field (of which I am a big fan), and although he wasn’t at Geecon you will be able to catch him at Devoxx UK in June. I chatted to Sandro at the conference, and we both agreed that it would be great if he and Simon could get together sometime for a meeting of minds!
  • Several of the emerging languages and tooling are becoming a lot more opinionated, which I welcome. It’s great to have an uber-flexible language (Scala I’m looking at you here), but the flexibility and lack of constraints can confuse novices, and also stifle the creative challenge. Ken Sipe did an amazing job of introducing Google’s (very opinionated) Go language in an hour session, and this has inspired my to further look into this language as perhaps an alternative to some of the Python I write. Ken also did a superb advanced session on the testing framework Spock. I could see some people’s brains melting at some of the content (and mine got quite hot), but some of the power demonstrated looked simply awesome. Both of Ken’s talks demonstrated to me that the developers of the language/tool had clearly surveyed their respective fields and picked what they considered best for inclusion into their offering. This obviously could be hit-and-miss, but with Go lang and Spock I think we have a couple of winners.

That’s all for the moment, but if you ever get the chance to attend Geecon then make sure you do – you’ll learn lots, and have a great time doing it! if you have any comments then please let me know!

Java 8 Lambdas – by Richard Warburton


In a nutshell: If you are looking for a concise and high-impact guide to the core features of Java 8, then you’ve found the right book! Whether you’re just getting started with Java, or are a seasoned programmer, this book will help you get to grips with the new JDK 8 essentials such as Lambdas and Streams

I’m sure many people browsing this book will have heard about the recent (March ’14) release of Java JDK 8 and all of the associated excitement about ‘the biggest language changes’ since JDK 5, and no doubt you are looking to see if any of the current JDK 8 books are worth an addition to your programming bookshelf. My answer to that question for this book is a definite yes.

The book starts with a whistle-stop tour of the influences for the new language additions, such as Lambdas and Streams (with a nod to the much-vaunted ‘functional programming’), and then launches into explaining and demonstrating these key features in a well-paced and logical fashion. The stand-out chapters for me are 3, 4 and 5, in which you get to see many practical examples of where and how the new syntax (and new way of thinking) can save a lot of boilerplate typing and can also lead to much more expressive code.

As a relatively seasoned Java programmer, the examples and associated explanations had me up-and-running with the new features over the course of a weekend, and left me plenty of room (and motivation) to start experimenting in my own time with my new-found knowledge.

Data parallelism is covered well in Chapter 6, and the essential topic of testing (and a few associated gotchas with the new Lambda-driven approach) is covered nicely in the following chapter. Another excellent chapter is ‘Design and Architectural Principles’, which walks through some of the well-known design patterns and demonstrates to you that all of your current pattern knowledge doesn’t have to be thrown away when using a functional style of coding. There is also a great section in this chapter discussing how the new language features relate to Uncle Bob’s SOLID principles, and if you get chance I would also recommend searching for a companion talk by Richard on the Skillsmatter website.

Personally I think this book will end up alongside the classic Java books that I recommend to anyone looking to truly master the language, and this list includes such classics as ‘Effective Java’, ‘Java Concurrency In Practice’, ‘Java Generics and Collections’ and ‘The Well-grounded Java Developer’. Richard has done a great job of distilling the key elements of the new JDK 8 language feature, and presented them in a concise tour-de-force without skimping on detail. A job well done!

Disclaimer: I know Richard personally from his good work within the London Java Community, and was also a reviewer for an early version of this book. I have endeavoured to write an unbiased review, and would be happy to discuss any of my thoughts listed here via the review comments section below, or via personal communication. Anyone who has seen Richard present, or had the pleasure of pair-programming with him, will know he is very much the ‘real deal’ when it comes to Java wizardry, and so I whole-heartedly support his first foray into the world of publishing!

Click here to buy Java 8 Lambdas on Amazon UK

This was the first year I’ve attended the JAX London conference, and I must say I was impressed. The conference struck a nice balance between discussing the latest technologies in the Java space and also the ‘soft skills’ side of what we do as developers, which includes use cases and lessons learned from everyday life as a developer

Day One
Unfortunately the combination of the UK ‘Super’ Storm and South West Trains approach to business meant that I couldn’t make the first day of the conference, which was included a series of tutorials. This was a real shame, as I had been eagerly anticipating listening to Thoughtwork’s Neal Ford talking about Continuous Delivery. Thanks to Neal’s website I managed to get hold of the slides, but I’m still gutted that I couldn’t attend.

Day Two
With the Storm well and truly behind us the conference got into full swing. @monkchips provided the opening keynote “How Java got its mojo back”, which I thought was a great start to the conference. Key takeaways:

  • Java is still very much alive a kicking, even with all of the competition of other languages
  • Java may not be ‘cool’, but thanks to the JVM, the execution scales very well
  • Twitter et al have moved from cool technologies (Ruby on Rails) to not-so-cool JVM-based technologies (Scala + Java) in order to meet the massive scalability demands
  • Java may be missing a killer web-app framework (and who can deny the JSF approach is a little clumsy), and this may hinder the hipsters from adopting the Java ecosystem
  • The Java development ecosystem shows the full range of governance available within our industry, from dictatorship (OSGI) to direct democracy (Apache). I thought this was a fun fact!
  • NoSQL is rapidly becoming the de facto datastore of choice – is HDFS the new relational database?
  • It’s now more difficult to sell software, and instead the focus is moving towards selling services and data
  • Java is the architects choice, the engineers choice, but is it the developers choice?

As @monkchips himself noted, it was a slightly tough audience, and I’m not sure why. Maybe the combination of the previous day’s storm and an early start had set everyone up badly?

2013-10-29 09.50.11

Next up with @mashooq talking about “TDD at Scale”. This was an excellent talk, and there were plenty of great points made:

  • Doing TDD does not guarantee that good design will emerge from the codebase
  • …this is further exaggerated by the fact that good a TDD lifecycle should include “Red, Green, Refactor”, but it’s all too tempting to just go “Red, Green, Red, Green…” Unfortunately I’ve been there and done that…
  • It may be easy to split an application into components, but unless a component maps to a real business process, then it will be difficult to create real meaningful acceptance tests around this. This can lead to overly fragile tests, which simply test technical functionality.
  • Avoid the test fixture ‘God’ Class anti-patten at all costs. This is created with good intentions to manage test fixtures, but soon grows out of control…
  • …instead you could/should invest in creating a DSL to create test fixtures
  • Classify tests into Unit, Integration and Component/Acceptance, as this allow some flexibility to choose when expensive/slowest tests are run
  • Regularly email the team with the 10 slowest tests. Often the slowness is due to a simple design flaw in the test. Name and shame the perpetrators until they fix the tests 🙂
  • Parallelise test execution (where possible)
  • System tests are very valuable, and so don’t forget them. If implemented correctly then this truly can become ‘living documentation’
  • Lisa Crispin’s ‘Agile Testing Quadrants’ provide an invaluable insight to the range and value of testing that is available in any software development project. This was a great nugget of wisdom!
  • The foundations to successful software development are design, code quality, TDD and constant critique

For the third session I attended one of the Big Data Con talks about the ‘Lambda Architecture’. If you haven’t read about this architectural pattern then it’s worth doing some research, as I’m increasingly seeing this adopted by many of the Big Data shops. Although interesting, I didn’t particularly take away lots to share from this, and so I’ll skip notes here.

The fourth session I chose was an explanation (and demo) of the Apache Drill project, which is an open source clone of the much discussed Google Dremel project. The talk was more of a introduction to the project, and so I don’t have lots of notes to share here either. I would recommend having a quick read about Dremel, and also watching a few of the related videos floating around the interweb, as when completed I expect the Apache Drill project to create quite a stir in how we query Big Data sources.

For the fifth and final session of day one I attended @sandromacusso‘s talk on ‘Why other people don’t get it’, focussing on how to create a great development team, how to handle situations where ‘they’ (management) just don’t get it, and also how we as developers should take responsibility for ourselves and our careers.

I always enjoy Sandro’s talks, and this one was a personal highlight of the conference for me – the scene was perfectly set when Sandro opened the session with a question “Does anyone have complete freedom to do what they want in their day job?”. Three of us put up our hands, to which Sandro replied that we “should get the f*ck out, as we shouldn’t be in this session”. Fair comment! There was a lot to take on board here, and I was was quite engrossed to the actual talk, and so my notes are a little sketchy. I’ll try my best to summaries the key takeaways for me:

  • In order to create a great software development team and company you have to:
    • Define the culture you want to have in your company
    • Don’t make your problem bigger. Hire allies
    • Help people to help you
  • Hiring great developers is not an easy process, but this is critical for creating a great team (and company)
  • Good Developers want a good company. If you’re hiring developers then please remember this obvious but often forgotten fact!
  • Don’t just rely on boilerplate job advertisements for recruitment (Sandro’s slides contained some great examples)
  • If you wouldn’t promote someone on a criteria, then don’t use it for a job advertisement i.e. please don’t use the much maligned ‘X years experience of Y’
  • Hiring developers should not be entrusted to the HR department. There doesn’t exist a simple process or test to find the best developers
  • Look for passionate developers. Passion could/should be used as a CV filter
  • If you have a problem developer at your company, ask yourself
    • How was he hired?
    • How was he nurtured when he got here?
  • If you are looking for a job then publicly display examples of code you have created (OSS etc), personal projects and other involvement with the larger community. Show that you’re more than a 9-to-5er – show your passion for software development! Amen to that…
  • Pairing is a vital skill to learn – this allows prospective colleagues to see how you think, how you code, and also how you will be able to transfer knowledge
  • When looking to do something beneficial within your company, such as creating ‘brown bag’ technical sessions, or running software craftsman discussion groups, it is best to “ask for forgiveness, rather than beg for permission”
  • If you are in a position of authority then you should lead by example
  • If you are responsible, then you must also be accountable
  • Managers of great teams must provide autonomy, mastery and purpose
  • You are ultimately responsible for your career, therefore you must take responsibility. If you don’t like something, then take action to change it

2013-10-29 17.55.54
That’s all for this first part of the JAX London review. Stay tuned for the second part later this week (hopefully… 🙂 )