<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jayway Team Blog &#187; Björn Granvik</title>
	<atom:link href="http://blog.jayway.com/author/bjorngranvik/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jayway.com</link>
	<description>Sharing Experience</description>
	<lastBuildDate>Sat, 11 Feb 2012 10:33:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>My fridge &amp; the phantom work jam</title>
		<link>http://blog.jayway.com/2011/04/17/my-fridge-the-phantom-work-jam/</link>
		<comments>http://blog.jayway.com/2011/04/17/my-fridge-the-phantom-work-jam/#comments</comments>
		<pubDate>Sun, 17 Apr 2011 15:08:25 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Agile]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=8082</guid>
		<description><![CDATA[Have you ever had too much to do? Did you react by working even harder – like the rest of us? At first, the situation seems to improve and everything looks just fine. However, even though "harder" might lead to "better", it still is not the same as "good". Time passes and you keep putting [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Have you ever had too much to do? Did you react by working even harder – like the rest of us? At first, the situation seems to improve and everything looks just fine. However, even though "harder" might lead to "better", it still is not the same as "good". Time passes and you keep putting in the extra effort and then some. By now you are quite busy, but not actually getting anything done. Congrats - you have met the phantom work jam.</strong></p>
<p>I was in my car talking over a really bad connection. At the far end was Steve Denning, a renowned author of several books on management. He wanted to know how we work at Jayway. During a long interview, interrupted by countless GSM holes, we kept talking. Among other things I told him the story of our old house – a school from 1928. It is a good example of a renovation that had gone wild and how we managed to get on track again. It ended up in Steve's new book which came out last fall, <strong>"The Leader's Guide to Radical Management"</strong> (http://amzn.to/radicalmanagement). It is a great book and a funny thing happened while I was reading it: I took notes in the margin. That has not happened in the last twenty years, basically back in university. Denning's book really made me think. I just had to scribble and make comments.</p>
<p>Shortly after the interview I got the transcript – boy was that a sorry sight. Not only did the bad connection play tricks, my half-finished sentences and fuzzy thoughts made the text almost incomprehensible. Therefore, I was thoroughly impressed when I got the following text from Steve Denning's latest book. It was spot on.</p>
<blockquote><p>"The Leader's Guide to Radical Management"<br />
CHAPTER 7— PRINCIPLE #4: DELIVERING VALUE TO CLIENTS IN EACH ITERATION<br />
…<br />
Björn Granvik lives in Malmö, a small town in the southern tip of Sweden. At work, he is the chief technology officer of a software firm called Jayway. In the evenings and weekends, he works on renovating the house that he occupies with his wife and three children. The house used to be a school and so it is rather large, but doesn't have many rooms. Transforming it into a livable house requires a massive effort.</p>
<p>When he started the renovations, his wife would stand in the corner in one of the rooms, and she would say, "Björn, here's something over here that doesn't work."</p>
<p>And Granvik would run over and start trying to fix it.</p>
<p>But then he would hear her from somewhere else in the house and she would shout, "Here's something even worse." And he would leave whatever he was doing and go over and try to fix that. So he kept running between projects in the house. There was so much to do that he was constantly jumping from one project to the other, hardly ever finishing anything. So one day he said to his wife, "This doesn't work. We can't go on like this."</p>
<p>Granvik had encountered a phantom work jam! Too many inputs had jammed the system.</p>
<p>Given Granvik's experience with the practices of radical management and the simplicity of the situation, the solution was fairly obvious.</p>
<p>"I know that there are a bunch of things to do," he told his wife. "But we need to do them in some kind of order."</p>
<p>So he cleared a space on the door of the fridge, and he said that they would have three available slots. There would be one slot for all the big things that needed to be done—things that take a lot of time like fixing the leak in the roof—and two slots for small items, something that would take less than an hour to do, for which he could squeeze in an hour here or there. That might be like: "Hang ten photographs on the wall."</p>
<p>"Anything we put on these slots," he said, "we can talk about. And we can get them going. I will concentrate on these three things. If something else comes up, we can put it on the side of the fridge, but I will not look at it. There's no point in talking to me about this, because although I will listen, I won't do anything about it. I will only work on the top priority items in the three slots on the fridge."</p>
<p>So he and his wife began working this way. And it went really well. He was happy because his wife stopped bugging him about things that weren't on the priority list. And she was happy because things that she really wanted done were actually getting done.</p>
<p>The interesting thing was: it turned out that his client—his wife—was equally happy if he hung ten photos, or if he fixed the leak in the roof. Fixing the leak in the roof is a big expensive project that takes considerable time and effort. But the amount of joy that comes from it was no bigger than a tiny task like hanging the ten photos.</p>
<p>By focusing on what his client really wanted at that particular moment, he found that increasing client delight didn't necessarily cost more. A small thing delivered sooner could delight more than a big thing delivered later.</p>
<p>In order to become more productive, and generate more delight for his wife, Granvik had to restrict the flow of work. To go faster, he had to go slower.</p></blockquote>
<p>Steve Denning goes on to talk about "phantom jam work" and the havoc it plays on our efforts. Doing too much at the same time invariably leads to less being accomplished. It certainly does not feel like it. Putting in the hours makes us count the effort and not the actual value we create. Just like tunnel vision, we are blinded by speed and forget that we are not reaching any goals.</p>
<p>Whenever you are stuck in <em>effort blindness</em>, stop and think.<br />
- Am I really doing the right thing, the right way – is this value? Is it fun?<br />
In my case I needed something that would focus our effort. Something to slow us down and get stuff done, really done. "The big and small list" was my solution of getting a good flow through my org… err, family.</p>
<p><strong>Works for big people</strong><br />
So how did we do it?</p>
<p><a href="http://blog.jayway.com/wordpress/wp-content/uploads/2011/04/fridgeboard.jpg" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2011/04/fridgeboard-294x300.jpg" alt="" title="The Fridgeboard" width="294" height="300" class="alignright size-medium wp-image-8088" /></a> <em><strong>Figure 1:</strong> Our fridge and the simple task board with a "small" (lilla) and "big" (STORA) list. Big stuff is "lift roof and fix it", small might be "hang photo on wall". Second from the left at top is the "build room" note (Bygga rum).</em></p>
<p>The first important step was to reduce the number of things going on at the same time. The lists are each limited to "3 notes". This meant nothing could be introduced or worked on before there was a vacant slot in one of the lists. In order for this to work we have to prioritize the work. It is of no use if I go off on a fixing spree if it is not what both my wife and me needs or wishes.</p>
<p>Separating the small stuff into their own lists, or "swim lanes", was the next step. As a parent I usually can squeeze in the 1 hour tasks somewhere into my calendar. Getting those smaller tasks done is an easy way to turn around a bad situation. It was baby-sized steps, as compared to the big list stuff, but at least it was a step forward. And remember, sometimes even small values are big wins.</p>
<p><strong>Works for tweens</strong><br />
As Steve Denning writes in his book, we actually started to land projects, small and big. My wife was happy again, but my oldest son Max started to talk about the rooms I had promised him and his younger brother Felix. Since we live in an old school we have rather large rooms and no wardrobes. By Swedish standards we are apparently defined as "cramped living" (Swedish "trångbodd"). The statistics have us as living in a "small" house since our three sons shared a single bedroom. This is no small feat in the 360 m2 (3 800 square feet) that make up our ex-school.</p>
<p>My oldest son, Max, kept asking me (in a nice way) about his room. Being 12 years old, I could understand him. He wanted a room of his own. I recognized the earlier situation with my wife and yet again our fridge came to our rescue. This time around I made some more slots available - I needed to size up to include my sons. I explained why the "leak in roof" note came before "Build Max &amp; Felix Room". This worked really fine because it was now understandable and transparent to Max why he would have to wait. Moreover, our kids needed to be better included in the decision process. Roughly once per week we visit the fridge and check the progress. If there are any vacant slots open we discuss what needs to be done - both fun and important stuff get their chance. And of course, we constantly check to see if we have the right prio - something might have come up that needs to "push through" the other tasks.</p>
<p>In the spur of the moment I took a pen and asked Max for commitment.<br />
- You could help, I explained. What do you want to do?<br />
He took the pen and to my surprise he signed off on one of the jobs <em>before</em> his own room note. Despite being young he understood that helping me with some other task would make us as a team work faster on accomplishing his goal. Sure enough, when I came home one afternoon I found a big hole in the garden for one of our roses that my wife wanted to plant. It might not sound all that much, but digging through those layers of ice age clay leaves even a grown man panting.</p>
<p><strong>Works for small people</strong><br />
My second son, Felix (8) saw and understood the fridge. One morning I came down and saw that one empty slot now had a new note scribbled with a child's hand: "go bovling". A couple of weeks later we did just that.</p>
<p>In order to get a sense of flow with the big tasks I introduced a "scratch". Every man-day, roughly, was a scratch on a big note. Otherwise, they risked going stale - staying on the fridge "forever". It also meant we got a counter and a "reward". The quotes are needed, since a scratch is such a small reward, but none the less it works.</p>
<p>At this time we had introduced red notes. They were important high prio tasks that needed to be executed quickly, basically to push ahead of the ordinary yellow notes. This risked blocking out the fun stuff. Where is the R &amp; R, if we just kept doing good? My solution was to introduce the green notes. It is a just such a natural color to indicate fun <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://blog.jayway.com/wordpress/wp-content/uploads/2011/04/rooms_before.jpg" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2011/04/rooms_before-300x225.jpg" alt="" title="The rooms, before." width="300" height="225" class="alignleft size-medium wp-image-8090" /></a> <em><strong>Figure 2:</strong> The "before" image of the rooms.</em></p>
<p>Close to a year later, me and my children have finally built the rooms for Max and Felix.</p>
<p>All it took was: some 2,5 metric tons of building material, 97 man days of work (yes, I counted) and the ability to focus – all visible on our fridge.</p>
<p>Sometimes I even managed to find some work that was easy, but still important, for Bix (4). We were working on the roof/floor above the rooms and Bix had the important task of bending the floor boards. Boy, was he proud. All it took was some creativity in dividing the work.</p>
<p>Having a simple, visible system with understandable rules promotes transparency and understanding. As a parent this translates into less nagging.</p>
<h2>Final thoughts</h2>
<p>If you find yourself working really hard and being quite busy, without any real results to show – except for sweat – then stop and think. It will feel contradictory, but you need to limit your work so you can focus on getting something worthwhile done. Add some transparency and a shared prioritization and you get commitment. It doesn't really matter if the people around you are colleagues or kids. We are all pretty much wired the same way.</p>
<p>Having learnt all of this, I'm I immune? Or will I repeat my mistakes and try to do too much at the same time? Most likely the latter.</p>
<p>The experience might make me quicker seeing a solution, but it's still hard to convince myself - and others - that we need to do less in order to do more.</p>
<p><a href="http://blog.jayway.com/wordpress/wp-content/uploads/2011/04/rooms_after.jpg" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2011/04/rooms_after-300x225.jpg" alt="" title="The rooms, after." width="300" height="225" class="alignright size-medium wp-image-8089" /></a> <em><strong>Figure 3:</strong> Max and Felix rooms.</em></p>
<p>Am I proud of what we accomplished? You bet.</p>
<p>//Björn<br />
<em>Originally published at <a href="http://bjorngranvik.wordpress.com/">Björn Granvik's Blog - Tumblelight</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2011/04/17/my-fridge-the-phantom-work-jam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Øredev 2009 Panel Video &amp; Books</title>
		<link>http://blog.jayway.com/2009/11/09/%c3%b8redev-2009-panel-books/</link>
		<comments>http://blog.jayway.com/2009/11/09/%c3%b8redev-2009-panel-books/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 14:39:24 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[oredev]]></category>
		<category><![CDATA[panel]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=2218</guid>
		<description><![CDATA[The panel of Øredev 2009 proved to be a great group of people ready to take the panel format further. As the moderator I wanted something other than your daddy's discussion - something edgy or just plain edutainment. I certainly got what I asked The folks on the stage were: James Bach - Author of [...]]]></description>
			<content:encoded><![CDATA[<p>The panel of Øredev 2009 proved to be a great group of people ready to take the panel format further.<br />
As the moderator I wanted something other than your daddy's discussion - something edgy or just plain edutainment.<br />
I certainly got what I asked <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The folks on the stage were:<br />
James Bach - Author of Lessons Learned in Software Testing<br />
Ola Bini - Thoughtworker, core developer of JRuby and creator of Ioke<br />
Stu Halloway - Author of Programming Clojure<br />
Scott Hanselman - Principal Programmer at MS and general spreader of good info for developers<br />
Oren Eini (Ayende Rahien) - NHibernate Profiler, NHibernate, Castle, Rhino Mocks<br />
Chris Hughes - AT&T iPhone Hacker</p>
<p>Scott Hanselman did a great job of setting up a live feed together with the Øredev people.<br />
Here's a good page from Scott, <a href="http://bit.ly/3C2UIi">http://bit.ly/3C2UIi</a>, on the event with video and everything.</p>
<p>Oh, and the non-computer related books that the panel recommended:<br />
* The Gathering Storm (12th book of The Wheel Of Time) - Neil Jordan<br />
* Anathem - Neal Stephenson  +1<br />
* Gödel Escher Bach - Douglas Hofstadter<br />
* Replay - Ken Grimwood<br />
* Flow - Mihaly Csikszentmihaly</p>
<p>Thanks guys!<br />
/Björn</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2009/11/09/%c3%b8redev-2009-panel-books/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PMI, Scrum &amp; Shock Therapy</title>
		<link>http://blog.jayway.com/2009/05/19/pmi-scrum-shock-therapy/</link>
		<comments>http://blog.jayway.com/2009/05/19/pmi-scrum-shock-therapy/#comments</comments>
		<pubDate>Tue, 19 May 2009 13:17:33 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[amsterdam]]></category>
		<category><![CDATA[pmi]]></category>
		<category><![CDATA[slides]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=1754</guid>
		<description><![CDATA[I've just uploaded the slides from the PMI conference in Amsterdam here. Some 150 people turned up for this morning show, a Pecha Kucha with group discussions, about various aspects on Scrum. After some initial wrestling with the audio we got under way. We were four to speak - Juliet Andrew, Gabrielle Benefield, Petri Haapio [...]]]></description>
			<content:encoded><![CDATA[<p>I've just uploaded the slides from the PMI conference in Amsterdam <a href="http://www.slideshare.net/bjorngranvik/pmi-emea-shock-therapy-bjrn-granvik"><strong>here</strong></a>.<br />
Some 150 people turned up for this morning show, a Pecha Kucha with group discussions, about various aspects on Scrum. After some initial wrestling with the audio we got under way. We were four to speak - Juliet Andrew, Gabrielle Benefield, Petri Haapio and me. If you haven't heard of this format it is a sort of PowerPoint in "burst mode", i.e. 20 slides and each will flip over automatically after 20 seconds.<br />
Difficult, but I would like to do it more <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>After that we broke up into separate groups for discussion. There were many good questions and I wished I've had more time on hand. Anyway, thanks to the those who attended and for your great feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2009/05/19/pmi-scrum-shock-therapy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrum Shock Therapy, Part 2</title>
		<link>http://blog.jayway.com/2008/12/17/scrum-shock-therapy-part-2/</link>
		<comments>http://blog.jayway.com/2008/12/17/scrum-shock-therapy-part-2/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 13:45:27 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[jayview]]></category>
		<category><![CDATA[scrum]]></category>
		<category><![CDATA[shock]]></category>
		<category><![CDATA[therapy]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=610</guid>
		<description><![CDATA[So we have a recipy for the team. But this is just not enough. We need to make sure that management and everyone else is on board. The second part of the Scrum Shock Therapy presents a bootstrapping recipe on how you can do this. The first part of this series can be found here: [...]]]></description>
			<content:encoded><![CDATA[<p><strong>So we have a recipy for the team. But this is just not enough. We need to make sure that management and everyone else is on board. The second part of the Scrum Shock Therapy presents a bootstrapping recipe on how you can do this.</strong></p>
<p>The first part of this series can be found here: <a href="http://blog.jayway.com/2008/11/17/scrum-shock-therapy-part-1">Scrum Shock Therapy, Part 1</a>.</p>
<h2>The Management Recipe</h2>
<p>The checklist above is only a part of what it takes to go through Shock Therapy. I often find myself at new companies and need to work with a bigger picture than focusing solely on the team. As is evident from the polls and surveys above, we need to address management as well. The word shock is perhaps more applicable here. If it has learnt anything from the past it is that you have to "drive" development - delegate, follow up, check, adjust, hand out, recheck...<br />
Telling them to trust the very group that has not delivered before is asking for a leap of faith. </p>
<p>Setting up a recipe for this group is tricky. You have to adapt to management style, the corporate culture and so forth and the things you ask for are softer. These can be very hard indeed to change! In plain English; The management has to take some more real tough decisions for a Scrum to work efficiently. If you need to kill a document standard or process step then do so! If this is impossible (for now) then go for "barely enough".</p>
<p><strong>The Management</strong></p>
<ul>
<li>Attend the Scrum training session with everyone else</li>
<li>Hands off during 3 iterations</li>
<li>Attend:</li>
<ul>
<li>Some Daily Scrums - be quiet</li>
<li>All Sprint Reviews</li>
</ul>
<li>Start to work on waste - now!</li>
<li>Management by walking, asking and listening, i.e. practice facilitation.</li>
<li>Make the first step easy for the team</li>
<li>...</li>
</ul>
<p>When learning something new you have to do it several times just to make sure you are not totally confused. I have found that three times a charm. Try your best to get management to abide by this "rule". After the three iterations everyone has better picture to judge the value of the effort and Scrum.<br />
Eliminating waste is vital on any type of project or endeavor. In a transition it makes even more sense, you have to make space to learn something new.</p>
<p>Finally, management has to ask the people that will perform these miracles what they need to do just this. Have they? Have you?</p>
<p><strong>The Management Exit</strong></p>
<ul>
<li>One successful team</li>
<li>Removed impediments and studied results</li>
<li>Change in perception at "ground level"</li>
<li>A good <strong>agile</strong> reason to change the rule</li>
</ul>
<p>Having one successful team is sort of self-evident. This takes patience when the ride is anything but smooth. Being a part of this process is important. Management will have the best ability to change ambition level, removing impediments etc. Get cracking and be that good example.</p>
<p>If there is a change at ground level on how they perceive management, then you're probably on to something.</p>
<p>Is this recipe the final version - probably not? Your mileage will vary, adapt to your management.</p>
<h3>The Organization Recipe</h3>
<p>Many of our customers are just starting out doing Scrum. Therefore we typically come into play as an external effect. It is important for us to understand how the agile effort has started and its nature within our client's organization. We can basically divide this efforts into to two major types - "bottom-up" and "top-down". The typical traits for a bottom-up style is one where the programmers et al have decided to go agile. The management might be aware of this and even letting it run. Then again this might be a stealth and an under the cover job.</p>
<p>I have found the bottom-up approach to be the most common case. Programmers usually like to work in an agile way. In these type of setups my work usually revolves around questions like "How do we fit this to a waterfall context?" etcetera. This can be tough work, but I find it to be the more easy of the two - the people who do the day to day grinding are already on board.</p>
<p>The top-down effort of introducing Scrum comes with its own set of problems. Any methodology or decision that involves change tend to meet resistance from the organization. We need both experience and sideways effort to the transition.</p>
<p><strong>The Top-Down Scrum Organization</strong></p>
<ul>
<li>Get a Scrum Sensei</li>
<li>Inject a Agile Senior Programmer into the teams</li>
<li>Make sure there is organizational transparency</li>
</ul>
<p>The Scrum Sensei is an experienced Scrum Master who's been there before. Much in agile and Scrum is common sense, but there is no need in making the simple mistakes. With a battle-trained mentor the whole organization get a sounding board (Swedish: bollplank) helping out to implement Scrum. This part is important to the Shock Therapy where he or she will be the contract owner enforcing the startup and approving exit. In some sense this person could act as a "bad cop" in a good-bad ScrumMaster setup. </p>
<p>Or in the words of Nanny McPhee - a children's movie where a nanny answers the seven ne'er-do-well children on how long she will stay:<br />
- When you need me, but do not want me, then I will stay. When you want me, but do not need me, then I have to go.<br />
The Scrum Sensei needs to work in similar way to bootstrap the team and management.</p>
<p>A top-down effort always risks resistance from the organization. My experience tells me that a side way force is needed for translation on the factory floor. Moreover, such a person has the experience on a technical level to do the hands on tools and practices that is a vital part of any agile projects. A seasoned programmer with agile experience knows what works and how to translate the management vision into bits and bytes.</p>
<p>"Self-evident" sometimes reads "evident to myself and no one else". If we want to affect the organization we also have to make sure that practices, experiences and results are easy to come by. Walking down a corridor should yield interesting information about ongoing projects. If there is a pilot project doing Scrum then visibility is high on the wish list. Not only does it mean commitment for the Scrum team, but also a pull factor for other teams to get on board. Organizational transparency comes in many flavors. Apply liberally!</p>
<h2>Summing it up</h2>
<p>There is no denying that projects have problems getting started with Scrum. But more often than not I believe that we can do something about it. Why not try some nice Shock Therapy?<br />
It might be the sweetest hard deal around!</p>
<p>/Björn Granvik, Jayway</p>
<p>MySpace Therapy:<br />
</a href="http://jeffsutherland.com/scrum/2008/09/shock-therapy-bootstrapping.html"> http://jeffsutherland.com/scrum/2008/09/shock-therapy-bootstrapping.html </a></p>
<p>Scrum Poll on Nokia Test Practice:<br />
</a href="http://tinyurl.com/68vapj">http://tinyurl.com/68vapj</a></p>
<p>VersionOne Report: State of Agile Development Survey:<br />
</a href="http://www.versionone.com/agilesurvey/">http://www.versionone.com/agilesurvey/</a></p>
<p>Situational Leadership:<br />
</a href="http://en.wikipedia.org/wiki/Situational_leadership_theory">http://en.wikipedia.org/wiki/Situational_leadership_theory</a></p>
<p>Nanny McPhee:<br />
</a href="http://www.imdb.com/title/tt0396752/">http://www.imdb.com/title/tt0396752/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2008/12/17/scrum-shock-therapy-part-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Questions from the Øredev session Shock Therapy</title>
		<link>http://blog.jayway.com/2008/12/09/questions-from-the-%c3%b8redev-session-shock-therapy/</link>
		<comments>http://blog.jayway.com/2008/12/09/questions-from-the-%c3%b8redev-session-shock-therapy/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 13:43:46 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[oredev]]></category>
		<category><![CDATA[scrum]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=545</guid>
		<description><![CDATA[The Øredev conference was a real success. I'm involved in it ,so that probably makes me biased:-). However, I struggled for the first 10 minutes of my presentation to get my slides on the projector. A tip for you Mac users out there: Plug the adapter (dmi to vga) into the VGA cable first! I [...]]]></description>
			<content:encoded><![CDATA[<p>The Øredev conference was a real success. I'm involved in it ,so that probably makes me biased:-). However, I struggled for the first 10 minutes of my presentation to get my slides on the projector. A tip for you Mac users out there: Plug the adapter (dmi to vga) into the VGA cable first! I plugged a lone adapter into the computer first. It couldn't find any projector and gladly gave up on me...  Sigh. After that bumpy start I got going, but had to keep a brisk pace. Sorry, for that to those of you who where listening.</p>
<p>I asked for comments/questions. As it turns out I got mostly questions on Scrum in general and not so much on my topic - how to bootstrap Scrum. I'm not sure what to make of this.<br />
Anyway, here are my takes on those questions. I hope they're of some value.</p>
<blockquote><p>
Dear Björn,</p>
<p>How do you motivate a team to produce more without paying more for IT (salaries)?<br />
Hourly salary seems retarded for agile teams.<br />
Thanks!
</p></blockquote>
<p>Dear anonymous,</p>
<p>I'll first look at the non-monetary part, mostly Scrum, and later on salaries and bonuses.</p>
<p><strong>Self organizing</strong><br />
In many organizations people enjoy very limited control over their own situation. Being able to self organize is important. We humans just tend to like this.</p>
<p><strong>Pick your tasks and choose your implementation</strong><br />
Again, if I can use my competence and decide (as far as possible) on how to implement a certain goal, I will enjoy my work the more. Using this approach I've even been able to rehire people to very problematic situations. Very powerful.</p>
<p><strong>Deliver</strong><br />
When I ask programmers what they are most proud of, I usually hear words like "idea, made by me, real users". It might not be the hardest and certainly not the biggest project they worked on. They used their competence, created something and delivered! In Scrum you get the delivery feeling at every sprint. If you break it down into activities no bigger than a day, then you will get that nice "flow" and people will be able to say "I did" every morning.</p>
<p><strong>Good Colleagues</strong><br />
I've found that Agile makes sense if for no other reason than you can keep and hire the good people. SmartFriends(tm) is a great way to work!</p>
<p>I'm sure I could pick more facets of Scrum and Agile on how to motivate your team. But let's move on to the Money. This part of my answer doesn't have so much to do with Scrum or Agile, but rather my beliefs. So you have to be the judge here - what would work for you and your situation?</p>
<p><strong>Powerful, way too powerful</strong><br />
Salaries, bonuses etc affect you - all the way to the bank and your holiday and...<br />
In short: Once you start using money in different forms as your primary means of rewards, you will get a powerful ally in driving your people. Perhaps to powerful. </p>
<p>Take bonuses at a consultancy firm (a real example from life). You have all the good intentions so you set up a bonus system so that everyone will benefit if they have a client. More hours with customers, bigger bonus. Easy. This way you can lower your costs in bad times. Nice, if you're just counting beans. </p>
<p>Effect: No one wants to come in do monthly meetings if it's going to cost them money.<br />
Counter effect: Introduce a threshold so that there is room for a bonus even though it doesn't mean 100% with customer.</p>
<p>Another effect: You just removed your ability to make strategic decisions like "put someone on the big corporate account" that pays less, but means more hours. Who wants to loose money working for that customer if they have to take a cut money-wise?<br />
Counter effect: You introduce another "rule" specifying that a lower price per hour will not affect their bonus.</p>
<p>Yet another effect: Holidays suddenly never cross the monthly boundaries. That would put your people below the threshold for the bonus on two separate salaries.<br />
Counter effect: ...haven't got the faintest here what they did here.</p>
<p>I hope my example makes sense in your situation. My point is that money matters. When used to drive people you will get side-effects.<br />
For me this is not good enough. I don't want just to persuade people's wallets - I want their hearts and minds. It has to be fun and engaging.</p>
<p><strong>Here's my short take:</strong> First make sure you have decent salaries etc. When this in place, aim for those things that make our working day worth while. Set interesting goals, get good colleagues, the right work to do, empower people and so on.</p>
<blockquote><p>
How to ensure creativity and quality in Scrum?<br />
/Fredrik
</p></blockquote>
<p>Hi Fredrik,<br />
I liked the way you wrote this on a green note (meaning "good" when voting at the conference). Thanks <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Creativity</strong><br />
I believe there doesn't have to be a contradiction between setting a goal and using proper frames (time, resources etc) vs. creativity - at least as long as we have the right to work to our own judgement within these constraints. I often find that this last part is missing. You get all the obligations, but no mandate.</p>
<p>In Scrum, one part of the creativity is built right into the process: Understanding the different goals. In the product backlog you should enter business value. This way the team has direct contact with the user's intentions and can suggest alternative solutions that might be better, i.e. be creative.</p>
<p><strong>Quality</strong><br />
If we're talking IT, I would like to use automatic testing, continuous integration and so on to ensure consistent quality. Add to this an annoying email whenever something breaks and you have a good start <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Moreover, the tight feedback loop using sprint reviews and such should pick up on issues like usability etc. Basically make sure you have a product owner that can spend time on the project.</p>
<p>Also make sure that your "definition of done" reflects your quality goals. It has to be very clear what "done" means within your organisation.</p>
<blockquote><p>
Hur gör man för att bryta ner gigantiska projekt över flera plattformar i lagom stora bitar för att köra Scrum?<br />
[How to break down into gigantic projects over several platforms into decent chunks so that Scrum can be used.]<br />
Sven Nilsson, SAAB
</p></blockquote>
<p>Hi Sven,</p>
<p>Your question seems to revolve around two hefty issues: Breaking down the project into several teams that are likely to depend on each others and breaking down the actual work to fit into a sprint. Perhaps "platform" has a special meaning within your organization and how you work. I would have to know a bit more to answer you on that point.</p>
<p><strong>Teams and dependencies</strong><br />
This is tough on several levels. First let's do the pure Scrum answer - Scrum of Scrums. This basically means that we organize our teams so that one person from each group "steps up" and forms a team that work across several teams. Dependencies etc can be resolved in this group, set up an encompassing backlog and work much in the same fashion as a Scrum Team. Jeff Sutherland, co-fonder of Scrum, has run this set up on 500+ persons. I would love to work on such an outfit.</p>
<p>However, and this is a big however, this is a major change for most companies. The ones I've met (medium size and up) just aren't geared to handle such an approach right now. The number of issues and obstacles with such a transformation can be huge. If you find yourself in such a situation then I suggest you adapt piece by piece and continuously strive to be ever more agile. This is hard work and will mean small improvements upon each other, but maybe no hyper productive state.</p>
<p>This is where I chicken out and suggest you should get someone with experience. Every company is different and needs their set of actions.<br />
Hell, buy me lunch and maybe I can point you in a good direction <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Breaking up the work into chunks</strong><br />
This takes creativity. </p>
<p>First: Try to slice the work so that you will touch base with most layers/parts. This way we can have a better understanding of what it means to deliver the whole system. Therefore make the slice as thin as you can while at the same time deliver something "valuable". This might mean you need to mock other components (code that isolates different components with dummy answers). This can be very beneficial since it becomes some sort of contract with other teams.</p>
<p>If the chunk still is to big then you might have to resort to cutting up the chunk into parts by level in your architecture. This of course has the drawback that we don't know what it will take to implement the parts we didn't do. Business value might be less, but we might be able to "prove" that we're on the right track. What is "proof" to your product owner?<br />
If you can, stay away of doing tasks in your product backlog. In worst case people will be task-driven: "I've changed the registry, can I go home now?"</p>
<blockquote><p>
If we want to/have to promise the customer a delivery date. How can we do that when we don't analyse the whole project?<br />
We are focusing on the next sprint?</p>
<p>How can we tell management how many resources we will need in one month?<br />
/Patrik Johansson, Ericsson
</p></blockquote>
<p>Hi Patrik,</p>
<p>Several questions and perhaps the most common ones. Let's dive into them.</p>
<p><strong>Analyze the whole project?</strong><br />
Why we can't analyze the whole project? Because, this is blatant lie for anything bigger than a trivial project. I apologize for my frankness, but I've never seen a project with a single version of the Gantt schema, a single time plan, with a known set of resources...<br />
They always change. Always.</p>
<p>If you and your management can't agree that things change then you might have to go dualistic - outwards project manager old style, inwards ScrumMaster. It's not easy, but in time you will gain some victories, err deliveries, and you can move the agile thinking further up. Hard work, but it's better than doing waterfall all the way.</p>
<p>Your question is still valid. How do we commit on delivery if most things might change? The customer still needs to plan an ad campaign.<br />
One trick is to reinterpret the "commit to delivery date" into agile terms. Get a stable backlog and learn the team's velocities. This way you can commit to the same "distance". Things will change, but (as always) it's down to making things fit into the available time.</p>
<p>For this work we need some iterations under our belt to know our velocity and hashing out what the product backlog should contain. Therefore, mix the project plan's you have do at the start with some "real work" like coding. Inspect and adapt. After while I think you will able to commit to management.</p>
<p><strong>Focus on the next sprint?</strong><br />
You shouldn't just focus on the next sprint. The closest work (sprint) is fine grained and the most well understood. The further away (further down on the product backlog), the more coarse grained should the user stories be. No point in being specific, when they're far into the future.</p>
<p><strong>Resources?</strong><br />
Which resources can you get? Go for full time members. Make sure can keep them. Look at the product backlog and calculate what you can get done with the people (velocity etc) that you got. The important part is to couple the resources with the goals. All too often your resources get slashed and the goal knocked into orbit - and not on the same day.<br />
Get them in synch so that a change in one of them will affect the other.</p>
<p>I hope this helped.</p>
<p>Regards,<br />
Björn</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2008/12/09/questions-from-the-%c3%b8redev-session-shock-therapy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where to listen to Scrum Shock Therapy</title>
		<link>http://blog.jayway.com/2008/11/18/where-to-listen-to-scrum-shock-therapy/</link>
		<comments>http://blog.jayway.com/2008/11/18/where-to-listen-to-scrum-shock-therapy/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 10:12:29 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[oredev]]></category>
		<category><![CDATA[scrum]]></category>
		<category><![CDATA[shock]]></category>
		<category><![CDATA[therapy]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=429</guid>
		<description><![CDATA[Just a quick note on Scrum Shock Therapy. I will give a session on this subject at the Øredev conference on Tuesday at around 10 o'clock. If you can make it I will talk about the whole shebang - recipes for the team, management and organisation. I'd love to get your feedback. See you in [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick note on Scrum Shock Therapy. I will give a session on this subject at the <a href="http://www.oredev.org">Øredev</a> conference on Tuesday at around 10 o'clock. If you can make it I will talk about  the whole shebang - recipes for the team, management and organisation.</p>
<p>I'd love to get your feedback. See you in the halls and the Way Group booth.<br />
Or you can just give your comments about the session here on this blog.<div id="attachment_434" class="wp-caption alignright" style="width: 140px"><a href="https://www.oredev.org"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2008/11/oredev2008.jpg" alt="Developer&#039;s conference in Malmö, Sweden" title="Øredev 2008" width="130" height="180" class="size-full wp-image-434" /></a><p class="wp-caption-text">Developer's conference in Malmö, Sweden</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2008/11/18/where-to-listen-to-scrum-shock-therapy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrum Shock Therapy, Part 1</title>
		<link>http://blog.jayway.com/2008/11/17/scrum-shock-therapy-part-1/</link>
		<comments>http://blog.jayway.com/2008/11/17/scrum-shock-therapy-part-1/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 17:05:31 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[jayview]]></category>
		<category><![CDATA[scrum]]></category>
		<category><![CDATA[shock]]></category>
		<category><![CDATA[therapy]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=417</guid>
		<description><![CDATA[Scrum consists of a straightforward process, half a bunch of roles and a few artifacts. Sounds simple enough, but according to an online poll 3 out of 4 projects that call themselves Scrum fail to implement even the simplest parts. To make matters worse, most of the mistakes are on the simple side of things. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Scrum consists of a straightforward process, half a bunch of roles and a few artifacts. Sounds simple enough, but according to an online <a href="http://www.scrum-breakfast.com/2008/06/quick-poll-results-is-any-body-really.html">poll</a> 3 out of 4 projects that call themselves Scrum fail to implement even the simplest parts. To make matters worse, most of the mistakes are on the simple side of things. Is there a way to bootstrap the project? Might there be a sweet hard deal that we can use?</strong></p>
<p>Scrum and Agile development has started to rock the world within IT in various ways. A simple, but powerful process that seems to deliver. Developers and customer alike are happy. What's not to like about it? Still, there are signs of problems. Projects that claim to use Scrum do not reap the benefits, management looses patience with this new method and team members struggle to adapt an agile approach to their everyday work life. Why is this? And more importantly, what can we do about it?</p>
<p><strong>The Therapy:</strong> Get off to a good start by directing the team with a careful set of good practices and a strict agreement that leaves little or no choice. The team can then, over a couple of iterations, gradually take command themselves.</p>
<h2>Easy, but still so hard</h2>
<p>Why then is Scrum so hard? Well, first of all it is fail-fast, meaning that any problems will be quickly apparent. There are no artifacts or process steps to hide behind. This is never easy. To this list we can add even more pitfalls that are just plain hard to deal with whatever method we are using.</p>
<p>Still, it does not explain why there seems to be so many simple mistakes with such a simple framework. One of the best examples is the failure to keep backlog that is prioritized and up to date.<br />
<i>- We're doing Scrum, but we're too busy to work on the product backlog!</i></p>
<p>That one has always short-circuited my brain. What can be more important than to decide what is important? This pattern of falling short and missing basic parts of Scrum even has a name - "ScrumButt". If you look in the sentence above you see why.</p>
<p>Nokia created a test to make sure the projects are "Scrum enough". These plain questions form a lithmus test that can be used to analyze most agile projects.</p>
<p><strong>The Nokia Test</strong><br />
Iterative Development?</p>
<ul>
<li>Iterations - time boxed, less than 4 weeks.</li>
<li>Software features - tested and working at the end of each iteration.</li>
<li>Iteration must start before specification is complete.</li>
</ul>
<p>Scrum (in Nokia's opinion)?</p>
<ul>
<li>You know who the product owner is.</li>
<li>There is a product backlog prioritized by business value.</li>
<li>The product backlog has estimates created by the team.</li>
<li>The team generates burndown charts and knows their velocity.</li>
<li>No project managers (or anyone else) disrupting the work of the team.</li>
</ul>
<p>The questions seem to be on the easy side. It turns out that this might not be the case.<br />
One online poll, <a href="http://www.scrum-breakfast.com/2008/06/quick-poll-results-is-any-body-really.html">Nokia Test by Practice </a>, about the ability to achieve the Nokia Test level gave some interesting answers. In essence, only one out of four give themselves a full mark. Half of the groups report that management interferes, not directs but interferes.</p>
<p>Informal queries by Jeff Sutherland among his audiences around the world give an even worse number - something like 1 out of 10 pass the Nokia Test. Hand on your heart: Does your project live up to this?</p>
<p>A survey by <a href="http://www.versionone.com/agilesurvey/">VersionOne</a> tries to dig deeper into the current state of the Agile affairs. Under the headline "Top barriers to adopting Agile" we read the top four answers:</p>
<ol>
<li>Organisational culture, 45%</li>
<li>General resistance to change, 44%</li>
<li>Lack of people with experience, 42%</li>
<li>Lack of management support, 32%</li>
</ol>
<p>Take a long look at these barriers. No technical stuff. Nothing specific to agile. Just people.</p>
<h3> What do we know? </h3>
<p>Learn to walk before you run. Greek Proverb.</p>
<p>We could be a bit closer to today's reality than these ancient words of wisdom. The <a href="http://en.wikipedia.org/wiki/Situational_leadership_theory">Situational Leadership</a> offers an approach to management that has been around since the 60's. These theories say that there is no single leadership style that is optimal for all people in every situation. Situational leadership talks about four different leadership styles that need to be matched with the follower. Basically, when leading someone who is passionate, but have no experience, you should adapt and give clear directives. As the follower evolves his or her ability to execute, so should the leader using less directives and more encouragement. In the end the follower is able to perform with only a stated goal and little or no directives.</p>
<p>If this holds true for people, could it not be true for teams as well?</p>
<h2>The Shock</h2>
<p>So we have problems making Scrum and Agile efforts to run. What is the conclusion? Could it be that we adapt our leadership style to the group? Make them walk before running?</p>
<p>This is counter intuitive, at least to me: To go agile, we first need to control. We should not let our teams and managements start off without some kind of directives. Give them a good deal, some practices that make Scrum work. Otherwise, we are just repeating the same old mistakes as the next-door agile project. Set up an agreement with both management and team so that they can evolve and experience Scrum for real. Just reading a book (or article) or listening to some good speaker alone does not help you out there in real life. You have to experience it. </p>
<p>Shocking as it may feel: We need to exercise some control over the Scrum project start so that it can evolve and self organize! But, and this is a big but, this has to be done with compassion and genuine involvement, otherwise we stand the risk of destroying what we are trying to build.</p>
<h2>The Therapy</h2>
<p>So what can we do? We need to work the team, management and often the whole organization.</p>
<h3>The Team Recipe</h3>
<p>So how do we get started? Here's a recipe for the team as it used at <a href="http://jeffsutherland.com/scrum/2008/09/shock-therapy-bootstrapping.html">MySpace</a>:<br />
<strong>The Team</strong></p>
<ul>
<li>Scrum training session for everyone</li>
<li>Sprint 1 week long</li>
<li>Definition of Done:</li>
<ul>
<li>Feature Complete</li>
<li>Code Complete</li>
<li>No known defects</li>
<li>Approved by the Product Owner</li>
<li>Production Ready</li>
</ul>
<li>Story Points</li>
<li>Physical Task Board</li>
<li>All-in-one Sprint planning meeting.</li>
<li>No Multi-tasking, work in priority order.</li>
</ul>
<p>Scott Downey, Agile Coach at MySpace</p>
<p>The idea of this recipe is to set a good practice right from the start. Instead of debating the details on how to work in an agile way, we can focus on getting going.</p>
<p>Everyone has to have a common Scrum understanding to start from, hence the training session. One-week iteration sounds really tight for any reasonably sized projects. The thinking behind this is to get as quick iterations as possible - the faster that the group gets going the better. Short sprints help in this aspect. We learn faster with more turnarounds.<br />
This in turn affects the meetings where MySpace has elected to combine them all, except the morning meeting, into one single occasion. The time is just too short to in a weekly sprint.</p>
<p>MySpace's definition of done is a good and basic list. However, as a programmer I lack for instance continuous integration, pair programming and so on. These are not mandatory to have, but I see them as enablers for Scrum and supporting your agile initiative.</p>
<p>The next two on the list - Story Points and Physical Task Board - are really effective. If you haven't tried them out then please do. They work. Finally we have something that is a no-brainer to me even though I have great problems avoiding it, "No Multi-tasking, work in priority order". Context-switching is expensive, just avoid it. The priorities are in order, you just have to follow them. In the Reference box you find a link to Scott Downey's description of their therapy. </p>
<p>When the team matures, they should evolve and handle things more on their own and no longer need directives. At MySpace the group can "prove" that they are ready for prime time by reaching the following goals.</p>
<p><strong>The Team Exit</strong></p>
<ul>
<li>Hyper-Productive (>240%)</li>
<li>Three successful Sprints consecutively</li>
<li>Good business reason to change the rule</li>
</ul>
<h2>The Result?</h2>
<p>So how does this work out? At MySpace all groups achieved exit. All, but one, improved after that. One group even achieved a whopping 1,650%  improvement after just four months (16 sprints). At Jayway one of the teams used such a bootstrap technique, primarily on the technical side, and reached 800% after 3 months.</p>
<p>The second part of this blog can be found here: <a href="http://blog.jayway.com/2008/12/17/scrum-shock-therapy-part-2">Scrum Shock Therapy, Part 2</a> where I will look into how to handle management and organisation with some recipes.</p>
<p>/Björn Granvik, Jayway</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2008/11/17/scrum-shock-therapy-part-1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Interview: Dr Jeff Sutherland, father of Scrum</title>
		<link>http://blog.jayway.com/2008/02/02/interview-dr-jeff-sutherland-father-of-scrum/</link>
		<comments>http://blog.jayway.com/2008/02/02/interview-dr-jeff-sutherland-father-of-scrum/#comments</comments>
		<pubDate>Sat, 02 Feb 2008 15:15:43 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[jayview]]></category>
		<category><![CDATA[scrum]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=3784</guid>
		<description><![CDATA[Jeff Sutherland has piercing blue eyes - friendly, but probing - and a frequent smile. They are a bit like a distant uncle who wants to know what you have made of yourself. After several CTO assignments at various companies, Jeff Sutherland found himself at Easel corporation where he created Scrum together with Ken Schwaber. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Jeff Sutherland has piercing blue eyes - friendly, but probing - and a frequent smile. They are a bit like a distant uncle who wants to know what you have made of yourself.</strong></p>
<p>After several CTO assignments at various companies, Jeff Sutherland found himself at Easel corporation where he created Scrum together with Ken Schwaber. Ken later presented this methodology at the OOPSLA conference in 1995.</p>
<p>A dozen years later I find myself in search for a good spot where I can concentrate on my interview. Jeff and I sit down at a café at the Øredev conference. My computer has been acting up going blue screen on me twice that day. Time is short and I wonder if it's an omen.</p>
<p><div id="attachment_3786" class="wp-caption alignnone" style="width: 214px"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2009/12/Skärmavbild-2009-12-11-kl.-16.14.02.png" alt="Photo of Dr Jeff Sutherland." title="Jeff Sutherland" width="204" height="332" class="size-full wp-image-3786" /><p class="wp-caption-text">Photo of Dr Jeff Sutherland.</p></div><br />
<i>Dr Jeff Sutherland. Photo by Mai Skou Nielsen, Trifork</i></p>
<p><strong>Q: I hope I've done my reading. As far as I understand you've been a fighter pilot in Vietnam, an assistant professor in math and medicine and the CTO at nine different high tech companies. Moreover, you travel the world to teach Scrum. Does it take a resumé like this to invent a process like Scrum?</strong></p>
<p>The key part of what makes Scrum work is "complex adaptive systems" and you need some understanding of this. Also you need to understand systems theory and how to optimise a system as a whole. </p>
<p>You do not have to be smart, but you have to thoughtful.</p>
<p><strong>Q: How did Scrum start and from where does it draw its heritage?</strong><br />
Scrum and Lean both derive from complex adaptive system theory. Constraint theory is a narrow subset of complex adaptive systems thinking. Lean implementations of these theories have been created at companies like Toyota and Honda. Honda was actually more aggressive at this in the nineties, but then Toyota was more successful in the market. They also were more formalised and better known. </p>
<p><strong>Q: Why does it work?</strong><br />
The first reason for all of this is important - super intelligent performance out of ordinary developers. In order to do that we need we need to set up a simple framework so that people will self-organize. The second reason is that there is no central point of control. The manager needs to back off. That is critical.</p>
<p>The third principle is behaviour that emerges in the team based on self-organizing in order to get max production.</p>
<p>The fourth reason is that the production is far higher for the group than any single developer. Groups actually achieve more than any lone bright developer.</p>
<p>These are the basic principles of a complex adaptive system. Any organization is a complex adaptive system. Software production is an organizational phenomenon. It is an empirical process that must absorb significant change in requirements, technologies, priorities, and people.</p>
<p><strong>Q: You talk about managers, why is it important for them to back off?</strong><br />
A company needs to stop sub-optimizing locally. That is the thing that Toyota figured out, largely due to the efforts of Edward Deming and other Americans who trained the Japanese in WWII industry processes. Most managers just care about local performance. Managers have to work as a team to look across the whole spectrum. It is difficult for them. They're paid and given bonuses on a single level, not the company as a whole. </p>
<p>For instance, look at the General Motors manufacturing plant in Fremont, California. GM shut down that plant 1982 due to several problems, among them quality. Two years later it reopened as a joint venture between Toyota and GM. Toyota needed a plant in the US in order to avoid import restrictions. In an agreement with the labour union they offered reemployment to the former employees.</p>
<p>Two years later the NUMMI plant was producing over 200 000 cars per year and was twice as productive as the typical GM plant. The thinking they applied is the same as "lean production" where Toyota makes the team responsible to figure out the best way to solve the problems and achieve the goals. NUMMI later won several awards for quality.</p>
<p>"Your battery is running low", declares my machine solemnly. Jeff and I make a run for a power outlet and find one on the second floor. My power chord is too short so we stack up real close to the wall. It will do. More than that actually, it feels like we really are working together on this interview.</p>
<p><strong>Q: Some parts of Scrum are frightening, like making the group totally responsible for an implementation. How come people in management buy this?</strong></p>
<p>The best answer I can give you, is the discussion I had with my first CEO when I introduced the ideas of Scrum. We had a critical project with a hard deadline. It was a question of survival.</p>
<p>The CEO expected a Gantt chart [ed: a timeline specifying activities and their dependencies, showing the progress of a project].</p>
<ul>
<li> How many Gantt charts have you received that actually worked? I asked the CEO.
<li> None, was the short answer. In my 25 years I haven't received a single one that was correct. I asked him if a 100% failure rate wouldn't make it foolish of me to give him one.
<li> What are you going to give me, he asked?
<li> Working software. Decide for your self to if we're on track. In return I made him promise not to disrupt the team before the deadline. At this point he started to worry.
</ul>
<p>I said that at the end of the month he could change everything he wanted, but not during that month.</p>
<ul>
<li> If you do this, you will get significant more code with better quality.
<li> I can live with that. Let's do it.
</ul>
<p>Scrum was born in that minute. </p>
<p>It's a basic contract between management and team. The team delivers twice as much stuff with twice as good quality (minimum) and the management supports the team in their efforts to self-organize and self-manage. If either party does not fulfil this contract then it will fail. </p>
<p><strong>Q: Doesn't Scrum fail?</strong></p>
<p>Scrum itself is a set of rules that causes self-organization if certain things are put in place. It's like the rules of soccer. Does soccer fail?<br />
With Scrum you will fail significantly less.</p>
<p>The Standish Group \[ed: a company that specializes in IT studies\] reports that project in the range 3-6 million dollars with a traditional project plan fail more than 85% of the time. Scrum does a lot better than that!</p>
<p><strong>Q: What are your top three tips on using Scrum?</strong></p>
<p>Bas Vodde was the Lead trainer for Scum Master at Nokia Siemens Networks. He has the shortest set of questions to identify a dysfunctional Scrum team.</p>
<p>You must have iterations of 30 days or less with working software tested at system level at end of each iteration. You need an agile specification, just enough for programmers to start for that iteration.</p>
<p>You need a product owner who orders activities by business value of the feature set. The team estimates the product backlog.</p>
<p>And lastly, the team needs to monitor progress with a burn down chart and know its velocity at the end of the iteration.</p>
<p><strong>Q: Finally, what is in the future for Scrum?</strong></p>
<p>Hyper productivity on an economic and marketing level where companies consistently out perform their competitors.  Scrum is a disruptive technology that will alter markets. Companies doing Scrum well will grow rapidly in both size and profitability and dominate their waterfall competitors. There is already a brain drain going on where the better developers are fleeing from waterfall companies to Agile companies. This will hasten the demise of traditional projects.</p>
<p><strong>Q: Is this a shameless plug?</strong><br />
Oh no, we have achieved it in several departments at my company \[PatientKeeper\]. It is doable. Other companies I work with right here in Scandinavia are doing it as well.</p>
<p>Going away from this fast paced interview, I still have the feeling that I could have done more with my life. If Jeff can do it, then so can I    ...I hope</p>
<p><em>Originally published in <a href="http://jayway.se/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2008/02/02/interview-dr-jeff-sutherland-father-of-scrum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interview: Martin Fowler &#8211; man in the know</title>
		<link>http://blog.jayway.com/2007/02/02/interview-martin-fowler-man-in-the-know/</link>
		<comments>http://blog.jayway.com/2007/02/02/interview-martin-fowler-man-in-the-know/#comments</comments>
		<pubDate>Fri, 02 Feb 2007 16:09:33 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[jayview]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=3853</guid>
		<description><![CDATA[I am in search of an empty room at the Øredev conference. Normally this is an easy task, but I've got Martin Fowler on my tail. My mind is still blank. What on earth can I ask him that he hasn't already written himself? Finally, an empty room, well almost. Another speaker, Erik Dörnenburg, is [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I am in search of an empty room at the Øredev conference. Normally this is an easy task, but I've got Martin Fowler on my tail. My mind is still blank. What on earth can I ask him that he hasn't already written himself?</strong></p>
<p>Finally, an empty room, well almost. Another speaker, Erik Dörnenburg, is sitting half way into his screen and mutters.<br />
- What's up, I ask.<br />
- I've updated my machine and my demo doesn't work. I've got 45 minutes until the presentation.<br />
We sat down next to him. Do not disturb a developer while he's coding...</p>
<p>So I got a man who has coined phrases like Dependency Injection and POJO in front of me. What next? Martin is easily recognizable both in accent and appearance, a frequent and brilliant speaker.<br />
He has an excellent web site, www.martinfowler.com, which contains loads about his work. Articles and references abound. That is when it suddenly hits me - who is he as a programmer and person?</p>
<p><strong>Q: When was the last time you coded?</strong><br />
Well, I do code my own website. But it's been a while since I had any paying customers. I've been pairing quite recently though. A real delivery? That was some time ago. I'm actually afraid to lose contact with code, but I have smart people around me.</p>
<p><strong>Q: But what makes you tick?</strong><br />
I enjoy trying to figure out new techniques - to organize knowledge. I see myself as a conduit [ledning] for transferring knowledge, to process what is out there and make some kind of structure out of it. Brian Foot actually described me as an "intellectual jackal with a good taste in carrion" [intellektuell schackal med god smak för kadaver].<br />
I look around for interesting stuff and try to make sense of it.<br />
The "Refactoring" is a good example. I figured out how to describe it and wrote a book that came out when it could make a difference and move the area forward.<br />
I also enjoy writing a lot, that's a big thing. I'm better now at speaking, but that's not what makes me tick.</p>
<p><strong>Q: You've written quite a few books - how do they compare?</strong><br />
Out of the five, "Uml Distilled" sold more copies than the others put together. Usually you can't make a living out of your books, I guess I could though.<br />
All of the books had their good sides, but I would have to say that it was fun to write with Kent Beck [red: wrote "Extreme Programming", created JUnit etc]. We were in tune and could support each other through the dull bits.<br />
I would have to say though that I'm proudest of "Refactoring". It's an important technique and didn't get the attention it should have received – the book helped.</p>
<p><strong>Q: How did you start out?</strong><br />
I was an independent consultant for many years. Giving talks was a good way of getting jobs. Articles same thing - it got my name known.<br />
Also, I write something because I don't understand a certain area or technology. It's a good way to learn.<br />
Erik is now on the phone with California. We calculate that time is roughly 6:30 there – in the morning.</p>
<p><strong>Q: Then what? How come you started working for Thoughtworks (TW)?</strong><br />
I've been there for six years and done a lot of consulting. I never wanted to work for a company, but there was something about TW that made me interested.<br />
Get the work done and tons of bright people. But more importantly is that it is a sort of social experiment. A notion that good people makes a difference.<br />
I hope we can affect IT, which is a difficult and skilled exercise at best.</p>
<p><strong>Q: What is the most difficult part of being a celebrity?</strong><br />
I'm not an extrovert person. I'm not good at the "person to person". I get emails with questions like "I got a problem on…what is the magic trick". They worked for months on it and I can only point to a book. That clearly wasn't an answer they liked. It's frustrating.<br />
However, celebrity is also a nice thing – it opens a few doors. I can email people like Rod Johnson [red CEO of Interface 21 that created the Spring framework] if I have a question about something. And he will answer.<br />
People tend to think I'm an ingenious programmer. I'm not. I'm pretty good, but not necessarily that great.<br />
Erik suddenly spits out:<br />
- F---!...ok the demo will be shorter.</p>
<p><strong>Q: Looking forward, what's next?</strong><br />
Oh, there is tons of stuff to write about. The design patterns area for instance. I'm also interested in DSL [domain specific languages] and agile development. But in agile there are too many writers and I don't like competition. There are too many smart people in agile development.<br />
My strategy is to look for topics that no one has written about. Basically I don't foretell the future.</p>
<p><strong>Q: What are your top three pieces of advice to a programmer?</strong><br />
My first advice must be to learn to collaborate with the user or purchaser. The really good ideas usually come from them. You don't have to be an expert to do this. This I found to be a good general advice.<br />
Secondly, it would be "continuous learning". It's like running up a downwards-moving escalator – you have to keep running.<br />
The third one is difficult…<br />
"Buy lots of books by good authors" would be it.<br />
Erik suddenly releases a big:<br />
- Yes!<br />
I saw Erik's demo some twenty minutes later – it was really good.<br />
As for Martin, our discussions continued well into the debate panel and beyond. He would frequently forget his back pain and sip into some extra energy pack. I wonder how he did that.</p>
<p><em>Originally published in <a href="http://jayway.se/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2007/02/02/interview-martin-fowler-man-in-the-know/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Neo – a netbase</title>
		<link>http://blog.jayway.com/2007/02/01/neo-%e2%80%93-a-netbase/</link>
		<comments>http://blog.jayway.com/2007/02/01/neo-%e2%80%93-a-netbase/#comments</comments>
		<pubDate>Thu, 01 Feb 2007 10:32:01 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[graph db]]></category>
		<category><![CDATA[innovation]]></category>
		<category><![CDATA[persistence]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=3617</guid>
		<description><![CDATA[Neo is a network-oriented database for semi-structured information. Too complicated, let us try again. Neo handles data in networks – nodes, relationships and properties – instead of tables. This means entirely new solutions for data that is difﬁ cult to handle in static tables. It could mean we can go agile all the way into [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Neo is a network-oriented database for semi-structured information.<br />
Too complicated, let us try again. Neo handles data in networks<br />
– nodes, relationships and properties – instead of tables. This means entirely new solutions for data that is difﬁ cult to handle in static tables. It could mean we can go agile all the way into the persistence layer. </strong></p>
<p>The relational database represents one of the most important developments in the<br />
history of computer science. Upon its arrival some 30 years ago, it revolutionized the<br />
way the industry views data management and today it is practically ubiquitous. </p>
<p>In fact, it is so taken for granted that we, as an industry, have stopped thinking. Could<br />
there be a better way to represent and store our data? In some cases the answer is<br />
– yes, absolutely. The relational database is showing its age. Some telltale signs: </p>
<ul>
<li> The mismatch between relational data and object oriented programming.
<li> Schema evolution – updating your data model when the domain model changes<br />
– is just so much manual labor.
<li> Semi-structured or network-oriented data is difﬁ cult to handle.
</ul>
<h2>The Neo Database</h2>
<p>Neo is a database that is built with a different philosophy. Where the relational da-<br />
tabase squeezes all data into static tables, Neo uses a ﬂ exible and dynamic network<br />
model. This model allows data to evolve more naturally as business requirements<br />
change. There’s no need for “alter table...” on your production databases after you<br />
introduce a new version of the business layer and no need to rewire and migrate<br />
your O/R mapping conﬁ gurations. The network will evolve along with your busi-<br />
ness logic. This spells agility.<br />
Neo is an embedded persistence engine, which means it’s a small, lightweight and<br />
non-intrusive Java library that is easy to include in your development environment.<br />
It has been designed for performance and scalability and has been proven to handle<br />
large networks of data (100+ millions of nodes, relationships and properties).<br />
Neo is a newly founded open source project, but the software is robust. It has<br />
been in commercial production in a highly demanding 24/7 environment for al-<br />
most four years and has full support for enterprise-grade features such as distributed<br />
ACID transactions, conﬁ gurable isolation levels and full transaction recovery.<br />
But so much for sweet talk, let’s cut to some code! </p>
<h2>Model and Code</h2>
<h3>Representation</h3>
<p>In the Neo model, everything is represented by nodes, relationships and properties.<br />
A relationship connects two nodes and has a well-deﬁ ned, mandatory type. Prop-<br />
erties are key-value pairs that are attached to both nodes and relationships. When<br />
you combine nodes, relationships between them and properties on both nodes and<br />
relationships they form a node space – a coherent network representing your busi-<br />
ness domain data.<br />
This may sound fancy, but it’s all very intuitive. Here is how a simple social network<br />
might be modeled: </p>
<p><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2009/12/Picture-89.png" alt="Figure 1" title="Figure 1" width="412" height="211" class="alignnone size-full wp-image-3618" /></p>
<p><strong>Figure 1:</strong> An example of a social network from a somewhat famous movie. Note the different type on the relation between Agent Smith and his creator The Architect. </p>
<p>Note how all nodes have integer identiﬁ ers and how all relationships have a type<br />
(KNOWS or CODED_BY). In this example, all nodes have a “name” property. But<br />
some nodes have other properties, for example, an “age” property (node 1) or a<br />
“last name” property (node 3). There’s no overall schema that forces all nodes to<br />
look the same. This allows Neo to capture so-called semi-structured information:<br />
information that has a small amount of mandatory attributes but many optional at-<br />
tributes. Furthermore, the relationships have properties as well. In this example, all<br />
relationships have an “age” property to describe how long two people have known<br />
each other and some relationships have a “disclosure” property to describe whether<br />
the acquaintance is secret. </p>
<p>Working with nodes and relationships is easy. The basic operations are as follows: </p>
<p><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2009/12/Picture-90.png" alt="Figure 2" title="Figure 2" width="387" height="114" class="alignnone size-full wp-image-3619" /></p>
<p>This is an intuitive representation of a network and probably similar to many other<br />
implementations that want to represent a network of data in an object-oriented<br />
language.<br />
It’s worth noting, however, that relationships in this model are full-blown objects<br />
and not just implicit associations between nodes. If you have another look at the<br />
social network example, you’ll see that there’s more information in the relationships<br />
between nodes than in the nodes themselves. The value of a network is in the con-<br />
nections between the nodes and Neo’s model captures that. </p>
<h3>Creating a Node Space</h3>
<p>And now, ﬁnally some code. Here’s how we would create the Matrix social network<br />
from ﬁgure 1: </p>
<pre>Transaction tx = Transaction.begin();
EmbeddedNeo neo = ... // Get factory
// Create Thomas ’Neo’ Anderson
Node mrAnderson = neo.createNode();
mrAnderson.setProperty( ”name”, ”Thomas Anderson” );
mrAnderson.setProperty( ”age”, 29 );
// Create Morpheus
Node morpheus = neo.createNode();
morpheus.setProperty( ”name”, ”Morpheus” );
morpheus.setProperty( ”rank”, ”Captain” );
morpheus.setProperty( ”occupation”, ”Total bad ass” );
// Create a relationship representing that they know each other
mrAnderson.createRelationshipTo( morpheus,
   MatrixRelationshipTypes.KNOWS );
// Create Trinity, Cypher, Agent Smith, Architect similarly
...
tx.commit();
</pre>
<p>As you can see in the code above: It is rather easy to construct the node space for our<br />
Matrix example. And, of course, our network is made persistent once we commit. </p>
<h3>Traversing a Node Space</h3>
<p>Now that we know how to represent our domain model in the node space, how do<br />
we get information out of it? Unlike a relational database, Neo does not support a<br />
declarative query language. Instead, Neo provides an object-oriented <em>traverser frame-<br />
work</em> that allows us to express complex queries in plain Java.<br />
Working with the traverser framework is very straight-forward. The core abstrac-<br />
tion is, unsurprisingly, the Traverser interface. A Traverser is a Java <code>Iterable</code> that<br />
encapsulates a “query” – i.e. a traversal on the node space such as <em>“give me all Mor-<br />
pheus’ friends and his friends’ friends”</em> or <em>“does Trinity know someone who is acquainted with an agent?”</em>. The most complex part of working with a Traverser is instantiating it. Here’s an example of how we would create a Traverser that will return all the<br />
(transitive) friends of the “Thomas Anderson” node of the example above: </p>
<pre>// Instantiate a traverser that returns all mrAnderson’s friends
Traverser friendsTraverser = mrAnderson.traverse(
    Traverser.Order.BREADTH_FIRST,
    StopEvaluator.END_OF_NETWORK,
    ReturnableEvaluator.ALL_BUT_START_NODE,
    MatrixRelationshipTypes.KNOWS,
    Direction.OUTGOING );</pre>
<p>Here we can see that traversers are created by invoking the <code>traverse(...)</code> method<br />
on a start node with a number of parameters. The parameters control the traver-<br />
sal and in this example they tell Neo to traverse the network breadth-ﬁrst (rather<br />
than depth-ﬁ rst), to traverse until it has covered all reachable nodes in the network<br />
<code>(StopEvaluator.END_OF_NETWORK)</code>, to return all nodes except the ﬁ rst <code>(Returna-<br />
bleEvaluator.ALL_BUT_START_NODE)</code>, , and to traverse all <strong>OUTGOING</strong> relation-<br />
ships of type <strong>KNOWS</strong>.<br />
How would we go about if we wanted to list the output of this traversal? After<br />
we’ve created a Traverser, working with it is as easy as working with any Java <code>Iter-<br />
able:</code></p>
<pre>// Traverse the node space and print out the result
for ( Node friend : friendsTraverser )
{
    System.out.println( friend.getProperty( “name” ) + “ at depth “ +
        friendsTraverser.currentPosition().getDepth() );
}
</pre>
<p>Running the traversal above on the Matrix example would yield the following out-<br />
put:</p>
<pre>$ bin/run-neo-example
Morpheus at depth 1
Trinity at depth 1
Cypher at depth 2
Agent Smith at depth 3
$
</pre>
<p>As you can see, the Traverser has started at the “Thomas Anderson” node and run<br />
through the entire network along the <strong>KNOWS</strong> relationship type, breadth ﬁ rst, and<br />
returned all nodes except the ﬁ rst one. “The Architect” is missing from this output<br />
since the relationship connecting him is of a different type, <strong>CODED_BY</strong>. This is a<br />
small, contrived example. But the code would work equally well on a network with<br />
hundreds of millions of nodes, relationships and properties.<br />
Now, let’s look at a more complex traversal. Going with our example, suppose<br />
that we wanted to ﬁ nd all “hackers of the Matrix,” where we deﬁ ne a hacker of the<br />
Matrix as any node that you reach through a <strong>CODED_BY</strong> relationship. How would<br />
we create a Traverser that gives us those nodes?<br />
First off, we want to traverse both our relationship types (<strong>KNOWS</strong> and <strong>COD-<br />
ED_BY</strong>). Secondly, we want to traverse until the end of the network and lastly, we<br />
want to return only nodes which we came to through a <strong>CODED_BY</strong> relationship.<br />
Here’s the code: </p>
<pre>
// Instantiate a traverser that returns all hackers of the Matrix
Traverser hackerTraverser = mrAnderson.traverse(
    Traverser.Order.BREADTH_FIRST,
    StopEvaluator.END_OF_NETWORK,
    new ReturnableEvaluator()
    {
        public boolean isReturnableNode( TraversalPosition pos )
        {
            <strong>return pos.getLastRelationshipTraversed().
                isType( MatrixRelationshipTypes.CODED_BY );</strong>
        }
 },
 MatrixRelationshipTypes.CODED_BY,
 Direction.OUTGOING,
 MatrixRelationshipTypes.KNOWS,
 Direction.OUTGOING ); </pre>
<p>Now it’s getting interesting! The <code>ReturnableEvaluator.ALL_BUT_START_NODE</code> con-<br />
stant from the previous example was actually a convenience implementation of the<br />
<code>ReturnableEvaluator</code> interface. This interface contains a single method and you<br />
can supply a custom implementation of it to the traverser framework. It turns out<br />
that this is a simple but powerful way to express complex queries.<br />
Setting aside the anonymous inner class cruft surrounding the code in bold, we<br />
basically pass in a snippet of code that checks whether we traversed a relationship of<br />
type <strong>CODED_BY</strong> to get to the current node. If this statement is evaluated to “true”<br />
then the current node will be included in the set of nodes that is returned from the<br />
traverser.<br />
When executed with a simple print loop, the above code prints the following: </p>
<pre>$ bin/run-neo-example
The Architect
$
</pre>
<p>StopEvaluators work the same way. In our experience, writing custom evaluators<br />
is very easy. Even the most advanced applications we have developed with Neo<br />
–  applications that traverse extremely large and complex networks – are based on<br />
evaluators that are rarely more than a few lines of code. </p>
<h2>Conclusion</h2>
<p>Neo is not a silver bullet and some areas needs to improve, for instance tools, stand-<br />
ardizing the model and a query language.<br />
However, if your data is naturally ordered in a network or is semi-structured or you<br />
just need to go truly agile, give the Neo database a run for your money. We hope<br />
you ﬁnd it, as we do, to be an elegant and ﬂ exible alternative that is both robust and<br />
fast. </p>
<p>Emil Eifrém, Neo Technology<br />
Björn Granvik, Jayway</p>
<h2>Links </h2>
<p>Neo speciﬁcation<br />
<a href="www.neo4j.org">www.neo4j.org</a></p>
<p><em>Originally published in <a href="http://jayway.se/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2007/02/01/neo-%e2%80%93-a-netbase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaOne 2006 – almost in hindsight</title>
		<link>http://blog.jayway.com/2006/10/01/javaone-2006-%e2%80%93-almost-in-hindsight/</link>
		<comments>http://blog.jayway.com/2006/10/01/javaone-2006-%e2%80%93-almost-in-hindsight/#comments</comments>
		<pubDate>Sun, 01 Oct 2006 14:29:03 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[javaone]]></category>
		<category><![CDATA[jayview]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=3750</guid>
		<description><![CDATA[JavaOne 2006 might be only a few months old, but a summer feels a like lot longer than that. What were the trends and are they still hot? JavaOne conferences seem to come in three different flavours – announcement, middle and final. Several “new” technologies made their finale this year; a graduation year. EJB 3, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>JavaOne 2006 might be only a few months old, but a summer feels a like lot longer than that. What were the trends and are they still hot?</strong><br />
<a href="http://blog.jayway.com/wordpress/wp-content/uploads/2006/10/javaonehindsight1.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2006/10/javaonehindsight1-224x300.png" alt="" title="JavaOne - waiting for the next session" width="224" height="300" class="alignleft size-medium wp-image-7315" /></a></p>
<p>JavaOne conferences seem to come in three different flavours – announcement, middle and final. Several “new” technologies made their finale this year; a graduation year. EJB 3, Java EE 5 etc. were all more or less announced two years ago. Even the examples were in some cases identical to then: mature and perhaps a bit boring. However, EJB3 will play a role in many projects so “mature” is a good sign.<br />
There were also some surprises and rejuvenation, mostly on the open source side even though Sun managed to squeeze in some surprises.<br />
What happened in the Java SE and EE area? Let us check out some trends and<br />
see what we can make of them. </p>
<h2>AOP- still stillborn? </h2>
<p>Sun has had a very cautious approach to aspect oriented programming. Two years<br />
ago on JavaOne, a large, attentive audience tried to understand what Sun had to say<br />
on the subject. The answer from the panel on aspects was like something taken from<br />
an old police station series on TV:<br />
- Let’s be careful out there!<br />
Well, the “fireside chat” this year with Sun aluminaries and, of course, James Gos-<br />
ling proved to be more of the same.<br />
The EJB 3 gang also had something similar to say during the conference - along<br />
the lines of:  “why aspects, when interceptors will do the job”. Interceptors could be<br />
described as poor man’s aspects using interfaces and proxies to catch calls to meth-<br />
ods. Those of you with good memory banks will recall the Spring folks doing the<br />
same rhetorical twist a couple of years ago. This was of course before they saw the<br />
light and got the AspectJ guy on their payroll. Smart move.<br />
My guess is that we will hear Sun speaking more on using aspects instead of in-<br />
terceptors some two years from now. In the mean time, Spring will lead the way on<br />
aspects and real life programming. </p>
<h2>Scripting </h2>
<p>In Java 6 there will be JVM support for hooking in your choice of scripting lan-<br />
guage through the standard Java Scripting API. The contestants are already many<br />
and include such names as JavaScript, Ruby, Groove, BeanShell and a bunch<br />
you probably haven’t heard of. The driving force behind this is twofold; first the<br />
amount of glue code needed in Java. It is sometimes just too much code for simple<br />
stuff - or should I say stuff that should be simple. Secondly, the competition in the<br />
language area is heating up. Ruby on Rails is a good example of powerful and fast<br />
programming for setting up a website. Their 15-minute video does compete with<br />
successful TV ads. You know the ones that make you buy something just because<br />
it is such a good deal.<br />
My forecast is that we will see a scripting case where the language and solution<br />
just makes sense. Which one? Who knows. Unfortunately we might see a lot of bad<br />
examples before the right one comes along. </p>
<h2>Java 7 - Dolphin</h2>
<p>The Mustang (Java 6) might not be on the loose just yet, but I had to check out the<br />
next mammal in the Java sequel - Dolphin. Java 7 was apparent in several sessions,<br />
but the common denominator was the vagueness. The speakers used phrases like<br />
“thinking about”, “might” etc. Still it was interesting and some of the features are<br />
needed. </p>
<h3>XML in Java</h3>
<p>For instance, what about supporting XML in Java more directly where the XML<br />
would be a data type? </p>
<h3>Current way </h3>
<pre>String name = “Björn”;
XML xml =
   &lt;person&gt;
      &lt;name&gt;{ name }&lt;/name&gt;
      &lt;age&gt;{ 25 }&lt;/age&gt;
   &lt;/person&gt;;
</pre>
<p>Alternatively the XML could be expressed as, less verbose: </p>
<h3>Possible new way </h3>
<pre>XML xml = #person
           #name { name }
           #age { 25 };
</pre>
<p>Less verbose but will it catch on? I find XML so mind numbing that I am ready to<br />
try just about anything. </p>
<h3>Super Packages </h3>
<p>In large projects the notion of packages does not scale. How can we use a library<br />
of classes without exposing internal classes best left in the dark? There are several<br />
aspects to this problem, from distribution format to lifecycle. JSR 294 addresses<br />
the modularity issue even if it includes a certain NIH factor (Not Invented Here).<br />
OSGi, for example, already has a similar mechanism. But for now let us just exam-<br />
ine how we can handle classes and their visibility, i.e. “super packages”.<br />
Here’s a code snippet on what a definition for a super package would contain. </p>
<pre>super package com.sun.myModule {
  // Classes visible outside of this super module.
  export com.sun.myModule.myStuff.*;
  export com.sun.myModule.yourStuff.Interface;
  // Not visible outside
  com.sun.myModule.myStuff;
  com.sun.myModule.yourStuff;
  com.sun.SomeOtherModule.theirStuff;
  org.someOpenSource.someCoolStuff;
}</pre>
<p>As you can see super packages is essentially a package of packages. This way we can<br />
only expose classes on a need to know basis. Solving this with current Java syntax<br />
is tricky. Some even resort to removing any JavaDoc on the “internal” classes to<br />
obscure their usage. </p>
<h3>Java Module System </h3>
<p>The next big thing is aimed at the JAR file format that, let’s face it, doesn’t scale and<br />
has poor dependency enforcement especially when it comes to versioning. What<br />
is needed is a system for resolving references between “Java modules” where each<br />
module has meta-data about its version and related resources. This is exactly what<br />
JSR 277 defines and yes, it sounds very much like shared assemblies in .NET.<br />
However, combining super packages with Java modules forms a powerful way of<br />
distributing, versioning and managing components. I like.</p>
<p>These three examples on what we might see in the next-next version of Java are<br />
likely to change. Nevertheless I found them interesting. </p>
<h2>Ajax, Ajax ...oh and Ajax </h2>
<p>If there ever was a message being touted on the rooftops of Moscone Center in San<br />
Francisco, it is Ajax. The intro sessions were packed, standing room only even on<br />
the repeat sessions. Ajax is simple at its lowest level - some JavaScript to query the<br />
backend and voilà, you’re done. At the face of it, this is deceptively easy. However,<br />
once you have done that simple first try, you quickly get into more questions. Where<br />
should we put retrieved data on the client? How do we handle lots of Ajax calls?<br />
Will someone mesh up my data?<br />
Performed correctly though, you do get neater web clients and that is actually an<br />
attractive notion. The flip side of this, though, is all the hype. Everything from the<br />
Colgate inspired salesmen - yes, they were there with their surreal suntan - to the<br />
former Sun execs doing the IPO dance. “Next episode: Will they get cash in before<br />
the expiry date?”<br />
Ranting aside, Ajax is here and we all better start to learn it because it does matter.<br />
And it does put an amicable face on your web site. </p>
<h2>Far out Java container </h2>
<p>Two years ago the chosen Java compatible container was ...a cool BMW. This year<br />
it was an autonomous dune buggy named Tommy with software all in Java. It was<br />
entered in a challenge to cross a patch of the American desert - without a driver. It<br />
looks a bit like Flash Gordon with four tires instead of rockets, built in somebody’s<br />
garage. I must say Tommy spurred my interest more than the BMW, but then again<br />
you would not look too cool driving it.<br />
Sun to ground control </p>
<h3>NetBeans </h3>
<p>It was quite evident that Sun has a new version of NetBeans out and that it does sup-<br />
port the latest Java EE version. And, yes, it does look good. And the price tag is quite<br />
right - zero. I just wish that it wasn’t being plugged at most every Sun keynote etc.<br />
The audience did get the message and we will check it out. Boy, that IDE market<br />
is tough! </p>
<h3>Java 6 </h3>
<p>“Java 6 is here” was one part of the message and “compatibility matters” was the<br />
other. Sun CEO Jonathan Schwarz has been going the open source route a lot and<br />
many applications are being made OS. Even Java itself could be made open some<br />
day. The “When” is still open though. Personally, this isn’t such a big deal for me.<br />
Sun has been, for the most part, good at stewarding Java. They have also managed<br />
to keep the code running, mostly, between versions. Opening it could be a problem,<br />
but also very interesting. Making compatibility a part of the arguments makes sense<br />
in such a scenario. Let us hope it stays just that - compatible. </p>
<h3>“We want your help” </h3>
<p>Making your software open source does change your way of thinking. Sun<br />
has promoted a lot of its stuff into the OS arena. Good, I say! It is only logi-<br />
cal that participation, from you and me, is seen as a great opportunity. Many<br />
of the applications going open, Project Glassfish etc, often ended their ses-<br />
sions with a “we need you”. Maybe Sun’s bad economy has a role in this?<br />
To me it doesn’t matter. I like it and I am eagerly waiting to see what the future<br />
might bring. </p>
<h2>Summing up </h2>
<p>JavaOne is a lot more than you can cram into an article such as this, but let us not<br />
be stopped by that when summing up. EJB 3 has come of age. This was their prom<br />
night and things were basically just as they said they would be two years ago. Keep<br />
an eye on it. It will play a role in many projects.<br />
Spring will deliver aspect oriented programming, not Sun, and it will go from hot<br />
to “fun and here”.<br />
Ajax is everywhere and you will use it. You might as well pick up a good book on<br />
this subject and start hacking.<br />
Java 6 will deliver lots of goodies. Will we get to use it? Or is your project stuck in Java JDK 1.4.2 unable to upgrade? Let us hope not. Check out scripting! It will change with Java 6. Who can tell which language will affect it big time? Someone will. Check out your local Javaforum to see if you can predict the winner.<br />
Keep coding and may your code be with you. </p>
<p><em>Originally published in <a href="http://jayway.se/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2006/10/01/javaone-2006-%e2%80%93-almost-in-hindsight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javaforum Malmö &#8211; now alive and kicking!</title>
		<link>http://blog.jayway.com/2006/03/04/javaforum-malmo-now-alive-and-kicking/</link>
		<comments>http://blog.jayway.com/2006/03/04/javaforum-malmo-now-alive-and-kicking/#comments</comments>
		<pubDate>Sat, 04 Mar 2006 08:33:21 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[javaforum]]></category>
		<category><![CDATA[jayview]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=7330</guid>
		<description><![CDATA[The Javaforum Malmö (re)opened at Jayway’s new office at Malmö one afternoon in March. The meeting set a new record for that conference room and filled it with ease. Some forty people checked in for this, the first Javaforum event in Malmö for several years. The audience was a mo- saic of around fifteen companies. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The Javaforum Malmö (re)opened at Jayway’s new office at Malmö one afternoon in March. The meeting set a new record for that conference room and filled it with ease.</strong></p>
<p>Some forty people checked in for this, the first Javaforum event in Malmö for several years. The audience was a mo- saic of around fifteen companies. The forum handled subjects like project methodology Scrum, application servers like T4 and Geronimo, news of the Spring framework and finally sensory networks using tiny Java thingies. The sessions covered the small and the big, from the sublime to the surreal - and all in Java.</p>
<p>Feel like more Java? Check www.javaforum.se for up to date information.<br />
Welcome next time around!</p>
<p><a href="http://www.javaforum.se"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2006/03/javaforum2.png" alt="" title="Javaforum.se" width="296" height="76" class="alignnone size-full wp-image-7334" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2006/03/04/javaforum-malmo-now-alive-and-kicking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The scent of freshly cut code</title>
		<link>http://blog.jayway.com/2006/03/04/the-scent-of-freshly-cut/</link>
		<comments>http://blog.jayway.com/2006/03/04/the-scent-of-freshly-cut/#comments</comments>
		<pubDate>Sat, 04 Mar 2006 08:26:17 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[jayview]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=7317</guid>
		<description><![CDATA[I just had to be there. My friend was starting out anew. A fresh idea, a start up - I was hoping it was going to be good. I was not disappointed. I could smell it straight away when I en- tered the small office - the fresh and raw scent of newly cut code. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I just had to be there. My friend was starting out anew. A fresh idea, a start up - I was hoping it was going to be good. I was not disappointed.</strong></p>
<p>I could smell it straight away when I en- tered the small office - the fresh and raw scent of newly cut code. Two men sat in front of their computers. One of them smiled at me.<br />
Jon Hauksson and I had hacked code, back to back, against a fast moving dead- line in a distant project. He had given up his daytime job as a consultant at a respectable firm. Now, he was shoulder deep into his new venture, bringing au- dio books to the mass market of mobile phones.<br />
<div id="attachment_7321" class="wp-caption alignright" style="width: 192px"><a href="http://blog.jayway.com/wordpress/wp-content/uploads/2011/03/bokilur1.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2011/03/bokilur1-182x300.png" alt="" title="Happy men" width="182" height="300" class="size-medium wp-image-7321" /></a><p class="wp-caption-text">Jon and Andreas in a classical image – happy men with computers.</p></div><br />
What had he learned? What is it like to develop a business to consumer app running on all those different Java mo- biles? A lunch later we were heading back into his office at Ideon – an incu- bator for new companies. Mobiles were strewn across their tables. Blank walls. Shelves were more or less empty. It all breathed start up and focus - get that app out trough the door!<br />
We sat down and Jon pulled an SQL- statement to calculate the last 24 hours of commerce.<br />
- Yeah, rising, he said and smiled.</p>
<p><strong>It has been said that developing a Java ME solution for all those different mo- biles is difficult and time consuming. Is it that hard?</strong><br />
Yes... but it has improved, especially for Nokia and Sony Ericsson. But some other brands can be trickier. We usually code for the Sony Ericsson emulator and then bring the code over to the Nokia one. Usually there aren’t any problems here. From here on we test the other brands. If we hit a problem we either try to solve it or we have to program our way around it. It used to be more difficult. The situation has improved in the last year. Especially Sony Ericsson is working hard to make it better.</p>
<p><strong>Does this mean you have different sets of your code?</strong><br />
We have four variants of the result- ing jar/jad file and that is enough for us. Fortunately NetBeans has pre-process- ing that makes life easier and allows us to only work with one code base.</p>
<p><strong>Without any time to think, what are the top three hard to learn lessons that you can you share with us?</strong><br />
1) Testing, testing, testing is extremely important. Many unforeseen things can happen in areas like operator handling, memory management, the mobile network and different quality issues - a lot can happen and usually does.<br />
<div id="attachment_7323" class="wp-caption aligncenter" style="width: 162px"><a href="http://blog.jayway.com/wordpress/wp-content/uploads/2011/03/bokilur2.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2011/03/bokilur2.png" alt="" title="The Bokilur app" width="152" height="295" class="size-full wp-image-7323" /></a><p class="wp-caption-text">Bokilur’s application playing a book.</p></div><br />
2) The Java settings are often not in- stalled correctly on the terminal from start. The user can download the set- tings for Java from the operator but sometimes these settings are not cor- rect. We’ve tried to add a guide that pops up when this happens but fiddling at this low level is not a pleasant experience for the customer. Some call our support number and we try to help them, but it is still a problem.<br />
3) Streaming solution<br />
The network, GPRS or 3G, has gaps and this affects our application. We’ve had to develop a streaming solution with a five-minute buffer so that you can listen to our books while driving. We’ve even tried it on trains, on the X2000 for instance, which reportedly has its share of problems when it comes to mobile network connections. But to our relief it worked there as well.</p>
<p><strong>Would you do use Java again?</strong><br />
For sure, it is easy to work with and even though it has problems, it is getting better.<br />
Although, we’ve chosen to imple- ment a number of our own frameworks even though there might be a good open source solution available. It is im- portant to us to keep our code size to a minimum and we usually don’t want the whole nine yards.</p>
<p><strong>Any examples of when you’ve had to roll your own solution?</strong><br />
Well, we implemented a GUI frame- work a bit like J2ME Polish. This way we can target our application’s needs and keep control. We’ve also developed an RMI like protocol to interact with the servers. There are, however, a lot of open source solutions to try out.<br />
We also have a simple debug solu- tion where the phone sends back debug information to the server so it can be logged. Very handy. And of course simple stuff like text han- dling.</p>
<p><strong>Would you do anything differently now when you look back? How long has it been anyway?</strong><br />
One and a half year. Ha-ha, it feels a lot more! We are trying to improve the user friendliness of the entire browsing and purchasing process in the applica- tion. That’s user interaction, but I can’t think of anything technical. Keeping the program easy and intuitive is important to us.</p>
<p><strong>Any practical hints on starting a prod- uct company in the mobile space?</strong><br />
Get the operators as partners. For a data rich service like ours, you need to get a deal without traffic charges. Other- wise it will be hard to develop a pricing model that is attractive to your targeted customers. Besides, the operators have a strong interest to bring in attractive services into their portals. They need more than just games and ring tones.<br />
Oh, and one more thing, keep track of the top selling mobile phone list. That way you know which models to target during testing.</p>
<p><strong>What about the future?</strong><br />
Our business idea is to be the best mobile literary service both here and abroad. You can expect us to go after the Nordic countries.</p>
<p><strong>Has the “market” for new companies changed?</strong><br />
Yes. During the last year more of my former colleagues have started compa- nies of their own! It’s even come to the point where venture capital has a prob- lem finding something to invest in…</p>
<p>During our interview Bokilur’s other programmer, Andreas Melvanius, kicks in.<br />
- We have a problem.<br />
It turns out that a single Nokia phone is thrown into silence. A quick round of questions and they agree on some new tests.<br />
After a while Jon asks whether I’d like a tour of the ”pavilion”. Walking in the corridors, we find a new com- pany behind every door. I cannot help but being impressed, such diversity. We stumble upon solutions for detecting schizophrenia, simulation of combus- tion engines, cameras that can see in fog and darkness and so on. I leave the barracks feeling elated – I too want to start up my own company.</p>
<p>PS. Curious about the Bokilur applica- tion? Check out www.bokilur.se.<br />
PPS. Bokilur later changed their name to StoryTel.com<br />
<em>Originally published in <a href="http://jayway.com/jayculture/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2006/03/04/the-scent-of-freshly-cut/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bert Rubaszkin, the quote master</title>
		<link>http://blog.jayway.com/2006/03/03/bert-rubaszkin-the-quote-master/</link>
		<comments>http://blog.jayway.com/2006/03/03/bert-rubaszkin-the-quote-master/#comments</comments>
		<pubDate>Fri, 03 Mar 2006 08:49:07 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[jayview]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=7341</guid>
		<description><![CDATA[Bert Rubaszkin is the Chief Technologist, CTO to us mere programmers, for Sun Sweden. He is often quoted in such computer mags as Computer Sweden. Questions cover a lot of ground, from Sun servers being tossed from tall buildings to the future of some new Sun technology. Bert comes across as the wise ol’ programmer [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_7345" class="wp-caption alignnone" style="width: 271px"><a href="http://blog.jayway.com/wordpress/wp-content/uploads/2006/03/bert.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2006/03/bert-261x300.png" alt="" title="Bert Rubaszkin" width="261" height="300" class="size-medium wp-image-7345" /></a><p class="wp-caption-text">Bert R working on his sauna raft.</p></div><br />
<strong>Bert Rubaszkin is the Chief Technologist, CTO to us mere programmers, for Sun Sweden. He is often quoted in such computer mags as Computer Sweden. Questions cover a lot of ground, from Sun servers being tossed from tall buildings to the future of some new Sun technology.</strong></p>
<p>Bert comes across as the wise ol’ programmer who has seen most of what there is to see. Always in a good mood, I find it hard to see him loosing his cool despite being probed with difficult questions. But first, let’s start off with a simple question.</p>
<p><strong>What’s it like being asked to comment on just about everything under the Sun?</strong><br />
There are two problems. If you have worked long enough, people expect you to be an expert at everything. The truth is that you only know a fraction of what is needed, but I do know who to ask.<br />
Another major problem are magazines. They are mainly interested in either new information or mud raking. Some are seriously interested in what has happened, others... they only want to talk about things that don’t work. But it is my job. I just try and answer the question. Sometimes it’s actually flattering that people think I know so much.</p>
<p><strong>Open Source has become quite important to Sun of late. As I understand it, you’re going to open source all of your code. Why?</strong><br />
It is correct that we plan to release all our source code, but I would like to point out that there is no time plan saying that at a certain point in time all the code will be released. The most important open source project for us now is OpenSolaris. The cat is, so to speak, out of the bag. We have been discussing this for several years. Once we took the decision, we needed to wash the code and make sure we had the copyrights to do this.<br />
The effect is quite positive. We now have a community around OpenSolaris 10, and version 11 will contain features that wouldn’t otherwise have made it in there without the community. And bug tracking of course. Plus it defused the Linux versus Solaris debate. We can now discuss things with our customer in a much more interesting way. Someone at Sun said “It’s not about the code stupid, it’s about the dialogue!”<br />
Internally it has also been a vitamin injection. Involvement is a lot higher. Everything we wished for has happened.<br />
There was a suspicion that we would only let go of the old stuff. Instead we released innovative bits like DTrace etc. This has the positive side effect of code going cross operating systems. For example: a group of people are working on a distribution of FreeBSD, which will include DTrace. That’s one example of code becoming de facto standard outside the GPL arena.<br />
Other high priority Open Source projects from Sun are OpenOffice and Netbeans. The end result of all of this is that we get more competitive. We get better tools and the risk of stagnation disappears.</p>
<p><strong>What is the story with CDDL (pronounced “cuddle”), Common Development and Distribution License? Wasn’t the Mozilla open source license good enough for Solaris?</strong><br />
I’m no expert on licensing but CDDL is based on Mozilla except for the one paragraph that states that the license can be changed at any given moment. It doesn’t even require any approval. Our big clients don’t accept this single difference.</p>
<p><strong>Most readers of JayView already know about the resurgent Javaforum. Apart from that, what is the status of Java in Sweden? Can you spot any trends?</strong><br />
Trends are meta trends and so... What I see from my angle is that Java still dominates the server side. Microsoft probably would have hoped that it would have made a more visible dent in the server side of things. We see very little impact from Dotnet among our customers.<br />
The meta trend is SOA and web services and how to interact in a mixed environment such as Java and Dotnet. We work together with Microsoft on this and more is going to happen. J2EE dominance on the server is not threatened. From a customer point of view, it’s good to be able to encapsulate web services in the different worlds and that there is a consensus on how to interact between the two.<br />
Looking on Java end-to-end, we’ve only started. There have been problems with limited midp hardware and different profiles between small devices. These mobiles will be more powerful. The problem of coping with differences between small platforms will be forgotten in 5 years.<br />
We’re not there yet... but the APIs will be the same and so on.</p>
<p><strong>Q: Sun has had this ambiguous relationship where it both owns Java, but also lets it play with the programmers on the block. It’s not hard too find examples of changing times. Take for example the Apache Harmony project (an open source implementation of Java 5 SE) or the interest in dynamic languages and the effort to provide support for these in the JVM in Java 6 SE. Are Sun’s dual roles over Java changing?</strong><br />
There is a concept within Sun which refers to “church and “state” as far as Java is concerned. Some work within the state it’s no more difficult than that. Java is a big investment for Sun and we want to see it spread, to complete its potential. It’s important that standards are kept and that nobody can corrupt them. Journalists typically want to make a big thing out of this. Our customers think JCP (Java community process) works. Maybe it is true that Sun has been able to keep the two roles apart and at the same time have products.<br />
One strategy that we have followed is that every time there has been a split view, a 50-50 vote, on any subject within a JCP committee, we haven’t used our deciding vote. We’ve actually let the other point of view “win”. I believe that off the record even IBM will agree to this. The common denominator for those who complain, is that they haven’t actually looked into the JCP. It’s rather quick work nowadays. In the beginning some smaller companies complained, but that has been resolved. It’s rare to hear someone say “Damn Sun”.</p>
<p><strong>Java is more of an ecosystem than just a language. What’s the status of that system today? And where is it going?</strong><br />
A flora of tools and frameworks has grown up, but doesn’t necessarily run within the JCP. Java is sort of the centre and further out are things like Ajax. You can go far out from the middle of this system and that is a good thing. James Gosling himself thinks this is very good. He was asked what happens if something can be done smarter in a different language to Java.<br />
“I’m all for it!” That goes for most Sun folks. There is no single person in the world that can answer all the questions within that field – that’s good.</p>
<p><strong>At the far end of that ecosystem I actually place Microsoft and C#. Some of the recent improvements in Java were inspired by the “other camp”, just as ideas and open source flow in the other direction. To me this is “competing symbiosis”. Take away one and the other would stagnate, much like Internet Explorer vs. Netscape. What’s your view on this?</strong><br />
It’s good with competition, but I’m critical of the fact that Microsoft with a budget exceeding some countries’ GNP cannot produce anything better than a pure Java clone, C#, with some minor improvements. Pitiful! But then again, competition is good. The Java community has a keen ear for improvements.<br />
I have to give Microsoft credit for building tools that are easy to use. But this is partly at the expense of power and has meant that some things have not been developed. For instance, I’m totally convinced that Excel is a threat to mankind. People make decisions based on small errors that are impossible to debug.<br />
If we at Sun can maintain the power and at the same time increase ease of use.</p>
<p><strong>What is the best/worst thing that has happened in Java?</strong><br />
The best thing that is happening right now it is that we succeeded with Javaforum. It’s an embryo for an independent organisation. Tremendous. On a more technical level there are lots of good things happening. One thing that I like, but I would not classify it as “tremendous”, is annotation in Java 5.<br />
The worst thing that has happened in Java was Microsoft signing an agreement, only to break it again immediately after. That wasn’t nice – not funny at all. But what was funny was them being made to pay.</p>
<p><strong>Looking into your crystal ball, where is Java heading? Is there a device that will _not_ hold a JVM?</strong><br />
Different times place different demands on tools. Java’s dominance will be broken sooner or later. For instance, there are more network-oriented languages at academic level. Old languages don’t die. Look at how much Cobol code there is.<br />
Java was the fist programming language for the net and shows no signs of old age. I would guess that Java will have a lifecycle similar to Cobol. It will take hundreds of years before it disappears – ha ha.</p>
<p><strong>It has been said that Java will be the Cobol of the future. I dare you to make a guess at when that will be!</strong><br />
20 years from now it will be legacy. Not within five.</p>
<p><strong>I once managed to make James Gosling speechless. He was taking questions from the audience and I managed to sneak in _”What’s the meaning of Java, as in ‘what’s the meaning of life’?”_ What’s your take on that?</strong><br />
It was the first programming system built for the net, just as NFS was the first file system for the net. That was the meaning.</p>
<p>Dang, I thought that at least the last question would stomp Bert.</p>
<p><em>Originally published in <a href="http://jayway.com/jayculture/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2006/03/03/bert-rubaszkin-the-quote-master/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jonas Bonér, your regular AOP guy</title>
		<link>http://blog.jayway.com/2006/02/04/jonas-boner-your-regular-aop-guy/</link>
		<comments>http://blog.jayway.com/2006/02/04/jonas-boner-your-regular-aop-guy/#comments</comments>
		<pubDate>Sat, 04 Feb 2006 09:02:07 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=7350</guid>
		<description><![CDATA[Jonas is still standing when I meet him at the Öredev conference to discuss an interview. Even though a cold is doing its best to bring him to his knees. He still has a ‘roundthe-globe’ trip to Tokyo to do and the following sprint to reach JavaOne in Japan another one of those Swedes going [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.jayway.com/wordpress/wp-content/uploads/2006/02/jonas.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2006/02/jonas-257x300.png" alt="" title="Jonas Bonér" width="257" height="300" class="alignleft size-medium wp-image-7354" /></a><br />
<strong>Jonas is still standing when I meet him at the Öredev conference to discuss an interview. Even though a cold is doing its best to bring him to his knees. He still has a ‘roundthe-globe’ trip to Tokyo to do and the following sprint to reach JavaOne in Japan another one of those Swedes going places.</strong></p>
<p>Jonas Bonér is the founder of AspectWerkz, an aspect oriented framework without the need for special compiler. It later joined forces with AspectJ, which could be described as the Father Christmas of aspect oriented programming in the Java world. He used to work for BEA in Sweden, but has recently joined Terracotta, San Francisco.</p>
<p><strong>Jonas you’re a long term AOP advocate. When and how did you start with aspects and, perhaps most importantly, why?</strong><br />
I started using AspectJ back in 2001 and I was immediately very fascinated by the concepts of AOP, its power, beauty and ability to solve really hard problems in such an elegant way. I have always valued clean design and simplicity and in AOP I found a way of letting design and concepts map directly to actual code.<br />
I started by using ‘policy enforcement aspects’, e.g. AspectJ’s declare error/warning, logging and tracing aspects, as part of the build process. After a while I gradually started to use it for more advanced things, such as security, transaction demarcation, persistence, caching, “unit of work”, design patterns etc. for better modularity, reusability, maintainability and simplicity.</p>
<p><strong>Why did AspectWerkz and AspectJ merge?</strong><br />
The short answer is that the users needed a standard. But let me elaborate a little bit. During recent years the AOP landscape for Java has flourished. When a technology is new and immature it is usually a good thing to have many frameworks/products competing, since they can inspire and push each other and the technology even further, but when the technology matures it starts to become a problem. For example, the users might end up not knowing which framework, syntax and semantics to start using, since they do not know which ones will even be around a year later. If you see this happen a lot, like it did with AOP, then there is a need for standardization.<br />
During 2004, AspectWerkz and AspectJ slowly converged, but the two projects were still focused on different areas and had complimentary strength. We had some discussions and both teams saw the need for standardization and felt that both projects as well as the user community would benefit from unifying the projects, roadmaps and teams instead of competing. So we decided on the merger that was announced in the beginning of 2005 and was completed with the release of AspectJ 5 at the end of last year.</p>
<p><strong>So where do you think we’re heading for in the future, as far as AOP is concerned?</strong><br />
I am confident that AOP will play an important role in the future of enterprise application development. Many vendors are already starting to embrace AOP as an enabling technology for separation of concerns, transparency, simplicity etc. For example Terracotta DSO, JBoss EJB 3, TopLink, Spring etc.<br />
These are all examples of vendors using AOP to layer infrastructure services on the user’s domain models in a transparent fashion. That is great, but I hope that it won’t stop with that, my wish is that users will see the value of using AOP in their application specific code, in order to achieve more modular design, code that is more easily written, understood, reused and maintained. In some ways AOP had a healthy backlash over the last year, which has removed most of the hype around it. It has matured, has a standard in AspectJ 5 and is ready for real-world deployments.</p>
<p><strong>Tool wise it seems that we have several things in place in Eclipse/AspectJ/ AJDT to get a good grip on aspects. Examples: being able to see what code an aspect affects, diff engines to compare changes to an aspect etc. Do we have all we need?</strong><br />
The AJDT team has done a tremendous job and I think that we have already come a long way, even though more work can of course be done and needs to be done in this area. But while this is true for static views of the system, like AJDT is showing, there is almost no support for monitoring and introspecting the runtime view of the system, something that is getting more important now when the usage of dynamic AOP is becoming more widespread, which has the ability of redefining the behavior of the system at runtime. This is an area in which I hope that the academic community will contribute more in the future.</p>
<p><strong>Can you see anything that needs to be fixed or added before we see more widespread adoption of AOP?</strong><br />
I think that the most important thing now is education trainings, books, articles etc. We need to try to reach beyond the group of “expert” developers. Another thing is a standard library. We need an ADK (Aspect Development Kit) in the same sense that Java has its JDK. I am involved in an attempt to gather and develop a set of library aspects for AspectJ 5, and we’ll see where that leads. Finally I hope to see more best-practices, patterns as well anti-patterns emerge.</p>
<p><strong>Terracotta, the new company you work for, has a distributed cache product. What’s so cool about it?</strong><br />
It is completely transparent. Meaning that zero code changes are required to cluster an arbitrary J2EE application. Our only requirement is that you have to write a correct multi-threaded application. We then take that multi-threaded single VM application and a tiny bit of XML configuration to declaratively specify what should be shared, lock semantics etc., and turn it into a multithreaded multi-JVM application. These are the features I find most interesting:<br />
* True transparency.<br />
* Noserialization.We only send the actual changes to an object graph (the delta) as well as keep track of who is referencing who, so we can send these changes only to the nodes that need it, e.g. lazily.<br />
* Object identity is preserved. We maintain Java’s “pass-by-reference” semantics, so regular object references work, which means that you can use your domain model the way you have designed it, as well as traditional OO design patterns etc. without a need to think about distribution, caching or clustering. • Coordination and memory manage-ment. We maintain the Java Memory Model transparently throughout the cluster, including distributed coordination, for example wait(), notify(), synchronized() etc., distributed garbage collection etc. We work as a virtual heap, meaning that you can for example run an application with 200G heap on a machine with 4G of RAM in which we then page in and out the heap on a demand basis.</p>
<p><strong>How does it work?</strong><br />
We use AOP technologies to adapt the application at class load time. In this phase we extend the application in order to ensure that the semantics of Java are correctly maintained across the cluster, this includes object references, thread coordination, garbage collection etc. For example, we extend the semantics of a regular synchronized block, or actually maintain them across the cluster, by taking a global lock for the object instance that you are synchronizing on right before entering the block and releasing it right after exiting the block. You can declaratively define the exact semantics for the block, e.g. read, write, concurrent etc.<br />
Another example is the invocation of notifyAll(). Here we turn this call into a cluster wide notification, which will open up for all nodes to contend for the lock.<br />
The architecture is hub and spoke based, meaning that we have a central server which manages the clients, we use TCP/IP so the server just needs to be somewhere on the network. The client in this case is simply your regular application together with the Terracotta JAR. People always ask whether the server is not a single-point of failure, but we have a SAN-based solution to support fail-over in an active-passive manner. You can have an arbitrary number of (passive) servers waiting in line and upon failure the selected one will pick up right where the master server that has crashed left off.</p>
<p><strong>Finally, as an active open source contributor, do you have anything up your sleeve for the future?</strong><br />
I have some ideas, but nothing I can talk about now. Stay tuned...</p>
<p>Something tells me that we will hear more from Jonas Bonér.<br />
His cold? Well the trip actually made it go away. He made JavaOne with half an hour to spare. I guess it’s that Viking blood.</p>
<p><em>Originally published in <a href="http://jayway.com/jayculture/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2006/02/04/jonas-boner-your-regular-aop-guy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Printers going Java</title>
		<link>http://blog.jayway.com/2006/01/04/printers-going-java/</link>
		<comments>http://blog.jayway.com/2006/01/04/printers-going-java/#comments</comments>
		<pubDate>Wed, 04 Jan 2006 09:28:58 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[jayview]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=7371</guid>
		<description><![CDATA[Embedding Java doesn’t always equate mobiles. Nor does it necessarily mean stuffing it into a rover on Mars. Introducing new possibilities is sometimes just a question of putting it on a small card hooked up to your printer. Axis, a well-known creator of print servers, network cameras etc has done just this. They took one [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Embedding Java doesn’t always equate mobiles. Nor does it necessarily mean stuffing it into a rover on Mars. Introducing new possibilities is sometimes just a question of putting it on a small card hooked up to your printer.</strong></p>
<p>Axis, a well-known creator of print servers, network cameras etc has done just this. They took one of their print servers and added Java for a big time printer manufacturer in Japan. How did they do it? And what did they learn? I teamed up with three of the people – Jens Johansson, Kristofer Johansson and Stefan Andersson – behind this Java enabled print server to get more of the gory details.</p>
<h2>The Start</h2>
<p>The project started around four years ago with a prototype after some seven months. The release onto the market was roughly one and half years ago. The first step, however, was to assess the feasibility of it. Could they perform to their customer’s demands? What type of handling of Java classes should they use just in time (JIT) or ahead of time (AOT) compiling? Even the choice of hardware wasn’t given from the start. Should they use third party chip dedicated to running Java or do it themselves? The former would have meant a bus and shuffling data in between the main chip and the Java chip.<br />
Not interesting. Ten man-years later, here’s what they<br />
ended up with.<br />
<div id="attachment_7375" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.jayway.com/wordpress/wp-content/uploads/2006/01/axis.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2006/01/axis-300x248.png" alt="" title="Schematic view of the Axis solution." width="300" height="248" class="size-medium wp-image-7375" /></a><p class="wp-caption-text">A schematic view of the print server and its different parts. The functionality is extended by uploading Java classes as a normal jar file.</p></div></p>
<h2>The Box</h2>
<p>First off they had to decide which road to travel – base it on a hardor software? Roll their own or go third part?<br />
Buying an ASIC block doing the Java and integrating it on their chip architecture would have been very expensive and wouldn’t have resulted in a cost effective system. Buying a third-party chip? That would have meant hooking it up on the system bus and making the whole system rather complex. In the end they settled on a software solution and doing it themselves.<br />
Basically they took the Axis ETRAX 100LX chip, added more memory and used software to implement the Java support. The ETRAX 100LX systemon-chip is a 32 bit, 100 MHz RISC CPU. The design then uses the Java 2 Platform, Micro Edition (J2ME) with the CDC and Foundation profiles. This resembles the abilities of a PDA or a set top box on your TV.</p>
<p>The Java foundation classes reside in a separate memory and are loaded by the print server before any uploaded jar files from the file system on the board are run. The memory is divided into a 16 MB file system and 16 MB for all the executable code including the Java Foundation classes. Add to this a 64 MB RAM that houses the system, of which approximately 13 MB is used for Java. This is considerably more than the standard print server that typically has 4 MB of memory.</p>
<p>The operating system is Axis’ own proprietary RTOS for embedded systems. The unit consumes a sparing 0.3 W.Add to this a USB port and you get a pretty good idea of this competent little circuit board.<br />
You change the function of the print server by uploading an ordinary Java jarfile. These compiled classes are then run on the print server and have access to the various ports and, of course, to its printer.<br />
There is even a remote call possibility (RMI) to query the server for its status et al.</p>
<h2>The result</h2>
<p>Even though there were apprehensions at the start of the project about the performance, the result speaks for itself. CaffeineMark 3.0 is a Java benchmark. It is used to measure the speed of a Java Virtual Machine (JVM) running on a particular hardware platform. The test is calibrated to return a score of 100 running on a Pentium 133 MHz using Windows 95 and Sun’s JDK 1.1 interpreter. Even though this feels like an old PC, it does give you a good reference point for embedded solutions.<br />
Axis’ print server landed on an impressive 60. This result is even more to write home about since the entire floating-point math is done in software.</p>
<h2>The Lessons Learned</h2>
<p>As with most projects, there were problems to overcome. In this case the floating-point library proved to contain bugs. The TCP stacks used at Axis were different compared to the Sun version. There were compiler issues going from Java to C. As coup de grace they needed the Java logo and that meant going through a grueling TCK test (Technology Compatibility Kit). This is a suite of tests, tools, etc that provide a way of testing an implementation for compliance with a Java.<br />
”This has been among the most complex printer projects we’ve done ”, says Jens Johansson with a weary smile. However, the Java portion worked without any major problems as soon as the foundation classes were in order. ”For one and half year we haven’t had any Java related bugs”, explained the tech lead Kristofer Johansson.<br />
They chose AOT compiling to implement the foundation classes, but this meant a large code base and it took time to implement. Hindsight is one of the best visual aids: might it have been better to use JIT instead?</p>
<h2>Possibilities</h2>
<p>So techno stuff is all just fine, but what can we do with this Java enabled print server? Ever forgot about an important printout that shouldn’t lie around? Well, why not a simply hook up a card reader? Once you arrive at the printer you swipe your card and, presto, your pulp stack pops out. Authentication and authorization could be done against an LDAP server.<br />
Still too simple. Why not implement a distributed load-balancing scheme for printers – next available printer pulls a job from a print queue somewhere. Need more power? Just hook up another printer to the network. Could I combine the print server with a web camera and motion detection? Add something to sample the temperature and we get surveillance, fire detection and printing to go.</p>
<p>Puleeze Axis, can I get a couple of print servers to try out?</p>
<p><em>Originally published in <a href="http://jayway.com/jayculture/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2006/01/04/printers-going-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrum down!</title>
		<link>http://blog.jayway.com/2006/01/04/scrum-down/</link>
		<comments>http://blog.jayway.com/2006/01/04/scrum-down/#comments</comments>
		<pubDate>Wed, 04 Jan 2006 09:06:48 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=7361</guid>
		<description><![CDATA[Scrum is not another rugby term*; it is both a rugby term and the name of one of the hottest project management processes to come off the assembly lines. Yes, it actually draws its heritage from Toyota and lean production! Most of it is just common sense though. A scrum is when the teams pack [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Scrum is not another rugby term*; it is both a rugby term and the name of one of the hottest project management processes to come off the assembly lines. Yes, it actually draws its heritage from Toyota and lean production! Most of it is just common sense though.</strong></p>
<p>A scrum is when the teams pack in a special formation in rugby, head to head, in order to gain possession of the ball.<br />
Here is the opening explanation from Wikipedia, assuming someone didn’t change it after printing.</p>
<blockquote><p>“Scrum is an agile method for project management, first implemented by a team led by Jeff Sutherland at Easel Corporation in 1993. It has been called a ”hyper-productivity tool”, and has been documented to dramatically improve productivity in teams previously paralyzed by heavier methodologies.”</p></blockquote>
<p>That sounds too good to be true! What is this?</p>
<p>* A scrum is when the teams pack in a special formation in rugby, heads to heads, in order to gain possession of the ball.</p>
<h2>The short story</h2>
<p>Scrum is an agile, iterative process where small self-organizing teams focus on producing a working demo of the system at the end of each sprint, iteration. One such sprint is typically four weeks.<br />
The product owner handles the product backlog. This is a list of prioritised features or activities. At the start of a sprint, the team and product owner collaboratively select a goal for the coming sprint. They then select the product backlog items that best support that goal. These backlog items are then decomposed into the necessary tasks. This is known as the sprint backlog. While the team may add or remove items on the sprint backlog during the sprint, the sprint goal remains unchanged.<br />
Through 15-minute daily meetings the team shares status information and the Scrum master removes any obstacles (impediments). The Scrum master controls the process, but the team is totally in control of the implementation.<br />
An executable is presented at the end of the sprint. After this demo, a new sprint starts and a sprint backlog is created.<br />
<div id="attachment_7363" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.jayway.com/wordpress/wp-content/uploads/2006/01/scrum1.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2006/01/scrum1-300x142.png" alt="" title="Scrum Process" width="300" height="142" class="size-medium wp-image-7363" /></a><p class="wp-caption-text">An overview of the Scrum process.</p></div></p>
<h2>What is the problem anyway?</h2>
<p>Several methodologies assume that building a system is something you can define or specify up front. The struggle to attain this level of confidence is often a difficult up hill marathon or just plain futile. Even small projects need to adapt during their implementation. Scrum, on the other hand, recognizes<br />
that IT is so complex that the only way to control it is through an empirical process. Watch the process. Constantly monitor it in order to get the desired output. The complexity, or our inability to fully understand the problem, has become a dogma.</p>
<h2>Who’s who?</h2>
<p>The roles in Scrum are actually quite few – Product Owner, Scrum Master and the Team Members.</p>
<h3>The Product Owner</h3>
<p>First we have the product owner, and this perhaps is the easiest role to understand. This person handles the product backlog and is responsible for setting the priorities for the product.</p>
<h3>The Scrum Master</h3>
<p>The Scrum master is not far from being a project leader if it wasn’t for the many things he/she does not do. The Scrum master protects the group during the sprint, removes impediments that hinder development and guards the process itself. He or she does not hand out assignments, dictate a solution or even make decisions for the team.</p>
<h3>The Team Members</h3>
<p>This cross-functional team is made up of around seven people with different background – programmers, testers, etc. They self-organize and structure their work. This means they alone decide on how to form a working group that can implement a solution to reach the sprint goal. This is important and slightly terrifying. Scrum seeks to unleash the group’s potential to strive for a goal as effectively as possible. The group therefore not only has the normal burden of obligations, but more importantly the right to decide how it should be done. This means the group could decide to use its cousin XP (extreme programming) as a base for their development model or perhaps RUP.</p>
<p><em>Why so few people?</em> In order to get a closely-knit development with fewer overheads, as is typical in agile projects, the group cannot be too big. Even the physical distance will affect the outcome. Going further than a ”coffee cup walk” could be a problem.</p>
<p><em>Why so many people?</em> I’ve heard people say that a group should not extend beyond 3-4 people in order to stay tight and focused. Scrum, on the other hand, seeks to reach hyper productivity where the group is drastically more effective at cranking out solutions. Call it synergies. Call it direct coupling of brains. Whatever the name, people can be a lot more effective when interacting without obstacles. You get too little of this if the group is too small.</p>
<h2>The Process</h2>
<p>Scrum is built up around the sprint, or the iteration. Though before we can start, we need a Product Backlog. This list contains everything that needs to be done on the project – stories, activities and so on. The product owner prioritizes every item.</p>
<h3>The Sprint Planning Meeting</h3>
<p>The sprint planning meeting sets off the iteration and produces a sprint goal and a Sprint Backlog. The goal and this list is the sole target for the team during the sprint. Tasks may by adjusted or split during its course, but no new no product backlog items can be added to the sprint. No boss sidetracking the Scrum master, no desperate plea from the salespeople can alter the backlog. This produces a box of calm that lets the group do real work instead of endless switching between tasks and trying to hit a target that is constantly moving.<br />
Is there no way to change the list? Well, there’s the simple case when tasks are completed faster than planned. The group can then decide to take on more tasks. In some cases, the product owner can OK changes to tasks in order to meet the deadline.<br />
And of course there is the ultimate change the sprint is cancelled; but that is a rather drastic measure.</p>
<h2>The Daily Scrum Meeting</h2>
<p>How do the team steer the work effort? How does the Scrum master know that all’s well? The answer is the daily Scrum meeting. This meeting lasts roughly 15 minutes and each team member is responsible for answering three questions:</p>
<ul>
<li>What have you done since the last Scrum meeting?</li>
<li>What is preventing you from doing your work?</li>
<li>What will you do until the next daily Scrum meeting?</li>
</ul>
<p>The Scrum master will pay close attention to what is said and how it is delivered. Are the team members doing what they should be doing? Is work progressing as it should be? Is the group functional or is something hindering it from performing?</p>
<h3>Tracking</h3>
<p>To track progress the team uses a <strong>Sprint Burn Down Chart</strong>. In this graph we can find the number of hours left to do and the number of days available. Hitting deadline is then a question of making sure the line reaches the x-axis by the last day.<br />
In the example graph above we can see that the group’s remaining hours actually increased around day five. The level of complexity was fully understood at this point in time. On day six a meeting with the product owner resulted in a change in ambition and made it possible to reach the sprint goal, albeit with a reduced ambition.<br />
<div id="attachment_7364" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.jayway.com/wordpress/wp-content/uploads/2006/01/scrum2.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2006/01/scrum2-300x263.png" alt="" title="Scrum Burndown chart" width="300" height="263" class="size-medium wp-image-7364" /></a><p class="wp-caption-text">The Sprint Burn Down Chart. Each Scrum team tends to have a ”signature” on how the remaining hours de- crease. Note the bump around day five.</p></div></p>
<h3>The Sprint Review Meeting</h3>
<p>The sprint’s final meeting is the review where the most important piece of artifact is shown to the product owner and others who might be interested – the executable. This piece of code should be something that is actually running. It might be small, it might just do one of the many things it will do in the end, but it is real. This means that there are no mockups, no PowerPoint slides and no dummies – just real stuff.<br />
This concludes the sprint where we’ve done all the designing, coding and testing that is needed to get the executable part of our system to do a demo.<br />
One more thing; the artifacts we need are marked in bold above, not a lot and very focused.</p>
<h2>Scale? Control?</h2>
<p>Having come this far you might be saying:<br />
”This all sounds all well and good for the programmers, but it can’t scale.”<br />
Actually, it can. By setting up a Scrum of Scrums – the Scrum masters from different projects form a Scrum of their own – you can scale up, as Jeff Sutherland has, to more than 500 people.<br />
I asked Sutherland whether Scrum doesn’t fail sometimes:<br />
”A high estimate would be that 5% fail, but they do so in two weeks.”<br />
There are a lot of projects that take a lot longer to implode than a mere two weeks.<br />
Scrum accommodates the complexity of IT and can increase efficiency drastically. It’s all about common sense and daring to live close to chaos. You let the team free and then check progress. Set free and monitor. Let go in order to gain control – a true paradox.</p>
<h2>In conclusion</h2>
<p>The process, the artifacts and hopefully even this article are easy to understand. However, Scrum is more, it is also a mindset. Without a deeper understanding of the process, the desired effects might not just appear. It’s a bit like mimicking Rembrandt, armed only with the angle and speed<br />
of the master’s stroke. This is the only project management method that I’ve found I can relate to. So my final question has to<br />
be... You wanna Scrum?</p>
<p><em>Originally published in <a href="http://jayway.com/jayculture/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2006/01/04/scrum-down/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaForum – nu nära Dig!</title>
		<link>http://blog.jayway.com/2005/12/04/javaforum-%e2%80%93-nu-nara-dig/</link>
		<comments>http://blog.jayway.com/2005/12/04/javaforum-%e2%80%93-nu-nara-dig/#comments</comments>
		<pubDate>Sun, 04 Dec 2005 10:02:53 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[javaforum]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=7388</guid>
		<description><![CDATA[En gång i tiden, före bubblan före dotcom dog sotdöden, fanns det ett Javaforum i Sverige. Nu är det dags att återfödas! Sun och Jayway är stolta föräldrar till Javaforum i södra Sverige, generation två! Det fanns en tid då Java-utvecklare kunde samlas för att ta del av det senaste inom Java och dessutom mingla. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>En gång i tiden, före bubblan före dotcom dog sotdöden, fanns det ett Javaforum i Sverige. Nu är det dags att återfödas! Sun och Jayway är stolta föräldrar till Javaforum i södra Sverige, generation två!</strong></p>
<p>Det fanns en tid då Java-utvecklare kunde samlas för att ta del av det senaste inom Java och dessutom mingla. Efter några års dvala är det nu dags att starta denna uppskattade form av kompetensutbyte igen. Fast nu kommer vi i en starkare version både ansikte-mot-ansikte och på nätet.<br />
Java handlar om öppenhet och samarbete. Javaforum är ett sätt att förverkliga visionen.<br />
”Det finns dessutom stora synergieffekter i att koordinera aktiviteterna” säger Bert Rubaszkin (Sun), en av de drivande krafterna bakom JavaForum. ”I och med Jayways engagemang i Javaforum börjar nu ett stabilt fundament för ett långsiktigt samarbeta att ta form. Nu förväntar vi oss att andra intresserade partners, som är beredda att engagera sig i detta hör av sig!”<br />
Seminarierna kommer att variera från det praktiska till det teoretiska, från det lilla till det stora men alltid vara intressanta.<br />
Du är hjärtligt välkommen till Javaforum.</p>
<p><em>Kom in och anmäl dig nu på javaforum.se, så är det redan klart!</em></p>
<p><strong>Urkopplad</strong> Nästa forum är den 23 mars kl 13:00 i Jayways nya lokaler på Hans Michelsensgatan 9. Skriv till bjorn.granvik snabel-a jayway.se och anmäl dig!<br />
<strong>Direktkopplad</strong> www.javaforum.se</p>
<p>Vi ses!<br />
<em>Originally published in <a href="http://jayway.com/jayculture/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2005/12/04/javaforum-%e2%80%93-nu-nara-dig/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Øredev 2005</title>
		<link>http://blog.jayway.com/2005/11/20/%c3%b8redev-2005/</link>
		<comments>http://blog.jayway.com/2005/11/20/%c3%b8redev-2005/#comments</comments>
		<pubDate>Sun, 20 Nov 2005 09:36:27 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=7381</guid>
		<description><![CDATA[Øredev is the biggest conference for developers in Sweden and covers several areas such as Java, .Net, Methods &#038; Tools and Embedded. The conference in our own backyard got off to a very good start indeed and featured internationally renowned speakers such as Eric Evans, Rickard Öberg. Kai Tödter etc etc. The number of attendees [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Øredev is the biggest conference for developers in Sweden and covers several areas<br />
such as Java, .Net, Methods & Tools and Embedded.</strong></p>
<p>The conference in our own backyard got off to a very good start indeed and featured internationally renowned speakers such as Eric Evans, Rickard Öberg. Kai Tödter etc etc. The number of attendees was 320 and they came from as far away as Copenhagen and Gothenburg. “Own backyard” is quite literal since Jayway was one of the principal organizers. Nevertheless, why not try and analyze our own effort?</p>
<h2>Trends</h2>
<p>As Java fans we had not only the Java track to enjoy. The Methods & Tools and Embedded tracks contained several interesting sessions with a Java base. This made it sometimes difficult to choose between colliding talks, just as it should be.<br />
Looking at the reviews from the sessions, we find “9 ways to hack a webapp” at the top. It was a great talk given by Martin Nystrom (yes, there are no dots above the “o”) – but somewhat embarrassing. The “I’ve made that mistake!” feeling was a bit too apparent. The top position of this talk came as no surprise. JavaOne attendees gave it an honorable second place in a review of all presentations given there.<br />
The talks covered a lot of ground. They ranged from the challenges of implementing Java on a mobile phone to 64-bit technology and its effects on the JVM, from standards like EJB3 to up-and-coming technologies like aspect oriented programming. On the anecdotal side we note Bert Rubaszkin, Chief Technologist at Sun Sweden, who in his “10 years with Java” talked about several achievements. Some of the examples included Rickard Öberg sitting in the audience. Times flies by faster within IT. Or, better still, it’s just the family!<br />
A few rough edges around the conference were apparent: the sun (yes, the one in the sky) together with a curtain on the loose, made life difficult for some lecturers on the main scene, nothing that can’t be fixed for round two of this annual conference.<br />
<div id="attachment_7382" class="wp-caption alignleft" style="width: 129px"><a href="http://blog.jayway.com/wordpress/wp-content/uploads/2011/03/öredev2005.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2011/03/öredev2005-119x300.png" alt="" title="Øredev 2005" width="119" height="300" class="size-medium wp-image-7382" /></a><p class="wp-caption-text">Mingling at Øredev 2005</p></div></p>
<h2>Conclusion</h2>
<p>The success of this, the first, developer’s conference in Öresund is promising. The conference will return this year in November. Let’s hope it continues to build on its promising start.</p>
<p><em>Originally published in <a href="http://jayway.com/jayculture/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2005/11/20/%c3%b8redev-2005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DDSteps &#8211; data driven sanity</title>
		<link>http://blog.jayway.com/2005/08/01/ddsteps-data-driven-sanity/</link>
		<comments>http://blog.jayway.com/2005/08/01/ddsteps-data-driven-sanity/#comments</comments>
		<pubDate>Sun, 31 Jul 2005 22:00:00 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[automated testing]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=7391</guid>
		<description><![CDATA[”Aaarrrgh”, is not only the sound of pirates. It is also the desperate cry from programmers who realize what a mess they’ve got themselves into. This is especially true in testing. The number of combination that you should run your code through easily outpaces you. But fear no more, here’s one pill with a great [...]]]></description>
			<content:encoded><![CDATA[<p><strong>”Aaarrrgh”, is not only the sound of pirates. It is also the desperate cry from programmers who realize what a mess they’ve got themselves into. This is especially true in testing. The number of combination that you should run your code through easily outpaces you. But fear no more, here’s one pill with a great taste ordered by Dr Jay DDSteps.</strong><a href="http://blog.jayway.com/wordpress/wp-content/uploads/2005/08/ddstepslogo.png"><br />
<img src="http://blog.jayway.com/wordpress/wp-content/uploads/2005/08/ddstepslogo.png" alt="" title="DDSteps" width="77" height="100" class="alignnone size-full wp-image-7401" /></a></p>
<p>DDSteps is on open source project the brainchild of Adam Skogman which aim to make sense of your unit tests when they consist of god knows how many permutations of input. Read on to find out exactly how.</p>
<h2>A Typical Project</h2>
<p>Let us tell the tale of a too-successful project. It all started out as a prototype web site, quickly hacked together over a week to show to the investors. Big hit! Some swift fixes later it went live slow, rocky, but making money. Refactoring the code was an inevitable next. As new people joined the project, test driven development was introduced to make sure that programmers did not break each other’s code. The unit tests covered more and more of the code. Even the happy hackers in the group had to admit that things were getting better and bugs were fewer.<br />
The business side of the now booming company poured new feature requests into the development and demanded that they appear in production “real soon”. Therefore, a shorter release cycle was introduced, releasing every month. Also, a quality assurance test team was set up to test each release. So developers had to “pre-test” the release before the test team got it. Testing now took two weeks. Bugs were all around and had to be corrected. At this point the site went global, requiring small specific changes for each country.<br />
This is when it all broke down. Testing now took over a month and bugs were often reported months after the release was made. Nobody wanted to re-release and do all those tests again, so the site went into production with known, serious bugs. It was at this point that the programmers went: “Aaarrrgh!”</p>
<h2>The Remedy</h2>
<p>Testing your solution for every type of input and making sure it will pass function tests is difficult at best. Usually, this is done “by hand” and requires real people. And, yes, it is boring and time consuming. So you have to automate it, just like you did with JUnit tests for unit testing.<br />
By Function tests we mean, ”Does it work like the use case says it should”. We mean full, system, end-to-end tests, using a production-like environment. We mean using a browser, surfing the web application and then checking the real database for results.<br />
Automating function tests is hard, mostly since they suffer from the same problem as the manual testing. Many of the tests are the same; just the data is slightly different in each test. </p>
<p>Data driven testing on the other hand separates the testing code from its input. This and the reusable test steps makes it easy to maintain and evolve the test cases, you get reuse instead of copy-paste. Need another field? Just add new column in your input and handle it in your test case and voila. There will be no explosion of test methods, no massive round of changes!<br />
Ok, let’s start from the top and look what DDSteps is and how it makes your life easier.</p>
<p><a href="http://blog.jayway.com/wordpress/wp-content/uploads/2011/03/ddsteps4.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2011/03/ddsteps4-300x161.png" alt="" title="DDSteps process" width="300" height="161" class="alignnone size-medium wp-image-7396" /></a><br />
<em>Figure: Overview of the DDSteps’ process. 1) Input is retrieved from an Excel file and populates your test cases and test step POJOs. 2) Yellow is your code. TestSomething is your test method that (re)uses different test steps. 3) The fixture F typically sets the database in the correct state for the test. The Navigators, Executors and Validators in this example use JWebUnit to perform their respective step. 4) Output – reports, console etc.</em></p>
<p>Since most tests are the same, with just different data, first we separate data (input) and the test code. The data, found in an Excel file, is inserted into your test case, each row becoming a test case run. The second important part is the framework of reusable test steps. Test cases are broken down into steps:</p>
<ul>
<li>Fixture – set up the needed data in your database. </li>
<li>Navigator – Navigate your web site. </li>
<li>Executor – Input data into the system, like filling out a form on a page and pressing a button. </li>
<li>Validator – Validate the output on a page or a row in the database etc. </li>
<li>Cleaner – Clean up any mess you have made.</li>
</ul>
<p>You implement these types of test steps using for instance JWebUnit and Spring JDBC. You can easily imagine that many test cases will use the same executor, since they pass through the same web page, so reuse is everywhere.<br />
Finally, DDSteps is just standard JUnit, so the test outcome is reported back via Ant, CruiseControl or your preferred JUnit compatible IDE. It integrates perfectly into your existing environment.</p>
<h2>Divide and Conquer</h2>
<p>Let us dive deeper. Again, how do we separate data from the code? You can do this several ways. We chose to use Excel. It’s not only easy to format and to enter data, it’s a de facto standard and you can use formulas etc. And if you want you can always use OpenOffice.<br />
Let us take the following use case from PetClinic from Spring – ‘Add new pet’.<br />
<a href="http://blog.jayway.com/wordpress/wp-content/uploads/2011/03/ddsteps1.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2011/03/ddsteps1.png" alt="" title="DDSteps &#039;Add new Pet&#039;" width="303" height="392" class="alignnone size-full wp-image-7392" /></a><br />
<em>Figure: Use case ‘Add New Pet’. Green is data that is put into an Excel file. See next figure. The letters N, E and V are our test steps for this use case.</em></p>
<p>We have now divided our use case above into reusable test steps. Next is the Excel file. From our test case we can see that we need: Owner, pet name etc.<br />
<a href="http://blog.jayway.com/wordpress/wp-content/uploads/2011/03/ddsteps2.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2011/03/ddsteps2.png" alt="" title="DDSteps input data" width="590" height="351" class="alignnone size-full wp-image-7393" /></a><br />
<em>Figure: The Excel file that holds our input and fixture data.</em></p>
<p>Each test method is entered on separate worksheets. The fixture data we need for the database is entered as well. DDSteps find your test data in the spreadsheet using the method names in your test code, and uses JavaBeans get/set to inject data into your test case and your test steps.</p>
<h2>Code</h2>
<p>Next is the test code. Let us look at just one part of it – navigating. The example covers points 1-6,7 of the use case, i.e. the first and second test step. In order for this part to work our HTML pages need to be written with JWebUnit in mind, i.e. an id is put on elements, so that we can find it and “click” etc. Let us assume this has been done. We also use Spring even though this is optional.<br />
The test case would then look something like this.</p>
<h3>PetclinicTestCase.java</h3>
<pre>
// Our test case, see PetFTest.xls for input.
public class PetFTest extends PetclinicTestCase {

    protected NavigateToAddPet nav;
    protected ValidatePetForm valForm;
    ...

    // The test method, same as tab name in Excel file.
    public void testAddPet_Ok() throws Exception {
        nav.runStep();
        valForm.runStep();
        ...
    }

    // Used from data file to access navigator properties, e.g. “nav.name”.
    public NavigateToAddPet getNav() {
        return nav;
    }
    ...
</pre>
<p>In the code snippet above we declare our PetFTest test case that inherits from PetclinicTestCase. This base class only holds common things like web browser, fixture etc. The test method testAddPet_Ok is simple and reduced to only use necessary test steps, nav (NavigateToAddPet) and valForm (ValidatePetForm).<br />
Also note that we have getNav() which is used as the first part in the data file “nav. name”. The access to properties is JavaBean based, i.e. using get/set methods. We will only look at the first test step, the navigator NavigateToAddPet, since the other steps are similar in concept.</p>
<h3></h3>
<pre>
public class NavigateToAddPet extends JWebUnitTestStep {

    // Reuse another navigation step
    NavigateToOwner navigateToOwner;

    public NavigateToAddPet(WebBrowser webBrowser) {
        // The web browser is injected by Spring.
        super(webBrowser);
        navigateToOwner = new NavigateToOwner(webBrowser);
    }

    public void runStep() throws Exception {

        // Delegate
        navigateToOwner.runStep();

        // Click ‘Add new pet’ button,
        // which is the submit button in the form ’formAddPet’
        setWorkingForm(”formAddPet”);
        submit();

        // Snapshot of web page.
        writeTrail(”Add New Pet Form”);
    }

    // Full name is populated from ”nav.name” in the data file.
    public void setName(String name) {
        navigateToOwner.setName(name);
    }
}
</pre>
<p>This test step is a composite of another navigator, NavigateToOwner, and going to the “Add new Pet” page. WriteTrail will write specified html page to the hard disk, a visual page debugger if you will.</p>
<h2>Run</h2>
<p>Having come this far, we can now run our test code and get the result.<br />
<a href="http://blog.jayway.com/wordpress/wp-content/uploads/2011/03/ddsteps3.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2011/03/ddsteps3-300x198.png" alt="" title="DDSteps output in Eclipse" width="300" height="198" class="alignnone size-medium wp-image-7394" /></a><br />
<em>Figure: And finally the output, in this example, in Eclipse.</em></p>
<p>Oops, better fix our code! In the example above we see the errors per row, not just by test method.</p>
<h2>What happened to the Project?</h2>
<p>When our team employ DDSteps, they can automate their tests, and cut down the time for testing to minutes, not weeks. This means you can run all function tests every night or every time the source code changes! Suddenly, you can release to production with no bugs because as soon as you know there is a one, you fix it during ordinary development. Function testing is now a part of development, not an afterthought.</p>
<h2>Conclusion</h2>
<p>DDSteps both tries to break new ground and to reuse solutions perfected by others. We think it is a good mix to implement function tests using data driven testing. Is it for you? Who knows? Get it from www.ddsteps.org to see for yourself.<br />
<em>Originally published in <a href="http://jayway.com/jayculture/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2005/08/01/ddsteps-data-driven-sanity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brave new EJB?</title>
		<link>http://blog.jayway.com/2005/03/04/brave-new-ejb/</link>
		<comments>http://blog.jayway.com/2005/03/04/brave-new-ejb/#comments</comments>
		<pubDate>Fri, 04 Mar 2005 10:55:36 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=7408</guid>
		<description><![CDATA[The new specification of Enterprise Java Beans (EJB) version 3 came out a little while ago. Now this may be an early draft, but the contours are already in place. It’s going to be different - very different. In this article we take a close look at every little detail... not. Rather, we attempt to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The new specification of Enterprise Java Beans (EJB) version 3 came out a little while ago. Now this may be an early draft, but the contours are already in place. It’s going to be different - very different. In this article we take a close look at every little detail... not. Rather, we attempt to take an overall view and check out some code!</strong></p>
<h2>The story so far....</h2>
<p>Within J2EE, EJB has been seen as one of the heaviest technologies - not just for its complexity, but also from the point of view of the various factors involved in doing something. The list of “points for improvement” could be long. Onto the stage came Microsoft with its Dotnet, and began to use words like architecture. Sun, which still is used to sing in the final scene when it comes to creating major systems, realized that it had to be easier to develop with EJB, preferably without losing power. Cur- tain up! Enter EJB3 stage left!</p>
<h2>Objectives</h2>
<p>There were several objectives behind the new version.<br />
New simpler configuration. Only state what is different – configuration by<br />
exception.</p>
<ul>
<li>Encapsulate the beans to reduce dependency and knowledge of the world around. No artificial methods which are used, etc. </li>
<li>Simpler persistence through simpler Java objects – ”Plain old java object” (Pojo). </li>
<li>Support for lightweight modelling, easy to test outside the container (no need for heavy application servers). </li>
<li>Support for inheritance, polymorphism, etc. Yes, that’s right! Actual object orientation! </li>
<li>No checked exceptions, e.g. RemoteException. </li>
<li>...and a whole pile of improvements.
</ul>
<p>In other words: easier, simpler and neater! Let’s take a closer look to see how successful they were.</p>
<h2>Metadata</h2>
<p>One of the first simplifications was to make use of the metadata which comes with Java 5 (JDK 1.5). To put it simply, it is a way of describing the code from a more comprehensive point of view. For example, why write long XML files when it should be enough just to say, “This method must be accessible from all machines.”</p>
<p>In our example, this will be ”@remote” in front of the method name. Obviously much simpler!</p>
<p>However, this has some unexpected effects. Now there are many new different meta settings and above all their default values. You don’t need to use all of them, but what is needed is new knowledge. Nevertheless, I still think it is better. The alternative would be to do as in the current version of EJB, where one is forced to always state values for all settings.</p>
<h2>A simple bean</h2>
<p>So let’s look at some code! A stateless session bean is the closest we get to “Hello World” with EJB.<br />
Do you remember all those methods, for example ejbCreate, which had to be implemented despite being empty? And don’t forget the various interfaces and a description file with lots of XML.<br />
Why not like this?</p>
<pre>
@Stateless
@Remote
public class FooBean {
    public void printBar() {
        System.out.println( ”Bar” );
    }
}
</pre>
<p>Much better the way I see it. Stateless indicates that this class is a stateless session bean. “Remote” indicates that it must be capable of being called from an- other machine. In reality more settings are needed but these either have standard values or are retrieved from the code. In the example we quote above, for instance, an interface file is generated, which we can later use in e.g. a client program which will call up the server.</p>
<p>And a session bean that saves its state isn’t all that much more difficult.</p>
<pre>
@Stateful
public class BarBean {
    @Tx(TxType.REQUIRED)
    @MethodPermission(”guest”)
    public void orderSomething( String aDrink ) { ... }
}
</pre>
<p>This time we had both transaction management and security. Note that it is just as easy to order an alcohol free alternative <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<h2>A wilder bean</h2>
<p>However, the great challenge with EJB 3 isn’t the session beans but the entity beans (CMP/BMP). The principle for saving these in a database has seen a real change. Gone are the monoliths that were connected to the mother ship, the application server.</p>
<p>An entity bean is marked with ”Entity”.</p>
<pre>
/** Our customer Pojo. */
@Entity public class Customer {
    private Long id;
    private String name;
    // A customer has one address.
    private Address address;
    private Set orders = new HashSet();

    // Our primary key
    @Id(generate=SEQUENCE)
    public Long getID(){
        return id;
    }
    protected void setID (Long id){
        this.id =id;
    }

    // A customer has zero or many orders.
    @OneToMany(cascade=ALL)
    public Set<Order> getOrders(){
        return orders;
    }
    public void setOrders(Set<Order>orders){
        this.orders =orders
    }
    ...
</pre>
<p>All fields in the class are saved unless otherwise stated. Access to these fields is typically based on get and set methods in precisely the same way as for ordinary JavaBeans.</p>
<p>Both the name of the table and the columns are calculated in this case from the names we gave them in the code. Naturally, we can specify something different, but for the sake of simplicity we take a straightforward approach here. It is also possible to put the configuration in separate files - as previously – and in this way we could override the meta settings.</p>
<p>The first reference to another class is ”Address”. If it is marked as persistent, these instances are also read and written automatically.</p>
<p>Our primary key is “id”, which also contains information on how to generate new IDs.</p>
<p>We have also generated an Order pojo in a similar manner. The relation to this is written with “OneToMany”, as a customer has several orders. Order relates back to our Customer in the same way as the Address field above, thus the relation is two- way, which differs in outlook from a relational database. You will find an example of this further down in the article.</p>
<p>If we have read in a customer from the database, we have also automatically received that customer’s Orders. This will be an object tree where the root is the customer with his primitive values and references to the other sub-object Address and the list with Order.</p>
<p>Finally, the relation from customer to order is set as “cascade=ALL”, which speci- fies how events such as “save”, “delete”, etc are to be propagated. In the example we send all on to all order objects in the list.</p>
<h2>Read a little, write a little</h2>
<p>Let’s move on to retrieving a customer from the database. Therefore we insert a ses- sion bean that does just that. First we must acquaint ourselves with what replaces the application server – “EntityManager”. In a loose sense this class represents our database/session and manages the lifecycle for our pojos. It also contributes to gene- rating our queries (Query) to the database.</p>
<p>First a session bean:</p>
<pre>
@Stateless
public class OrderEntryBean {
    @Inject private EntityManager em;
    //...
}
</pre>
<p>Inject allows us to manage our pojos, i.e. get into the database – search, generate, etc. EntityManager can come from anything; it need not be an application server, but maybe a somewhat simpler test bench.<br />
Now we can insert a method for searching for customers who have a certain name.</p>
<pre>
public List findByName (String name) {
    Query q = em.CreateQuery ( “SELECT c FROM Customer c ” + “WHERE c.name LIKE :custName ” );
    q.setParameter(“custName ”,name);
    q.setMaxResults(10);
    return q.listResults();
}
</pre>
<p>The result is a list of the customers which matched the names we included. Re- trieving the value of these is quite simply a matter of looping over the list and calling up get and set methods.<br />
Now we’ll make it a bit more difficult and add an order.</p>
<pre>
public void enterOrder(int custID, Order newOrder){
    Customer c = em.find(“Customer ”,custID);
    c.getOrders().add(newOrder);
    newOrder.setCustomer(c);
}
</pre>
<p>The relation is two-way and therefore they both require a reference to each other.<br />
As yet the object is not in our database. Somewhere we have to tell our Entity- Manger to do the job and save our customer “c”.</p>
<pre>
em.create(c);
</pre>
<p>The customer is already in the database and will therefore be ignored. The event “save” will be sent on to sub-object (cascade=all) and the order we had stored in the database.</p>
<h2>EJB QL</h2>
<p>The new specification does not just involve simplifications. We also have entirely normal improvements to EJB QL, for example: </p>
<ul>
<li>bulk processing of delete and update, </li>
<li>group by, having,</li>
<li>sub and dynamic queries, </li>
<li>and more functions (UPPER, CURRENT_DATE, etc) and so on.
</ul>
<p>One of my favourites is probably a polymorphism, which can already be used here:</p>
<pre>SELECT avg(e.salary) FROM Employee e</pre>
<p>So if Manager now inherits from Employee, we will obtain an calculated mean value for everyone – both ordinary employees and managers. Though maybe it is a less interesting example to mix up salaries like this <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<h2>When and how?</h2>
<p>If we use the number of pages in the specification as a mark of how much more needs to be done, then there is a lot. EJB 2.1 weighs in with a brave 646 pages. The draft of version 3 is more modest with 93. Moreover, many aspects invite discussion. At the time of this writing a second draft has been released. It is now divided into two documents – persistence is kept seperately. Combined they land at nearly 200 pages.</p>
<p>It’s going to take time. I hardly dare guess where the horizon lies. Shall we say a year before the specification is ready? And should we add another year until it is generally available? True enough, this is my pessimistic side talking - I hope. There are already some versions which, so to speak, comply with the standard. That’s why “now” is a good time to prepare for what is to come.</p>
<p>Would you like to have a deeper understanding of what it’s like to develop such a solution? Trying out a Hibernate/Xdoclet combo is good idea since it is so similar EJB3 persistence. If you are interested in experimenting, JBoss has a beta version of the EJB specification based on Hibernate.</p>
<h2>Brave new EJB?</h2>
<p>Yes, in fact. Sun has chosen the right path to take. And for that they deserve praise. It requires courage to break with old doctrines. The “old” EJB was a heavy affair which hasn’t exactly made life any easier for us programmers. But – and there’s always a but – the new specification is both simpler and more complex. The complexity is tied up with the new power that object orientation, pojos, etc gives us. But extra<br />
power tends to require extra learning. There are going to be quite a few more ups and downs before we can set the “pedal to the pojo”.</p>
<pre><strong>Resources</strong>
JSR #220 <a href="http://www.jcp.org">http://www.jcp.org</a>
Hibernate <a href="http://www.hibernate.org">http://www.hibernate.org</a>
Jboss <a href="http://www.jboss.com">http://www.jboss.com</a>
</pre>
<p><em>Originally published in <a href="http://jayway.com/jayculture/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2005/03/04/brave-new-ejb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Personligt: JavaOne 2004</title>
		<link>http://blog.jayway.com/2004/08/04/personligt-javaone-2004/</link>
		<comments>http://blog.jayway.com/2004/08/04/personligt-javaone-2004/#comments</comments>
		<pubDate>Wed, 04 Aug 2004 10:24:00 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[javaone]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=7414</guid>
		<description><![CDATA[Från varje stor och viktig konferens så måste det finnas en objektiv och heltäckande rapport – det här är inte den artikeln. Istället får ni mina personliga iakttagelser kryddat med diverse spekulationer och tyckanden. Med denna varning ur vägen och utan eftertanke, låt oss dyka in i Javavärldens största konferens för programmerare – JavaOne 2004. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Från varje stor och viktig konferens så måste det finnas en objektiv och heltäckande rapport – det här är inte den artikeln. Istället får ni mina personliga iakttagelser kryddat med diverse spekulationer och tyckanden.</strong></p>
<p>Med denna varning ur vägen och utan eftertanke, låt oss dyka in i Javavärldens största konferens för programmerare – JavaOne 2004.</p>
<h2>EoD</h2>
<p>En av de viktigaste drivkrafterna på sistone hos Sun är EoD, Ease of Development. Denna idé om att det måste vara lättare att jobba med Java har fått starkt fotfäste. Tack Microsoft! Tack för Dotnet och för att ni tvingade Sun att konkurrera på nya villkor.<br />
Ta till exempel Sun Java Studio Creator (SJSC) 1.0 som presenterades under dagarna. Det är en vanlig utvecklingsmiljö förklädd till Visual Basic. Detta låter kanske inte så häftigt, men faktum är att både gränssnitt och den genererade lösningen ser bra ut – till och med om man tar hänsyn till demons glittriga yta. Listan med förkortningar, JSP, JSTL, JSF, etcetera är precis så vanlig Java som man kunde hoppas på. Sun kan mycket väl lyckas med att attrahera f.d. VB-programmerare, och kanske även gamla härdade javaiter, som vill köra J2EE med krockkudde.</p>
<p>Tänk er att kunna skapa en prototyp i SJSC för att sedan rycka ut olika lager och ersätta det med något mer industriellt. Jag håller tummarna för att Sun gör det rätta. Lite rita-dra-ochtesta-kod skulle inte skada för en gångs skull.</p>
<h2>Mer EoD – EJB 3</h2>
<p>Men det finns andra mer långtgående effekter av EoD. Ta metadata, dvs. att man kan berätta saker om koden. Man skulle enkelt kunna ange att en metod är ”remote” och vips så genereras de filer som behövs för att skapa en web service. Bästa exemplet är nog EJB 3.0 som hade en del riktigt enkla powerpoint-slajds – de var helt enkelt tomma. Det lilla som fanns kvar var uttryckt som metadata i koden. Applåderna lät inte vänta på sig.</p>
<p>Jag får erkänna att jag aldrig tyckt om EJB och framförallt inte CMP. När jag talat om bristerna har jag ibland känt mig ganska gnällig. Expertgruppen för EJB har gjort en rejäl sväng och skapat en bra mycket mer elegant lösning. Tänk er enkla Java-bönor med metadata (typ Hibernate med XDoclet) så får ni en rätt bra bild. En så pass ny kurs innebär att gamla sanningar utsätts för hårda prövningar. Vad sägs om följande citat från konferensen ”You shouldn’t have to be a rocket scientist to be an EJB-developer” eller ”the Data Transfer Object [DTO] anti pattern”? Det sista innebär inte mindre än en dogms död för vad god EJB-programmering har inneburit.</p>
<p>Något oväntat kanske, så hamnade de nu i samma säng som JDO – Java Data Objects – en av Suns andra persistenslösningar. Diskussionerna både bakom och framför ridån var intensiv under dagarna. Resultatet har tack och lov inte väntat på sig. De två expertgrupperna har precis kommit ut med ett öppet brev där man lovar att arbeta ut en gemensam lösning. Det lär ta tid, men det är definitivt ett steg i rätt riktning. Jag får erkänna att jag antagligen inte kan gnälla länge till.</p>
<p>Det finns långt fler exempel och gemensamt för dessa nyheter är EoD. Vi kommer att få se mer av denna katalysator.<br />
<a href="http://blog.jayway.com/wordpress/wp-content/uploads/2004/08/javaone2004.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2004/08/javaone2004.png" alt="" title="JavaOne 2004" width="497" height="404" class="alignnone size-full wp-image-7421" /></a></p>
<h2>SOA, nu med XL hajpfaktor</h2>
<p>Det verkar finnas en naturlag som alla konferenser måste följa – minst ett ämne måste trissas upp. Flosklerna ska flöda och en exakt förklaring saknas. I år vågar jag mig på att utnämna SOA till huvudkandidat. Service Oriented Architecture var på många föreläsares läppar och tanken på en sorts gemensam arkitektur är lockande. Jag kunde dock inte förstå exakt vad det är som skiljer SOA från web services, möjligtvis är den senare ett specialfall av SOA. Nåja, gräv ner fötterna i jordmyllan och var beredd på att höra mer om detta begrepp. Det finns många intressanta tankar, men också en hel del floskler som vi hört förr. Det lär ta tid, men chansen är att det kommer på en server nära dig.</p>
<h2>Klienter, feta som mobila</h2>
<p>Vi har fått leva i flera år med anorektiska klienter (läs: webbläsare med uselt gränssnitt som bara en mamma kan älska;-) men det verkar förändras nu. Det är inte längre självklart att en klient måste vara tillgänglig överallt på bekostnad av användargränssnitt, funktionalitet etc. Under konferensen fanns det flera exempel på varierade klienter – det var allt från att löften om att kunna generera feta klienter ”i nästa version” till skräddarsydda mobila varianter.<br />
Står dina användare fortfarande ut med tunna skal som blinkar och fladdrar? Jag gissar att de närmaste åren kommer fler av oss att rycka fram de gamla böckerna om gui och Swing för att vi glömt vad vi redan kommer ihåg.</p>
<h2>Femfemfem</h2>
<p>PR-avdelningen på Sun har slagit till igen. Förra gången detta hände fick de för sig att använda både 1.2 och 2 som nummer för samma release – den första var JDK och den senare det mer övergripande och luddiga Java 2 Standard Edition. Nu räknar vi upp hela härligheten till Java 5.0 eller var det JDK:n? Och vad var det nu J2SE skulle heta...<br />
Vi tar det igen; 1.5 är det interna numret, 5.0 är det externa. Och tvåan i J2SE blir då det utomjordiska numret?</p>
<h2>Far out</h2>
<p>Första kandidaten i denna klass är Nasa och deras Rover – Marslandaren. Både den och program runt omkring använder sig av Java. Det var roligt att höra om deras lösning med robotarmar och allt som fanns på deras bilder. När de fick frågan om vilken databas de använt för att spara all bilddata, så spred sig ett förtjust fniss bland åhörarna – MySQL. Man behöver tydligen inte så mycket mer om man bara ska till Mars.</p>
<p>Den andra kandidaten är Groovy som är ett nytt språk från veteraner som James Strachan (Geronimo, jelly, dom4j, maven, Jakarta commons etc.). De hade lagt märke till att mycket kodande går åt till att limma ihop olika komponenter. Varför inte uppfinna ett nytt språk som gör detta och mycket annat lättare? Född var Groovy. Några absolut minimala exempel:</p>
<pre>
str = ”testing”
// Notera inget semicolon!

c = str[-1]
// c är nu lika med ’g’

s1 = str[3..1]
// s1 är nu lika med ”tse”

v=[1,2,3].find{it>1}
// v är nu lika med 2
</pre>
<p>I listan ”1,2,3” så letar vi efter den första posten som uppfyller villkoret vi skickat med (”it” är en sorts standardparameter). Vi kan alltså skicka med kod som ska exekveras!<br />
Man behöver många fler exempel för att förstå hur häftigt det är, så jag ska inte ens försöka göra det rättvisa här. Groovy fick dock det att klia i mina programmerarfingrar.</p>
<h2>Siffror och visioner</h2>
<p>När Suns ledning talade var det många siffror. Det var antalet Java X, antalet miljoner dollar, antalet... ja, ni förstår. Allt var förvisso intressant och visionen var också ”Everything and everyone connected to the Internet”. Och jag fick onekligen en känsla att Java är med överallt. Scott McNealy uttryckte det mer subtilt när Sun fick en utmärkelse för sin marknadsledande Java Card och dess dominans:<br />
We prefer ’interesting market share’.</p>
<p>Var fanns då den rena råa visionen, passionen? Mestadels hittade jag den i de olika grupperna, allt från expertgrupper inom Sun till, och kanske framförallt, olika kommuniteter (”communities”). Här fanns de galna idéerna, de lovande framtida teknologierna och de intressanta verktygen. Det gör säkerligen inte våra liv lättare på kort sikt, men jösses vad roligt jag kommer att ha det!</p>
<p><em>Originally published in <a href="http://jayway.com/jayculture/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2004/08/04/personligt-javaone-2004/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AOP featuring Rickard Öberg</title>
		<link>http://blog.jayway.com/2004/02/02/aop-featuring-rickard-oberg/</link>
		<comments>http://blog.jayway.com/2004/02/02/aop-featuring-rickard-oberg/#comments</comments>
		<pubDate>Mon, 02 Feb 2004 12:23:14 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=7425</guid>
		<description><![CDATA[I didn't know what to expect, but the appearance of Rickard Öberg – a renowned programmer on the Java world scene – surprised me. Apart from having written a book on RMI, he has been one of the core programmers behind JBoss. He instigated the XDoclet tool. WebWork, winning Java programming competitions, lectures and other [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I didn't know what to expect, but the appearance of Rickard Öberg – a renowned programmer on the Java world scene – surprised me.<br />
Apart from having written a book on RMI, he has been one of the core programmers behind JBoss. He instigated the XDoclet tool. WebWork, winning Java programming competitions, lectures and other achievements are also on his CV. Moreover, he's not your average online personality, or perhaps he is? Anyone who remembers the Pet Store debacle*?</strong></p>
<p><em>* Microsoft vs. Sun over the J2EE blueprint called PetStore. It resulted in a hot debate with many arguments.</em></p>
<p>I was sort of waiting to meet someone, well, far out. Instead this wholesome dude with a four-day beard greets me with a smile. I can't help but to think of a strong caffe latte smooth milk blended with mind-altering caffeine.</p>
<p><strong>Q: SiteVision is the content management system (CMS) sold by the company you work for, SenseLogic. Ok, without any prenuptial agreement, let's get at the first question why?<br />
Why do you use aspect oriented programming in SiteVision? After all, there isn’t that many product grade systems using aspects as a core design choice.</strong></p>
<p>A: There are several reasons. When we began writing SiteVision we soon realized that we had to encapsulate reusable code in a number of places, especially features that were side effects of method calls. Object had to be saved on setter calls, events had to be sent, logging had to be done, transactions should be managed, and so on. We couldn't figure out a way to do it using standard technology, e.g. EJB, so the only solution was to use AOP.</p>
<p>We were also on a very tight schedule. In just a couple of months we had to build a commercially viable CMS-tool using only five developers, and after that we had to maintain and develop it at such a rate as to catch up, and pass, our competition. It really should be impossible, and it would be with standard technology. The solution was to avoid writing code by using AOP. AOP allows an extreme degree of reuse of code, and because of this we managed to write lots of features with a minimal effort, and since we avoided writing unnecessary code to a large extent it also became easier to maintain. In addition, since AOP makes it easy to add functionality incrementally we were also able to enhance the architecture and implementation as we went along without having to change much of what was already written.</p>
<p><a href="http://blog.jayway.com/wordpress/wp-content/uploads/2004/02/Rickard.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2004/02/Rickard.png" alt="" title="Rickard Öberg" width="507" height="368" class="alignnone size-full wp-image-7428" /></a></p>
<p><strong>Q: Why roll your own aspect engine? Why didn't you decide to use AspectJ or some other aspect-inspired tool?</strong><br />
A: After the decision to use AOP was made I researched the available tools on the market, and compared their feature sets with our requirements, especially with regard to code maintenance, performance, scalability. None of the tools, including AspectJ, had been written with such requirements in mind, so we had no alternative but to write our own tools. My background in EJB made it possible for me to combine the principles of AOP with our requirements in a good way.</p>
<p>In hindsight I can conclude that it was the right decision, and if I were to make the same decision today I would still do the same. There is, in my opinion, still a lack of good AOP-tools that support the demands of a complex server side application. The awareness of the importance of such tools is on the increase however, so I would be surprised if this has not changed by next year.</p>
<p><strong>Q: AOP being a true paradigm shift what are the biggest changes when going aspect?</strong><br />
A: There are two things that stand out, from a design and implementation point of view. First of all it takes some time to learn to recognize "cross-cuttting concerns", that is, code that can be extracted into an aspect. Second, the use of static introductions as a design tool gives one a whole new set of posssibilities with regard to domain model design. Instead of using inheritance as the main building block for reuse of code one would use design by composition, which gives you many more possibilities for combining existing components. It takes a while to get used to this new freedom, but once you do that everything is fine.</p>
<p><strong>Q: SiteVision is soon to go version 2. Has your view on AOP changed during the trip?</strong><br />
A: In the beginning I was, as most others seem to be now, fascinated with the concept of interception. What difffers now, almost two years later, is partly a realization of the importance of static introduction, and partly the understanding of how important it is to have a powerful pointcut model. AOP has so much more to offer than just method call side effects.</p>
<p>As for AOP in general it is great to see that more developers are beginnning to see the advantages of it, even though the examples often are so trivial that it's hard to see the point of it. I'm also waiting for more people to realize just how powerful static introductions are as a design tool, and the consequences this has for design pattterns and such issues.<br />
It's going to be quite a revolution, and several tools that exist today in order to avoid the problems of current system design techniques are going to get a tough time.</p>
<p><strong>Q: Do you dare to mention tools, or types, that will have problems?</strong><br />
A: I suppose XDoclet is the most obvious one. We are not using any code generation at all in SiteVision, and that is solely because we have been able to avoid all the problem of standard design principles by using AOP.</p>
<p><strong>Q: Let's pull out the tarot cards. What's in the future for AOP?</strong><br />
A: The theoretical part of AOP seems to be stabilizing, but we will probably see more tools in the AOP space. Some people ask, "Why not only use AspectJ?” but I think that's like saying, "Why not just drive BMW?". There's nothing wrong with a BMW, but sometimes a Volkswagen works better, and sometimes a Porsche is the only choice.<br />
As usual it's about choosing the tool that best matches your requirements, and I can't see AspectJ being able to match all different kinds of requirements at the same time.</p>
<p>Apart from the AOP frameworks it will also be very important to have good support tools, especially with regard to visualization of AOP systems. Since AOP to a large extent is about fragmentizing and componentizing code it can sometimes be difficult to see what a component does just by reading code. A visualization tool for AOP can put together all the different pieces that make up the whole, and present them as one unit even though they have been developed separately. Access to this kind of tools is, of course, crucial.</p>
<p>We have built such a tool ourselves for our own system, and it has been very helpful when we are expanding the system and when we are looking for bugs.<br />
The step after that, I guess, is the possibility to build packaged aspects that can be reusable in your own projects. However, predicting component markets have proven to be a notoriously difficult task so I'm not going to bet on it.</p>
<p><strong>Q: ...and the future for SiteVision?</strong><br />
A: Without revealing too much we can see that our framework and way of building systems gives us interesting opportunities to build application using AOP which run in SiteVision as portlets. Our next version expands the product into the portal segment, and the next logical step after that is to include document management features. We are also looking into how to provide scalability through clustering, and have some rather unique ideas there. But, one thing at a time.</p>
<p><strong>Q: For the finale What are your top five advices for the wannabe aspect programmer?</strong><br />
A:</p>
<ol>
<li>Read "Design Patterns" (the GoFbook)</li>
<li>Read the documentation for AspectJ
<li>Find a medium size example application and implement it fully using AOP. Pick the framework which best suits your needs. I would start looking at AspectJ for client side development and AspectWerkz for the server side.</li>
<li>Apply design patterns using AOP as far as possible.</li>
<li>Read the AOP-entries in my blog <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ol>
<p>It is somewhere around here, at the end of the interview, that I start to long for a good cup of coffee, some Java and lots of aspects <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<pre><em>Resources</em>
SenseLogic: <a href="http:// www.senselogic.se">http:// www.senselogic.se</a>
Rickard's blog: <a href="http://www.jroller.com/page/rickard">http://www.jroller.com/page/rickard</a>
</pre>
<p><em>Originally published in <a href="http://jayway.com/jayculture/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2004/02/02/aop-featuring-rickard-oberg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ytterligare en Aspekt på din kod</title>
		<link>http://blog.jayway.com/2004/01/20/ytterligare-en-aspekt-pa-din-kod/</link>
		<comments>http://blog.jayway.com/2004/01/20/ytterligare-en-aspekt-pa-din-kod/#comments</comments>
		<pubDate>Tue, 20 Jan 2004 12:27:46 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[aop]]></category>
		<category><![CDATA[aspectj]]></category>
		<category><![CDATA[aspects]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=7436</guid>
		<description><![CDATA[Har du någonsin kopierat vissa snuttar kod – om, om och om igen? Trots att du redan har en snygg objektorienterad arkitektur? Trots att den är full med de bästa design-mönster som går att uppbringa? Trots att du valt de bästa verktygen och ramverken? Lika förbaskat så sitter vissa rader, som loggning, både i ryggraden [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Har du någonsin kopierat vissa snuttar kod – om, om och om igen? Trots att du redan har en snygg objektorienterad arkitektur? Trots att den är full med de bästa design-mönster som går att uppbringa? Trots att du valt de bästa verktygen och ramverken? Lika förbaskat så sitter vissa rader, som loggning, både i ryggraden och i varje klass. Vad är fel? Och hur kan man undvika det? Aspektorienterad programmering (AOP) kan vara svaret – om inte annat så är det ett paradigmskifte värt några hjärnceller.</strong></p>
<p>Trots att vi anstränger oss till det yttersta att modellera våra system intill perfektion, nåja i alla fall väldigt, väldigt nära, så är det fortfarande svårt att fånga strukturen hos ett problemområde. Detta märks t ex genom att vi kopierar välbehövliga små bitar kod och lägger in dem överallt. Inte nog med detta, de klasser som helst bara skulle behöva lösa en uppgift, tvingas att känna till säkerhet, databas, loggning osv. Allt detta leder till system som är svåra att underhålla och förändra.</p>
<p>Vad skulle hända om vi kunde plocka ut all loggning i våra projekt och lägga dem i en separat klass – en aspekt? Istället för att sprida ut en viss lösning i vårt system, kan vi nu underhålla den på ett enda ställe. När programmet kompileras så förs koden tillbaks ut där vi hade den innan.</p>
<p>För att bättre förstå vad aspekter är tittar vi närmare på AspectJ, som är en variant av AOP baserad på öppen källkod. Den har flera år på nacken och skapades på Xerox PARC som ett forskningsprojekt med stöd av DARPA.</p>
<p><div id="attachment_7450" class="wp-caption alignnone" style="width: 698px"><a href="http://blog.jayway.com/wordpress/wp-content/uploads/2004/01/aspekt1.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2004/01/aspekt1.png" alt="" title="Ett exempel" width="688" height="339" class="size-full wp-image-7450" /></a><p class="wp-caption-text">Ett exempel: Var finns egentligen koden för loggning?</p></div><br />
<em>En vanlig syn är loggningen som ligger utspridd över ett helt system. När vi inför en aspekt så får vi ett enda ställe att underhålla den på.</em></p>
<h2>Kodpunkt, punktsnitt och direktiv</h2>
<p>I aspektorienterad programmering kan man samla alla dessa små bitar kod på ett enda ställe. Men vi måste ju fortfarande kunna köra dessa på givna ställlen i programmet? Lösningen i AspectJ är att identifiera punkter i exekveringen av ett program – så kalllade kodpunkter (joinpoints).<br />
Det finns flera olika typer av kodpunkter man kan identifiera; metodanrop, skapande av objekt, att sätta attribut, utlösning av undantag (exceptions) osv. Ett punktsnitt samlar en omgång kodpunkter och ger dem ett namn.<br />
Genom att ange kod, direktiv (advice), som ska köras vid dessa kodpunkter kan vi samla tvärgående intressen (crosscutting concerns) i en enda fil – en aspekt. Eller annorlunda uttryckt:</p>
<pre>aspekt = punktsnitt(kodpunkter) + direktiv</pre>
<p>En aspekt består av en omgång identifierbara punkter i programmet där extra kod ska köras.</p>
<h2>Vad kan man göra mer?</h2>
<p>Vi har bara gått igenom ett hyfsat enkelt exempel till höger, men det finns många saker man kan använda AspectJ:</p>
<ul>
<li>Olika former av loggning och debugging.</li>
<li>Design-by-contract, d v s att man kollar inoch utgående tillstånd och parametrar. När man är nöjd att systemet uppfyller kraven kan man ta bort dessa aspekter.</li>
<li>Testa optimering, alternativa lösningar etc.</li>
<li>Cachning, synkronisering, accesskontroll etc.</li>
<li>... och fler tekniska aspekter som inte har med vårt problemområde att göra.</li>
</ul>
<p>Innan har vi endast talat om dynamisk förändring av ett program, d v s att påverka arbetsflödet. Men det går också att ändra den statiska strukturen genom att lägga till t ex klassvariabler, metoder, ändra arv. Här uppstår fler möjligheter:</p>
<ul>
<li>Multipelt arv som t ex mix-in i C++</li>
<li>Genomförande av kodstandard. ”Ingen får ändra en variabel direkt”. Denna koll kan t o m göras vid kompilering!</li>
</ul>
<p>Listan kan göras mycket längre. Vi befinner oss bara i början av vår förståelse om var och hur vi bäst använder aspektorienterad programmering. Även om denna inte kommer att ersätta objektorienterad programmering (OOP) så kommer den att vara grunden för AOP på samma sätt som funktioner utgör grunden för OOP.</p>
<h2>Ett enkelt (nåja) exempel</h2>
<p>Vi skulle kunna gå igenom ett enkelt ”Hello Aspect World”, men jag väljer iställlet att dyka i lite djupare. Jag vill mäta hur lång tid det tar att anropa databasen i vårt hemmasnickrade modelllager.<br />
Vår modellkod innehålller en abstrakt klass som definierar ett gränssnitt för att arbeta mot databasen. Personklassen representerar en post i person-tabellen och implementerar själva anropen med SQL mot databasen i metoderna dbSave, dbUpdate och dbRemove. I ett anfall av hybris lägger jag in mig själv i databasen. Demokod:<br />
<a href="http://blog.jayway.com/wordpress/wp-content/uploads/2004/01/aspekt2.png" rel="lightbox"><img src="http://blog.jayway.com/wordpress/wp-content/uploads/2004/01/aspekt2.png" alt="" title="Ett enkelt modell-lager" width="320" height="250" class="alignnone size-full wp-image-7451" /></a><br />
<em>Vårt enkla modell-lager som kapslar in databasen.</em></p>
<pre>
DBObject tPerson = new Person();
tPerson.setField("firstName", "Björn");
tPerson.setField("lastName", "Granvik");
tPerson.dbSave();

tPerson.setField("company", "Jayway");
 tPerson.dbUpdate();
</pre>
<h2>Du gamla vanliga lösning</h2>
<p>Låt oss nu göra en enkel tidtagning. På det gamla sättet så blir det till att kopieraoch-klistra, så mycket som vi nu orkar. Till exempel skulle Person.dbSave kunna se ut som följer:</p>
<pre>
void dbSave() {
    long tTime = System.currentTimeMillis();
    // Do something...
    tTime = System.currentTimeMillis() tTime;
    System.out.println( thisJoinPoint + ": " + tTime );
}
</pre>
<p>Och på samma sätt för de andra metoderna dbUpdate och dbRemove. Även om vi förbättrar situationen genom att introducera en tidtagningsklass blir det bara marginellt bättre – det är fortfarande korkad kod! Dessutom så kommer den att ta tid att exekvera. Inget vi vill ha kvar i en produktionsversion.</p>
<h2>Du sköna nya aspekt</h2>
<p>Låt oss titta på hur man skulle kunna lösa problemet med hjälp av aspekter. Vår nya lösning innehåller en del nya ord som tillägg till Java-språket, se fetstil nedan, men är inte så svår som det först verkar.</p>
<pre>
/* A timing aspect on DBObject.db methods */
public aspect DbTimerAspect {

    /* Public DBObject methods starting with 'db',
     * taking no parameters and returning anything. */
    pointcut dbMethods() : execution( public * DBObject.db*());

    /* A simple timer advice to be called instead
     * of the original method. */
    void around() : dbMethods() {
        long tTime = System.currentTimeMillis();
        proceed();    // Proceed with call to DbObject.
        tTime = System.currentTimeMillis() tTime;
        System.out.println( thisJoinPoint + ": " + tTime );
    }
}
</pre>
<p>Vår aspekt DbTimerAspect innehåller dels de metoder som vi vill mäta och den tidmätare vi vill ska köras.<br />
I kodsnittet dbMethods (pointcut) väljs de publika metoder i DBObject och dess subklasser som börjar på ”db”. Vi anger också att det är när metoden körs (execution) som är intressant. Här kan man välja på fler varianter; när metoden anropas, när ett attribut ändras, när ett objekt skapas och många fler sorters kodpunkter.</p>
<p>När demokoden anropar Person.dbSave så är det vårt direktiv som körs istället. Nyckelordet som anger detta är around. Vi hade naturligtvis kunnat ange att den skulle köras före, efter osv. Det första vi gör är att ta reda på tiden. I nästa steg anropar vi originalmetoden med ”proceed”. Nu körs Person.dbSave som vanligt.</p>
<p>Efter att vi kommer tillbaka räknar vi ut den tid som tillbringats i anropet och skriver ut den på konsolen. Lägg märke till att vi har tillgång till den kodpunkt som vi befinner oss i m h a thisJoinPoint. Resultat<br />
När vi kompilerar vår kod gör vi det med kompilatorn från AspectJ. Den genererar ren Java ”byte code”, dvs. koden kan köras precis som vanligt. </p>
<p>Resultatet på konsolen blir:</p>
<pre>
execution(void se.jayway.jayview.aop.Person.dbSave()): 111
execution(void se.jayway.jayview.aop.Person.dbUpdate()): 30
</pre>
<p>Ganska mycket det vi förväntade oss.</p>
<h2>Slutkläm</h2>
<p>Denna artikel räcker egentligen inte för att förstå hela vidden av det man kan göra med aspekter. Jämför vi med en vinprovning har vi bara hunnit titta på etiketten. Men, likväl, vårt lilla exempel pekar på de stora möjligheter som finns med aspekter.<br />
När och var bör man då använda AOP? Än så länge är aspekter inte ”bevisade”. Hur kommer de att skala? Hur påverkas arkitekturen i skarpt läge etc?<br />
Däremot så är det mycket intresssant att förbättra hur vi utvecklar dessa system. Mitt råd blir därför; Skapa aspekter som stödjer din kodstandard, testar varianter av din lösning utan att behöva modifiera koden, gör verktyg som t ex loggningsaspekter, etc.<br />
Om jag ska våga mig på en gissning tror jag att vi inom några år kommer att ha sådana ”tekniska” aspekter som öppen källkod. Fast jag kan ha fel – de kommer kanske redan om ett år eller så <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h2>Termer</h2>
<p><strong>kodpunkt (joinpoint)</strong> En punkt i exekveringen av ett program, till exempel i anropet av en metod i en klass.<br />
<strong>punktsnitt (pointcut)</strong> En samling utvalda kodpunkter.<br />
<strong>direktiv (advice)</strong> Kod som körs vid utvalt punktsnitt under angivna omständigheter, t ex kan man logga ett anrop innan det körs.<br />
<strong>tvärgående intressen (crosscutting concerns)</strong> Ett system har oftast flera mål som det försöker uppfylla. Förutom att lösa grundproblemet (t ex lönehantering) så finns där också uppgifter som t ex loggning, säkerhet etc. Dessa uppgifter, eller intressen, är typiskt utspridda i systemet – de går på tvären genom strukturen.<br />
<strong>OOP Objektorienterad programmering</strong> en programmeringsteknik och synsätt som gör det möjligt att öka komplexitetsgrad och återanvändning.<br />
<strong>AOP Aspektorienterad programmering</strong> att göra fristående moduler som hanterar tvärgående intressen på ett sådant sätt att de kan sömlöst kan föras in i koden igen vid t ex kompilering.</p>
<pre>
<strong>Resurser</strong>
<a href="http://www.eclipse.org/aspectj/">AspectJ</a>
<a href="http://www.eclipse.org/ajdt/">Eclipse, AspectJ plug in</a>
<a href="http://www.javaworld.com/javaworld/jw-012002/jw-0118-aspect.html">JavaWorld: I want my AOP!</a>
<a href="http://aosd.net">AOSD – Aspect Oriented Software Development</a>
</pre>
<p><em>Originally published in <a href="http://jayway.com/jayculture/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2004/01/20/ytterligare-en-aspekt-pa-din-kod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Applets för vuxna</title>
		<link>http://blog.jayway.com/2001/08/04/applets-for-vuxna/</link>
		<comments>http://blog.jayway.com/2001/08/04/applets-for-vuxna/#comments</comments>
		<pubDate>Sat, 04 Aug 2001 12:12:48 +0000</pubDate>
		<dc:creator>Björn Granvik</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=7456</guid>
		<description><![CDATA[Java Web Start (JWS) är en teknik som tillåter automatisk distribution av Java- applikationer via webben. Dessa applika- tioner kan antingen köras i en begränsad miljö, likt appletar, eller om så krävs få fulla systemresurser till klientens dator. Applets – fast denna gång för vuxna. JWS-applikationer startas första gången typiskt från en länk på en [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Java Web Start (JWS) är en teknik som tillåter automatisk distribution av Java- applikationer via webben. Dessa applika- tioner kan antingen köras i en begränsad miljö, likt appletar, eller om så krävs få fulla systemresurser till klientens dator. Applets – fast denna gång för vuxna.</strong></p>
<p>JWS-applikationer startas första gången typiskt från en länk på en html sida, applikationen laddas då ner till klienten. I fortsättningen kommer den dock bara att titta efter uppgraderingar från servern. Men JWS- applikationer är ingalunda kopplade till webbläsaren, de körs helt fristående vilket innebär att de även går att starta som van- liga applikationer.</p>
<p>En annan intressant funktion är den dyna- miska resurshanteringen. Första gången en applikation körs laddas ett minimum av den ner, vid behov laddas sedan ytterligare data ner under körtid.</p>
<p>För att tillhandahålla dessa funktioner lig- ger det under JWS ett api som heter Java Network Launching Protocol (JNLP). Den innehåller en rad olika services som tillåter sandlådsapplikationer att spara och öppna fi- ler, komma åt clipboard och skrivare med mera. Användaren måste dock via en dialog godkänna sådana operationer.</p>
<h2>Vad krävs?</h2>
<p>Så vad krävs för att köra JWS-applikatio- ner? Klienten behöver Java Runtime Environment 1.2.2 eller senare och Java Web Start 1.0.1 eller senare – inget utöver det vanliga. Dessutom behövs en standard webbserver som kan registrera nya MIME- typer.</p>
<p>För att utveckla JWS-applikationer behövs ingen speciell kod, exekveringen börjar på samma sätt som vanliga applikationer. Utvecklandet innebär följande steg:</p>
<ul>
<li>Skapa applikationens kod.</li>
<li>Paketera applikationen och dess resur- ser till en eller flera jar-filer.</li>
<li>Signera jar-filer(na).</li>
<li>Skapa en XML-fil som beskriver applikationen, kallas JNLP-filen.</li>
<li>Lägg upp allt på webbservern, tillsammans med en lämplig html-fil.</li>
</ul>
<p>Första gången måste du även se till att din webbserver känner igen .jnlp filer genom att registrera den som en ny MIME-typ.  </p>
<h2>En fet klients räddning</h2>
<p>När man läser rubrikerna från tiden då applets skulle rädda världsfreden är det svårt att låta bli och le. Java Web Start känns som client/server med rätt anslag. Om man har behov av av feta klienter är det klart intres- sant att kolla upp – annars lär man utveckla exakt samma kod själv.</p>
<p>JWS används med fördel av utvecklings- intensiva applikationer eller av applikatio- ner vars uppgraderingar snabbt måste ut till ett antal användare. Ett annat behov kan vara att bryta de bindningar som en traditionell applet har med sin webbläsare. Eller om man bara vill vara bekväm av sig.<br />
<em>Originally published in <a href="http://jayway.com/jayculture/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2001/08/04/applets-for-vuxna/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

