marcusoft.net - sharing is learning


function share(knowledge){ return share(++knowledge) }

Supertest: Verify database after request


One thing that I often find myself want to do is to check the database after I have created a resource. For example:

  • Post some data to /user
  • Verify that I get 201 Created back
  • Check that the data in the database looks ok

I have had such a hard time finding a stable way to do this. I know that I have a little bit of a special tool chain but still… it should not be this hard.

But last night, after weeks searching for this, I got it to work. I’m so excited to share this with you.

Read on ...

Stuff I said coaching


I had the great joy and exciting opportunity to do a agile coach gig the other week. In Kuala Lumpur for Nintex.

It was a really fun time and as usual I learned a lot on the way. I only hope that I could share a lot in the process.

When you’re in front of people… that’s where you all of a sudden find yourself saying things that you have not heard come out of your mouth before. It’s really interesting because it’s like the abstract ideas you have needs to be concertized and then some new things can come out. In another way than before, or emphasized differently.

In this post I wanted to summarize some of the things that I said during the 3 days I spent with the teams there.

Read on ...

Order points, value, flow and waste


As I wrote about earlier I’ve just returned from 3 days of coaching at Nintex in Kuala Lumpur.

Once I stood in front of the teams (6 teams, 40 people) and then got a chance to coach them individually I was struck by the trust that Nintex showed me. They really could not check me too close, what I said, how I nudged the teams etc. Me and Christian, their head of engineering, had synced up in emails and other conversations. And we see eye-to-eye on many things… But still. Trust. It’s a good train - get on it!

There was one thing that we talked about in the teams that I didn’t really manage to make my reasoning clear about. It’s pretty common, powerful and interesting so I thought I’d share this idea with you and try to give an better explanation around what I really meant.

Read on ...

What I've learned from the first 30% of Reinventing Organizations


I’m reading Reinventing Organizations right now and it’s an inspiring read to say the least. Finally someone puts words and structure to what I’ve tried to do, achieve and explain to others.

And the stories about the self-organization, trust-embracing, hierarchy-demolishing, performance-through-the-roof, best-place-to-work-organizations are truly truly amazing.

I’ve several times wiped tears from my face reading these stories. Not because it’s so great but because it comes down to trusting the people in the organization. As one founder of such organization puts it when he describes his organization FAVI:

The organization that believes that mankind is good

I don’t care what they are doing - I want to work there. I know I can belong! Luckily I work for a company, Aptitud, that strives towards this.

But what is common for these organizations?

Mind you I’ve only read 1/3 of the book… this might be answered later and then I’ll will be ashamed of my feeble attempts to explain this here.

Read on ...

Supertest: Things I've learned - part I


My favorite thing with blogging is the feedback I get. In fact; that’s the reason I blog. There. I’ve said it. I love to see many read my stuff and get back to me with questions and suggestion. I’m not even ashamed to say so.

Sometimes people even ask me to blog about something. I really love that, even though I’ve have to find time to do so. I got a very nice comment from James Gardner asking me to blog a little more about supertest.

He specifically asked me to show how to “split test into separate files for big APIs”, so I’ll do that in this post.

But that sprung a few ideas about things that I’ve started to use a lot and I thought I’ll do a little mini-series here. Here are some posts I have in mind:

Cliffhanger; the last bullet is still not clear to me… It will a blast seeing me stumble through that one.

Read on ...

Why don't they change: what if I could just snap my fingers?


Yes, it’s another post on change management. As a consultant … well that’s basically your job. And most of my engagements are of consultancy type. But change management is very trick to do right, frustrating and … simply wonderfully rewarding if you get it to work.

Sadly this post is describing my frustrations rather than a “one size fit all situation” solution. Of course, since those solutions don’t really exists in reality. Where I work.

I wanted to share a thought that went through my head one day when I was particular frustrated. And then tell you why it was stupid and how I now changed my thinking about this problem / situation.

Yes - it will be great fun. Mmmmmm frustration…

Just kidding but I will try to write this so I can use it as a nice reminder post for when I fall into this reasoning again. Maybe you find it useful too.

Read on ...

Why don't they change: What would make me behave like that?


I’m starting to realize that the biggest advantage I, personally, will get from my three years in Indonesia is a lot of experience in change management, under some extreme conditions. As I’ve blogged about, twice, I am now in a culture where questioning is not done. It’s not encourage, not praised, not sought for etc. You simply don’t do it.

Again please don’t read that as I think that they are stupid or ignorant - it’s just their culture. There’s a lot of strange things going on in our culture too. Just step outside your own box and you’ll see it.

In fact; that’s what this post is about; stepping out of my box. A simple question that I’ve found very valuable for me to understand “them”.

Getting to the point

First let’s get back to my intro a bit. I think that everything I’ve seen here in Indonesia that puzzled me can be found in some regard in Sweden where I usally work. But here it’s more extreme.

  • Here we might say ‘Please don’t question the process’ whereas in Sweden this is hinted and implied, wrapped in smooth formulations.
  • Here we don’t question decisions from “senior” people. In Sweden we do… but maybe not so that they hear it. Or in ways that still not challenge them to much. Or in some places we do… knowing that it will be ignored
  • Here we follow the procedure as it’s written without asking a single question. In Sweden we “do as we always have done - it’s easier”
  • Here we do things knowing that it’s stupid “because it says so”. In Sweden we do things knowing it’s stupid “because otherwise it will just take a lot of time”

And so on. Of course I can only speak for Swedes and the few, of a the many many Indonesian people I’ve interacted with. But I think you can find things in your culture that fits into these examples.

The point is; cultural differences is present everywhere. In some places / organizations / countries they are easier to spot than in others. But they are there.

Back to the point

Ok, one day when I was particularly confused about “them” not doing what I wanted, I went for a walk. I think in this case I could not get “them” to see the benefits of having a clear goal or vision for their work. To me that’s a no-brainer; without a goal - how do you know where you’re going? But I just could not get the answers I wanted out of them. (hmmm… whose answers did I want here… #antoherPost)

As I was walking I remembered a great question from Dan North:

What has to be true for them to behave like this?

Sadly, this time I was stumped. The cultural differences was too big. I couldn’t understand what had to be true for them.

The point

So I tried this instead:

What would they have to say to me that would make me behave like they are now?

Their reactions: * arms crossed * looking grumpy * saying Yes - doing No * looking “Yeah, you keep talking… we’ll do it our own ways” * Utterly surprised and chocked; “How can you even say things like that? Is that safe?”

What would make me do things like that? Maybe if they said “You need to smoke a pack of cigarettes per day - then your effectiveness will be awesome” or “Waterfall projects! That’s proven greatly effective! Here is why” or “Use stones and a hammer to write your emails”…

I’ve found that I can use whatever stupid example I could come up with, just to make me “feel” like they feel.

Then I ask myself;

What would someone have to say to me in order to for me to move closer to that "stupid thing"?

Now, here’s where it get interesting. If someone told me that “smoking is better”; what do they have to do for me to “get” that? Is it better? Who would I know / can I tell?

Conclusion

I’ve found this reasoning very helpful for me to come up with alternative ways to formulate my goal. Sometimes step away from “my” goal and let them come up with “their” goal instead. Generally I find it very refreshing (read: a little painful) to shift perspective like this.

Try it in your culture if you want to. If you dare it will open new thoughts to you. Promise.

Read on ...

Please question the process


One of the things that I’ve been told that upset me the most during the last couple of years was this sentence:

Please don't question the process

Instead of going angry and rant about the stupidity of that I’d thought about the opposite. Or what I’d want to do. If I ever get to hire people to a company I will tell them, on their first day:

Please question the process. This is only as good as we've got so far. In fact - one of the big reasons you are here is to make us better. You cannot do that without questioning and challenging the current state.
If you ever feel that something could be done better or in another way - please say so.

Please question the process means that we are humble about that we are not the best we will ever be. It also sends a signal about us looking for something better. Finally by saying “Please question the process” the person you say it to feels like they are important, that you need their input. And it includes new people in “we”, in the team instantly.

Read on ...

Koa Js and the power of mounting


I’ve been writing quite a lot of Koa applications, but most of them have been small. Now I’m doing a little bit bigger website. It consists of three parts:

  • A public site that is just static html, served with static-now. The site will do API calls back to the server for the content.
  • An administration site for administration of the text content of the site. This will be based on my example koa example blog
  • An API serving the content from use form the static site.

Absolutely nothing humongous but still big enough that you need to think about application structure a little bit.

That’s when I came to think about koa-mount. In this post I wanted to show you what I’ve learned about this powerful little middeleware, at the heart of Koa thinking.

Read on ...

Saying thank you for agile manifesto


Last autumn I met one of the signatories of the Agile Manifesto in real life. At the Agile Singapore conference.

I didn’t think much about that until he (James Grenning) mentioned it in the beginning of one of his talk. He told some anectodes about that meet-up. In honestly so would I if I was at that weekend in Snowbird.

There I was. Also a speaker at this conference half-around the world. Working with management for the Salvation Army in Indonesia, being invited to the conference since I’ve written a book on Kanban.

The last 10 years of my career has been involving agile in one way or the other on a daily basis. And evolving me for the better, mostly daily.

You know where this is going: I just had to thank him.

Read on ...

Motivating in a world without WHY


I wrote a post about Indonesian culture. In it I wrote about my experiences in Indonesia and how I’ve interpreted what I’ve experienced as many people here lives in a world without WHY. Read more in that post.

In this post I wanted to continue my thoughts about this and specifically around what actually motivates Indonesian people. Or how I could motivate someone that lives in a world without WHY. How do you get someone to start thinking in long-term goals in a culture that do not? This is has been my task for the last 1,5 year and I’m still struggling. Sometimes I have, accidentally mostly, succeed too and in this post I wanted to describe HOW I did and why I think that it worked.

As before remember:

  • these are my experiences by being here for close to 1,5 years, meeting the people I happened to meet during that time
  • Indonesia is a VERY big country with a big, big spread between poor and rich, in education level, geographical and also cultural.

Should I make any generalizations (which I will) it’s based on my own experiences. If they are wrong or weak is due to that. If they are good… well I was lucky I guess.

BUT, one thing that I am quite sure of is that I’ve learned a lot about my own culture by studying the Indonesian culture. All the phenomenas that I’ve observed here can be seen in Sweden as well, but in lesser extension maybe.

Basically - I’ve learned a lot. I hope you learn something too

Read on ...

package.json: engines & engineStrict - and how to use them


I’m poking around quite a lot with io.js recently for reasons that soon will be revealed. When doing so I used my favorite Node version manager - Node Version Manager to manage different versions of Node and io.js.

Switching back and forth is simple and sometimes I end up running some code on a version of Node/io.js that the code does not support. For example running EcmaScript 6 let-statements in Node.

I was hoping that I’d get a warning or preferable even an error when doing that. But no. Or…

In this post I’ll show you how to use the package.json file to make sure that you get warnings and errors when using the wrong version of the framework

Read on ...

What the traffic in Jakarta taught me about slack


Like most cities in Asia the traffic in Jakarta is horrible. Especially the motorbikes that are plentiful is an interesting phenomena to observe.

Once you mange (took me a year to do) to look past the total disrespect for human life on display, the drivers own lives as well as other people, I saw patterns that have bigger influence on at least me.

In this short post I wanted to share those with you and maybe you can also get some thoughts that can help you.

My good friend Håkan Forss wrote an excellent presentation called What can traffic in stockholm teach you about queuing theory. That inspired me to write this post, at least a little.

Read on ...

Open letter: Management tips to Dr Lillian


I’ve just ended one of the hardest but also most rewarding gigs I’ve been part of. As often I was merely a coach, but this time I marveled at the result. We took a company (hospital) on the verge of dying to being self-sustaining and profitable in 7 months.

The leader of the hospital is called Dr Lillian, a young doctor that been very responsive to my tips and radical changes. I’m very grateful for her cooperative spirit and hard work. The same goes for many many people in the hospital. As I said; they are the people who made this possible. I just gave some hopefully helpful (although hands-on) pointers.

Last Friday (the 13th…) was my last official day at the hospital. Now, it’s ca 150 m from my house so I will keep it under close surveillance during my time here.

But I wanted to leave Dr Lillian with some advice for the future. Although this is about a hospital I think that it can teach us something, as it has taught me while I was uncovering them.

So, here we go:

Dear Dr Lillian,

Now that I leave you I wanted to give you some advice that builds on all the things that we have talked about and that can help you in the future. Don’t read this as instructions but rather inspiration:

Read on ...

A world without WHY


When I first arrived in Indonesia I didn’t think nor knew much about the difference in our cultures. This quite understandable, although in hindsight I should have read up on it a little bit more. Now, as I know more and more, I also get more and more interested and confused about some very basic things in the society.

To not come out as very prejudiced there’s some of disclaimers to be made and I’ll do that throughout the post, but here are few to get started:

  1. These are merely my observations after 15 months in the country. I’ve been working with quite a lot of people (met maybe ≈500) and in a few different companies.
  2. It’s very easy to jump to a conclusion that some behavior (mine, your or theirs) is stupid or wrong. I don’t want to do that, so in everything I write here I will try to remember that it’s just different cultures that have formed us under many many years into what we are. For example, consider some strange tradition that you’ve seen in another culture (dressing up like dragons and jumping around on poles for Chinese New Year for example). It shouldn’t take you long to find a similar ridiculous event in your own culture (Santa anyone? Easter Bunny etc).

Oh, this post is mostly me reasoning. I have no ambition so solve any problems. Although, I think that this can be useful for you even if you never leave your own country (in which case I pity you - get out there!). Remember that each organization form subcultures of their own. Maybe this can help you understand things in another department. I can tell you that many of the things I find puzzling here in Indonesia can be observed to some degree in Sweden as well.

Let’s get started… I’m fearing it might be long.

Read on ...

Why I built page-logger... and how it made me money


I wrote a little application called page-logger for purely selfish and lazy reasons. It was fast, quite fun, I learned a lot and apparently I could make MONEY by using it. Which I didn’t thought of when I wrote it.

In this post I’ll take you through some code, point to some things that I learned and finally some thoughts about learning from your data. I hope you like it.

Read on ...

CoffeeScript - what I've should have done


The blog post I wrote yesterday was from my experience at the time. I even ended the post with a callout for better ways.

And sure enough, twitter to the recscue:

As a side, this why I hang out on twitter. There are brilliant people there that will push you towards ever better. Thanks Erwin for this.

So… what does that mean for my post yesterday… Let’s find out:

Read on ...

Get started writing NodeJs with CoffeeScript - not a piece of cake


For some reason I’m from time to time drawn to different languages that compiles to JavaScript. And then I’m drawn away again. Especially nowadays with ES6 coming up many ideas and needs for CoffeeScript or TypeScript goes away.

So the other day I found myself thinking again:

Hey - CoffeeScript. That's not such a bad idea. Maybe I should try to write some.

CoffeeScript and I have a dormant but warm relationship because this little language was the one that helped me understand not only JavaScript but also got grips of functional programming.

I thought I’d write a simple little kata in Node to fresh up my CoffeeScript-fu. How hard could it be?

Well… there’s quite a lot of setup and idiosyncrasies that you need to be aware of. This post tries to summary what I learned as I got my environment up and running. Specifically; initialization, run tests, write code and run my app.

Read on ...

What if money was not an issue?


In Indonesia there’s an interesting development going on right now in health care. A nationwide health insurance is being rolled out. For everyone. Until now health care has been paid for privately or via private health insurances, but with the advent of BPJS (that it’s called) everyone can now afford to go to the hospital… or at least there’s fixed tariffs.

Before we continue, imagine the effort to roll this out in the world 5th biggest population… 250-270 million people. Most of which is very poor. I think this is such a great thing and I applaud the Indonesian government for doing it.

However… I work for hospitals in Indonesia. On the “other” side of things. For us this is also an opportunity since this will bring more patients to our hospitals and we get to serve those in need. But there’s another side of the story that have very interesting implications around service quality, of all things.

In this post I will tell you a little about that, quote a great book and then ask myself some tricky questions that I cannot answer. It will be a blast - tag along!

Read on ...

Config handling in Node and Heroku - with secrets


Once you’ve coded and tested a Node application we are anxious to deploy it and put in front of real users. I’ve blogged before on how you can do that very easily and fast with Heroku.

But one thing that trips me up a lot is the configuration and especially things that I want to vary per environment, like connection strings to databases or user names. Hey - some of those things I don’t even wanna check into source control at all. They might be secrets that I don’t want anyone else to get hold off.

In this post I’ll show you a little function / object that I’ve found plenty use of and that I now include in almost every project I deploy. I’ll finish up with a little discussion on how to handle secrets too.

Read on ...