Thursday, 6 November 2014

The story of the "My Big Bro" experiment

What is MyBigBro?

MyBigBro is a system I have built that tracks a user on their journey through a city and captures and stores imagery of them that has been made available on the city’s CCTV traffic camera network, as they move through the field of vision of each subsequent CCTV traffic camera.

Why'd you do that?

There is a growing trend among Governments globally to make the data that they collect on their citizens as open and available as possible. The MyBigBro 'experiment' (I'll explain why I call it that later) explores this trend and leverages some of the data that is becoming accessible.

Some examples of open dataset repositories provided by Government are as follows:
One of the datasets that I find particularly interesting is CCTV traffic camera imagery. MyBigBro leverages that specifically.

How does the MyBigBro experiment work?

At the time that I originally wrote this document (which was originally a pitch for funding, and has now been hacked and re-purposed for this blog) MyBigBro was in deployed on the Android app store "Play" and in early alpha - not publicly available. There were (and still are!) a number of features yet to be developed before it was properly ready to introduce it for public use - it's now publicly available

It was working at a rudimentary level in early alpha though. Here is a screenshot from a journey that I made and tracked using it on January 4th 2014 (The look and feel of the system has changed significantly since this screenshot was taken):


[Images captured while travelling though Mangere Bridge, Auckland]


Architecture

The MyBigBro system architecture leverages a range technologies. Although the following diagram references AWS elements, currently MyBigBro sits mostly on the Azure cloud platform; the fundamental architecture has not changed significantly however since I drew the diagram in early 2014:


[The MyBigBro system architecture]

At the time I was using AWS and a local webhosting organisation (http://www.kiwihosting.net.nz/) for hosting purposes. The back-end services are now almost entirely running on Azure. No clients other than the Android one exist at this stage.

Development and potential; thoughts

Development on MyBigBro has been underway since mid-2013; my efforts ramped up in early 2014, following my completion of a two year part-time study programme last year. The idea first came to me sometime in 2012. I suppose I get between 1 and 10 hours per week to spend on this initiative, sometimes more, sometimes less.

Over the coming months and years I anticipate many city's CCTV traffic camera networks will become more advanced; the cameras will become higher resolution, the images will be refreshed at closer intervals and the camera networks will become more granular (we are already seeing this in
NZ). Currently images being captured from the NZ network are “hit and miss” as to whether the participant is captured, due to the CCTV image refresh intervals and the resolution of the cameras. As the camera networks develop though, users of MyBigBro will be able to capture images of themselves increasingly regularly.

At the time of writing (Nov 2014) MyBigBro is limited to New Zealand, Sydney, Hong Kong and London’s CCTV traffic camera networks. London is (currently - only just) of most interest, since the CCTV camera network there is vary granular and covers a rich range of urban settings.


[App screenshot showing a sample image picked up by a test user in London - https://mybigbro.blob.core.windows.net/images/55552a1b-9ffe-4336-a094-032f8b0d3650.jpg]

Further information relating to London’s CCTV traffic camera network is as follows:

Theme and market

The theme that I am developing could perhaps most accurately be described as “gamification” of issues that are of public interest, such as public sector CCTV infrastructure. The front-end (web and mobile app) is a novelty, which appeals to our general curiosity with regard to what data our Governments are collecting about us and making available to the general public. The product is mildly tantalising, but is not a tool or a necessity. I'm not certain what the market for MyBigBro is as a service, but can speculate...

Futures

The intention of the system at this stage is to capture imagery from cameras as users move through a network of CCTV cameras. The system could be adapted easily though to capture and store a series of images from a single camera indefinitely. This would be useful for example if a user wanted to keep an eye on their car overnight, which they had parked and left in the field of view of a camera.

MyBigBro is not really a business or a productivity tool – it is more like part of an experiment. However, given the current attention that issues relating to public sector data collection and distribution are receiving, MyBigBro does have the potential to become a point of interest in cities like London, where Government CCTV use is pervasive. Follow-on opportunities may arise as interest in the platform grows.

How can I get/use MyBigBro?

As mentioned above - the app's currently only any good to you if you use NZ's motorways, or Sydney, Hong Kong or London's streets. That being said, here's how you can get started:
  1. Get the app: https://play.google.com/store/apps/details?id=com.infostructure.mybigbro
  2. Visit and fnd your way around the web app: http://mybigbro.tv/
  3. Run the Android app (background is fine), traverse your city, look-and-see on the web app if any images are captured.
  4. Ask questions: https://twitter.com/mybigbrotv
Easy as 1, 2, 3...4!

Why "My Big Bro"?

So if you have not guessed; I call this experiment "My Big Bro" after the character "Big Brother" in George Orwell's book 1984. This is a loose reference to the way that the system sort of, claims back some of the data that is collected by a/the Government on it's users. Thus, MyBigBro is (part of?) a social experiment, or perhaps (more accurately?) an artwork.


[Banksy's "One Nation Under CCTV" - source: http://londonist.com/2008/10/council_to_remove_banksy_mural.php]

To clarify - I am not a conspiracy theorist and this is not a political manoeuvre. I do actually consider MyBigBro to be an experiment; a piece of art, like an installation artwork. I'm interested in the changing nature of our cities and the role that Government CCTV has to play in that. I'm also interested in image processing and computer vision. 

Mainly right now, I'm interested in people using MyBigBro and generating data - so if you know people in London in particular - tell them to install it and tell them to tell me if they reckon I've bollocksed something  up!


Monday, 13 October 2014

"We Haven’t Got Time to Think about This Job, Only to Do It"

Thoughts on team dynamics...

This blog post is a loose assembly of some of my thoughts on communication, thought and culture - and the importance of making room for these processes/phenomena to develop when we are working to solve complex problems in teams.

Two important references

Perhaps you have heard the following commonly repeated quote of Abraham Lincoln: "Give me six hours to chop down a tree and I will spend the first four sharpening the axe." - essentially, before diving in and starting a job, it pays to think about how to approach it and prepare.

The following link will take you to a more detailed version of the same thinking with specific reference to software development - "We Haven’t Got Time to Think about This Job, Only to Do It" (Peopleware - Timothy Lister and Tom DeMarco, 1987) - if you're lucky, Google will let you read to the end of chapter 2, which is where this section is.

http://books.google.com/books?isbn=0133440737

I actually highly recommend the book "Peopleware" in general for anyone working with software development teams; at least take a look at the section referenced above (if you can reach it).

http://www.amazon.com/Peopleware-Productive-Projects-Second-Edition/dp/0932633439

Anyway, these references set the stage for the remainder of this post.

Teams, communication and gestalt

Without communication we can end up doing a lot of hard work to produce something that is mostly useless (worst-case-scenario!).

It is better (in my opinion) to at least accept - and ideally expect - that a percentage of a team's time will be spent purely on maintaining/developing cohesion and culture.

A team is an entity in itself - the German word "gestalt" (for which I believe there is no analogy in the English language) essentially means "the whole is greater than the sum of the parts". This is what a team is like.

[gestalt]


Think about it - if you have ever been part of a close-knit team (a football team, family, organisation, etc - most of us have been), you will know that they can be happy, sad, motivated, dysfunctional, hurt, inspired, etc. A team is like a living, intelligent being in it's own right; it is capable of achieving more than the sum of the efforts of the people from whom it is composed. It is born of two or more minds working toward a common cause.

Teams function optimally when they are allowed/enabled to blossom and thrive. One of the reasons people leave teams is when they have no spirit.

Agile meetings - how can we improve?

Meetings are important. It is true that some meetings are unnecessary - and should be called out - but it is important to lean toward giving the benefit of the doubt.

Agile meetings such as stand-up meetings, sprint reviews, sprint retrospectives, sprint planning and backlog grooming give us a framework that we can use to develop a healthy level of team communication.

It's important to have a technical understanding of the purpose of these meetings and use them as intended.

It is far more important though to understand the principle these meetings are founded on; that in order to optimise productivity, teams need to be given the opportunity to figure out for themselves how best to communicate and to manage their work.

[team optimisation]

Agile meetings - a taxonomy

Here are a few articles that I find useful to revisit sometimes as an overview/refresher of the various meetings that Agile prescribes:

In summary

Agile meetings provide a framework that we can use to ignite team communication. They are not the only way of doing this, just a way that has been shown to be effective. This post is not about Agile meetings - it is mostly about team communication.

Effective teams are empowered enough to take advantage of meetings and to use them as a means of internal and external communication. Flavours of Agile like Scrum can give us a guideline for how to use meetings optimally.

By definition, teams are the only means by which organisations get things done (who knew?!). Managers are important - their purpose in the context of the team is to facilitate and to enable team communication.


Sunday, 5 October 2014

Three famous female computer programmers

Grace Hopper

This lady coined the word "debugging", when she found a moth in a piece of computer hardware that she was writing code against:

http://en.wikipedia.org/wiki/Grace_Hopper#Anecdotes
[debugging 4 realz - source, Wikipedia]

Julie Ann Horvath

Is probably the most recent famous female computer programmer, after she left GitHub in a major huff:

http://techcrunch.com/2014/03/16/github-julie-ann-horvath-response/

This is a bit of a sad story and it is a shame that it was allowed to happen. Up until just recently, GitHub lauded the fact that it didn't need managers:

http://www.wired.com/wiredenterprise/2014/01/github-ceo/

So really this story reminds us why/how managers are important - good management would most likely have prevented this situation from going so badly wrong.

Women's work...?

Interesting to note that programming in-fact used to be considered "womens work" - but now most professional programmers and computer science/engineering students are male (in NZ).

So what changed...? Here's one writer's take on the situation (YMMV):

http://www.smithsonianmag.com/smart-news/computer-programming-used-to-be-womens-work-718061/

In any case, if you work in software and have even a few female techies on your team, you probably have a more balanced mix than most organisations (at least in NZ?)

Ada Lovelace

Last but by no means least - this lady wrote what is now recognised as the the very first computer program:

http://en.wikipedia.org/wiki/Ada_Lovelace#First_computer_program

The Ada programming language was named after her and was one of the first object oriented programming languages:
[Ada Lovelace - not your stereotypical computer geek - source, also Wikipedia]


Sunday, 29 June 2014

How we think about software and the process of it's creation -


Writing code and developing software is a creative act. A programmer who finds herself in her work wields her tools and applies and refines her craft with as much care and discipline as any other type of artist. Anyone who has ever written software and/or developed an artwork in anger will be familiar with the dual processes of working toward a clear goal or idea, and coaxing an expression into existence through incremental experimentation and failure. 

To illustrate this notion I invite you to take a look at Picasso’s artistic process, dear reader:


["Why You Need to Fail", by Derek Sivers - Picasso is between approximately 9:09 and 10:40]

Perhaps you are not comfortable with an analogy of art/painting for programming? Then the following analogy for programming as gardening may be easier:

["Rather than construction, programming is more like gardening" - source: http://www.artima.com/intv/garden.html]

In any case, the idea that I want to express is that – although it makes sense that software development initially be lumped with other engineering disciplines, since it essentially emerged in it's modern form from electrical and electronic engineering – the perception of engineering as the final resting place of software development as a discipline is not right. Software development is bigger than that, and I want to talk about that here…

Software is as-if-not-more malleable than any other living thing or artwork. And – unless you somehow take into account the mass and velocity of the electrons involved – software is not realised through any specific physical structure. It manifests itself as patterns of electronic signals, through which data flows and is transformed. Ultimately, physical activity always results from and/or produces data that is fed into software, but the software itself is purely electronic.

Here’s Fred Brook’s (author of "The Mythical Man Month") take on programming:

“The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination. Few media of creation are so flexible, so easy to polish and rework, so readily capable of realizing grand conceptual structures...”

One of the factors that makes it difficult for the idea of software development to grow beyond the engineering analogy is that working software is hosted by and dependent on physical structure – i.e. hardware. The development and arrangement of hardware naturally runs on far longer cycles than that of software and therefore certainly fits the classical engineering model.

Another factor that I would suggest keeps software development closely linked to engineering is the perception that from a business perspective, art is perhaps not seen as being as serious-of-a matter or as predictable or rigorous as engineering. Software is ever-increasingly important to business; in-fact, much of the world’s modern business process – from the smallest scale through to the very largest – is no longer capable of operating without software (think point-of-sale systems, telecommunications, share-markets and stock-exchanges). The idea that business is heavily dependent on (the result of) a largely artistic process (software development) though would probably make a good percentage of executives feel ill. So maybe from a business perspective, software development’s happy place is engineering.


[Repeat after me "Everything seems to be in ooorderrr" - source: https://www.youtube.com/watch?v=bhuOIbg-hM0]

Furthermore, for reasons that perhaps justify another blog post – it seems to me that art and engineering are in-fact inextricably linked. All of engineering, from a Mars rover to stone footsteps laid across a stream, could be seen to be forms of installation artwork; each subsequent piece incrementally extending the ideas of its predecessors. And art-for-art’s-sake is apparently a necessity – artistic expression is as old as human history – so it becomes a chicken-and-egg question; which came first, art or engineering?



So I have come to think that art and engineering have a symbiotic relationship. And I think that software development more than (almost?) any other discrete discipline to emerge from history to-date, straddles art and engineering most evenly. One of the ways that technology emerges is when we figure out how to effectively commoditise an art form. That process of commoditisation is still active with software and is perhaps only just beginning.


Tuesday, 28 January 2014

A lap around the "single page web app"...

What's this about then?

2014 will perhaps be the year of the "internet of things" - and the WWW will surely play a big part in that.
Front-end in WWW (HTML5 in particular) is rapidly becoming the vast majority for UI development - consider the fact that even many (most?) successful smartphone apps are running in HTML5 containers like phonegap: http://phonegap.com/ 
Having an understanding of the way the web works and what the state of the art is on the web today could save us (as in - software developers working with the WWW and their customers) a lot of time and money.
So I have written this post to help myself better understand. Perhaps you may also find it useful, dear reader!
Please just note that this post (or more accurately, links listed within) occasionally swings wildly from relatively simple to deeply technical...

The single page web app

According to @peterwayner, the JavaScript MV* framework and the single page web app are both now hot:
But web sites/applications used to have lots of HTML files, site maps, etc. So what what's happened? How does one write a web application on a single HTML page?
Basically it seems this trend is supported by HTML5, but has largely been enabled by the rise of the JavaScript async framework.
The evolution has more-or-less been like this:
[Bernard's Interpretation of the Evolution of the "Dynamic" Web Application]

In reference to the "XMLHttpRequest + JavaScript = RYO AJAX script" - if you interested in seeing some source code that does this, take a look at a previous post I made on this subject:


The JavaScript MVC

So let's take a closer look at JavaScript MVC. Basically these are frameworks that enable us to treat a web server and an appropriately designed suite of web services on that server, as an application back-end.
The following section of the (freely available) book "Backbone.js Applications" provides a more detailed overview:
These WWW client-side MVC frameworks have really taken off in popularity over the past couple of years - they are generally based on the likes of jQuery and provide beautiful functionality for UI and back-end integration development purposes.
The following article (I was referred to this compliments of @josh_robb) is what inspired me to write this post and provides an extremely interesting (IMHO!) overview of why JavaScript MVC frameworks like backbone.js' days may be numbered...
Perhaps this is the article to read if you are considering using a JavaScript MVC framework in a project currently: 


Some references

Get Backbone.js: http://backbonejs.org/
Get Knockout.js: http://knockoutjs.com/
Take a look at "Om": https://github.com/swannodette/om


Notable

Finally another interesting addition to the mix is node.js; this is not really a web development framework, but in-fact this is JavaScript turned into a server-side language. Indeed, a node.js program can initialize it's own self-hosting web server - i.e. a "node". 
Get node.js: http://nodejs.org/

The enabling substrate

And what does all of this jumble of stuff depend on for it's very existence? It is of course HTTP; currently in version 1.1, or 1.0, depending on which browser you are running. This year though, we will see HTTP 2.0 start to make inroads.
This event is a bit of a big deal and carries with it the potential to turn "conventional" web development on it's head...again. Take a look at this video for an overview:

["Making HTTP realtime with HTTP 2.0" - Source: Realtime Conf 2013]
This video referred to me via @petegoo. Here's the Wikipedia page for HTTP 2.0 also, for reference: 

http://en.wikipedia.org/wiki/HTTP_2.0

Diagnostic tooling

What would an enthusiast of any genre - including web applications (or "internet of things") development - be without their tools? Probably not an enthusiast...
There are a range of diagnostic tools - that is, tools for analysing the performance/behaviour of your app, as opposed to developing it - available supporting web development. Tooling ranges from on-board (actually within the browser) to IDE integrated, to server-side diagnostics, to bits-and-bytes-over-the-wire-level. 

So here is a non-exhaustive list for your reading pleasure:


On-board: Chrome



Follow these links and update your instance of Chrome to the latest version to take a look at some of the newer tools available for this browser, including the fantastic "flame chart" for JavaScript performance analysis:


On-board: Firefox




Browser-independent: Fiddler


Bits-and-bytes: Wireshark

Summary

In summary - have fun!



Monday, 27 January 2014

What’s your view of purpose of life?

I was recently asked during an on-going conversation what my view on the purpose of life was. This is something that I consider here-and-there and since my response was written I figured I'll post it here. I have accompanied it with a couple of photos that I have taken recently.

[Sunset Over the Waitakeres, from Glenfield, Auckland]

So, my initial response to this question these days is usually:
"Honestly I have no idea."
However I followed this up with:

"It seems to me though that there are certain themes in life, and although some of the themes change with time, the one that is constant is to "overcome adversity" in whatever form it comes in.
Engaging the challenges that life puts in-front of me seems to be the source of all of my joy and frustration. When I’m not actively engaging challenges, before too long life seems to lose it’s meaning. I tend to encounter many challenges at once – some I "choose", others arrive of their own accord and demand my attention! Some of my time is spent thinking about how to balance the amount of my time I invest in each. And also there is time spent relaxing, meditating/praying, basically re-centring myself.
I do think that life is infinitely bigger than my own experience though and sometimes it feels as though I am just passively observing the universe and everything I do is automatic."
...and provided the following disclaimer:
"Phew! That’s the best I can do right now – ask me again next month/year though and you might get a different answer!"
...then finally:
"How about you?"
So over to you then, dear reader.

[Rangitoto Island, from Cheltenham Beach, Auckland]


Thursday, 9 January 2014

Software architecture; the lay of the land -

Purpose

Given the plethora of genres of architect that are sought on [insert your favourite job search tool].com, I thought it would be worth writing a post on this subject, to help myself and anyone else who may be inclined to ponder software architecture, better understand the lay-of-the-land within and outside of their own organisation.
This post is actually a loose assembly of my own thoughts and previous posts that I have made on the matter of programming and architecture; I have copied/pasted, and stitched together to form a somewhat coherent document.

Definition

"An architect is a person trained and licensed to plan, design, and oversee the construction of buildings. [...]"
Here's a picture of a Saab – according to Top Gear, all construction type architects own one of these:


[A Saab]

But this post is about software architecture...

So how does architecture relate to programming?

To be clear, architecture is by no means a final or inevitable destination in the career of a programmer. It is more a way of thinking than a "job", and in-fact, a good architect may not necessarily be (or have been) a good programmer.
Architects like to think about the big picture – business implications, what the customer thinks, how a design will fit with company/product strategy, project scope, etc – hence their work is much "fuzzier" than the programmer's. By contrast, a programmer may love the intricacy and precision of their work; designing a complex system at the "nuts and bolts" level and seeing it come to life.
Fred Brooks puts it like this in his influential book The Mythical Man Month:
"[programming is] the fascination of fashioning complex puzzle-like objects of interlocking moving parts and watching them work in subtle cycles, playing out the consequences of principles built in from the beginning. The programmed computer has all the fascination of the pinball machine or the jukebox mechanism, carried to the ultimate."
Neither programmer nor architect is "better" than the other, but they are different and can be expected to have different interests.
As the profession and industry of software development matures, we have an ever-increasing volume of historical accomplishments and/or issues to look back on and pat ourselves on the back about, or alternatively facepalm – depending on how you look at it!


[Faceplam]

We now understand that it's not how much code is written that is important; what's really important is the quality of the code and whether the code implements a product that meets the customer's requirements. Movements like Agile and Lean (as it applies to software development) reflect this thinking – but that's another story...
Successful software architecture is to a large extent guided by looking to and applying learning from our own history; certainly architecture is more about this, than it is about trying to find new and exciting ways to apply the latest/greatest technologies known to humankind.
Depending on the type of organisation, architecture may be more-or-less important. An organisation that aspires to be a product company for example, may put more emphasis on architecture than a services or utility type company (power, telecommunications, etc). 
To elaborate; imagine a suite of products with implementations geographically/physically distributed across many countries, sites and customers. Design decisions in this situation made around software development can have a far reaching impact. By comparison, "internal" software systems (the services or utility company, for example) maintained by an internal team of programmers, can be manipulated and modified with relative ease; the implication being, priority of design may be overridden by convenience in this situation.

Types of architect/ure

So what are the various "flavours" of architecture that we may come across, within and outside of the organisations we work with?

Solution architecture

The goal of solution architecture is to produce a customised solution for a specific customer. The solution may end up being part of a product, but initially at least, is tailored to a specific customer's (or group of customer's) requirements to solve a specific problem.
Wikipedia sum up solution architecture quite nicely: http://en.wikipedia.org/wiki/Solution_architecture

Product architecture

This is a relatively old discipline that is applicable to areas outside of software development.
One definition is as follows: "The arrangement of functional elements into physical chunks which become the building blocks for the product or family of products."
Here's a slideshow that Berkley provides online, relating to PA: http://best.berkeley.edu/~aagogino/Slides/11_SPD_platforms.pdf
Basically the role of the product architect is to think about the products in a company's portfolio and how they can be developed, improved and streamlined in order to make them more marketable, maintainable and effective.

Enterprise architecture (edited 20140714)

Enterprise architecture (EA) departs from other types of architecture in terms of definition and function - it is more of an introspective business discipline that leans on technology (business process design/mapping, automation/improvement, etc) than the other way around.
With the world becoming more-and-more interconnected and automated, and with new ideas being able to be brought to market faster and faster, there is a growing interest in EA as a means to improve internal business process. 
Several EA "frameworks" have sprung up in recent years - here's Microsoft's comparison:
Effective internal business process can be seen as a way to gain competitive advantage, since internal process is harder to imitate (by competitors) and easier to control (by the enterprise) than external factors. Examples of external business factors would be product marketing and development, price-based competition with other companies, etc.

EA's goal is to change and improve internal business process, which is in-turn expected to result in improved ability to successfully negotiate and manage external factors, thus enhancing and enterprise's overall competitive advantage.

Agile architecture

Another more recent addition to the list of types of architecture, and a growing movement, is the concept of "Agile" architecture:
The Agile architecture concept essentially says that architecture is a collective and emergent thing.
The role of the architect in an Agile team is one of bringing ideas together, making sure people feel comfortable sharing their ideas and then assembling the team's thinking to form a coherent "way forward" from a combination of the group's collective thinking and the architect's personal judgement. Sounds a bit "new agey"...but Agile is a bit like that.
Indeed, the role of "Agile Architect" in a team may not necessarily be held by an individual, but exist in the collective thoughts and opinions of the team, as a means to achieve a specific goal.

Concluding thoughts

Although we use titles to distinguish functions, within a single company/industry many of the above "flavours" of architecture may bleed into each other.
People's titles reflect their various backgrounds and interests, and what they are expected to be able to contribute in a team context. Despite this, we may find that the acting architect on a project/team may not hold the title of architect, but rather, be a senior developer, team leader (perhaps even a PM!), etc – essentially, someone who knows and/or has more experience than most about a particular problem/domain.
In Patterns of Enterprise Application Architecture (recommended reading for anyone who is in software development/design-esque line-of-work) Martin Fowler describes software architecture as being:
"The highest-level breakdown of a system into its parts; the decisions that are hard to change; there are multiple architectures in a system; what is architecturally significant can change over a system's lifetime; and, in the end, architecture boils down to whatever the important stuff is."
This seems to fit – basically, in order to deal with architectural decisions and problems, it helps to have the desire to be involved with this type of fuzzy stuff, and also the experience to be able to make informed/effective decisions in the face of fuzzyness – or at least, to get yourself (and the system) out of the schtuk if you make the wrong decision.


[Stakes is high: the "Ford Edsel" - http://en.wikipedia.org/wiki/Edsel]