Posts Tagged Books

Book Review: Growing Object-Oriented software guided by tests

Growing Object-Oriented Software, Guided by TestsFinally I finished reading Growing Object-Oriented software guided by tests, by Steve Freeman and Nat Pryce. We ran it as a reading circle at RemoteX but I think I’m the only one that will finish it, and I did so last week. So the circle quickly lost it’s members.

I would like to mention that my expectations on this book was very high, which could make them hard to live up to.

The book starts by describing testing, and the takes us through a fictive scenario where we gradually build up software guided by tests all the way. Then at the end it covers advanced topics.

I had trouble reading the scenario part of the book. Part because I do not like the use of mock-frameworks. But also due to not really buying in to the scenario. Some paragraphs were written to add realism to the scenario, such as sudden changes of UI. But these paragraphs seems taken out of thin air, and adds no value to the chapters. This annoys me. I also disliked how the book kept defending the technology choices of the example, it was quite clear that this was an example after all.

Now the advanced chapters at the end did indeed pick up the book quite a bit, some aspects of it I already knew, while others provided fruitful suggestions on how I could improve certain aspects of one of RemoteX’s test-suites.

The beginning of the book structures out testing and the terms used quite well, and I did like the last parts of the books discussing advanced topics.

I’m not sure if I would recommend this book. The approach in the book isn’t bad. It’s intended for beginners, however I’ve seen what a junior team can do to a test-suite armed with a mocking framework. I would recommend that junior developer would start by using OO-design to do their testing simply because they will learn much more and their tests will be much clearer. An intermediate level of developer could extract great value from this book however.

,

No Comments

Book Review: JavaScript the Good parts

javascript_coverMarkus Andersson recently recommended a book to me called JavaScript the Good parts, by Douglas Crockford. As we were discussing inheritance around JavaScript it came up, so to demonstrate to power of my Kindle I purchased it so we could check out the specific example we were discussing.

JavaScript the Good parts is quite different from other language specific books I’ve read. It’s short and to the point, a feature not commonly found around American authors. It is however also opinionated, not everyone might agree with it’s content. Which is great because it means you have to think about the content.

What I really liked about it was how it described the different ways to arrange and encapsulate your JavaScript functionality. It also provides a heads up for a few more common mistakes.

The chapters on Regular Expressions, there is two of them if I remember correctly. One discussing the good and bad parts of Regular Expressions in JavaScript and then a reference chapter.

The book is suited both for people whom are new to JavaScript and to people who’ve worked with it before. But then again it is focused on the language primarily, so more senior JavaScript developers might focus more on different styles of JavaScript implementations.

,

No Comments

Book review: Continuous Delivery

I recently finished reading Continuous Delivery by Jez Humble and David Farley. I have to say that the book was quite exiting. The first parts showed how to implement a continuous delivery pipeline and where automated tests fit in. It also explained how to setup the automated tests and the importance of continuously testing your applications.

The book however lost some of it’s flare at the end. The last chapters describing how to divide your application into components, manage continuous delivery and source control didn’t quite live up to the same quality earlier in the book. These chapters were a bit vague and repeated points made in earlier chapters.

I still recommend reading this book. To be honest I think this book gave me a better picture of how to fit acceptance tests into development than for example the Agile Testing book gave me. The more hands on practical approach to Continuous Delivery gives the option of first setting up the development environment to support acceptance tests, and then add the tests.

This being said the book was so inspiring that I  started a template project to implement a continuous delivery pipeline using Hudson and Git. You can find it as a project on github. We’re adopting this template to be used at RemoteX.

I recommend this book to any team that wants to improve their build and delivery models.

,

No Comments

Doing Continuous Delivery with Hudson and Git

Right now I’m reading the book Continuous Delivery. Excellent reading and even though I’ve only read around 46% percent of it, it’s quite thought provoking.

I’ve written earlier on how we at RemoteX have set up our build environment with a concept I then called The Independent Trunk (terrible name, right?). Continuous Delivery describes a similar approach of handling your source-control and build system, though in greater detail.

Recently we’ve been considering switching build environments to Hudson, since we’ve been quite happy with the results Hudson has been given us when we’ve tried it out for different scenarios.

Hudson however does not have its configuration checked in under source-control. Most people seem to be happy with just doing backups of the configuration with the motivation that it seldom changes. However I firmly believe that the configuration of the build-environment follows the same lifecycle as the software, and it seems the authors of the Continuous Delivery book do as well.

So I set out to do some experiments with Hudson to see if I could model an arbitrary delivery pipeline using Hudson and yet have it checked in.

I wanted the following to hold:

  • All configuration is checked in
  • Developers run the same builds locally as they do on the build-server
  • It’s easy to run the complete pipeline on a developer machine
  • It should be fast to get up and going

I started thinking about this in the middle of December and about a week ago I started to set things up. The idea I got was to simply check the entire Hudson system into source-control. I put the war-file that is executed in source-control along with Hudson’s home directory. I spent quite some time tinkering with the .gitignore file to get things set up how I wanted it.

The result is available on git-hub at: https://github.com/morkeleb/continuous-delivery-with-hudson feedback is highly appreciated. Also if anyone wants to use it as a boilerplate for new projects go right ahead.

The only difference in the pipeline I’ve created and the one that the book describes is that I’ve added a packaging step that is supposed to take all artifacts from the CI builds and add them up into a deliverable package. There are two stub CI builds creating files and shows the intended structure.

To make it easy to start Hudson on a developer machine I created a .bat file that starts the CI engine locally. All a developer has to do is get the latest version and run the script to have Hudson setup locally.

What I’ve found thus far is that this approach seems to work quite well. Sure it takes some disc space but that is affordable.

Upgrading Hudson can be done easily and have the changes replicated across developer machines as the fetch the latest version from the origin.

Now there are some things that differ when you run Hudson locally and on the main build-server. The main build-server will have all its artifacts and fingerprints backed up, as well as following the source-control version.

There are however some things that I’ve yet to try out. Changes to the configuration needs to be updated on the build machine, this can be accomplished by logging on to the machine and the do a git pull. However since this is tiresome a web hook approach could be interesting for automatically restarting Hudson and getting the latest version of the configuration from source-control. This however is yet to be experimented with.

Feel free to check it out on git-hub and any feedback is great. Especially considering that this might seem a bit crazy.

, , ,

3 Comments

Review: The Power of Pull

50314_108844182471580_2963_n.jpg (200×301)I recently finished reading The Power of Pull a book describing how the world-wide adoption of the Internet is changing how we generate value as individuals and in organizations.

The pull that the book talks about is a different kind of pull than what I’ve previously associated with the word. The Power of Pull talks about pull as the means of the individual to access information, attract people of similar interest and achieve common value.

That in working together towards a common goal making individual decisions in the same direction. Generates move value than working in a direction that has been pushed down from a single mind or individual.

It describes how the value of assets keep declining at increasing rates. How its becoming easier and easier to get outrun by a small groups of individuals. It describes the general disruption that the Internet’s increased communication and availability of information is causing.

It doesn’t stop at the individual level however, the book covers how institutions can leverage the power of this process of change. How institutions can change to create environments where individuals can achieve their fullest potential and generate the potential of unlimited learning.

Last the book covers how entire markets can be shaped as pull is being leveraged. Markets can be shaped to provide profit not only to single institutions but for everyone involved in the particular market.

In short the book describes the opportunity that exists right now to collaborate and create something truly fantastic.

I definitely recommend reading this book. It’s excellent food for thoughts.

No Comments

Stress and TDD

In Blink the author describes that there is an optimum peak of performance in regards to stress. What happens after that peak is reduced performance, inability to act on details and tunnel-vision so on.

In programming this means we will see the end goal, often the finished functionality according to a specific happy path scenario (that is developer specific). This means we will skip extra checking, and testing. We are not considering the alternative flows of the application. The end result when too much pressure is applied to software development is that things loose quality as the developers sight narrows.

TDD from a process perspective is designed to help developers maintain quality as the temperature rises. If the developer safely can write test for what he is doing, then there is an extra automatic quality gate for the production code to pass. Each test is a statement of the assumptions made by the developer as he or she writes the production code.

As a programmer I make decisions and assumptions all the time. I can see how stress cause a lot of the bugs that I’ve seen. In essence I think that this is what TDD is meant to resolve, to give you a framework that even though your stressed beyond cognitive functioning your decisions are recorded, and if you do something that breaks a previous decision, especially during a stressful period, you will be informed accordingly and forced to think.

However if you push hard enough something will break. What can break down instead? The obvious answer is Discipline.

Removal of tests, badly written tests, simply not writing tests etc. All you do is push the problem into the test suite. With a badly written test suite your production code will suffer.

So the question is: Can you correct an organizational problem with a methodology?

,

No Comments

Blink

I recently finished reading Blink. It’s about how we are programmed to make quick decisions. The driving force behind prejudices, but also our inherited ability to make quick and accurate decisions.

It’s funny, the book was mentioned in an episode of “In treatment”, and 60 seconds later I had purchased the book and had it on my Kindle.

Malcolm describes how we all make initial assessments of everything and everyone. The book explains when this ability is not to be trusted and when it is to be trusted.

I found it especially interesting how, for example packaging can change our entire perception of a product. It also explains how we often let our first impression of a person unconsciously affect our interactions with that person.

In essence the book is about decision making, a process that I’ve find to be hard to capture in text. It’s an interesting read and very inspiring, but it is more of a food for thought book than a practically focused guide.

No Comments

Agile Testing: A Practical Guide for Testers and Agile Teams

Agile TestingI finished reading Agile Testing, on the recommendation of Mary Poppendick. It’s a thick book, and it took me longer to read than I originally thought it would.

I found it too long, to be honest. It covers both testing and agile principles. For me a better fit would have been if it only focused on testing, implying that I am not the target audience. For the Agile part I would recommend other books on the subject.

The testing parts, however, worked as a muse for my thoughts. It wasn’t long before I was thinking of how I could apply the different aspects mentioned in the book. For instance the book suggests that if the test suite start taking too long to run, it could be split into a quicker suite run each check-in (or my preference each compile) and a longer suite that runs in a build. I realized that most teams I know of would have a hard time splitting their test suites up into quick feedback suites run each time the code compiles and a longer list which run each night. This ties back to some of the problems with TDD where early practitioners risk just producing test after test without considering their value.

Another idea I had while reading the book was that it could be quite easy to produce a test suite for a REST-api using curl and a set of script-files. This suite could easily be automated as well, without need of much programming experience. Then again, it’s not difficult programming either.

The book suggests thinking of different types of tests as features are implemented. Which is good to have as a sort of checklist, and I agree that features should be considered from as many angles as possible for risks or if they can be implemented simpler. However I do not see this as a tester activity or a “programmer” activity. I see it as an obligation for everyone in the team. I do greatly agree with “the power of Three”.

I believe that the book could have been shorter and more concise. Also I could argue that the book isn’t a practical guide, but rather an introduction to agile testing. With this I mean that you shouldn’t expect concrete examples of how to set-up an automated regression test suite. It will however greatly describe the benefits of one and suggest that not every test is suitable for automation (I can see how it’s easy to get carried away with automation).

Despite the fact that I didn’t enjoy the book as much as I had hoped for I would still recommend reading it. However I would recommend readers whom want to focus on the Agile processes to read other books on Agile instead of the chapters discussing processes.

1 Comment

The Checklist manifesto

imageWhen Mary and Tom Poppendick was in Stockholm a few weeks ago, Mary recommended the Checklist Manifesto by Atul Gawande. And now I finished reading it.

In general it was a good read. Since it’s American it tends not to be very concise, sometimes over elaborating or using constructs of words that could have been shorter. This is normal.

It describes among others how a Checklist somehow can unite the team for the task ahead.

Around chapter 6 it gets really interesting. It’s where it starts discussing what constitutes a good Check-list. Where it divides checklists into two different types: Read-do and do-confirm. To be used in different scenarios. The Read-do is a simple follow this checklist and do the things on it. The do-confirm list is a do some work, then verify that it has been done. In a team verification is done verbally.

It also explains how checklists are used in different industries. What I found interesting was the air-line industry that tests the checklists in flight-simulators. Which begs the question: When did you last execute tests on your software documentation?

The book also describes, among other benefits of checklists, how checklists can increase the communication in the team, by adding communication check-points. One thing that I found missing, was that checklists can help team-members to focus. By having items written down, they don’t have to worry about “not remembering them”, thus freeing up memory space for the task at hand. At least this is the Getting Things Done theory for checklists freeing up focus.

It’s remarkable, the results these checklists demonstrate when used in surgery. And for the question “Would you want the checklist to be used if you were the patient”, my answer is “yes”.

No Comments

Getting things done

I just started reading “Getting things done” – by David Allen. I’m roughly 25 pages in, but now I have to stop to write this blog-post just to clear my mind.

The reason for why I started reading the book is that I found Tracks though mor.ph and started looking at their system earlier this week. The goal was to get some inspiration for creating more productivity enhancing features in RemoteX Applications. Tracks was interesting enough but I wanted to read the book to get some better insight into the ideas behind it.

The way Scrum, Kan-ban works is similar in the sense that it is a way to organize Actions, things need to be done.

What I miss so far from Getting Things Done is that the items on the team boards that I’m working on is also a part of the things I need to get done. It feels as if I’m missing a dimension. I felt the same way about the Tracks software earlier this week.

The book it self has already resulted in 5 blog posts, this included. Ill add one when I’m finished to summarize.

, ,

1 Comment