Updated Modern Web Technologies Slides

on Monday, November 12, 2012
About 8 months ago I wrote about my lectures at JAMK. I got good feedback from this JavaScript, HTML 5 and CSS 3 set and was asked to do the same two lecture set again.

Before giving those lectures I revised and updated the slides. Here are the major changes I made to the slides.

  • JavaScript singleton pattern usage is now fixed to use Douglas Crockford's module pattern.
  • Section about web sockets is updated.
  • Some examples are added, such as the basic HTML 5 doctype example page.
  • JavaScript has now few slides about debugging which was placed just before introducing jQuery.

Tomorrow I will also give a lecture at JAMK about PHP application architecture and Zend Framework. I'll update those materials to SlideShare too, but first thing's first - here are the updated Modern Web Technologies slides.

Empowering people

on Sunday, April 29, 2012

On 27th of May I was privileged to attend second time for lecture by Wolfgang Steffens. This time he talked to us about lean, self organized teams and cost of delay.

Again there were a lot of good points and interesting topics in Wolfgang's lecture, but what probably hit me the most was the topic of victim versus empowered. Generally this applies to everything and can have a major impact of person's life. It boils down to this question: in case of some issue occurs, do you tend to be a victim or are you empowered and willing to do something about it?

Being victim is easy as you can blame external entities, there wasn't enough time, money or knowledge, I didn't have the power to make that decision, specifications were incomplete so I couldn't complete my work and so on. Although all of these can be true, empowered person would start to wonder what can I do about this. If the specifications are incomplete, maybe I could ask the other team to complete this by tomorrow. If we don't have enough money to implement all wanted features we will try to implement as many as we can as well as we can. Empowered person always thinks there is something I can do.

Being empowered is extremely important for productivity. But what can you do in order to empower the people around you, what does it require to be empowered? Few major things I wrote down from Wolfgang's session were ownership over what you do, being committed (I choose to ... because) versus being complied (I have to) and having meaning (clear vision, feeling of being part of something bigger).

Wolfgang said it well: "people want to be the best they can be". Of course there are exceptions, but generally this applies to everyone, I believe it is part of most human's nature to try to be the best they can be. At least I get satisfaction when I know I've done a good job. Give responsibility, let people make mistakes, let them learn and let them earn trust, let them be the best they can be and you will surely empower people in your organization.

Focus on the Product

One of the things I've picked up from application lifecycle management course that has had maybe the most influence in my daily work was when the following product lifecycle management principle was introduced to us.

"PLM puts the focus on the product"

Summarized this meant that in PLM both customer and product are important, but product comes before customer. In Humap Software I am constantly involved in service business and in service model this is not such a great principle as is. But I noticed this made me to think about the service paradigm.

Customer rarely has high level expertise about the field of technology in which we are creating the services them for. Because of that it is also unlikely that the customer can create exact specifications about what they want. Or actually customers can define what they want, but because we have the technological expertise, we can come up with more sophisticated solutions which customer might not even consider in the first place. What customers can very well do is to define what kind of problems they have. Our job is to analyze those problems and create as good solutions as we can.

I know that was bit provocative. Usually customers have good ideas and they have more or less good vision about what they want. This just got me thinking that we should always pursue towards the most excellent outcome and be brave enough to question the customers' views when we see a better solution.

Modern Web Technologies

on Thursday, March 15, 2012
As part of my studies I gave two lectures at JAMK about web technologies. I named this set as Modern Web Technologies and it consists of JavaScript, HTML5 and CSS3.

The slides aren't perfect and those topics are massive so naturally single slide set cannot contain everything there is to know about these three big ones. These slides are more like a summary of good techniques and practices I've encountered while doing web software development.

I noticed some flaws or inconsistencies after I published these slides, but didn't modify the slides any further. For example, there are two different examples of JavaScript singleton pattern. The first one is not as good as it relies upon placing anonymous function into variable whereas latter version is one recommended by Douglas Crockford (check out module pattern) and it uses object literal. I haven't used that version for that long, but it seems very logical and JSLint doesn't nag about it so I will use that version in the future.

Here goes, hope you like it :)

Another Look at Lean

on Sunday, February 26, 2012
On Saturday 11th of February I was attending to Application Lifecycle Management course at JAMK. There Heikki-Pekka Noronen was giving a lecture titled as "A Lean Perpective". The lecture gave me new ideas about lean.

I haven't investigated lean principles very deeply, but before the lecture I had quite solid idea about what lean is roughly about. Especially the "eliminate waste" was a familiar concept to me, but after the lecture I saw it in somewhat new light. I had become skeptic towards my previous impression of waste.

In HP's slides it was said that "waste is everything that does not add value" which is in my opinion a great way to summarize the definition. What really hit me were the things listed after this definition.

  • Partially done work (such as defects, untested code, unfinished or unused documentation..)
  • Slow internal communication
  • Unclear requirements (they truly are partially done, are they not?)
  • Queues, in all of their form

I'm unlikely the only software developer in the world who has been in such situation where stakeholders are asking what would be the fastest and cheapest way to implement some feature. I have thought that it's lean to think about some "duck tape quick-fix" in order to do something quickly as possible. But then again if the feature would be done properly with sustainable architecture, would it add value? First it was easy to think about maintainability, stability and other technical aspects and why it would always add value to go for proper architecture. Instead of always going for sophisticated solution, another kind of approach has had positive effects on our projects.

Value of proper architecture versus quickly implemented duck tape fix has usually a strong correlation between how temporary the outcome of the project is. This isn't always the case, but in our software development we have noticed this quite often being true.

If some web based application or environment is used only for short duration, it has been perfectly fine to patch, for example, some ugly user interface issues with bubble gum. It doesn't matter if the underlying core will eventually change and thus our quick-fix would then break because it's dependent of that core functionality - the environment is already deactive and has no usage. This is also the case if the outcome of the project is used only once and has no value for other projects. The shorter lifespan the outcome has, more wild and unstable implementations can be introduced without having to worry about long term support and stability.

If we are creating long term environments, products or applications, decision to patch something quickly would lead to unstable environment, more errors, more maintenance and unhappy customers when things fall apart. Also if we would create something that will probably be used in other projects too, it makes sense to invest more time to create proper architecture so that the next time the same outcome is used, it will work without hiccups.

I guess the most important message in the lecture for me was that it isn't necessarily against lean principles to test code thoroughly, write extensive documentation and design proper architectures. It's just the matter of what creates value and what does not.

This blog post was written from software developer's technical point of view. If you want to read about lean from more communicational and social point of view I recommend you to take a look at this blog post by Esko Kilpi.

Project Management Studies 18th and 19th of November

on Friday, November 25, 2011
It has been over a month since the last time, but last weekend we got back together with our class to learn and discuss about project management. On Saturday we checked out each other's Master's Thesis presentations, but in this blog post I'm going to focus on Friday when we were privileged to be lectured by Wolfgang Steffens, a lean and agile coach working currently at Nokia Siemens Networks.

We were told beforehand that Wolfgang has a provocative way of giving speeches and he said it also himself that some of the things might not be as black and white as he says, but he wanted to shake us up a little bit, take us away from the routines we are used to and give us some food for thought.

Well, Wolfgang's approach to agile methods was very direct :) Solid opinions like "in Scrum there are no project managers", "middle management is not needed" and "never do multitasking" are few examples that I was rolling around in my head during and after the lecture. Mission accomplished! Though I don't completely agree about everything he said, it lead me to do a lot of thinking afterwards.

I'm not even going to try to summarize everything we went through, but I'll write about the things that I felt had the most impact on me. First topic is about estimates and how I totally agree with Wolfgang on this one.

By definition estimates are wrong

This is something I learned the hard way in our own product development. When I started at Humap almost six years ago, agile was making its way into our product development. Back then I considered estimations being one of the hardest things. Initially we tried out two week sprints and for each sprint we (our development team) planned quite much all Monday. Out of 10 working days we were using 1 day, 10% of our working time, just to plan our sprint. Though sometimes planning didn't take all day, try sitting in a meeting for 4-6 hours planning complex schemes and then try to concentrate on a demanding programming or architectural design issue, it just doesn't work very well. Later on we tried solving our issues with wrong medication and we moved to 4 week sprints, then planning really took the whole day.

So what made our planning so slow? The fact that we tried to achieve something impossible, we tried to split our sprint into fine grained hour level tasks. What makes it even harder is that our work at Humap is very innovative and somewhat unstable in a positive way. We are flexible and one of our strengths is that we can adapt to changes very quickly. That system we were using back then was not supporting this flexibility very well. We realized quite quickly that estimates didn't correlate very well with reality, that's why they are called estimates. We started letting go of precise hour based estimations and started first using granularity of days, then the modified Fibonacci sequence of days (the series was something like 0, 1, 2, 3, 5, 8, 13, 20, 30, 50 or 100 days). This was already good, but little did we know how much there still was to improve.

After estimating days we moved to story points, but we colored our units a bit. I can't remember the exact units we had, but they were something like mouse, rabbit, horse, whale and planet. At this point we had come a long way from those wearing all day long meetings where we tried to foresee how many hours a single task would take though we were talking about such details of certain projects that we hadn't even properly started planning. Nobody really knew whether it takes 2 or 4 hours to modify commenting AJAX based show/hide functionality, but we knew that it was a rabbit compared to a planet size feature of creating a complete layout editor for our system. After few sprints we started seeing some patterns how many mouses, rabbits or whales we can nail in a single sprint.

Things started to roll quite well, but the variety in our burn down success got us thinking what is still going wrong in our processes. This leads to the second point in the lecture that I want to highlight as a title.

Stop doing iterations

We noticed that during two weeks, our sprint plans might change from top to bottom. Someone nails a sweet deal and its priority jumps to the top, we notice a nasty bug that takes quite a bit of time to fix, customer support tends to consume us in spikes or we just come up with such a great idea that we want to do some prototyping as soon as possible even if it would mean leaving some earlier planned tasks out of the sprint. Don't get me wrong, changes were almost always good, but our system just wasn't supporting that very well. Looking at an unfinished burn down chart at the end of the sprint and figuring out "what went wrong" didn't feel very motivating, but we just didn't realize that we were almost always doing the right things that supported our business strategies.

I can't remember the exact day when we decided to stop using Scrum and therefore stopped using iterations, but it sure has been working for us ever since. By that time we had never heard of Kanban, actually I heard it for the first time just a couple months ago. Nevertheless, our current system is much closer to Kanban than it is to Scrum, but I want to be careful when using those names as we are not using any particular method in our procedures. GTD has certainly affected our ways of working, but I haven't read the book so my knowledge relies on the discussions I've had with my colleagues. Some might consider this as Scrumbut, a term that also popped up during the lecture, but nevertheless we have a system that is working quite well for us. I wrote about our project management in my earlier post so I'm not going to repeat myself here, instead I'm moving on to the second last point I want to highlight from the lecture.

Traditional project management triangle is insufficient

Traditional project management triangle consist of time, scope and budget. In this traditional graph, one side of the triangle cannot change without affecting the others. If your budget cannot change but you need to get the job done faster, you need to take something away from the scope of the project, if you don't cut the scope then time cannot change and so on.

But then we encounter real world. Customer cannot put more money to the project, all the features in the scope of the project are vital and deadline cannot slide because the customer needs results by the time they are having some important organizational meeting, development days etc. On top of all this we know that this project is important to our business and would work as a good reference in our marketing so we cannot just say no to the project. Having more resources is also a no can do, because we are dealing with such complex core level development issues that it would take months to lead a new developer into being able to work with this project.

This has lead into refined version of the triangle and quality/performance has been added as a constraint. This allows some "magic" to be done and make the impossible happen. We take shortcuts, quickly copy-paste code from one place to another without designing proper architecture, write code that is hard to test, leave out unit tests completely and do not think of all the consequences of our actions. Now this is not completely unacceptable, we just need to be aware that this leads into design debt that needs to be paid later on. If you just go on and on taking more and more design debt, it eventually leads into completely messed up source code that is impossible to maintain or modify.

We face these situations in Humap too, but we try to take as little shortcuts as possible and replace them with innovations. In the triangle it means not to cut from quality, but increase performance. Increasing performance doesn't mean typing your source code twice as fast ending up with sore fingers and brain totaled from trying to think triple fast "because we are in such a rush". No, trying to hurry up usually leads to making mistakes and slowing up the process even more. Sometimes that little extra pressure might just lead into inventing some brilliant ideas how to solve issues by intelligently utilizing something existing, new ways of working, new technologies and some innovations in such way to the goal can be reached faster without quality loss or sometimes even with better quality than what was originally planned. Nobody's perfect, you can't always come up with pearls that solve all your problems, but it sure feels good when you get it right :)

This post is getting long enough already so it's time to check out the last one.

Never do multitasking

There was a very good example about multitasking from project management point of view. Imagine you have one week sprints and you need to complete four tasks, each estimated to take one week. In the beginning of first sprint you start to work on all those tasks and they all are progressing steadily at same pace. After three weeks, you have completed 75% of all four tasks, but what have you actually finished? Nothing.

What if you had started doing just one task and move on to doing next task once the on going task is finished? You would have finished three of the four tasks. Consider this from risk management point of view. It's not that hard to see that doing one thing at the time is the way to go.

Another, more technical example. When I first heard of Serial ATA, I though that how could it be faster than Paraller ATA? Same ideology applies. While PATA can move multiple bits side by side, bits arrive to the other end of the cable in bit different times so they have to be synchronized with separate logic. Sending data in serial reduces overhead and data transfer rate can be much higher so it becomes faster than "multitasking".

As said, this was not all we went through during the lecture and Wolfgang had good examples about Lean methods. But now it's time to close this one up and leave some space for future blogging too ;)

Project Management Studies 14th and 15th of October

on Sunday, October 16, 2011
Last Friday two lecturers, Mark Halmagiu and Heikki-Pekka Noronen, talked to us about distributed software development and team management and evolution.

Mark used MeeGo development as an example how things can go wrong in distributed software development. MeeGo was an excellent example as development teams are span all over the world in Finland, France, UK, Eastern Europe, Far East and USA. Mark said that they had only little or no overlap at all in working hours between some teams across the world. This creates a real challenge in planning work distribution. If workload is poorly split between teams who are working in completely different timezones, the other team might have to wait a complete day before receiving any information from the other team. These kind of dependencies can really stall development. Therefore it's important to split work into such packages which development is not (at least not much) bind to each other.

Another challenge was cultural differences. Cultural differences might sound obvious, but the Mark's examples were eye opening. For example, in China people didn't listen to you if you didn't have a fancy title. It seemed like they were listening, but afterwards people asked for confirmation from someone else who had more impressive title. There were also major differences in self-initiativeness between different cultures. Mark said that sometimes it required really specific instructions to get a team in Eastern Europe to start doing some tests, but once they got started, they produced results like clockwork. So even if it's clear that teams around the world have cultural differences, these examples reminded me that the problems that may arise can be quite surprising.

In Mark's presentation there were also good examples that should be considered in all projects, not just in distributed software projects. Good goals are essential to any project. They should be clearly described, achievable with reasonable time frame, lead the project to right direction, not change too often and goals should never conflict with each other. It's easy to see how project can go wrong if one or more of these goal principles fail.

Good communication is essential in order to project to be able to succeed. In the presentation, Mark told us about good examples how not to handle communication. The development teams were communicating quite well with each other, but there was some political interference in development. Far too often messages came somewhere higher from the hierarchy and teams had to change their priorities and start doing something else without any reasonable explanation why priorities changed. This effectively removes the feel of control and ownership from developers. Even in such cases where all the information cannot be told, instead of silence it would be better to deliver a message like "we are changing things for such reasons we cannot tell you, but we assure you this is important".

I think good communication is the key to success in many other areas too, not just in project management. How and what information we exchange (or decide not to exchange) with each other is extremely important for shared knowledge and understanding. Not exchanging information can also be important. Generating information waste can be so overwhelming that all working hours are used to read emails that have no real meaning for you.

I once saw a good graph describing the most usual problem in software development communication. Generally sales people are skilled communicators in customer's language whereas developers are experts in tech talk, but both parties tend to face issues when communicating in the opposite end of the graph. There's probably no need for sales to speak fluent tech and developers don't probably have to be as fluent customer communicators as sales people. The crucial point in this graph is the gap between customer and tech talk. A good software project needs someone being able to communicate fluently in this gap. Exchanging information between developers and sales people in such way that both parties get shared understanding is essential for the outcome of the project.


Heikki-Pekka's presentation was about team management and evolution. We discussed about self organizing teams, high performance teams, building and evolution of teams and how to manage different kinds of teams.

Later on after the presentation I realized how good situation we have at Humap. Our development team members have not changed in couple years, we all know each other well and each of us has shared understanding of each developers skills. This way we have been able to constantly polish our cooperation and at the moment our team works at extremely good performance. It was very good to hear about different kinds of problems in team building, evolution and management. It made me appreciate my current situation at Humap even more than I already did.