Archive for January, 2014

Advertising virtually and physically

by Oliver on Wednesday, January 29th, 2014.

I’m on vacation in Thailand at the moment and noticed a correlation here that I hadn’t before. So many houses, shanties, shops, restaurants and various other abodes have awnings or coverings made of synthetic material and advertising various products. The awnings (I’m not sure what else to call them, as they provide various different services depending on the needs of the person) provide shade from the sun and in the monsoon months shelter and cover from the rain. They all appear to be originally intended as banner advertisements, but I’m not sure if what I’ve seen are intended to be advertisements now, or were previously used for advertisement elsewhere and have since been recycled.

Regardless of my lack of understanding of the banner lifecycle, the obvious result is that advertisements are everywhere you look. Typically they are for energy drinks (are Thais that low on energy all the time?) or mobile phone carriers. I’ve more recently seen some for broadband providers (10Mbps!) and there have been some for scooters but not many others that stick in my brain.

Online we’re living in a world where, regardless if you are aware of it or not, often the “consumer” is actually the product. Look at Facebook or any other service provided for “free”, but now ad-laden. You are consuming the ads and other companies are paying Facebook to display the ads on the off-chance you might consume their products as well. There has been some backlash over advertising, mainly in the more tech-aware demographics but the general consensus seems to be that those aware of it consider it to be a massive affront to their sensibilities and should be done away with at the source.

Having been in Thailand already almost 7 years ago now, I know that these banner ads have been around since at least that long ago, and probably since much earlier too. Online, all you have to put up with are ads in your field of vision – virtually presented through a window you can measure in centimetres. In Thailand banner ads are all around you, wherever you go, physically present in your world here. Again, I’m not very aware of the culture surrounding them, or the reasons for why they are here, but I don’t sense any of the backlash against them. On the other hand, they are providing physical benefits of shade and cover whereas virtual ads online typical give you access to free services such as Facebook (which is really a 1st world luxury).

Tags: ,

Wednesday, January 29th, 2014 Thoughts No Comments

Safety and discipline in coding

by Oliver on Tuesday, January 28th, 2014.

A couple of years ago now at least, at my previous employer, I was just starting to feel reasonably comfortable with Ruby. I can attribute a large part of that to having had a great boss who gave me the time to sink a bunch of time into coding up our IaaS and Config Management systems while still being effectively a Systems Administrator, and another large part to reading Metaprogramming Ruby. A lot of the knowledge from the book has now seeped out of my brain, but it is an excellent read and I thoroughly recommend it if you want to know more about Ruby. I think it was on recommendation from Cody Herriges or Ken Barber of Puppet Labs, maybe both – cheers, whoever it was!

Feeling like Ruby was simply the best thing, I was quite quickly cut down by other coworkers with more development experience than I when topics such as Object#method_missing and Object#send were brought up. To a non-Rubyist I can see how these look like gaping vulnerabilities just waiting to be abused, and to be fair they can be (and are abused a lot). Of course, they are also staples of metaprogramming and require discipline and awareness of how to use them safely in that paradigm.

Specifically around the case of Object#send we were comparing method visibility functionality between Ruby, Python and perhaps Java. Ruby seemed to be quite understandable in this regard but the obvious exception pointed out is that Object#send ignores all visibility rules. Arriving exceptionally late to the party now in 2014 (and in my defence, only as a result of some necessary code-diving and lack of using Ruby much recently) I notice that 1.9 and later includes Object#public_send in its API.

Again, since discipline and awareness should be core developer traits, I don’t think it is entirely necessary but it is nice that the API evolved to address the need for better use of built-in method visibility controls. As for me, hopefully I can reduce my cycle time of finding new language features down from years to just a few months 🙂

Tags: ,

Tuesday, January 28th, 2014 Tech No Comments