Maker Days 2016 Q1

Wait, what?

Maker Days is what you get when you take a team of 20 or so developers, feed them sugar and a pseudo-scientifically regulated amount of beer and sit them down at a computer for an extended period of time: An in-house hackathon arranged a couple of times a year here at SpeedLedger.

We form small teams around interesting or novel challenges and go at it. Some times the tasks are technically advanced dares on the outer rims of known code-space; other times, more banging rocks together in the hopes of having them throw beautiful sparks.

The execution

Anton and Lis looking dapper in their MakerDays tees

Heroes.

To kick things off we met for lunch at John Scott’s stable: A local pub with free access to a projector for presentations. As we ate we shared our ideas and formed loosely knit teams to take them on.
The actual event started Wednesday, two days after our lunch meet. With an array of snacks and caffeinated beverages at our disposal, we donned our mandatory MakerDays 2016-shirts and set to work. We were heroes.

Two days later we emerged from our makeshift cave to present the result of our labour. Each team got 5 minutes to give a brief recap of the original idea and the end-result. Encouragingly, all participants had something to demo and presentations proceeded with only the briefest technical hiccup.

The projects

Das blinken lights lets us know that while some of us are at work, others aren’t.

Das blinken lights lets us know that while some of us are at work, others aren’t.

So what wondrous creations did we come up with this time?
Thanks for asking!

  • Das blinken lights
    This mysterious LED-adorned box houses a Raspberry Pi programmed to detect mobile devices on the local network. It doubles as nerdy christmas decoration.
  • The SpeedLedger Button™
    Ah, the button. So succinct, so tantalisingly clickable.
    “Why don’t we make a few for our partners’ admin websites, so that they may synchronise stuff like their member registry and what not?” mused Per, and so he did.
  • Frikkin’ Flags
    Dynamic and highly configurable feature toggles to let us try things out for a select group of users — like A/B testing — or simply activate and deactivate a service-feature without having to redeploy. Implemented using LaunchDarkly. (Note: No flags were harmed in the process of development.)
  • Listen2Speedledger
    Based on the theory that everyone loves geometric shapes and random intermittent noise, one brave team set out to visualise user interaction events in almost-real time. The events were dirty polled from Elasticsearch and linearized so that they played one after another, rather than all at once much like a grand piano hitting concrete after being dropped from a tall building.
  • Async-duh!
    A lot of our intra-service communication is done synchronously even when it would be simpler to use an asynchronous data flow. This project experimented with exposing streams of logging events to consumers, using Kafka so that interested parties wouldn’t have to resort to dirty polling.
  • Hipstereport
    Finding Clear Reports’ PDF generation capabilities “slightly cumbersome” (“… holy crap, just look at all those boxes crammed on top of each other!”), another Per came up with the idea to replace it all with a custom-built report tool using HTML5 and CSS3 for layout.

Lastly a team of talented designers managed to freshen up the careers section of our website.

Awesome work everybody!

The wrap-up

Presentation of The SpeedLedger button™.

Per, demonstrating the undeniable affability of buttons.

Last year we had some issues with screen sharing between teams; each team were responsible to share their presentation over the network so that remote location participants could partake. This year we opted for a simpler solution by having the teams connect directly to the projector and offering a video stream to remotes. Much simpler.

All in all, the event was a triumph (I’m making a note here, huge success). Most of the projects initiated were completed and the overall experience was rewarding.

Two days of hacking feels like a reasonable timeframe for hackathon projects; any less and we would be rushed to produce a viable candidate. It would be interesting to see what we could do with three days.

From Business to Buttons - Al Gore

From Business to Buttons

Last thursday we traveled to Stockholm for “From Business To Buttons” conference on friday, hosted by the lovely people at inUse. A full day conference around User Experience, Service Design and Sustainability.

Thursday night we separated to meet friends for dinner. Johan went to have a bite at Yuc and I went to Jamies Italian. Myself finished the night with a good night beer at the hotel bar before a good night sleep on the boat and hotel m/s rygerfjord.

Main experience and impressions after the day

  • Meeting great people who want to build great human experiences
  • Great design starts with culture: Work should be a safe place to be
  • We should challenge ourselves to focus on improving human lives, and don’t forget about the disabled ones
  • Problems can be solved through technology without yet another screen
  • We spend way too much staring at a screen during a day, what takes us away from our social life
  • In fact, we don’t need a screen interaction for everything
  • We need to gain more real human empathy for those who we design for
  • Challenge ourselves and colleagues to dig deeper and ask for the root cause of their beliefs through using the five WHYs
  • Al Gore is vegan
  • Scientists breed goats that produce spider silk in larger quantities
  • We can not use as much resources as we do today in order to keep climate in a shape that allows human and animal beings to live


ROBOTS, VIRTUAL REALITY, AND ARTIFICIAL INTELLIGENCE: THE FUTURE OF HUMAN INTERACTION WITH TECHNOLOGY

Dr. Susan Weinschenk – CEO of The Team W Inc., Author and Behavioral Scientist

Susan’s Slide Deck

Notes from Susan’s talk:

  • Transequence (temporary content) will increase in value – eg. Snapchat
  • People (will) use technology to be social
  • Having mobile phones on the table, even if it not ours, makes us feel socially less connected towards the ones sitting across the table
  • Unconscious data processing will increase – Technology allows us to influence decision making through signals send to our brains (What If You Could Have A Direct Feed From The Internet Into Your Brain?)
  • Technology recognizes our decisions 0.7 seconds faster from our brains before we actually take actions
  • Technology will increase neuroplastic to help people see, feel and move
  • Objects are expected to manage themselves
  • People trust machines more than human to make better decisions
  • If a car has a voice, and the voice has a name, it is more likely that we can trust it
  • The simplest robot made out of cardboard with a voice of an ten year old boy, made people talk right out of their hearts
  • Experiments with robots show how human can build relationship with digital mediums (BlabDroid)
  • We tend to have more emotions when robots are animal like, rather than human like (Watch robot dog ‘Spot’ run, walk…and get kicked – YouTube)
  • Robot pets are used today in nursery home to minimize loneliness

So what….

  • Human can in fact be emotionally attached with technology
  • Digital should feel more human, as if there is no technology involved


THE BEST INTERFACE IS NO INTERFACE

Golden Krishna – Design Strategist at Google

Goldens’s Slide Deck

Notes from Golden’s talk:

  • Sometimes we make tasks more complicated with interfaces when in fact no interface is needed
  • So called ‘backpocket applications’ allow us to interact without picking up the mobile to achieve specific tasks – the signal of a mobile simply does it for us
  • Screens now have taken over our lives
  • Screens everywhere, in cars, in your pocket, refrigerator, and even on your nose
  • An average person spends 150 times looking at their mobile during a waken day, and more than eight hours staring at a screen
  • There are apps for everything. Are you sick? There’s an app for that! Need to pray? There’s an app for that! Dead? Well, there’s an app for that, too!
  • Most apps are intentionally addictive distractions that end up taking our attention away from things like family, friends, sleep, and oncoming traffic
  • We are eager to use new technology, like screens etc. – But we forget to ask ourselves what the bigger problem is we are trying to solve for people

So what…

  • We can build a technologically in an advanced world without digital interfaces


HOW TO MAKE SENSE OF ANY MESS

Abby Covert – Independent Information Architect

Abbys’s Slide Deck

Notes from Abby’s talk:

  • Many people get overwhelmed when encountered a mess
  • The majority of mess is made of information (and people)
  • Information is not like content or data
  • Data are facts, observations, and questions about something
  • Content is whatever a user interacts with
  • Information is whatever a user interprets from the arrangement or sequence of things they encounter
  • Information architecture is how we arrange the parts to be understandable as a whole
  • Language matters
  • The goal is not simplify an arrangement or sequence of things – the goal is to be clear with you mean when you say what you say
  • There is no right way
  • There are only five ways to organize anything: 1. Location, 2. Alphabetical, 3. Time, 4. Category, 5. Hierarchy
  • Organizing things isn’t the hard part – Agreeing is the hard part
  • We need pictures – Pictures give us something in common to point to
  • Visualizing something when it is hard to explain in words
  • Show process, not just results

So what…

  • Involve real users to solve the mess, understand how they would organize the content
  • Group navigation rather so it makes sense to users, not how it reflects internal structure or your own common sense


FROM DAY ONE TO DAY NONE: THE LIFESPAN DESIGN CHALLENGE

Patricia Moore – President at MooreDesign Associates

Notes from Patricia’s talk:

  • Don´t make things for disabled people, make them for everyone. If someone disabled could use them, everyone can
  • Get empathy for your user, put yourself in their position – feel how they would feel

So what…

  • Being a user for a day helps to bridge empathy
  • Talking, listening and understanding users allows us to dive deep into their context, needs and goals


DESIGNING CULTURE

Jeff Veen – Design Partner at True Ventures / Former CEO of Typekit

Jeff’s Slide Deck

Notes from Jeff’s talk:

  • Equanimity (Latin: æquanimitas having an even mind; aequus even animus mind/soul) is a state of psychological stability and composure which is undisturbed by experience of our exposure to emotions, pain, or other phenomena that may cause others to lose the balance of their mind
  • Don´t find someone to blame, leaders need to build a safe workplace and spark a mental calmness
  • The five whys model helps to identify the root cause of a problem or critique
  • Share why something went wrong, how can we solve it and how could we fix so it won’t happen again?
  • Great teamwork with no disturbance could solve almost every problem
  • Focus to solve the task. Things that Jeff’s team at Typekit planned to take months was solved on a weekend
  • Culture should allow us to share our true thoughts
  • Chatt allow us to collaborate and act quicker
  • Chatt allows employees to respond more open on an opinion
  • We should feel safe in a work environment in order to spark innovation and creativity
  • Grow a team that trusts and respect each other leading to better products and service

So what…

  • Be open for critiques
  • Ask why five times in order to dig for the cause root of an opinion


THE MINDFUL MANAGER

Simon Bennett – Managing Principal for LASTing Benefits (AU/UK)

Simon’s Slide Deck

Notes from Simon’s talk:

  • Usually it doesn’t feel good when you screwed up
  • Being wrong is entirely different from realising that you are wrong
  • We are expected to be professional
  • Being professional should mean being complete human
  • Usually, the higher in an organisation you are, the less you have to defend yourself
  • Distinguish between being emotionally intelligent and being emotional
  • Ask yourself, do you hold beliefs or do you have knowledge?
  • Human beings are social animals, our communities can define, coerce and corrupt us or blame us
  • Share the burden
  • Safety is everyone’s responsibility
  • We experience others from the outside – but ourselves from the inside
  • From the outside the irrational use of power looks irresponsible and ugly
  • Leaders should use their power to shape new realities instead of distorting our view of the existing one

So what….

  • It is ok to screw up, as long as we realise we did
  • Screwing up helps us to learn
  • Encourage assumptions before knowledge


ELEGANT TOOLS: THE FOUR PRINCIPLES OF BUSINESS DESIGN

Margaret Gould Stewart – VP, Product Design at Facebook

Margaret’s Slide Deck

Notes from Margaret’s talk:

  • Advertising industry need to adapt to reality
  • We need to earn the right to be in people’s pocket
  • If Facebook wants users to continue trust, they need to continue deliver values
  • Design and act for people where they are
  • Understand device and internet connection people have access to
  • Giving advertising industry possibility to reach people in a relevant context

Four principles for designing quality business products

  1. Help people grow
  2. Balance efficiency and effectiveness
  3. Bring clarity to complexity
  4. Be accurate and predictable


TRANSFORMING A CITY: RE-DESIGNING DENVER

Kjell Persson – CEO at inUse

Kjell’s Slide Deck

Notes on Kjell’s talk:

  • inUse to help Denver to be a better city
  • Denver wants to be a more smarter and more sustainable city
  • Learning about citizens through data, observation and interviews
  • Bringing highest managers from different unity together once a month
  • Building shared understanding across different denver departments
  • Building measurable short term, mid term and long term goals


THE DEMOCRATIZATION OF TECHNOLOGY

Al Gore – Nobel Peace Prize winner, former US Vice President and Environmentalist

Notes from All Gore’s talk:

  • It was less technological advancement and user involvement we payed attention to, Al Gore impressed us mostly with his passion and engagement for environmental change
  • Guest in restaurant: If you dye your hair black, you’d look exactly like Al Gore, and you sound like him too
  • Science allows us to combine a spider with a sheep. (Spider sheep) – Interesting for biologist, more scary for normal human beings
  • We need to react on keeping smaller families in order to keep the population in a manageable amount
  • Al Gore is vegan
  • We all must make a change to environment now
  • Al Gore is positive towards winning the global warming issue
  • Do we have to change? – Yes!
  • Can we change? – Yes!
  • Will we change? – It is up to all of us
  • There is no plan B if we fail to prevent the climate change
  • We couldn’t rescue people from hurricane Katrina in New Orleans, we definitely cannot rescue world’s population from failing to prevent the climate change
Stockholm
Stockholm (Photo credit: Johan Magnusson)
From Business to Buttons - Golden Krishna
Golden Krishna (Photo credit: Johan Magnusson)
From Business to Buttons - Al Gore
Al Gore (Photo credit: Johan Magnusson)
Florian UX Design
Florian Fiechter, User Epxerience Designer (Photo credit: Johan Magnusson)
johan-magnusson-visual-designer
Johan Magnusson, Visual Designer (Photo: Florian)
QCon London venue

QCon London 2016

 

I’ll try to summarize three great days at QCon in London, not going into detail about all sessions that I attended but high-lighting some of the ones I really liked.
Most sessions were recorded and will be available for the public audience over time, make sure to check them out!

 

QCon offers a wide variety of tracks ranging from low level “Close to the metal” to more “soft” skills like “Optimizing You”.  There were also a track for the main sponsors of the conference. The wide variety of content and speakers made choosing what session to attend somewhat of a problem; I had made a schedule before traveling to the conference, and it broke down during the first presentation of the tracks before the first keynote…
Kicking of QCon was a great keynote “Unevenly Distributed” by Adrian Colyer. Adrian reads a paper a day, summarises it and publishes it on his blog “The Morning Paper”. This was a very inspiring and well presented keynote that raised my interest in reading papers and as Adrian said “5 reasons to love papers”:

  • Great thinking tools
  • Raise your expectations
  • Applied lessons
  •  Great conversation
  • Unevenly distributed

The only problem with reading more papers and learning more is that:

“The more I learn, the more I realize how much I don’t know.” – Einstein

After the keynote we listened to Gavin Stevenson, Engineering Lead at WilliamHill, who talked about WilliamHills betting engine and how they are transitioning from a large database centric solution to a micro service based architecture (this was a common theme during the conference). They were building a “production ready” betting engine in 2 week sprints, testing it with real production data. The most interesting take away was how important it is to really try to break your system. When the system fails, that’s when you learn. The old saying “If it ain’t broken, don’t fix it” just doesn’t apply anymore.

“If it ain’t broken, try harder!” – Gavin on testing

One of the few really non-software related talks was held by long distance runner Simon Wheatcroft.
When losing his sight the age of 17 due to a genetic degenerative eye condition, he began a journey of adapting tech to achive the impossible.
Through the aid of the Runkeeper application, he started running solo outdoors. Simon will be running his first solo race in May 2016; the Four Deserts Series Sahara Race in Namibia. There, he’ll use GPS coordinates and a mobile app to navigate across the 250 kilometer distance.
A very inspirational and humbling talk!

“You just have to tell yourself that pain doesn’t last forever”- Simon on running 250k

From non-technical to real in-depth low level Netty implementation details. Norman Maurer from Apple described how Apple is using Netty as a web service delivery platform for most of Apple services. Apple are running 550000+ Netty based services, handling 10s of Petabytes of data every day and millions of request per second.
Norman guided us in different aspects of the Netty framework and how the default JDK implemtations just aren’t good enough for this kind of load and how they’ve commited several improvements to the Netty open source code. Very interesting and down to the metal of how to hack the JDK and using JNI to get better performance with; for example memory allocation and SSL.

Martin Kleppmann held one of the best presentations of the whole conference where he talked about keeping data sources in sync, moving away from (distributed) transactions to streams. The content was not very in-depth, but Martin had deep knowledge of the subject, excellent slide and a lot of energy when presenting. This is a talk everyone should watch and learn from.

“Stupidly simple solutions are the best” – Martin Kleppman

Day two started with Linda Northrops keynote “Reflections on Software Architecture”. Linda looked at software architecture and how it’s importance and acceptance have changed over the last 20 years. To summarize: architecture is important, and it’s a way to manage technical debt.

Josh Evans from Netflix presented how Netflix have expanded there streaming services to almost the entire globe (Netflix#Everywhere).
Netflix have had some major outages and failures, both in their own software and the underlying cloud AWS-platform. Josh concludes that “Failure is inevitable” and that one really have to embrace the failure and not fail in the same way twice. This had lead Netflix to embrace a “Failure-driven architecture” approach when building their platform.
Netflix’s architecture is really impressive, although not applicable for most comapanies/services, so it’s always interesting to hear what they are doing to actually run the platform at that scale.
Josh presented Netflix four architecture pillars; data, caching, traffic and micro services, and how they use (among other techs) EVCache, Cassandra and DNS to keep their services up and running in case of total failures of an AWS datacenter/region. He also showed how they test failure in different regions and route trafic to another region to minimize customer impact.
If infrastructure and architecture at scale is of any interest, watch this talk when it comes online!

“Never fail in the same way twice” – Josh Evans

Mitchell Hashimoto (founder of Hashicorp) gave his talk “Observe, Enhance, Control: From VMs to Containers”. In his talk he takes us back to 2006 and the age of VMs and how the datacenters and the problems to solve are driving the architecture of the software for Monitoring, Configuration and Deployment. Jumping to 2016 and the age of containers, Mitchell argues that the “state-of-the-art” tools from the age of VMs are not really suited to handle the tasks anymore. Even though the tools are extremely good, they do solve a completely different problem. The content of the talk was nothing new, but it is really inspiring to listen to Mitchell talk.

Gil Tene talked about Hardware Transactional Memory. Really low-level stuff about CPU pipeline and cache optimization. HTM in the JVM is not new, Azul has been delivering both hardware and a customized JVM with JVM for 10 years. What’s interesting is that it will become mainstream now when Intel is shipping CPUs with support for HTM. Gil succeeded in a very educational way describe the complexity of HTM and how it can be implemented in for example the standard JVM. In the end Gil talked about how the developers must reason about locking and synchronization to make the most of HTM in their code.

One of my most anticipated talks during the week was Dan North‘s “Making a sandwich”. I hade very high expectations for this talk, and Dan managed to exceeded them (as usual). Dan talked about giving feedback, how feedback in itself is a system and why we should do it. Giving and receiving feedback (which is really just to say ‘Thank you’) is, in my opinion, one of the hardest skills to master and we should really practice a lot! Dan presented some useful techniques and tricks, but you should really watch this yourself!

Last day started with a very entertaining and inspiring keynote delivered by Kolton Andrus (Netflix) and Peter Alvaro (University of California). Peter and Kolton shared their expereience of a very successful collaboration between industry and academia. Peter had a “big idea”, Lineage-driven fault injection, and together with Kolton this evolved from a theoretical model into an automated failure testing system that leverages Netflix’s state-of-the-art fault injection and tracing infrastructures.

“My code is now actually running live on Netflix…” “…well, minus all of the println statements”

Vikki Read and Alex Wilson from Unruly described how they are using the extreme programming (XP) ideas to deliver high quality software and how it can be made to work in a very agile environment. Since agile and XP focus a lot on collaboration and knowledge sharing, they shared some problems that they’ve had with getting new employees up to speed and how growing teams make for example (too long) stand-ups being a problem.

The final session I attended before heading to the airport was Tammer Saleh at Pivotal talking about the mistakes people make when building a microservices architecture, i.e. Microservice anti-patterns. When are microservices appropriate as an alternative to the monolithic app? The problem with monolithic apps is not about the code, it’s about the teams! Large teams (or multiple teams) can’t work effectively in the same codebase.

Its not about code, its about teams

Its not about code, its about teams

Tammer stressed that “the most common mistake is to start with microservices”. Start monolithic and extract as needed, because microservices are complex and impose a constant tax to your development.
Tammer explores how to draw the lines between services. dealing with performance issues, testing and debugging techniques, managing a polyglot landscape and the explosion of platforms, managing failure and graceful degradation.

“Boring is beautiful” – Tammer Saleh

Most of the interesting sessions I attended during the week were about failure, and how to handle failures. Quotes like “Failure is inevitable”, “Failure is an opportunity to learn” and the importance of building an architecture that can manage failures were common topics. Migrating from a monolithic application to a more micro service oriented architecture were also popular.
Overall QCon London was a great conference, I will most likely try to get back next year! All tracks had great speakers, which is problematic since you have to choose between sessions – on the other hand most of the sessions are recorded so I know what I will be doing the coming weeks.

 

DESIGN FOR DELIGHT WITH THE KANO MODEL

Delightful, excellent, fantastic, awesome, great, incredible, satisfaction.

Which of the above differs from the others? — Why aiming for satisfaction, when we can build for delight?

Developed by Japanese economist, the Kano Model shows how to map a customer’s journey from frustration to delight – and keep them there. These are the main principles in the Kano model:

  1. Eliminate unused features to avoid experiences rotting.
  2. Look out for missed and failed expectations.
  3. Use joy, flow and meaning to define what pleases users and customers.
  4. Remember that today’s “OMG” is tomorrow’s “same old, same old.”
  5. Innovating our way to aspirational experiences, one small step at a time.

When following these 5 steps, we are on our way to a winning a strategy.

Source: “Understanding the Kano Model – A Tool for Sophisticated Designers,” by Jared Spool

Design as a value for growth

Remember your last bad experience you had with a service or product, and how that made you feel?

According to Nobel Prize-winning scientist Daniel Kahneman, we experience approximately 20,000 moments in a waking day. Each moment lasts a few seconds in which our brain records an experience. The quality of our days is determined by how our brains recognise and categorise our moments; either as positive, negative, or just neutral. Rarely do we remember neutral moments.

This fact is interesting for design. We need to ask ourselves how big of a human problem are we solving? How can we intentionally design for positive moments? Moments that is remembered as genuinely delightful will drastically affect how people feel about a brand, service or product.

People talk to others about moments as they remember it. Think about it as all delighted customers become a part of the marketing team. That’s why we strongly believe delighted customers can help us truly grow for the long-term.

That doesn’t mean that we should ask ourselves – can we build it? Because the answer is yes. Today’s technology allows us to build almost anything.

Therefore we should truly ask ourselves why, and what is the future that we want to build together.

Inspired and adopted from “HOW DESIGN BECAME THE NEW LANGUAGE OF BUSINESS,” – A documentary by Invision

Ship your Scala code often and easy with Docker

At SpeedLedger we have during the last year been working with gradually containerizing our services using Docker. At the moment we have 20 different services containerized that are running in production. During this period we have learned a lot and made a lot of mistakes. We are using a number of tools and developed some of our own. For example our deployment tool is built in-house and is responsible for starting and configuring our Docker containers in a standardized way to handle logging and service registration for our applications.

At the end of April it’s time for this years edition of the flatMap conference in Oslo. I (Marcus Lönnberg) will be hosting a talk there about how to deploy Scala applications using Docker. Some of the talk will be general about Docker and various tips from my journey with it at SpeedLedger. I will also talk a bit about how one can use sbt-docker, which I recently released version 1.0.0 of, to easily build Docker images using sbt. There will also be a few other tools that we will look into, for example the deployment tool we have developed at SpeedLedger.

SpeedLedger at the DataTjej conference

Earlier, in February, I participated in the DataTjej Conference held in Gothenburg. “DataTjej” roughly translates to “ComputerGirl” and DataTjej is a non profit organization aiming to increase women’s interest in computer science and IT, disregarding age or experience. Their long term goal is to increase the number of women in computer science and software development. Each year peaks in a conference held at different universities in Sweden. As of this year it was held at Chalmers University of Technology in cooperation with Gothenburg University here in Gothenburg. The conference aims to enhance the student-business relationship within computer science, IT and information systems. You can find out more about the organization and the conference here.

I have attended the conference several times as a student, but this was the first time representing my company. The very first time I came in contact with DataTjej was during my first year at Chalmers University of Technology. Some of my seniors organized the conference in Gothenburg 2009 and they encouraged me to go.

This year my co-worker, Marcus Lönnberg, and I attended the conference in order to promote SpeedLedger as an awesome employer and to recruit more women to SpeedLedger’s engineering department. We took part in three different activities during the conference; a presentation, a dinner and a fair.

So I had a few ideas when I put together the presentation. I knew we were going to have a booth at the fair, so I didn’t feel the need to promote SpeedLedger during the presentation, instead I wanted to give the audience something useful. Something code related. I also remembered my first time at DataTjej. We had just finished the second course in object oriented programming, which basically was Java with Swing. I hate Swing. During this period my mind was set on surviving the programming courses and then graduate to work with development processes and not touch code for the rest of my life.

But over time though, I came to realize that there are a different types of programming. Just because you don’t like one specific type, doesn’t necessarily mean that you dislike programming. You need to find the type of programming you like. As I see it, it’s always easier to learn something that you like and feel joy doing. For me it was datastructures and algorithms that changed everything.

So I let my presentation revolve around algorithms and how it awoke my interest for programming. Algorithms can be used to solve everyday problems and I gave the audience a demonstration of how two algorithms find the fastest path between two points, plus the theory behind it. To do this I hacked together a small program showing how the algorithm thinks in every step of the problem solving process.

A* solving a maze

A* solving a maze

I really wanted the presentation to have a technical aspect, rather than the typical business-connecting-with-students type. I hope the audience appreciated the technical connection and if anyone of them felt insecure I hope they were given a motivation to why coding can be fun. They have already chosen to study computer science, now we need to convince them to stay and enjoy the ride.

Back at the office I got the question: Why is this so important and why do we need girls in our teams?
This is a very relevant question. We actually don’t need women in our programming teams because they are just that, women that is. We need women in our team to create a heterogeneous group. Just as we need male nurses. There are numerous studies showing that a heterogeneous group is more efficient and drives each other forward at a much higher pace than a homogeneous group.

DataTjej’s most important task is to create an environment free from prejudice and to be a place where women, who otherwise might feel alone in a classroom full of dudes, can meet and share experiences.

So, to summarize: More diversity in software development! That is what we need to be stronger, better and faster as a team!

DockerCon Europe 2014

I just came back from DockerCon Amsterdam 2014 and here is a summary of the conference with some comments.
 
The theme of the conference was of course Docker. Just for fun I wrote down the most used terms on the conference just to give you a hint of what the sessions were about…
Orchestration, micro-services, cloud-native, distributed apps, scale and continuous delivery.
 
The common thread through almost all sessions were orchestration. Seems to me like the word orchestration means a whole lot of stuff while listening to the sessions. It involves creating Docker hosts, containers, clusters and monitoring just from the top of my head.
 

Docker and especially Solomon Hykes (original creator) and Ben Golub (CEO) spent some time explaining how the project is maintained, governed and how they will try to scale the project to keep up with all Pull Requests coming in. Some stats were presented and the numbers are quite astonishing.

Docker PR stats
It is neat how they handle organizational changes by doing PRs. The Open Design principle is also applied on organization changes by maintaining a file called MAINTAINERS in the repo. Check it out on Github.

Henk Kolk from ING presented how they have reorganized in order to increase speed of development. Developers are first class citizens.
IMG presentation

 Announcements

Docker Compose

An apparent theme of the conference was distributed apps. Meaning that you will run several containers cooperating to fulfill an applications goal. The way Docker has solved it with Docker Compose is very similar to how Fig works. A file describing what containers to bring up and links between them etc. I’m really looking forward to start utilizing the container composition capabilities on our systems.

containers:
web
:
build
: .
command
: python app.py
ports
:
- "5000:5000"
volumes
:
- .:/code
links
:
- redis
environment
:
- PYTHONUNBUFFERED=1
redis
:
image
: redis:latest
command
: redis-server --appendonly yes
And to have the containers up and running
% docker up

Docker Machine

In order to address some of the problems involved by getting Docker to run on a new host they announced Docker Machine. It comes with a new command ´machine´ that effectively creates a new Docker enabled host. There are a number of providers that you can use such as AWS, DigitalOcean, VirtualBox etc. When a new host has been created you can run Docker commands on your local machine that actually run on the newly created host. How cool is that?
machine create -d [infrastructure provider] [provider options] [machine name]
I can directly see the use of it in development. However, for production I don’t know yet.

Docker Swarm

Another announcement made on DockerCon Amsterdam 2014 was Dockers new cluster system. It enables us to control a cluster of Docker hosts that automatically puts a new container on a suitable host when running the usual ´docker run …´ command. You can set constraints on the run command for all properties that ´docker info´ gives you. So for example, you can state that OS must be Ubuntu.
% docker run -d -P -m 1g -e "constraint:operatingsystem=ubuntu" redis
 

Docker Hub

The team from Docker Hub announced a couple of new official images, Tomcat was one among them. They also announced Docker Hub Enterprise for on-premise use cases.

About CoreOS Rocket

The announcement of the CoreOS Rocket project was not commented and discussed officially on the sessions by the Docker team. Rocket is a new container engine project with a similar goal as Docker. It consists of two parts if I am correct; a container specification and an implementation. They spent quite some time talking about some of the things that CoreOS mentioned as flaws in Docker. I had a chat with a guy from the CoreOS team attending the conference. He made some good points and presented why they have started Rocket. The main reasons he mentioned:
  • The all-in-one binary for doing everything. Rocket is split up into multiple binaries more in the way the initial standard container manifesto Docker had. For example. There is probably no need for having the ability to run ´docker push´ or ´docker build´ on a production Docker host.
  • The design choice of having a daemon process for Docker. The design of Rocket is the reverse. Running containers should not depend on a running daemon. A start of a new container is a one-off job for Rocket which terminates after the container is up and running.
He also mentioned that Rocket probably will be somewhat interoperable with Docker.

Fluffy but important takeaways from DockerCon

DocerCon panel discussion

The conferences ended with a really good panel discussion. Here are some quotes I found inspiring.

Speed, especially in development process, is everything! – Adrian Cockcroft


Go deep, not broad. – Adrian Cockcroft


Do yourself a favor and present a new idea/technique in a representative way. A good idea deserves a nice presentation and good argumentation. Try to work with people upstream and downstream. – Solomon Hykes


If you know you have an excellent idea, believe in yourself. Don’t let negative opinions get in your way. – Solomon Hykes


All in all. DockerCon Amsterdam 2014 was a good conference. A lot more stuff can be found on Twitter.

Docker meetup startup resumé

The day after creating the Docker Göteborg Meetup group, around 30 members had joined. Now the are 65 Dockers in the group. The interest and buzz about Docker is intense for sure.
We started the group 21th of October this year and we decided to start off with a introduction meeting. It felt right to have a small group of people (20) and focusing on discussions instead of presentations. Here follows a brief summary of the meeting.

Short introduction of all participants

Everybody introduced themselves. The DRY principle was heavily applied since some people worked at the same company =)
 

Group introduction

Me and Marcus Lönnberg (the group organizers) are working at SpeedLedger and we started using Docker at SpeedLedger half a year ago. We started to use Docker for some of our internal services and single purpose production services. When we were in  the starting blocks of putting Docker in to use on our flagship product we felt the need to discuss Docker topics in a bigger forum. Hence the meetup group. We also have a co-organizer Katya from Docker who offered her help.
 

Leading presentation and discussion

We started by defining Docker together by writing down properties and characteristics. Most of them were positive but also some negatives were addressed. We moved on and started talking about how we are using Docker at SpeedLedger. We draw our production environment and a lot of question came up. These were some of the questions:
“How are you coping with docker host updates?”
“Where do you keep configuration? Inside or outside container image?”
“How do you communicating between containers?”
“How is the new production environment working out? Problems?”
“How do you deploy new images?”
etc.
 
A lot of good questions and interesting ideas. To summarize, the majority of the participants are not using Docker in production yet. Some are using it for other purposes such as test environments though.
 

What now?

We talked about practicalities around the next meetup. We will surely try to gather many more participants for the next meetup in order to involve and attract as many people as possible to the group. Seems like the next meetup would gain popularity by doing having more in-depth presentations. Lets see how that turns out!
 
Right now I am in Amsterdam and looking forward to attend the DockerCon Europe 2014 conference. If you want to see what comes out of it, follow me on Twitter and continue to follow this blog…
 
Take care folks!

Updating your Java server in runtime

It is sometimes convenient to have the ability to update an application in runtime. You might want to change the log level to track down some bug or maybe change the setting of a feature toggle. But it’s difficult to redeploy the application without disturbing your users. What to do? At SpeedLedger we decided to put the properties we want to change in runtime in a file on disk outside of the application. We then let our application watch the file for changes using Java’s java.nio.file.WatchService. So whenever a property in the watched file is changed the application is automatically called to update its state. We currently use it to add new endpoints in our traffic director.

Doing this first appeared to be really simple, the functionality is built in to Java since version 7. But doing it in a stable and controlled way required some thought, you cannot have your file watch service crash your application in production. So we created a small helper class to hide the complexity and decided to open source it. The code is available on GitHub.

To use it, simply add this dependency to your pom (or similar):

<dependency>
   <groupId>com.speedledger</groupId>
   <artifactId>filechangemonitor</artifactId>
   <version>1.1</version>
</dependency>

To create a new file watch you can do something like this when your application starts:

public class MyFileWatcher {

   final static String CONFIG_HOME = "/home/speedledger";
   final static String CONFIG_FILE = "file.json";

   public void init() {
      FileChangeMonitor monitor = new FileChangeMonitor(CONFIG_HOME, CONFIG_FILE, this::updateSettingsFromFile, 30);
      new Thread(monitor).start();
   }

   void updateSettingsFromFile(String directory, String file) throws IOException {
      ObjectMapper mapper = new ObjectMapper();
      String json = new String(Files.readAllBytes(Paths.get(CONFIG_HOME + File.separator + CONFIG_FILE)), "UTF-8");
      List<Endpoint> endpoints = mapper.readValue(json, mapper.getTypeFactory().constructCollectionType(List.class, Endpoint.class));

      // Update the endpoints
   }
}

In this example we watch a JSON file containing “endpoint” objects. Whenever someone writes to the file updateSettingsFromFile is called and the endpoints are read from the file and updated. If something goes really wrong, like the disk becomes unavailable or someone deletes the watched directory, the monitor waits for 30 seconds and then tries to restart the watch service.

It is a good idea to validate the data from the file before updating, if someone makes a mistake when editing the file we want to keep the current state and log an error message.

Note that if you run this on OS X you will notice a substantial (a few seconds) delay in the watch. This happens because Java on OS X doesn’t have a native implementation of WatchService. This shouldn’t be a problem as long as your don’t use OS X in production.

The file change monitor is available on GitHub and Maven Central, we hope you will find it useful!