EADDRINUSE when watching tests with mocha and supertest

You are happy to meet me among the living. The error I’m describing nearly killed me with frustration, and if that didn’t happen I was about to help it by finish myself off. No worries though - I found the solution. Hence I’m alive and can tell the story. This is the error, that haunted me into the wee hours of the night, in all it’s glory: 1) Uncaught error outside test suite: Uncaught Error: listen EADDRINUSE :::3000 at Object.exports._errnoException (util.js:837:11) at exports._exceptionWithHostPort (util.js:860:20) at Server._listen2 (net.js:1231:14) at listen (net.js:1267:10) at Server.listen (net.js:1363:5) at Application.app.listen (node_modules/koa/lib/application.js:70:24) at Object.<anonymous> (index.js:10:5) at Object.<anonymous> (test/site.spec.js:1:73) at Array.forEach (native) at StatWatcher._handle.onchange (fs.js:1285:10) I got that error from mocha when watching my tests with the --watch flag. But only when I ran that watching command as a npm script from package.json. Yeah, it was pretty complex to sort it. TL;DR - Just tell me how...
Read More

Requiring the os - runtime-js

This is my second attempt to write this post. It’s not that the post itself is hard to write but the concept makes my head … go ouchie. That tend to happen to my head when I see potential quantum leaps. Instead of the fancy intro I had planned, I’m just going to give a short introduction, point you to an awesome article, tell you how to get this to run. So what is it then? Basically runtimejs is a tiny, unikernel OS that you can bundle together with your application, as a dependency to your application. Which is basically what a OS is, right? Our application needs some libraries like koa, a runtime-platform (like Node) and an OS (like Linux) that the platform can run. What if that last part just was a dependency like normal to our application? Like this: "dependencies": { "a_small_little_os_just_for_me": "latests" } That would be...
Read More

The forced swing in my garden... and coaching

The other week we put up a thick rope to use as a liana, al á Trazan, for our kids. Extremely simple; just a rope, and I made a big tangled knot at the end. You can see my kids use it on the picture to the left. They loved it. Then one day one of our neighbors, that often help us and stops by - nice people, came by. He looked that the rope, saw my kids struggling to climb it and said: you know... it should really have a plank or something at the end so it's easier for them to stand on. I said: Nah… this is good enough for them. They are enjoying themselves plenty. Two days later … This is a post on coaching, asking before helping and not improving things that works fine. Ok - two days later, the man came back with two...
Read More

The Lars-principle

Today I had a session with the management group of one of our hospitals. We ended up talking about how to choose what we’re going to do next. Questions like; “but how can we know what is best”, “there’s so many things to do” or “everyone have a different opinion” were discussed during and after the meeting. I was reminded of a tip from a colleague and (to me) mentor from way back, Lars Littorin. I was complaining about so many things to do, not knowing where to start etc. His answer: Great! Then you know exactly what to do; make a list of the things you need to do, and then start doing one of them. There’s much truth in there. I think Lars is a great guy, but I doubt he knew how much use I have had from this single quote. Maybe, just maybe, he doesn’t even...
Read More

Review: Nature by Ron Jeffries

Got a recommendation to read Nature by Ron Jeffries and I did. What a read! I loved it from the get go. My short review is quite simply; “This book made me think. It left me with more questions than I had going in. But better more concrete questions. Seeking simple(r) answers. Also it’s sprinkled with challenges and gentle provocations of the current state of mind and process. The underlying principle ‘Simplify it’ is something that resonate very deeply with me. I recommend anyone doing, struggling to do or thinking about doing this thing we call ‘agile’ to read this book. And then give a copy to every important person in your organization. Thank you for a great read!” I’ve been following Ron Jeffries (not only on twitter, but that’s a good start) for a long time, not only on twitter. The first thing I read from him was actually...
Read More

Indicators; leading, trailing - short or long

This is a just a short post, mainly an idea that I can get out of my head. I’ve been helping the management team at one of our hospitals to come up with something to track our progress against. The main question was actually quite simple: How would we know if this hospital is awesome? We came up with a couple of balancing scores that we will take for a spin in our first experiment round. The idea is the these values will guide our actions - if we can make things that improve the values (one or more) it’s a good thing. In the spirit of balancing scores we are keeping track on more than one to make sure that we’re not tilting our efforts toward, say only financial values. Hmmm… need to write some of those ideas down, maybe. Ok - now to the topic of this post:...
Read More

What can you do for us then?

A couple of days ago I offered my services to one of the hospital directors here. In their current situation they could need some structuring and focus on start executing. I know that I can help them with this (using my normal “tricks” of visualization, transparency and short iterations etc) and hence asked if I could be of assistance. Now, this particular director is a really smart one and the response was quick, to the point and a real head twister for me: Thanks for that offer! What is you can help us with, then? I was a stumped! What do I do? Why would anyone want that? Who am I to think that I can help them? I’m an IT guy, no formal training, no formal authority here. Why should they want me? I ended up referring to my past work and try to describe that to the director...
Read More

Experiment - don't change

I re-read a post I wrote about 6 months ago, after a consultancy gig at Nintex. And one thing in there resounded with me and some of the conversations I’ve been having lately. I wrote (and said): Stop changing and start experimenting This would probably be my #1 tip for change management; don’t do changes - do experiments instead. In this post I thought I’d examine that recommendation in a little more detail. Well actually my #0 tip is read Switch - How to make change when change is hard, but you knew that one already, right? It’s packed with tips and tricks that anyone wanting to understand change should read. At least instead of this post. In the Switch book the authors says something like this (my wording): People don't dislike change - they dislike being changed This is a vital, fundamental observation for me. Far too often I’ve...
Read More

The 1000th post

Just ran a my count script into the _posts directory of my Jekyll installation. 999! and then I started this post. That means that this is the 1000th post on my blog! I only have 3 words: Un. Believe. Able. I never, ever thought that I would write 1000 posts. Through this blog I’ve learned so much, connected with so many people and got so many opporunities I never would have got without “throwing myself out there”. This post has two parts: history and stats. History I wrote the first post on the 24 of October 2006 and in that very trembling first steps I actually wrote somethings that still holds: This is my first ever publication on the Internet. I am not sure yet what to put down here but I hope that it will be meaningful, for me if not for any other. I actually started the blog...
Read More

Wash your hands - make your hands clean

We’re ready to sit down to eat. The kids comes running and I do the regular check-up: Nope - all hands, some of the faces covered in dirt. Me: Wash your hands! The run off, remarkably without complaining. 15 seconds all three of them are back. Hands, faces and much of the shirts are dripping with water. Hands and faces are still dirty. This is my fault. I was really just focusing on the activity rather than the outcome. I see this sickness in myself, many organizations and even our community at large. In this post I wanted to examine this thought a little closer. I have no idea where I might end up, but I’ll type on for awhile and then structure it into something worth reading… or you’ll never read this My favorite verb-form (what kind of sick person have favorites among verb forms…) is Imperative! It’s so...
Read More