Marcus Node Bits - Ok then, Moogose is pretty sweet

I often blog too early. I get excited and want to tell everyone as soon as possible. I whip together a demo and then write a blog post about my experience. Sometimes that is a bit too early. Sometimes you need another look to really appreciate a tool, or to realize that it doesn’t do the job. In my blog post about Monk (which I still think is great… Monk, that is, not the blog post) I wrote that I didn’t like Mongoose that much. That was too early to say. I have now used it for real and I think I like it. Let’s me redeem my bad Mongoose-conscience and write a short post on what I’ve picked up when trying it… for real. The thing that ticked me off and actually made me turn away from Mongoose on the idea-stadium was the fact that it needs a typed...
Read More

A little lesson about document database modelling

This is just a short thing that I experienced when doing the data layer for AptiTalk. AptiTalk is an attempt to create a corporate chat, we want something like Hangout but better. Yeah, we’re not only best - we are the most humble as well! Ok, in this simple setting I learned a thing about using document databases (Mongo in this case). The data model is really simple. It’s just a Posts, Replies and Hashtags. So we created the Posts like this (using Mongoose): Let’s leave the Replies out of this discussion for now. I think I have more to say about that, but I haven’t tried it yet. The Hashtags in turn is just the Tag and a reference to all the posts that contains that hashtag. Like this: Notice the reference to the Post-collection in the pots-array. Both me and Hugo was alright with that model. I started to...
Read More

Team Yayasan - getting started

I have a wonderful opportunity on my hands. I have been given a team of 4 people that never have done agile or lean before (albeit one of the is Elin, my wife, so she should know something). I have also authorization to decide about how and what we work on, within some limits (that I don’t really know the bounds of yet). And I have three years to work with them. For the better part of my career I have been a consultant giving advice to people with power of various reach. I have often done gigs that have been ca 6 months in length. Sometime they have been prolonged but then it has always been to go somewhere else in the organization. This time I have plenty of time and direct application of my ideas, no need to try to convince the person in charge. I’ve decided to...
Read More

Impact Mapping - now helping Indonesian Hospitals

I have a new job. In a new country. In a new domain. But it’s still me, luckily. And I bring the knowledge and tools that I know and have used from other domains. I have often thought that the IT industry was special. that projects in our environment was much more complicated than in any other environment. That we had special communication problems that only occurred here. I’m now starting to change my mind. Of course I cannot talk TDD and Specification by example with these people, but there are many universal things that will help you: focus on lead times and doing fewer things at the same time, get people together in the same room, visualize your problem to get a better and common understanding of it. Things like that. In this post I’ll describe how we used three (Root cause analysis, Impact mapping and Limit WIP) of...
Read More

Marcus Node Bits - supertest is a nice way to test an api'

I’m writing down some of the things I’ve picked up when I started to learn about Node, Express and Mongo. Here are all the post in the series: Doing stuff in the terminal is not scary at all npm is not only for getting packages Package.json is a mighty tool Git is not that hard, but I need to refresh my knowledge Callback function is cool stuff, and I even know how to write them mocha is cool both as framework and test runner Should is a nice way to do asserts monk is an easy way to access mongo Express is best without generators supertest is a nice way to test an api - this post This post is about a testing framework for HTTP: supertest. Really, I shouldn’t need to write anything more after stating the name of the module. That’s SUPER testing people. That’s all we really need… It’s called supertest since it...
Read More

Marcus Node Bits - Express is best without generators

I’m writing down some of the things I’ve picked up when I started to learn about Node, Express and Mongo. Here are all the post in the series: Doing stuff in the terminal is not scary at all npm is not only for getting packages Package.json is a mighty tool Git is not that hard, but I need to refresh my knowledge Callback function is cool stuff, and I even know how to write them mocha is cool both as framework and test runner Should is a nice way to do asserts monk is an easy way to access mongo Express is best without generators - this post supertest is a nice way to test an api This post is about the most commonly used web framework in Node: Express. Node in itself is pretty cool and the three-line web server is mind blowing at first sight. Pretty soon though you want something that...
Read More

Marcus Node Bits - monk is an easy way to access MongoDb

I’m writing down some of the things I’ve picked up when I started to learn about Node, Express and Mongo. Here are all the post in the series: Doing stuff in the terminal is not scary at all npm is not only for getting packages Package.json is a mighty tool Git is not that hard, but I need to refresh my knowledge Callback function is cool stuff, and I even know how to write them mocha is cool both as framework and test runner Should is a nice way to do asserts monk is an easy way to access mongo - this post Express is best without generators supertest is a nice way to test an api This post is about monk, a nice framework that makes accessing MongoDb really easy. When doing database work with Node, the default option seems to be MongoDb. This is of course very natural since Mongo itself is Javascript...
Read More

Marcus Node Bits - Should is a nice way to do asserts

I’m writing down some of the things I’ve picked up when I started to learn about Node, Express and Mongo. Here are all the post in the series: Doing stuff in the terminal is not scary at all npm is not only for getting packages Package.json is a mighty tool Git is not that hard, but I need to refresh my knowledge Callback function is cool stuff, and I even know how to write them mocha is cool both as framework and test runner Should is a nice way to do asserts - this post monk is an easy way to access mongo Express is best without generators supertest is a nice way to test an api This post is about an assertion framework that I’ve come to love; should.js. The thing with most Node packages is that they are quite small, often around 100-200 lines. They, in turn, make...
Read More

Marcus Node Bits - mocha is cool both as framework and test runner

I’m writing down some of the things I’ve picked up when I started to learn about Node, Express and Mongo. Here are all the post in the series: Doing stuff in the terminal is not scary at all npm is not only for getting packages Package.json is a mighty tool Git is not that hard, but I need to refresh my knowledge Callback function is cool stuff, and I even know how to write them mocha is cool both as framework and test runner  - this post Should is a nice way to do asserts monk is an easy way to access mongo Express is best without generators supertest is a nice way to test an api When it comes to testing frameworks on the javascript and node stack it’s an abundance of choices, just like for any of your needs. Once again you need to look around, ask around and make up your...
Read More

Marcus Node Bits - Callback function is cool stuff, and I even know how to write them

I’m writing down some of the things I’ve picked up when I started to learn about Node, Express and Mongo. Here are all the post in the series: Doing stuff in the terminal is not scary at all npm is not only for getting packages Package.json is a mighty tool Git is not that hard, but I need to refresh my knowledge Callback function is cool stuff, and I even know how to write them - this post mocha is cool both as framework and test runner Should is a nice way to do asserts monk is an easy way to access mongo Express is best without generators supertest is a nice way to test an api This is not Node related but rather a Javascript thing that was something that I had a real hard time with at first. And I know that I should learn about promises, but I haven’t yet. Functions...
Read More