Break the promise chains flow

I like the idea of chaining the promises in my code so that it looks nice, pretty nice and easier to read. After several months following this pattern, I have a situation where I need to break the chain promise flow, like stopping the flow. See the below snippet code:

From the above code, I am expecting the code to stop chain and move on to the .catch handler, but is not. I learned the code will continue the flow as I return with no value at line 9.

So, here is the way to break the promise chains, instead of returning with no value, I throw an Error to stop the flow:

Oh, yeah I use Bluebird to working with Promise…

Between Me, Docker client and Docker host

After reading the Docker documentation, Understand the architecture. This is how I draw my relationship between me, Docker client and Docker host.

This picture illustrating my relationship between me, Docker client and Docker host.

This picture illustrating my relationship between me, Docker client and Docker host.

Interesting things that I noticed so far is when the docker client is building the image and send it to docker host on my laptop, it only takes a minutes or so, but when docker client is building the image and send ti docker host that is located somewhere out there (e.g. machine that hosted on cloud providers) it takes a longer time.

Moving to Trello

A few days ago I still used Asana to manage my not so serious personal tasks and oftently via its mobile app. I’m not sure why, but somehow the Asana was not running quite fast on my device, especially when the Internet connection is unstable or poor.

Today, I’m considering to move all of my not so serious personal tasks to Trello. I just tried the application on my Android and it performs really well and also liked the user interfaces. Pretty simple and responsive.

Migrating to Atom

I started using Atom since yesterday after heard they also released the Linux version. Since I running 32-bit version operating system on my box, so I need to build from the source instead of install the .deb which is for 64-bit. When the Atom editor opened, its feels good to see the welcoming window. I am also excited to try many new things in this editor, as at the first time I am really enjoyed looking at the editor theme. I can stay all day long, just to code a things from this editor, but that would be a lie, since I don’t work straight 12 hours per day.

Atom Editor

Atom Editor

Try it out, you guys might also getting excited with this editor!

Implement Material Design in AngularJS

Last week I started working on a project to apply the Material Design into the AngularJS based application. I’m not quite sure how it goes since the application is already based on Bootstrap, and not quite sure which Boostrap themes I should use. Today, I kinda interested to use Polymer since it has a Paper elements, but not quite sure how Polymer can coexist in AngularJS application, so I google it using polymer in angularjs and found an interesting search result.

Angular Material

Angular Material

Angular Material! I’m started thinking like this is what I need. I think for now I will try Angular Material, and if its good then I will drop my intention to use Paper elements for now.