Category Archives: Back to school

how to make good teams great – episode 2

Feed your brain

In a rapidly changing environment – as the IT world is – you want to stay on top of things and you can’t only rely on techniques, languages, frameworks & technologies you played around with at school or in your current projects.

You must feed your brain with new ideas, new cool stuff (even old cool stuff by the way) and there are various places you can get brain food: conferences (if you or your company can afford it), bar camps & user groups (often free), brown bag sessions over lunch at the office, …

Say “well done”

Give your co-workers credit for a well done job. It does not necessarily need to be for big accomplishments only and you should also communicate on smaller achievements. Kudos can be given via an email sent to the Kudos mailing list or can take the form of a small present you know will be appreciated (a chocolate bar for instance).

Keep in mind that not everyone likes to be a star (even for a minute) and it is important that one gets kudos only if she/he wants.

That was easy!

In my team we use one of those EASY buttons (that says “that was easy” when you press it) for telling the floor someone has achieved something (small or big). It is not exactly the same as saying “well done” but still is a nice way of showing some pride.

Eat your own dog food

As a developer you should already be familiar with the quick feedback that a suite of unit tests provides but that is still pretty “low level”. Feedback is important but quick feedback is even more important since it helps you catch bugs early and fix them early (at a lower cost).

So what about testing the software as a whole? What about using it yourself? Eating your own dog food is all about using the software you develop instead of simply developing, shipping the product to the testers and waiting for feedback. By doing so you also see your software with your end users’ eyes (may it be a tester – internal – or a customer – external) and have a better understanding of their needs.

Experimentation time – motivation through innovation

By giving the developers the opportunity – read time – to explore and implement new ideas a company is making an investment that may or may not pay back. But a lot of products were born during experimentation time (FedEx days at Atlassian, Google Fridays, …) and if a company can afford to set a couple of hours aside for their employees to think out of the box it should go for it.

“Do what you want” time

The “do what you want time” differs from “experimentation time” in the sense that it is more about assigning some time (like 20%) for the developers to improve or implement a feature not yet in the backlog in an existing project.

You can find the slides from Sven’s presentation at Jfokus here.

how to make good teams great – episode 1

As we are implementing new development processes in the department I work for teams are going through a lot of changes. Attending Sven Peters’ (@svenpet) talk on “7 things: how to make good teams great” at Jfokus was an obvious decision and I’m glad I went. It was really nice to hear that some of the actions we are taking right now have proven to be successful and appreciated by teams in other companies.

I’m not going to write about the 7 things at once but will break them down in a couple of posts. Let’s start with “It’s flow time” and “Report robot”.

It’s flow time

Ever heard of context switching? It is probably one of the biggest problem of so called knowledge workers who – according to various studies – waste 20% to 30% of their time switching from one context to another. And that problem is even more important in an open space where one can easily be disturbed: a colleague or a manager stopping by your desk for a “quick” question (notice the “quick” there: sounds familiar?), someone just walking by, …

Unfortunately there is no “quick” question or task and you will always waste those 20% to 30% of your time (that’s almost 3 hours of a normal day at the office) switching context.

To Not Disturb

In such work environments it is therefore all about finding the right balance between productivity and collaboration. Collaboration is the idea behind open offices but productivity is not and you need to build virtual fences in order to secure high productivity periods – as if you were working in a closed office – over the day or week.

  • do not disturb time – together with the team members agree on a day (or half a day) when it is not allowed for an outsider to break the flow. The team needs to communicate when it’s alright to disturb and when it’s not. It could be done with a red flag on the desks or with the team members all wearing the same and explicit t-shirt for instance. All you need is basically a visual clue that people can easily interpret.
  • support guy of the day - one of the team member is responsible for isolating the team from the outside world and handles all the questions, meetings and so on. It is a good idea to rotate among the team members so it’s not always the same person being disturbed.

Andy Hunt dedicates a whole chapter on the subject – Manage Focus – in “Pragmatic Thinking & Learning: Refactor Your Wetware” and suggests team to “establish rules of engagement to manage interruptions”.

Report robot

Constant feedback is one of the key factor of successful agile teams and there are a great deal of tools that can help feeding the team with relevant information.

In your day to day activities you probably use a wiki to share documentation and knowledge. You probably (and you better do) use a bug tracking system to manage the defects in the code your write. You also might use a build system to automate builds and deployments.

When you think about it the list is much longer than that and it is almost impossible for a single person to keep track of all the data the different tools provide. If your company (read manager) understands the issue and is willing to invest some money in it maybe it’s time to build information radiators!

Information radiators are central locations (a web page, a flat screen TV close to the team) where the feedback from all those tools can be presented in a concise and visual manner: charts, green and red lights, numbers, … for anything that adds value to the team productivity and spirit.

Jfokus 2012 | 13-15 February | Stockholm, Sweden

Going to a good conference usually makes me want to write and keep this notepad alive. Going to a very good – and Jfokus 2012 was a very good conference in my opinion – makes me do it.

Jfokus 2012

In the next couple of days (understand weeks) I will force myself to go through the notes I took during the last 3 days and come up with a couple of posts. I swear.

My schedule

Day 1

  • Spring into the Cloud by Josh Long & Chris Richardson
  • A Practical Introduction To Kanban by Marcus Hammarberg & Joakim Sundén

Day 2

  • Enterprise Java in 2012 and Beyond by Juergen Hoeller
  • Player Framework 2.0 by Peter Hilton
  • Maven vs Gradle, On your marks, get set, go! by Hardy Ferentschik
  • Unleash Your Domain by Greg Young
  • An Intro to Hadoop by Eva Andreasson
  • Application Security for Rich Internet Applications by John Wilander
  • The road to REST by Rickard Öberg

Day 3

  • 7 Things: How to make good teams great by Sven Peters
  • HTML5 with Play Scala, CoffeeScript and Jade by Matt Raible
  • Zero Downtime Continuous Deployment of Java Web Applications by Fabiane Bizinella Nardon
  • It Is Possible to Do Object-Oriented Programming in Java by Kevlin Henney
  • Scala in Action by Heiko Seeberger
  • We visualized, we saw, we changed by Leonard Axelsson
  • Cool Code by Kevlin Henney

an overview of the NoSQL world

A few sessions at the Disruptive Code conference were dedicated to the “NoSQL solutions” trendy topic and I was really looking forward – I have to admit – to what Adam Skogman (from SpringSource) and Eric Evans (from Rackspace) had to say on the subject.

In the last 5 years the amount of data produced worldwide (texts, images, audio, …) has drastically increased from 161 exabytes to 988 exabytes (one EB being one million TB or one billion GB) and with that come some new challenges (storage capacity, availability, …) that cannot be entirely solved by SQL solutions and relational databases.

Not entirely because “NoSQL” does not mean no SQL at all but not only SQL really and a mixed architecture (depending on the needs) is probably what the final solution to a problem will look like.

What are the problems?

The amount of data is growing at an exponential rate and a relational database (like MySQL) is not really a distributed solution. Even though reads can be performed on slaves, writes most likely have to be done on the master (where would the consistency be otherwise?) which becomes a bottleneck in a transaction intensive system.

Relational models are rather statics and once the model has been defined you better not have to change it. From my personal experience I can say that adding a column to a table that gets 10 millions (roughly) extra rows a day without downtime is a rather complex and costly (just in the human resources involved) operation. And when you need to keep 5 years of data in that same table (which would be 18.3 billions rows) and still have a good performance on reads and writes, it gets even more complex.

When you need to store – as fast as possible – large quantities of data which structure has to be somehow flexible you’ll definitely have to have a look at the following solutions.

What are the solutions?

There are 4 kinds of NoSQL models at the moment:

  1. key/value
  2. column
  3. document
  4. graph

Key/value stores design is domain driven. Entities that are tightly coupled go to the same bucket (a customer and her shopping cart for instance) but different instances (customer A and customer B) don’t have to be in the same bucket.
With a key/value store like Redis a throughput of 110,000 database operations per second can be achieved when MySQL shows a good 15,000 (good because it’s still pretty good).

Most key-value stores provide an indexing mechanism and/or a search engine usually based on Lucene, Solr, Elastic Search.

As for the other solutions we can mention Cassandra (from Facebook), Google BigTable and Hadoop HBase (column models), CouchDB and MongoDB (document model) and Neo4J (graph database).

Graph models seems like a pretty interesting topic (even though performance is not what you can expect from a key/value store for instance) and I will definitely have a closer look at Neo4J.

high performance web sites, with ads [aftonbladet.se]

Today was the first day of the disruptive code conference in Stockholm (#dcode on Twitter) and I’m taking notes, a lot of notes. I unfortunately don’t have time to blog live from the event – too busy listening to some really good talks – so I am taking another approach: for the next couple of days, I’ll write about the sessions I have been attending.

Let’s get started then with notes I took during a session ran by Tobias Järlund, CTO at AftonBladet, the biggest Swedish newspaper (so he claims at least) : high performance web sites, with ads (don’t let third parties make you slow) which was based on AftonBladet’s experience and experiments on web site, embedding third party ads, optimization.

Facts and figures

www.aftonbladet.se lately (due to the elections in Sweden) had all time high traffic with 2.4 millions visitors a day on its front page which, as it has always been, is really, really, … really long and contains no less than 20 advertising spots.

Aftonbladet.se

Web performance optimization, iframes vs. JavaScript

“The server side is not the bottleneck” and, according to Tobias, optimization should rather be performed on the client side.

There are plenty of solutions available (iframes and/or JavaScript based) and AftonBladet decided, after evaluating the pros and cons of some of them, to go for friendly iframes that have the following “properties” (but not only):

  • may load in parallel
  • possible to late-load
  • full access to the DOM
  • support all types of ads

The setup

  1. create an iframe to a small static cacheable HTML page from the same domain
  2. inside the iframe, use the JavaScript variable inDapIF = true to tell the ad it is loaded inside a friendly iframe
  3. inside the iframe, create a script element with the ad url as the source (load the ad just like a normal JavaScript ad)
  4. when the ad has finished loading, resize the iframe to fit the dimensions of the ad

Even if “using iframes is the best option today” to solve that kind of problems, be careful when implementing such solutions since rendering iframes is quite an expensive operation.

Tweaks

  • don’t load all ads at once, use queues or delays
  • set default sizes (1 by 1 pixel for instance) and then resize
  • try not to block the “onload” event (the page loading speed is now taken into consideration by Google for ranking)

The future

  • <frag> tag (Google Chrome) to mark a piece of code that should be loaded in parallel, not blocking (not implemented)
  • postMessage(…) implemented in all modern browsers for messaging between iframes and the main page

Results

It’s certainly pretty cool when you get the chance to try out solutions and experiment different techniques but it’s even better when you measure the impact of the changes you make on your users’ experience!

By implementing friendly iframes Aftonbladet drastically improved the loading speed of the front page (editorial content loaded at the same time or even before the ads) and readers liked it…

  • visits per week up 7%
  • page views per visit up 16%
  • “latest news” section (which used to show up really late in the rendering process) CTR (click through rate) up 35%
  • average page load time down 30%

… and the most remarkable thing being that all those changes have not had any impact on the ads CTR

a brief introduction to Terrastore

Every 3rd Friday is a lantern day at work meaning that developers are free to try out new technologies, play around with obscure programming languages and give presentations on their findings to whoever is interested in the selected topic.

Today a consultant from Mejsla AB, new member in my team and committer to the Terrastore project, Sven Johansson, ran a session on Terrastore, a documents store (a documents oriented database in other words) based on the Terracotta clustering technology. As the team is currently investigating NoSQL storage solutions for one of the applications its responsible for, it’s always nice to get to know about existing (or at least under development) products out there.

Terrastore is a modern document store which provides advanced scalability and elasticity features without sacrificing consistency.

The open-source project started in September 2009 and is basically an advanced key/value store (like CouchDB, MongoDB, RavenDB, …) written in Java. Where a relational database deals with a bunch of tables containing rows, a store has buckets in which Java objects can be stored and retrieved from.

/** A class representing a person */
public class Person {
  public String identifier;;
  public String lastname, firstname;
}

/** An instance of the class */
Person aPerson = new Person();
aPerson.identifier = "1234567890";
a.lastName = "Doe";
a.firstName = "John";

Now we want to store aPerson and retrieve it.

TerrastoreClient client = new TerrastoreClient("http://some_host:some_port", new HTTPConnectionFactory());

/** Store the document in the "address_book" bucket */
client.bucket("address_book").key(aPerson.identifier).put(aPerson);

/** Retrieve the document from the "address_book" bucket */
Person aPerson = client.bucket("address_book").key("1234567890").get(Person.class);

Sven also described the different deployment architectures currently available (cluster or multi-cluster) among other things… On September 12, 2010 version 0.7.0 of Terrastore was released (including changes like client instantiation giving a list of hosts instead of a single server address like in the above example) and more functionalities are already in the pipe: MapReduce operations, better integration with Elastic Search, …

If you want to read more on Terrastore, feel free to pay a visit to the project’s Google Code page (http://code.google.com/p/terrastore/).

Those couple of lines were my minutes of Sven’s presentation and, I have to admit, a rather brief introduction to the project. Good luck to the committers and looking forward to the baby’s next steps!

Disruptive Code | 21-22 September | Stockholm, Sweden

In a couple of days I will attend the Disruptive Code conference in Stockholm, Sweden. A lot of interesting topics are on the agenda and I already have selected a few sessions about web sites development (HTML5, CSS3, high performance web sites) and NoSQL solutions I cannot miss.

We (my colleagues and me) are currently investigating NoSQL storage solutions (for an application storing 8,000,000+ rows per day) and I will definitely join Eric Evans’ talk on Apache Cassandra (“What makes Cassandra tick”). I’ll keep you posted!

HTML 5. NoSQL. CSS3. Cloud deployment. Mobile App Development. Cassandra. WordPress. Scaling. Performance.