We've had quite a few questions involving code on the site now:
Recapture/reset the first frame from a motion detector every N seconds
How can I change Alexa's pronunciation of a specific word in a skill?
Creating indirect (managed) connection between audio source and sink in CSR bluecore VM
The general consensus (see also here) is that programming questions are usually on-topic provided there is a link to an IoT use case.
I think it'd be helpful to enable syntax highlighting here (using language hints, where <!-- language: lang-example -->
comments are placed before the code block). Personally, I find it much easier to read code blocks with syntax highlighting once they begin to pass trivial sizes (even 5 or 6 lines can benefit from some syntax highlighting), so I imagine many posts will benefit here.
Would this be useful to others, and should it be enabled here? If there's enough support, I'll let the community managers know that we're interested, but I see little point in enabling it if the majority of people aren't going to use it.