Posts

Showing posts from 2015

Require is like new; An argument for DI in Node.js

As I continue my journey in Node.js I have been looking into unit testing. I typically practice TDD but while I was getting started with Node and everything was simple I was happy to play with manual testing and restarts. I picked Mocha as a test framework. One thing I noticed quickly looking at Mocha was that the examples were simple, adding a few numbers together or checking the type of a return value.   Having come to Node from C# I had require littered through my code like they were using statements,  When I tried to implement some tests against the basic logic I had put together I quickly ran into a problem, that was not covered by the simple Mocha examples.  The problem arose because require is not a using statement, it directly provides code from other modules meaning that the code referenced is invoked in the tests. I went looking for ways to mock out the require statement. As I was looking it occurred to me that mocking require is possibly not the best way to do it. In C

Manual package install in atom

Image
I was having problems installing atom packages at work (on a Windows 7 machine) and I really wanted to have syntax highlighting in my React project.  Turns out it's really simple to manually install a package.  Download the package you want. It's probably in GitHub.  I wanted the Atom React Package. Extract the zip file and put it in the packages folder.  You can find this folder from the install packages screen:   Open a command window in the folder you just put in the packages directory.  Run apm link  Restart Atom and you're done .

Symbol Hound - The search for devs.

During the course of the last week myself and a college came across an exception in our logs. The exception was from JSON.Net complaining of an unexpected character in the JSON string.  The character in question was the ^@ symbol.  A Google search for this symbol shows up very unhelpful results , you could try Carrot @  or Carrot At . We went looking for ways to search for symbols in Google, in our searches we came across  http://symbolhound.com  a search engine for developers. It doesn't ignore symbols so a search for ^@  yields much more useful results and reveals that its a null character. It's a useful tool for debugging and development questions, you can even set it as one of the search options in Firefox.

IoT Identity

The first IoT topic I want to look at is Identity.  Identity is critically important when selling an IoT product. It doesn't seem such a big problem when playing with half a dozen Raspberry Py's in the back room of your house.  But when customers start sending back error reports and/or hardware knowing exactly what they're talking about becomes very  important. This problem starts with the what is Identity ? Consider the example of a taxi management system.  We've all been in a taxi lets make the meter a smart meter.  It knows all about the taxi, speed, distance tally, fair total, etc and can be tracked at via a web service.  What the problems the system solves is not important for the example, what is important is that the system is installed into the car as an after market component and that it provides data about the taxi to a central service. And now we come to the question of identity. The first question to ask is "When do you need to identify a device

IoT series introduction

IoT is all the rage at the moment. It seems that every second pod cast and blog I see these days is talking about IoT in some way or another.  I guess this one is no different. Like most things in our industry when something new comes along it's not really new, so much as something that's been around for years re-imagined or re-badged in some way. It's no different for IoT.  The company I work for has been doing IoT in one form or another for the last 15 or 20 years, we just didn't call it IoT. What the recent popularity of IoT has done is bring alot of new blood into the area, which means alot of blogs and tutorials going through the basics of putting together a board with some lights and sensors. What these blogs don't talk about is some of the problems that begin to be encountered in a live IoT system. I intend to address that by writing about some of the experiences that I have had while working in a company with a strong greenfield and brownfield IoT prod

Smart Watch Thoughts.

I've been wearing a smart watch for a bit less than six months now.  With the release of the Apple Watch recently and the rampant success of the Pebble Time Kickstarter I thought I'd relay my experience and how I feel about smart watches these days.  When I bought my watch, Samsung Galaxy 2 Neo, it was more of an impulse buy/retail therapy purchase than a commitment to an emerging technology.  I was of the opinion that the Smart Watches were are dead end in the tree of technological evolution.  That said over the last six months I have become very fond of the watch. There are features that I always expected to use, some that I am surprised to use and some that I am surprised not to use. The key advantage to the watch that I believe will cut across brands and models is the notifications.  The ability to read a text message without having to pull the phone out of your pocket is great, being able to triage the other notifications as they come in so as to minimise inter

Windows 8.1 on Minnow Board Max

Image
Looking around at the tutorials getting a Minnow Board Max set up running Windows 8.1 appears more complex that it really is.   The following will run though the few easy steps that we took to get A Minnow Board Max running with Windows 8.1 Embedded Industry Pro Evaluation and cover the pitfalls that took this job that should have been a few hours (mostly waiting for downloads and installs) and turned it into 5 man days over 3 calendar days.  The TL;DR; version of this is  Use Rufus to create a bootable Windows install USB drive.  Install Windows onto a hard drive not a SD card.  What you'll need. Get the required hardware MinnowBoard Max. Micro HDMI to HDMI Converter and/or Cable. HDMI Monitor.  5v Power supply.  USB Keyboard and mouse. Micro SD card. (Or other media to install on, Micro SD car is not fast enough) USB drive (I used a 2nd micro SD card in a converter). 2nd machine running Windows to create the bootable drive.  I used my Windows 7 Pro d

A Tool To Help You Estimate - Kind of

I think of Estimation is a necessary evil, but an evil all the same.  I read something once to the effect of, and unfortunately I'm paraphrasing as I can't find the original, "An estimate should inform a decision. If it is not informing a decision you should ask yourself why you're estimating in the first place." I can't remember where I read it, or who to attribute it to, but the premise resonates with me.  I've stuck the original quote up at work and bring it up if I'm asked for a frivolous estimate.  Obviously I don't feel the need to look at it, which implies that I'm not asked for frivolous estimates all that often. Given how I feel about estimates (evil) I was greatly amused by this comic from Commit Strip the other day. It reminded me of a small app that I wrote, when I was first starting out developing software, to randomly generate estimates for me.  The original was crude but it gave me a laugh.  I've made a less crude version

Communication - The most important software development skill

I recently listened to an episode of Dot Net Rocks featuring John Sonmez focusing on working on your career.  One key point that John brought up was that the key skill that we as developers can need in today's environment is the ability to communicate effectively.  I've been pushing this same point of view for a while.  As I went though university I was aware the communication was important, but the scale of the importance didn't dawn on me until I worked with someone who was truly lacking in communication skills. For the purpose of this blog I will call him Thomas (not his real name obviously, it's actually part of mine).   Thomas' integration with the team was a daily struggle, we could not exchange ideas or build a working relationship.  The team worked hard to include him and provide avenues for him to join in discussions that were work related and non work related.  I can only assume he was also working towards this goal, if he was, it was hard for the res