Monthly Archives: May 2016

Javascript and new way of thinking!

It’s been quite some time since I did any Javascript programming, and it’s hard to start thinking in an unstructured way again.  One of JS’s peculiar nuances is the ability to declare a property on an object by just assigning it! After working with C++/Obj C/C# and having to declare everything up front this takes a new way of thinking.

For instance, with the Cocos2D-X-JS the pattern of their script declaration didn’t make it obvious on where or how to declare variables that will persist between function calls.  Being used to pre-declaring everything, I stuck a few ‘var’ statements at the top of the file, before the ‘extends’ stuff starts.  This works, but looks a bit messy.

var self,canvas;

extends: cc.Component,

Of course, with JS, there’s no need to declare variables, just assign them as a property and they’re created for you!  Of course, you’ll not get the benefit of type checking and even checking if the var you’re using is spelt the same as the one you declared, but you can’t have everything!

Time to expand my horizons!

I’m going to check out as a cross platform language for some utility work that needs to be deployed on both Android & iOS.  I’d prefer to use Unity, but the client I’m talking with doesn’t want to spring for a full Unity license (turns out you can’t just buy the monthly sub for 4 months, release a product and then cancel…).

Can’t wait – especially given how much I love Javascript </sarcasm>.


No audio from FaceTime on Mac

I’ve got FaceTime setup to receive/make calls through my iPhone using my Mac Mini, and normally I’m really happy with it.

However, today it stopped playing back the audio from calls received or made.  I tried with the force quit, but that made no difference.  I really didnt want to have to reboot my Mac (though I’m pretty sure that would have fixed it), so digging into the App I discovered you can select the audio output from the Video menu (which is why I probably never looked before).

Anyway, selecting a different audio source, placing a call, and then reselecting the original source made all the difference and now I’ve got it working again! Huzzah!

Screen Shot 2016-05-03 at 12.11.06 PM