Marcus Node Bits - Deploying to Heroku (and MongoHq)'
I’ve been doing something for real! A very simple little polling site, that actually turned out pretty ok (saved the UI but I have a friend brushing that up for me) and might be useful. It’s built with KoaJs, of course, and using MongoDb as database. Basically you can create a “question”, tag it with some meta data and then send a link to a page where you can start receiving answers. And there’s some very basic “export to excel”-reporting. Simple stuff. I spent maybe 3-5 hours altogether on it, in the hospital bed with my son in the bed next to me. He was pretty ok, so the concentration was not on top on either tasks for me. Bad! This Sunday I wanted to deploy the first version of it. To Heroku. It went pretty smooth but I wanted to share my story and some problems I ran into....
Read More
Looking for better
Apparently my last post was not completely gibberish and contained some thoughts that you could make use of. Thanks for the feedback. Let me continue my train of thoughts here. It’s not a very long train, but it’s still a train. Here’s where we ended: there’s a customer, we are here to delight them (thank you Stephen Deming for that phrase). Everything we do right now is just best so far in our strive to more effectively give value to the customer. We can and should, change our current state, process, organisation, tools or what have you, to try to improve. If we do the change in bigger steps there will be bigger impacts in our productivity, in smaller steps smaller impact. See? Nothing really new or amazing here. In this post I wanted to talk a little bit about where this can take us. Because I see this as a guiding...
Read More
No... this is how I think '
I have recently come to realize that some of the most basic of my thinking is not as evident and obvious to people around me as they are for me. This was a real wakeup call for me and made me think long and hard on what is important to me and how I do work. And consequently try to lead others with this as guiding star. My ideas is not new nor radical. The ideas I did meet is not bad, they just strive to achieve other goals (I think) or maybe the same goals but in a totally different manner. I have really tried my best not to portrait my ideas as better, but rather just another way. My agile and lean friends will quickly see that this is by not measure unique or new thinking. But I’ve come to realize that for people that haven’t seen this...
Read More
KoaJs and the SyntaxError Unexpected identifier error - or that time when I understood generators
It was quite sometime since I wrote a blog post with an error message in the title. However I have now got this error so many times, and keep scratching my head every time. Also I think I can explain why it happens. Here’s an example on how to make this error occur, from the co-monk library README (not anymore maybe): Running that code (either with “node –harmony koaErrorFail.js” or test it with “mocha –harmony-generators koaErrorFail.js”) fail with the error from the title of the blog post: yield users.remove({}); </div> ^^^^^ </div> SyntaxError: Unexpected identifier </div> At this point you start to think that you forgot to run the example with the “–harmony” flag</a>. But of course you do that, right? Ah, maybe you are running the wrong version of Node. Again, no. You’re doing it right. Right? However this code is not running within a generator function. And the...
Read More
Aligning our sights - what Indonesians taught me, part I
I have now been in Indonesia for about 4 months. There’s so many new impressions and things that I’ve seen, learned and experienced that I’m starting to forget them. Some is bad, some is good, some are ugly so I thought that I would write them down. The first thing is some sort of alignment that is repeated almost everyday. In almost all workplaces that I’ve seen or heard about. Like a routine checkup on what is important here. I’ve actually experienced that before, in a very different setting. In this post I’m planning to tell you a couple of short stories and episodes, to then try to see what this could look like in my “normal”, more western culture. I hope it will be interesting and useful. Gothenburg Brass Band I had the great privilege to play in the top brass band in Sweden for about 2 years. The...
Read More
Marcus Node Bits - Let us flex Koa Js, shall we?
The first two post of this mini-series, we picked up the basic on getting Koa Js to start as well as understand what it’s build from and the concepts behind it. It’s time to do something for real. Well over time, one might add. This post is all about using Koa to build different websites and web api’s. By using Koas own examples I will show you how you can use Koa for a lot of common tasks and scenarios. Let’s dive right in. Middleware The first thing to understand is that Koa is very modular. “Ok, got it”, you think. “No”, I answer, “very modular! The bits are tiny.” So a Koa application is to a large extent made up by middleware you include, that is not included per default. The list of middleware is quite staggering and will quite some time to learn and take in. Luckily you don’t have to learn all...
Read More
Team Yayasan week 5 Redoing Todo
This week started a bit late due to a public holiday, the Hindu new years celebrations, (the joys of working in a country that respect 4 different religions and celebrate all the main events publicly!) and then we had been spread out during the weekend. It took some time to gather the forces. Last week we were a bit confused about the lead times and throughput. Sure enough this week we did some more items, due to the ketchup-effect of doing to big items. We are continuing to track both the lead time per size (S, M and L) and the number of items (or each size) that we are completing per week. It’s still a little too little data to draw any conclusions but we are confident that with this data tracked we will soon start to understand our work. Retrospectives Today I told the team that the little...
Read More
Marcus Node Bits - Let us talk about yield and generators, shall we?
Koa Js removes need for callbacks but still have uses non-blocking code. How is that possible? If you read the code of the last blog post you might have reported a bug or two since I was using a strange asterisk at in the getGreeting-function. Is that really valid Javascript? And when you looked very closely you might be wondering about the “yield” right there in the middle… What kind of witchcraft is this thing anyway? These questions and more flew threw my head when I first learned about Koa and the concepts its’s built upon. In this post I will try to explain that a bit and point you to other places where they explain this much better, if you don’t like my tries. This is just how I, a newbie to these concepts, have tried to wrap my head around it. Hey, let’s be completely transparent and say...
Read More
Marcus Node Bits - Let us talk about Koa for a while, shall we?
Ok, let’s talk about KoaJs. Why? Well, it’s new and shiny. But that’s not it. And it’s tiny and stays out of your way. But that’s not it. It’s created by the awesome crew behind ExpressJs (and others). But that’s not it. It teaches me about new things. And really strange things. Like generators for example. But that’s not it. No. The Reason I really wanted to get your really important fact that we would like to hold on to in the rest of the text attention is something different altogether. This has to Stop. I’m by no means a seasoned Javascript developer but I’m already starting to dislike the code callbacks forces me to write. Yeah, I know, there are ways around it with promises and everything, but still have a hard time grasping that. Sorry. I hope there’s another way ^^ I mean; “getUserFromDatabase()”… what would you expect...
Read More
Setting up a complete Node development machine. From scratch. For free
I got yet another computer. To work on. But there will be slow days on airports and hotels with this baby to... So I decided to try something new; I decided to go Linux and setup a development environment for Node Js. I did not set up a goal of this being a no-cost project, it just ended up that way (with one worthy exception, in the end). I have never used Linux before and decided to go with Ubuntu that looked like it would suit my Windows/Mac background best. It did too. It's been a pure joy to use so far. This blog post described what I did and what obstacles I ran into on the way. It was ... not surprisingly maybe... but at least gratifyingly simple and smooth. I've tried to describe it so that you can be both a total newbie and a little bit more...
Read More