Blackout for SOPA and PIPA.
Click to learn more
Posterous theme by Cory Watilo

Time Crisis

Once in a while I end up facing problems due to the most disgusting global variable at all: time. Time can not be mocked easily. You'll have features based on time. You'll have reports based on time. You'll have to make the right decisions at the most appropriate time, etc... I could - and probably will - start a series of posts about time and its presence in software development. This post is dedicated to distributed build systems. I have a setup of a master Jenkins server, and several virtual and physical boxes around the globe as slaves. Oh. One more thing about time. It's relative. If you're locked in a windowless room with only one device capable of measuring time, can you be sure that what you see is the time as we know it? Guess what! Our computers have only got a single clock. This leaves me with a conclusion, that a box can have its own relative time, which is not a fine goal for cloud based (=stored across multiple instances) applications. It leads to strange errors, like when a Jenkins master would declare a fresh report from a slave outdated.

We've evolved so much towards shiny applications, that we have forgotten about the basic ideas which led to the evolution of the world-wide web. I remember when I first encountered the Internet, I usually pinged one host which I hoped to be on-line 24/7. This was: time.kfki.hu. A time server! NTP is a protocol designed to synchronize the clocks of computers over a network. The first NTP implementation started around 1980 with an accuracy of only several hundred milliseconds!

So wouldn't it be nice if all boxes would sync from the same provider? But what happens if your crucial information is corrupted by the mistake of that third party service? You wouldn't like that, would you? The great part follows: You can have your Jenkins master server act as a time provider for all connected devices. This could mean user PC's, test boxes and even the inflatable pirate's controller which is hooked on the notification system.

The implementation

The Server

I'll show a Ubuntu Natty configuration, but it should be pretty much the same on every distribution. The first thing you'd want to do is to remove the ntpdate application from all instances. It's not harmful, but can cause minor turbulences.

apt-get remove ntpdate

Then, you need to install the NTP daemon to every instance

apt-get install ntp

On the time server instance, open up and edit /etc/ntp.conf. The existing contents of the file can be left as it is, but you need to add some lines. Under the list of servers, add a reference to the instance itself. This will serve as a back-up if your network should fail.

server 127.127.1.0
fudge 127.127.1.0 stratum 10

You need to enable the synchronization service. Suppose you have a network with 192.168.2.xxx IP addresses, then you'll have to add:

restrict 192.168.2.0 mask 255.255.255.0 nomodify notrap

I prefer to insert it before the line: restrict 127.0.0.1. You need to insert such line for every network you plan to server.

Once you are done, save the file and restart the service:

/etc/init.d/ntp restart

 

The Client

So you have your network a time provider, you need to get your boxes to sync with that. If you carefully followed along, you already have the package ntp installed. Open up /etc/ntp.conf and edit as follows.

Remove every single server line, and add only those which are relevant for your box. If your time server is on 192.168.1.123, than leave a single

server 192.168.1.123

line in the list.

Right before the line: restrict 127.0.0.1 enter two more restrictions. The first will prevent access to the ntp services of this machine, the second will back-up the localhost serving of the time.

restrict default notrust nomodify nopeer
restrict <external ip of the current box>

Of course, you have to replace "<external ip of the current box>" with the external ip of the current box.

Once you are done, save the file and restart the service:

/etc/init.d/ntp restart

Debugging

The ntp software is anything, but verbose. If you want to see what's going on, than stop the service with

/etc/init.d/ntp stop

and run

ntpt -d

Global Day of Coderetreat, Budapest

Twitter is an awesome platform. A lot of information comes and goes. On the sleepy Friday of the 18th of November, 2011 I read about a global event called "Global Day of Coderetreat". As the software craftsmanship community in Budapest, Hungary is pretty fragmented, I started whining publicly that I'd love to have a Coderetreat here too. That's when Yves Hanoulle gave me the perfect kick (in the butt) in one of his tweets. So thanks again Yves for igniting our little group!

1

The day has come, and so did the 8am when we started setting up the scene at MyCorporation co-working space. I secretly planned on starting at 9, and it seemed to be a good idea. At 8:30, there were only 4 of people present. At 9:00am, we started the day with 4 pairs watching Corey and his greeting. After a short explanation of the day and the problem we're going to work on, session 1 started. Most of the attendees were familiar with pair programming, TDD and clean code, but never had the chance to try them "in production". The pairs were formed by people knowing each other, this gave them something to hang on to while facing new challenges. The first session was aimed to show the way pair-programming is done in practice, so I issued a role change every 15 minutes. The 45 minutes passed in a blink of an eye. Deleting code at the end caused some muttering, but we were counting on that. It seemed that the in-session role changing slowed the pairs down, so we voted to stop that for the next rounds. Two more people joined us during the first retrospective, and we maintained this number of 5 pairs until the very end of the day.

Session 2 started with the same pairs, as they now got to know the problem domain, and learned a lot from the previous session. Some didn't really stick to TDD at first, but in the second run, they tried. As I was walking around in the room, I could feel the innovation coming from those awesome minds trying to solve the Game of Life and the communication barriers. It was very interesting to hear that even co-workers who have been working together for years now, have never known each other as well as they did after 2 sessions of pair-programming. The participants were mainly from the world of PHP and Java, but thanks to some brave guys, we even had Scala, C# and Ruby popping up. The third session begun with new pairs. People paired up according to what they've heard from each other in the previous retrospectives. Some wanted to try out new languages that the other half knew, some wanted to try working with someone else. We introduced TDD ping-pong. I'm not sure if the language learning goal was a good choice, because we ended up with some pairs where only one participant knew the given syntax. Nevertheless, the problem was solved by the one not knowing the language told the other what he'd want to write. During the coding session, we've joined a global Google hangout, where fellow coderetreaters from Germany, Sweden and Belgium were doing their thing. Right after our third session, we saw that the guys from Ghent are standing in front of the camera and waiting for someone to talk to them. So we did, and had a great time talking to J. B. Rainsberger.
Our catering for the day was sponsored by Mimox, and they did invest in some really tasty food. MyCorporation organized it to be at the restaurant next door.

2

For the fourth session, we introduced the primitive obsession constraint. I made a mistake in facilitating and did not discover in time that a pair got sucked into an unnecessary generalization problem which held them back from achieving the primary goal. Lesson learned; as a facilitator you need to see their code, not just look at it. Another thing I've learned is that introducing these constraints without the participants understanding why they are good at all, isn't really a viable practice. I will create slides for each for the next time and speak about them a bit prior the first session.
For the final 2 sessions I suggested that everyone should return to their primary language. What they didn't know is that I had an evil plan prepared. (Thanks Jim for the idea).
We voted for the 3 lined methods constraint, and started coding. I encouraged the pairs to commit themselves to any other constraint too if they like, and most of them happily took the challenge. By the end of the 45 minutes, we had one team which completed the task. The evil plan was to ask them not to delete their code, but for the next session swap their product with another pair and they'll be working on the inherited code in the final session. Shame and laughter filled the air all at once, but they did it anyway. I hope that the message was clear that you should always leave code the way that you can even project it on the wall. A very appropriate global constraint was voted for this session: no swearing! The pair which inherited the already finished code received some guidelines from the original creators and started working on making the tests more readable, while the others tried to continue and complete each-others work.

3

Due to the delayed start, we had to leave the venue as soon as we finished session #6, so the final retrospective and the closing circle was held in a restaurant nearby. I was really happy that everyone stayed up until the end, and everyone wanted to have more coderetreats. Most people said that they will try this exercise at work, and they never thought pair programming was such fun and productive. My remark was that I really enjoyed facilitating, but I'd love to code too. For my greatest surprise, there were several volunteers for the role. We agreed upon rotating the role amongst these individuals, which is - I think - a great contribution to the coderetreat community.

What I learned from the day?

  • There's hope for a change of culture
  • There are craftsmen in our city
  • People need to experience agile development in practice to understand its values
  • Hands-on TDD and pair programming trainings should be present in our professional community
  • Organizing is fun and I still love it

What will happen?

  • We created a Facebook page for the newly forming community
  • We will conduct a coderetreat once a month
  • We will share knowledge between the participants
  • We will try and "infect" others with this experience
  • We will do this for fun and knowledge

Thank you all who had made this global day possible! Thank you all who got up early on Saturday and coded all day long. You have proven yourselves dedicated to your profession, there's no other way to put it! :)

Cost of a meeting

This is probably a redundant observation and there's many more scientific calculations out there created by much smarter guys, but here's a formula I found usable.

When you're planning a meeting, take the following things into account:
The people you invited have to prepare themselves before the event (creating slides, taking notes, going through the ticketing system, etc), and repair themselves after the event (coffee, grouping up, bashing something, etc). Empirically I've found that an effect of a meeting could take an hour or two per person.
It goes without a saying, that the net price is the product of the length of the meeting in hours and the hourly rate of each attendant. But in addition, there's the distraction time (described above). Also the happening draws time from delivering values, so that factor should be taken into account as well. Here's my formula.

Cost

  • R is the matrix of the hourly rates of the participants, so sum(R) would be the total hourly cost of the people involved.
  • l is the length of the meeting in hours
  • p is the number of people attending, thus R has p elements
  • Alpha is the distraction time in hours. Normally 1 to 3
  • r is the number of remaining issues after the meeting
  • 1+(1/(r+1)) part of the formula makes the cost even higher, if the time spent on the meeting could have been spent on finishing all the remaining tasks.

 

The r needs some explanation.It stands for "the number of remaining issues after the meeting"

Of course the "remaining issues" and the "issue count" could be replaced by hours, complexity points, or whatever you like. For the demonstration, I'll use remaining issues.

Expanding the value, we get an equation as follows:

Costdeltai

  • ir is the number of remaining issues
  • vi is the average issues done in an hour by one person in the team
  • h is the working hours in the day
  • p is the number of people attending
  • P is the number of people in the team

Let's say you are on a 2 week (9 coding days) sprint with a total issue count of 50 with a team of 8 people where you have h as the working hours daily set to 6. That would make:

P = 8;
D = 9;
T = 50; (total issue count)
h = 6;

That would mean:
vi = T/D/h/P = 50/9/6/8 = 0.11574

So when you plan a 2 hour meeting for 4 people when you have let's say 30 issues left,
ir = 30;

And that would make r:

r = ir-(vi*l*P)+(vi*l*p) = 30-(0.11574*2*8)+(0.11574*2*4) = 29.074

You could verify this equation when you send all your people to the meeting, the r be equal to ir:

r = ir-(vi*l*P)+(vi*l*P) = 30-(0.11574*2*8)+(0.11574*2*8) = 30

If everyone on your team earns $50/hour, the cost of this 2 hour meeting with a distraction time of an ideal 1 hour would be,

Costexpanded

Cost = (400*(2*1))*(1+(1/(1+30))) = $825.81

 

ASAP Driven Development

Asap

Today, I want to talk about the term we made up in times when we believed that it described the way we work: ASAP Driven Development (ASAPDD). Sadly the term As Soon As Possible is abused. It should mean that "whenever you have free resources", but it's commonly misinterpreted as "now".

If I'd to place it in the context of Agile, I would derive it from Kanban with one slight modification: the task you're working on is only important until the next task's priority doesn't exceed the current one's. In extreme cases where business is completely aware of what the costs of switching tasks without finishing them are, it might work. But in cases which I've seen, the stakeholders didn't even know that this is happening. Even more, the task switch didn't mean that you don't have to finish the one you just put behind. That's still top priority, but the new one is even more important. It took me quite a lot of time to truly understand what is going on, I'll drive you through my observations.

Symptoms:

If I had to describe the symptoms in one word, I'd say: pain. What hurts in ASAPDD gone terribly wrong? As a developer, you never know how much time you have before you're forced to work on something else. If you don't know how much time you have, you have to finish as soon as possible - meaning the simplest and fastest possible way, while ignoring all professional needs - in order to flag something finished. If you can't finish before you receive a new task, then you'll have 2 tasks on you to finish ASAP, and so on, and so on. Of course you can say no to a new task, but that would leave you without a job. Given this situation if you know that you most likely have to put your style, cleanness and reputation aside to do your everyday job, it hurts and undermines your motivation ... if you care about such things of course.
But what about managers? I had the luck to be a manager in such environment too. You're told by your superior that the stakeholders do not care, and you can't communicate negative things towards them. You're told that whatever they want, is to be done. Given this, you have to promise that you'll get the task done, and you must tell the same to the developers resulting in a new 'top priority issue'. You'll say that this is even more urgent than the others. If not, the other tasks then must be completed by yesterday in order to get work done on the new one. What happens when the programmers raise their flags about a task and you tend to agree with them? You'll end up as a messenger between sides, but you can't be truly honest with the product side, and you'll have to convince the team to be passive-aggressive and do as they are told. You can try to defend your team against insane requirements, but say hello to bonuses and appreciation. You'll be the guy who always says no and argues, while there's the other ones who understand the tasks and get them done. This is a true enemy to creativity and innovation. As you might guessed, the side-effect of such "pain" is fluctuation. People get under-motivated, fed up, exhausted, laid off or they just simply quit.

Cause:

I tired really hard to understand what's going on, so that I could do things to fix it in my own circle of influence. Clearly there was a crack in the flow of communication. But why? Whenever top management or the product team came up with something, they were hardly told that it can't be done, or can't be done in a week, or simply that they should come up with smaller chunks of functionality. They believed that when they feed the development team any input, they get the output they wanted in a short period of time without any further interactions. Nobody said truly no to them in order to properly schedule or break apart a task. Nobody communicated the need to finalize, stabilize previous features. If they were demoable, they were done. Even if someone did say no, then the top management came and pushed the feature into development regardless the raised flags. Inspecting the pain from the bottom, I saw that even if we told our managers that we can't do something or that we think it wouldn't be any good to the product at all, they pushed it on us without defending our professional opinion. Even if our managers did try to defend us, their superiors denied help. Even if the superiors tried to help, the CTO wanted to impress the CEO so much, that he didn't help. Even if the CTO was convinced, the CEO was the one who seemed to have no common sense. Finally if even he thought that we're in trouble, the solution was to "hire more resources", 'cause the feature is so important, that it must be done. So as the previous ones. I couldn't blame the CEO though, he was hardly ever aware of the fact that we're having hard times completing tasks. Why should he even think that hiring more people isn't the cure? He thought, that everything is going smoothly and that our throughput is influenced by the number of people working. I'd say he wasn't respected enough, and he was constantly lied to.
Anyways, how could a feature be so important that it needs instant development? Well, the sales made an insane promise and the money's already spent on shiny new golf clubs? Or did a newsflash somehow got public weeks before planned describing nice new features which didn't even get into development? Or simply nobody knew that we were not remotely ready with our current work. Whatever the reason is, the managers and the developers had to fix someone else's mistake. Mostly.

Cure:

Why mostly? Because we as developers should have stood up for ourselves and defend our own beliefs, profession and credibility. We were too afraid that we could lose our jobs. So what could have been done? Honesty, respect, professionalism and metrics. Clearly it's much easier said than done, but let's see what we could have done from both sides.
We should have increased transparency by radiating the metrics of our codebase. Telling everyone from top to bottom, that our codebase is rotting, and if we won't have time to properly code a feature, the time we'll spend on each following task will exponentially increase. We could have told our superiors, that if they want to keep a sustainable development, we should start caring about the health of our product. If we could get our product and top management team to hear us out and try to accept that we must re-calibrate our workflow, we might end up in an adaptive system such as Kanban, so that they could re-prioritize the upcoming tasks until the very last minute. If instead of staying quiet we would respect our co-workers by telling the truth and giving honest feedback, we would give our managers / leaders the ability to think of a solution instead of leaving them in a belief that everything is fine. I'm sure that they would try to make their own company work at any cost... if they knew what to fix. Maybe we could have even helped them by providing various solutions they could choose from? Ranting never helps without providing a possible solution to the problem.
What's to be done with the sales / marketing guru who constantly screws up and ignites new ASAP developments? Help him out! Find out why he's doing such stupid things. Does he even know he's not doing well? Does he get any feedback, or just the premium after each deal? I even know that the product team sometimes needs to test an idea and see if it's viable or not. They can use the main development team to rapidly build things, but instead of burning tons of $ on coding man-hour, try to do a paper mockup and invite a control group. It's less expensive, and gets you much closer to your customers. What happens when a rapidly developed idea doesn't work out? The programmers have to revert weeks/months of work. No matter what methodology you follow, that always introduces motivation loss.
To wrap it all up, I don't say you need to change organizational structure to avoid ASAPDD. Just be honest and make sure people would want to be honest with you. Accept feedback even if it's negative, and think of it as a candidate to making things better. You won't get a negative feedback unless the one who provides it doesn't believe that you can do something about it.

 

Literature and help

 

Thoughts on: The Future of Agile Development

Bc519a6c

I just read an article from Michael Dubakov on The Future of Agile Development. I encourage you to follow the link and take the time to read it thoroughly, even more than once. It contains interesting facts for both managers and developers.

Everyone should clearly understand what are we doing, why are we doing this, and why is it important at this very moment.

The thing I personally don't understand is why do we have to keep on repeating this statement over and over again? Why don't people see that without the knowledge of what we're building, we (as developers) can't decide on behalf of the final goal / values. I know that there might be a great deal of political bullshit up above, and some may think that holding back information makes them special, but this corrupts any cooperation and not just software development.

Developers must set themselves to lifelong learning.

It should be developers and managers. Both should have a profession which needs to be updated and evaluated constantly. By evaluation I mean mostly self-evaluation. You should be able to see whether you should stop or continue an activity. I understand that as a manager, micro-managing makes you feel invincible and you might be rewarded as the worker of the month, but think of what you're causing. You're stating, that you will tell everyone in the team what and when to do, discouraging them from becoming a self-organizing, proactive team of professionals. The time of command and conquer attitude is dawning, so if you want to stay on the top: learn! (You could start by reading Management 3.0) As for developers, you should refer to The Clean Coder book. It tells it all.

Be keen on your work, and learn to say no especially when you're reputation is at stake.

There's an evolution leap we could make if the industry truly recognizes the power of the craftsmen. We could influence the way they teach our profession and the skills which are required by HR. But until being able to show up a degree or write a piece of software in a single programming language without any care about style and tests is enough to become a highly paid developer, there's not much hope.

Working efficiently while listening to music. (a reply to @unclebobmartin)

I'm currently reading The Clean Coder book from Uncle Bob. It's a must have on the (virtual) bookshelf for everyone who's in for self-retrospectives and continuous improvement. I could praise his work for pages, but the post is about working to music.

Uncle Bob tells us about his experiences, which I think should be familiar to all who ever tried to craft to music.

MUSIC

At Teradyne, in the late ’70s, I had a private office. I was the system administrator
of our PDP 11/60, and so I was one of the few programmers allowed to have a
private terminal. That terminal was a VT100 running at 9600 baud and connected
to the PDP 11 with 80 feet of RS232 cable that I had strung over the ceiling tiles
from my office to the computer room.
I had a stereo system in my office. It was an old turntable, amp, and floor
speakers. I had a significant collection of vinyl, including Led Zeppelin, Pink
Floyd, and … . Well, you get the picture.
I used to crank that stereo and then write code. I thought it helped my
concentration. But I was wrong.
One day I went back into a module that I had been editing while listening to the
opening sequence of The Wall. The comments in that code contained lyrics
from the piece, and editorial notations about dive bombers and crying babies.
That’s when it hit me. As a reader of the code, I was learning more about the
music collection of the author (me) than I was learning about the problem that
the code was trying to solve.
I realized that I simply don’t code well while listening to music. The music does
not help me focus. Indeed, the act of listening to music seems to consume some
vital resource that my mind needs in order to write clean and well-designed code.
Maybe it doesn’t work that way for you. Maybe music helps you write code. I
know lots of people who code while wearing earphones. I accept that the music
may help them, but I am also suspicious that what’s really happening is that the
music is helping them enter the Zone.

Robert C. Martin, (May 23, 2011), The Clean Coder, 63
(quoted with the author's permission)

I truly understand what he's talking about. Been there, done that. I wasn't happy that I couldn't listen to the music I really love, so I started debugging my working process to find a way which to a productive state of mind while listening to music. Preferably music I like.

I pretty much consider my self a very eclectic person when it comes to music, but I do have some cornerstones in my taste which can be identified clearly. These all influenced me in a way I'd never forget:

  • Rap with appreciable music
  • Rap Metal
  • Rap Rock
  • Heavy Metal
  • Punk Rock
  • Doom Metal
  • Gothic Metal
  • EBM
  • Industrial
  • Electro
  • Trance
  • Goa
  • Progressice House
  • Hardstyle
  • Rave
  • Dance

At the time I started deliberately measuring my mood while listening to music, I was way into the Doom/Gothic metal. Delain, Nightwish, Lacuna Coil, Within Temptation, Haggard and etc. Even if you're not into metal, try bearing a few minutes of this track.

As it turned out, my musical education since I was a toddler enabled me to break down music to individual instruments and channels while listening to it. Haggard is a great example of a complex composition which triggers my brain to start decomposing it. Every time I hear it, it's a new adventure of musical discovery. So even that I love this tune very much, I had to ban it from the working hours.

As I continued to experiment with more and more genres, a pattern started to form. Every tune with variable beat rate, or with complex instrumental composition was sucking my focus away from work. I still didn't give up on the statement that I do want to enjoy what I'm hearing, so I stepped into another world which I was happy with. Dance/Pop/Radio-friendly stuff. You know, all those lightweight music which can go on for hours without you noticing them on the radio. While you're not even aware of those at the mall or a hairdresser, they have an effect on your subconscious (as it is meant to spread at that level). You find yourself humming the tune and forming the lyrics with your lips. You might not feel distracted, yet you are extremely unproductive.

I started seeking online radio stations, but I had a hard time finding one which played acceptable music for my taste all day. Whenever I tuned into one which was playing something cool, it got worse short after. I had days when I listened to Infected Mushroom all day just to keep me going. When I tuned into a psytrance station to get more, I found myself listening to some really annoying crap. Those Infected Mushroom-ish days were my most productive days I had in years. What I really liked about them is that though it gave me quite an energy-boost due to that 138-150 BPM speed, the high sounds kept me from going into the flow too deep. Sometimes I got lost for some seconds in the music which was enough for my brain to think about what I just did on the screen.

So I went looking for high-energy music, but I didn't have the stamina to collect work-compatible goa enough to fill even a day without repeats.

The best psytrance radio station I found was the one on di.fm. I started looking around in their stations when I got annoyed way too many times, and suddenly I found the station which kept me going for over than 3 years now: Classic Trance Channel. Not many of you may know that I was a trance dj for quite some time back in my past, and this station plays all the great music from that era. I know these songs so much, that I don't even need to think about them. The only problem was that I still got distracted by the euphoria each song caused as memories associated with the tune started to take over my thoughts. I was pretty happy with these "distractions" though, I felt like two worlds of my soul have finally developed a common interface. (The DJ and the coder)

It was not so long ago when I accidentally tuned into another station and didn't realize it for several days. It was the Trance Channel.It plays some nice psy, progressive and classic tunes, old and new which just got released on beatport.

Guess what! I even heard a song coming from the EBM/Industrial world. I did shed a tear at that moment.

Why did I settle with this genre?

Since I started caring about my health, I am aware of how the heart rate influences my well-being. I know that there's a scientific rate which is the healthiest to one's body. It's the 60-70% of your maximum heart rate, which is 220 minus your age. With my current age:

((220-26)/100)*65 = 126,1

And guess what beat-range trance operates on?

Trance is a genre of electronic dance music that developed in the 1990s;[3]:251 generally characterized by a tempo of between 125 and 150 bpm

via Wikipedia

Basically listening to trance music tunes my body into perfect balance and pulls my productivity way up. Of course, the beat itself should be enough to reach that, and here comes the musical taste to play. The vocals and the pads in trance music let me escape the flow if I wanted it to. I can always close my eyes for a few seconds, get lost in the music and re-think what I just wrote on the screen. Of course nothing beats pairing with the right partner, but for times when I work alone, there's music.

You may ask why I'm so keen on escaping the flow, as it is a super-productive state of mind. Yes, and no. If you have tests and relatively short pomodoros, there's nothing wrong with 1-2 flowing cycles. But not more. The explanation is to be read in The Clean Coder. :)

p.s.: Thanks to @unclebobmartin for letting me quote an entire section!

update1: Why Does Music Affect Your Heart Rate? article on ehow.com

What should have you learned from Steve Jobs?

Applenosteve

I'm no Apple fan. I've tried several Apple products, but I wasn't satisfied at all. I'm just not their target everyday tech noob. I like to fiddle around with every little aspect of my systems. No hard feelings, we're not a good match, that's all.

Despite my incompatibility with the Apple philosophy, I truly admire Steve Jobs' absolute professional way of thinking. He gave the world some super-simple user interfaces by realizing that software is built for users. Users, who are most unlikely nerds. His stubborn and sometimes indecent attitude drove out those features which seam so obvious ever since, that it feels like you always had it.

So what I learned from him and think that every person involved in software craftsmanship should learn also? You produce for users. The one and only important thing to keep in mind while creating a feature is that it must be communicating it's intent and the value for your user. Nobody will want to use stuff they don't need. Nobody will use something if it's more complicated than what they can use. On the other hand, if your users feel that they are overlooked, you'll earn a bad reputation.

I feel that Apple products are less configurable than I'd like them to be, and they want me to use them the way they think I need to use them. I hate that, but for that genius targeting, I don't feel that Apple could be blamed. We're no match, I'm not their user. They produced for their users, that's all.

If we combine this theory with Agile thoughts, you can easily come to the core genius of Jobs:

  1. Grab yourself a feature from the perspective of a User, which has business value for you
  2. Identify the value and intent of that feature and marketing it well to both business and users so they truly understand it
  3. Make sure it can be reached and used the most convenient way for the target user
  4. Ensure that the functionality serves the intent
  5. Don't build anything more than that
  6. Never ever break any of the rules above

Rings bells?

The way I see it, Steve Jobs did nothing else, than kept these rules without exception, and was a demanding user of his own products. He produced for those, who use Apple products and on the way he made us question the presence of overcomplicated interfaces.

I'm hating that my social sites are spammed with "RIP Steve" messages, but I found one which made me write this article:

If you want to honor Steve, don't mourn. Do your best work every day. Live your life to the fullest. Never settle. His spirit lives on.
via Sebastiaan de With

BDD in all layers

I'm working on a project in my free time where I have the chance and time to play around with different aspects of my job. At the current phase, I'm doing everything by myself. I'm the client and the dev. So the first thing I wanted to do is to write some requirements.

I want the business logic represented on various clients. This means, that all features I write, should be implemented in every interface of the product(s).

As a dev, I know that I'll have a collection of simple objects for the core concept. I'm pretty sure I'd want to build a RESTful API to let others access this logic.

As business, I want to build a Rails and an Android app for my users to play around with. I'd want to let other developers contribute their own clients for other platforms, but I want all features to be fully available on all platforms, 'cause I want to offer the same thing for everyone. I absolutely don't want to write the specs more than once though.

So after fiddling around with this a bit, I came up with a git repository for feature files, which describe all the high-end business requirements. These are loaded as submodules (or whatever you want) to each layer of the app. Of course, the driver for these test will differ for each. I mean that for the plain old objects, I'll only include and execute the code itself. For the RESTful API, I'll have some curl-ish HTTP client communicating in raw messages. For the Rails app, I'll have a webdriver for example.

Again, this is only for those critical (core) features that must be identical and working with all clients.

For the record, I created a .gitignore file which permits only feature files, directories, readme and the gitignore file itself:

*.*
!README
!*.feature
!*.gitignore

You don't need to worry about readability with scripting languages!?

This wasn't my first discussion on the topic. Not even my first team which had a member declaring, that "with dynamically typed (script) languages, you shouldn't bother with patterns and clean code. It's easy and dynamic!"

It blows my brain every single time. Especially when I have this argue, and with the script language of choice I start TDD-ing (even if I have never seen it before). Then this other member comes into play and blows it all up 'cause "we need to get it done quick". Okay I say. My part is all tested, I'm confident that it works, hook it up with yours and we're done.

Time goes by, and the first change requests start knocking on the door. It's not too complex, shouldn't take more than a couple of hours... I might finish until lunch. And than I realize that I've spent hours looking at an (mostly) untestable big bowl of giant spaghetti. Because of "doing it quick", I have to spend days instead of minutes with every change I have to make. Was it really worth it?

I also stumbled upon Uncle Bob's reaction to the same topic.

Separation of blogs

So I'll just decouple my personal blog from the professional, and abandon wordpress... Hopefully for ever. No hard feelings, wordpress served well for years, but it's becoming a hassle to maintain it. I was looking for ways to scale it, load-balance it, make it a cloud based application. I was even temped to use a SPOFless, distributed, transparent filesystem just to be able to properly *cloud it*. Nevertheless, it's not worth it. Probably if my blog would have houndreds of active users and publishers, I would have continued the battle. But I just want to write my mind out.

Why here? Why Posterous? Because I've been to a github meetup once, and ended up drinking with Sachin Agarwal and Christopher Burnett. Yeah, I could probably tell that (true) story as my main motivation, but that's not why I chose Posterous. I'm following Henrik Kniberg (by the way, check out his stuff!), and he did a research which came in handy: http://bigfamilytrip.posterous.com/and-the-winner-is

Screen_shot_2011-09-19_at_23
I'm not sure if I will migrate the old stuff from the original site or not. Some are out-dated, some can be added easily. Probably I'll add the latter... Sooner or later :)