Currently Browsing: Node.js

Coin Change Kata

At the SCNA conference this year, I was reminded of the importance of practice for craftsmen. In one of the breaks, there was a “kata battle” where two people were competing to see who could get a complete implementation of the Coin Change Kata working first. The Coin Change Kata exercise should produce the minimal amount of change for a given amount. For instance, If the input is: $0.99, the output should be: 3 quarters, 2 dimes, and 4 pennies. I was inspired to take this on myself and sharpen the saw. You can find my node.js implementation here. There are 10 commits that demonstrate each...
read more

Websockets Over SSL: Stunnel, HAProxy, Node.js

Background I lead a team of talented developers and we’ve been working on a few Node.js projects. We already had one project in production (code named coltrane) and had arrived at the point of deploying a second project (code named maps). This second project makes use of websockets using the library. It was at this point that I unexpectedly found the need to put on my network architecture hat. Our current setup uses Nginx for SSL termination and load balancing. +-------------+ +----------------------------+ https://dev-coltrane...
read more

Code Small FTW: Friday

Yesterday’s installment, Putting it all together, can be found here. Epilogue We’ve been using the app on our iPhone every day for about a month now. Overall, I would give the app a grade of an A-. The network still gets in the way at times if there is no phone data service or the login times out. Perhaps a future version will have a local storage area that will sync transactions in the background as it is able to. But, it has not ever been enough of an inconvenience to deter us from using the app (and believe me, my wife won’t tolerate much inconvenience before she bails on an app). The...
read more

Code Small FTW: Thursday

Yesterday’s installment including the Pomodoro Break and The Server Side sections can be found here. Putting it all together I now had a front end iPhone app and back end services, both of which were tested in isolation. It was time to hook everything up. My next pomodoro was spent hooking up the settings tab of the app to the authenticate endpoint on the server side. In this case, I started with authentication since I knew that I would have to authenticate prior to being able to hit any of the other endpoints. I soon realized I would need some additional fields on the settings tab. I needed a...
read more

Code Small FTW: Wednesday

Yesterday’s installment including The Design and Testing the App can be found here. Pomodoro Break Getting the App side of the project into reasonable shape took 14 pomodoros (6 hours of work time). This seems like a good point to reflect a little. I started with the App side, because I know it is a weak point for me. Working in Pomodoros, I was highly productive the first day with the exception of the end of the day. That hour-and-a-half of unstructured time, working in frustration at being stuck with a view component not behaving the way I wanted it to, was the least productive time of the...
read more

« Previous Entries