Recent Posts

Development Blog for AlchemyCS on GitHub

Recent Posts

Nodebots Day Sydney

Last weekend the family attended the first World Nodebots Day in Sydney, and it was awesome!

First I would like to send out thanks to Web Directions for providing a venue and to NICTA for supplying some of their educational boards.

In this post I wanted to write more about the experience from my families perspective rather than a technical view. Naturally I was like a kid on XMAS eve waiting for the event and my son was mildly curious with my wife a little nervous about hanging out with IT people. My wife is an RN at RPAH (yes, she’s been on the show), and probably Australia’s leading Sherlock operators, but has recently been dabbling in HTML/CSS/JS via Codecademy

Arrival

We arrived just a little early and kind of just stood around nervously not knowing anyone or what we were meant to do, but after a little while it started to take off. Web Directions is in an old building in Surry Hills with old wood floors and a blackboard for a wall. The lights were hang down long fluro tubes that weren’t too bright and had a slightly yellow tinge to them.

We started by watching the Nodebots Day keynote video by Chris Williams which was kind of funny because we somehow managed to get the unedited version, but the way we were all gathered around in this dark room dull lighting watching our supreme leader talk about the ‘democratization of hardware’ my wife leaned over to ask if were at the robot place or some underground anti-government meeting!

Fork and Merge

After that we kind of forked into two groups: those who were new to everything and those who already had a project they wanted to work on.

Later on through the day close to lunch time we started to merge back together again, with everyone starting to walk around and see what everyone was up to.

Projects

Our main project was a cheapo radio controlled ‘tarantula’ we bought, gutted and stuck a Freetronics Arduino Leostick into it with a few sensors. We got to the point of wiring up the internal motors to make it scrabble around, but we’ll be finishing of the rest in the next couple of weekends when time is available.

My son was quite impressed by a robot called ‘Weaver’ by a quiet and clever guy called Fernando. We recommend that you check out his work at Weaver the social robot.

Take Away

The first thing we got from this is how fantastic and fun the whole idea and day was. All of us would love this to become a more regular thing. We’ve seen people suggesting every month, but personally for us every 2-3 months would be better.

So what did we get?

Quotes From My Son

  • ”..These people are great, they are interested in each others stuff and want to help and not just talk about why their own stuff is better..”
  • ”..Dad, I want to learn JS for real this time”
  • ”..that Weaver is so good, I’m really impressed!”

Conversation With My Wife

On the way back home my wife started interrogating me about what everyone gets out of this. What do they expect, why did Web Directions host it and why so cheaply?

It was a long conversation, but it was an eye opener for her (and nice for me to get to share) that a big part of the developer/maker way of being is sharing and learning and helping. This is all stuff we love to do and if others are interested we are happy to teach and to learn.

To paraphrase a little she was, “..impressed how people in this community of programmers and robots have more heart than the rest of the world..”

For Me

I grew up so fascinated with robots, electronics and technology my teachers worried for my lack of interest in ball games (don’t worry Mr Reynolds, I now have a Sphero!) so I was happy enough to see that my dreams as a child are becoming reality.

How could I not be content? After all, who would have thought that making robots would be a family event no different from going for a picnic down the park?

Photos

If you like, some of our photos are at https://www.dropbox.com/sh/62taz0ry6nzrnm7/T9X3Z7W0JJ

Unit testing nodejs modules with Q promises (or why is my code always perfect?)

If not done carefully, unit testing with assertions inside promise Callback and Errorback functions can be misleading and make it look like your code is perfect all the time!

When running unit tests the assert API throws exceptions to indicate when things aren’t going as expected. For example:


var assert = require('assert');
function myTest(aValue) {
   assert.ok(aValue, "myTest(aValue) expected something to be passed");
}

But if you are testing inside an promise Callback or Errback the exception get’s caught by the wrapper. Consider this snippet:


var aModule = require('someModule');

aModule.doPromisedThing()
.then(function(aValue) {
  assert.ok(aValue, "Expected aValue to be set");
}, function(aError) {
  assert.fail(aError, null, "Shouldn't be here!");
});

Here we would expect an assertion if something here went wrong, but in practicality the promise library has caught the exception. Since if we are in the Callback when the error occurs, we can’t get to the Errback, and if we are in the Errback then there is nowhere else to handle the error since we are already supposed to be handling the errors!

So what do we do?

The answer is quite simple and sits in a little block on the Q README titled The End.

By simply ensuring the ‘thenable’ chain finishes with a simple .done() any exceptions thrown in the Callback or Errback are re-thrown.

Our previous code sample becomes:


var aModule = require('someModule');

aModule.doPromisedThing()
.then(function(aValue) {
  assert.ok(aValue, "Expected aValue to be set");
}, function(aError) {
  assert.fail(aError, null, "Shouldn't be here!");
}).done();

Christmas Build - Better Than CSS and HTML

The Build

This build has absolutely nothing to do with CSS and HTML - sure it would probably have been easier to build in HTML and CSS, but definitely not as fun or as satisfying!

Just because I “build things for the web” doesn’t mean I can’t “build things for my family”

Christmas In Australia

This is the first Christmas in about 3 years I have been at home in Australia. It’s hot and no chance of snow…except for what comes out of a can!

We have a tree with fake snow

My wife and I decided we would decorate a bit for this years family party which is at our house. We have a pretty nice garden that is always fantastic to rest in and we’ve decorated it with the obligatory lights.

Although I must admit, our last few Christmas seasons have been in Thailand and it is embarassing how fantastic their decorations are: Australia is supposed to be a christian country and Thailand a buddhist country, but they make Aussie stuff look like an afterthought!

Ginger Bread Man Ginger Bread Man With Perspective

Part 1 - The Sign Post

Right! So we decided to build a few things. It started of we wanted a sign to direct our guests around the back of the house. Our idea was to put up a sign that said “North Pole”.

Ok, so we are closer to the South Pole, but hey, let’s keep with the spirit!

Anyway it evolved from stuff we had around the house:

  • spare christmas decorations
  • an old snack tin we painted
  • an unused climbing plant trellis
  • cardboard, foam, tape
  • some scrap wood
  • and a cheapo bubble machine we bought from Jaycar

It is now not just a pleasant sign, it is interactive! No matter who you are you can’t resist trying to catch or pop a bubble!

North Pole Directions North Pole Directions Back

Part 2 - The North Pole

While at the hardware shop getting some more garden supplies I saw them throwing out a very tall and solid cardboard tube - perfect to build a “North Pole”. They were happy to let me take it.

I grabbed a few more things:

  • some wood for the base
  • support brackets and some screws
  • red and white cloth adhesive

Perfect! I wasn’t quite sure about the sphere at the top yet - I had seen some foam spheres at the craft shop but we ended up using the glow ball night light next to my son’s bed. The base still needs to be painted, but we’re happy with the results!

North Pole Parts North Pole

Merry Christmas Everyone!

How We Use In-Game Purchases To Teach Our Son Personal Responsibility

Preface

I was originally inspired by Christian Heilmann to write a short article on in-game purchases to unlock achievements and how they are actually quite a good thing for parents. I think, however, I may have opened up a whole can of worms on parenting!

Introduction

Many parents lament over how cheap or free games/apps keep kids locked out of certain achievements unless they pay for them. They also fret over the inordinate amount of time required to play a game to unlock the same paid achievement.

While discussing this a few years ago with my wife we discovered we could use this to teach our son responsibility and self-achievement while enjoying the awesomeness of being a kid!

What I discuss here has (so far) worked for us - YMMV. While “I” write this article, the perspective is from “we” - mum and dad!

Ground Rules and Values

All the rules we have in place are not permanent fixed rules, they are subject to constant negotiation between us and our son. This encourages skills in critical thinking, persuasion, debate, value assessment and negotiation skills. However in the end, we the parents have the final word.

Our son is rewarded on several categories that include:

  • Doing well at school
  • Learning about something in the real world, for school or personal interest, in his own time
  • Doing extra chores to help out around the house

Some of the values we try to teach:

  • Freedom doesn’t mean being able to do anything, it means accepting responsibility for the consequences of your choices and actions
  • Responsibility is not a chore, it is a reward achieved from recognition and respect
  • Help others so long as it doesn’t hurt yourself or your family

The Balancing Act Between Chores, Self Learning, Rewards and Fun

Our primary goal for our son is to provide him with the best future we possibly can. We want him to do well academically while understanding the world around him and enjoying all life has to offer. We want him to succeed in life by magnitudes better than us.

Children need to be taught that certain chores are necessary to maintain cleanliness, health and general wellbeing in life. These chores don’t deserve a reward - they are just general parts of living. Things like putting dirty clothes in the basket, folding and putting away clothes, putting belongings away when they aren’t being used etc. These are things that kids need to learn so that they become instinct. We want our son to help do the dishes because it keeps the house tidy and hygienic, not because he will get a reward.

So how do you teach ‘expected’ chores while rewarding academic achievement and encouraging self learning and lateral thinking? And how do you balance encouraging your child to be a self achiever while not missing out on the fun of being a kid?

The following works in our family.

A Simple Method

Our son has several on-line things that he likes a lot. Many of these things include free app games that have in-game purchases such as upgrades etc. Left to his own devices our son would spend hours trying to unlock achievements for these games.

Rather than spending hours trying to unlock something in his games, we would much rather our son do something that will benefit his future but we also don’t want to deny him his childhood.

To achieve this we offer our son the purchase of in-game items if he can demonstrate to us that he has gone beyond the usual expectations of mandatory chores, homework and good behaviour. This aligns with “real life” where you may have a job and you get your salary, but performing exceptionally results in other benefits. The “real world” isn’t always like that but the skills of persuasion, debate and negotiation certainly help. Sometimes he will be rewarded with an iTunes gift card that he can spend on games, in-game purchases and now he is approaching his teen years music and videos (with our approval of course).

When our son wants something in-game he needs to prove to us why he deserves to be rewarded. We encourage him to do this by giving a presentation: this helps with his self-esteem in front of people and prepares him to be a leader in the future. As a side effect he has gathered a reputation at school as the kid who doesn’t use palm cards and isn’t afraid of public speaking (he is, but to a much lesser degree than his peers).

Exceptions and Punishment

It is important to note that his extra effort is not recognised if he doesn’t achieve his basic core requirements: his basic chores, homework and good behaviour are requirements that must be met before he is eligible for rewards. If the lounge room is messy for a long time, he keeps leaving his clothes on the floor or slips for an extended period in school then he doesn’t qualify for a reward.

I lied about the punishment. I guess the closest thing to punishment we have is simply not qualifying for a reward. I don’t know if we have done exceptionally well as parents or our son is just naturally well natured, but we have never had the need to punish him. He has never had a temper tantrum - EVER! He will get quiet or sarcastic, but never shows his temper. In fact when he sees other kids having tantrums he freaks out a little and keeps his distance, sometimes asking what is wrong with them.

Outcome

Our son does well at school. He is slightly above average in his class. We’re happy with him being well adjusted rather than a genius at school that doesn’t how to shake hands!

All things worthwhile tend to require effort & understanding and we think our son is the most important thing for us to be spending effort on.

We are constantly being told by other adults how well behaved, pleasant and smart our son is - we are very proud of him.

I could write a long list of things we are proud of regarding our son, but I will close of with his most recent accomplishment: as I write this we are in Thailand for his grandfather’s funeral. Our son is respected enough in our family that he has been asked to become a monk for the ceremony to help guide his grand father to the other side. Whatever your afterlife belief is, being entrusted with someone’s soul is certainly one of the greatest marks of respect.

Supplement - Evolution of Our Son’s On-Line Gaming

  • Club Penguin
  • World of Cars Online (closed)
  • Lego World: he would have been if it was released in Australia - he always checked their progress
  • Ben 10 Online: he won a mother’s day competition
  • Need for Speed World: he was an active bug reporter, about 3 per week, until they banned him for “spamming”. He was very upset that they thought he was a spammer and wouldn’t justify their decision let alone enter into negotiations. He lost quite a lot of value from in-game purchases on this. As much as he has loved the NFS franchise he is now actively against EA Games and is sure to discourage his friends from using them.
  • City of Heroes: I’ve had a City of Villains account for years but he has only recently become old/mature enough for us to allow him to play - but he has chosen Heroes.
  • Spiral Knights: He loves this one at the moment. He’s been saving ‘rewards’ for value packs that he has chosen to purchase only during school holidays so he gets better value.
  • iOS: Galaxy On Fire, Temple Run, Atari Breakout and Asteroids

Another Breach/Rant On Privacy

Ok, so this post isn’t about something I have done or used, or about some cool piece of technology I have come across. Rather, this post is yet another rant on privacy erosion that has come about because of a breach in my own personal information from people that should know better.

The build up to this rant started on Saturday, so I did have time to calm down from wanting to tell everyone they are idiots and anathematize myself to selling hand woven baskets at the local markets.

However my calm was immediately damaged on a morning walk when I spotted this portable surveillance device complete with GPS and facial recognition, sitting calmly near some pedestrian traffic lights on George Street (Sydney).

So what happened on Saturday?

In my post Mail Insecurity originally posted on 4th April 2010 and re-posted on 28th January 2011 I said,

The scariest part for me is not about ME sending personal data, but other people sending personal data about me! I can easily envisage HR personnel communicating with the companies superannuation provider about my account and sending personal information such as my tax file number, date of birth and address. Wow, that's enough to identify me over the phone with any utility provider or even my bank! Scary...

And this has most certainly come to pass:

I was looking at my calendar and saw that it showed birthdays and other pesonal dates of people I know, including my upcoming holiday plans. This grabbed my attention since I never put it into my calendar. Upon investigation I found that someone had been using their public event calendar to also to keep track of their personal dates of interest!

People who know me know my strong (sometimes extreme) viewpoint on privacy and security and they should know better. What makes this more dumb founding is I gave a talk only a month ago on Why Information Security is Important.

So one of two things has happened here:

  1. My talk wasn’t good enough and I didn’t drive the point home enough.
  2. People simply lack the brain capacity to understand privacy, or at least check if something is public or not.

Resolution? Yeah, right!

The question remains as what to do. Sure, I can go through the usual bullshit and try to educate people or even give them a good verbal lashing. Again. But perhaps it would be more illustrative to start posting other peoples private data and see what happens. I get so tired of this. As Jean-Paul Satre said in his book No Exit:

Hell is other people

As my son recently discovered when someone offered him some jelly beans without telling him they were deliberately flavoured distgustingly: other people can never be trusted. Ever. The X Files most certainly had it correct:

Trust No One

Sometimes I really do want to go off the grid and make a living selling baked goods or hand woven baskets at the local market.