The Mark of a Good Programmer

The mark of a mature programmer is willingness to throw out code you spent time on when you realize it’s pointless. (Bram Cohen)

I saw that quip on the Xamarin bug list.

I’m building an IoT solution using a Raspberry Pi 3 device. It’s been a while since I looked at the solution, so I ran, “sudo apt-get update” to refresh the OS and various utilities on the Pi. After the slew of upgrades, things seemed to be faster and amazing.

Included in those upgrades was one that moved my version of mono (I use C# on the Pi) from 4.0.something to 4.6.2. Which led me to exceptions like listed here. Problems with SSL authentication. I spent a few days digging around for solutions. I went from custom SSL handler code, to setting up a reverse proxy with nginx, to trying to use libcurl.

When I have a solution that worked and then “suddenly” stops working, I generally find myself trying to find a quick approach that lets me move on to what I actually want to build. This strategy is very breadth-first. After all, that thing that stopped working, as far as I’m concerned, worked, so I’m about to make the next big thing. I don’t want to redo that which I’ve already covered. So searching gets frantic sometimes. And I get distracted more easily.

Which brings me to that quote above. I just kind of caught me in that place between distraction and frustration. As I thought about it, a big part of what I was doing on the Pi and that bug was tied to a strong desire to keep my solution working in C# even though there was a likely better approach with some other stack on the device. So, I switched, used Node.js for where the communication pathway was breaking down and I could move on.

I don’t expect this is the final architecture for what I’m building, but it lets me build out higher priority areas, while that bug gets resolved or I understand with a bit more depth what broke between versions. Either way, here’s to realizing pointlessness.


Basket of (open data) goods

Last year, Anand, Nigel and I won the Trinidad and Tobago leg of the Caribbean Open Data Sprint. (woohoo!)
It was Anand and my second or third time at the event. We didn’t expect to do so well, we largely went for the vibes, bounced up Nigel there and it was nice.

This year, there apparently won’t be a Trinidad and Tobago leg for the first time since the thing started.Screen Shot 2016-04-22 at 12.38.46 AM However, getting involved in Open Data projects never needs invitation or formalities. If the data’s there, people will try to make magic.

Trinidad and Tobago is in a recession. So, people have been more price conscious than usual. Not just people but even ministries in government and their units.

One such unit, the Consumer Affairs Division, released a booklet that tracks the cost of goods across a range of grocery stores around the country.

The data was locked in a PDF-formatted file, across 32 pages.

I grabbed the file and spent sometime thinking about how it could be liberated and what could be done after that.

Fortunately, because the PDF itself was structured fairly well, an online service was able to render it as excel.
From there, we converted it to a more app and website friendly format – json.

A small site was built which provided a view of the data, and works fine in a desktop browser. The site can be seen here:

I was motivated to do this because it was a good demonstration of the innovation possible as more and more data becomes available.

Edit (April 30, 2016) [and super-technical note]:

I really wanted to start some sort of basket functionality on this PoC, and so I just added the start of that functionality into price range.  Ideally, it should do a version of what “Knapsack” does, which is, for a given set of items in the basket, what is the best place to get all the items? #KnapsackInRealLife

IoT Perspectives

Recently, I represented Teleios at a Microsoft Trinidad Event: “Innovating your Business with Microsoft’s Cloud”.

I presented on the Internet of Things, together with Darryl Ramdin. I spoke in general about the Internet of Things, providing definitions and context. Darryl followed up with real world examples and case studies from Microsoft.

The Internet of Things is a global phenomenon, and I wanted to bring that sense to the participants in the room, who before this may have only been exposed to IoT as a buzzword.

According to a 2016 study from Evans Data Corp, APAC and North American developers are most likely to engage in IoT:


For the crowd in the room, that meant our region is definitely on track to feature more and more of these projects. Going further, IoT is expected to hit mainstream by 2020, with 25B connected devices projected.

So, what is IoT?

I’ve been using the “connecting everyday devices to the Internet” as a starting point for a long time. However, in talking with Darryl, he shared with me a simple, yet powerful set of points that are meaningful. The Internet of Things can be seen as the set of technologies that feature “things”, data, connectivity & analysis. Things here, being sensors, smart devices & other points of input.  Connectivity speaks to how that Data is communicated and analysis – finding meaning in the mass of readings.

Consumers tend to see this as remote management of their devices, including thermostats, home security systems and automobiles.  And the more they see, the more they want. Connected cameras, thermostats, door locks and other appliances are among the expected popular items, according to this study.

In our seminar though, we had representation from Manufacturing, Transport, Oil & Gas and Government Administration.  They expressed interest primarily in a range of Asset Tracking situations, as well as Document Management.  A Cisco report on IoT in the Enterprise concluded that  Asset utilization could be a $2.5 trillion component of the IoT pie, overall expected to be in the region of $14.4 trillion in 2022.

At the moment, one of the things that is jumping out at me is that many, many firms can benefit from considering and implementing IoT solutions. While waiting to present I met someone from the Trinidad and Tobago Fire Service, stationed in Tobago.  Of course, some quick searching pointed out that there is in fact an innovative use of Smart Textiles in that space – the Firefighter jacket or Turnout Gear in professional speak, with integrated Thermal Sensor Technology (TST) directly into the fabric.

viking_turnout_gear_tstSo that while there has been moves since the 80s to ensure suits are able to stand the heat, now, fire fighters can be more proactively informed about the nature of the danger they are in.

This can help fire fighters know when the temperature has become to hot for them to stay in those conditions any longer.




All this pointing to the understanding that there are great moves happening in the IoT space and as we’ve shown with the Teleios Code Jam, the barriers to entry are getting lower and lower, as university students continue to present compelling solutions in this space.




Defining Cloud

When we teach on Cloud Technologies at UWI, we start with building the context.

Many students come to class with ideas about what cloud is from their experience with service providers. Perhaps they use Gmail for email, or One Drive for storage.  What they know is that some provider manages the concerns attached to a service they use.

We start off with a definition investigated and shared by the US National Institute of Science and Technology (NIST). As outlined by NIST, when they developed their definition, they were going for a yardstick that could allow consistent comparison among service providers, deployments and strategies.

According to NIST, cloud computing is a model. A way of thinking with regard to requesting, deploying, managing and monitoring computing resources. This model anticipates broad network access as the means to interacting with service providers. The resources being provisioned are expected to be shared.

In the NIST version of the cloud model,

  • There are 5 key characteristics.
  • There are 3 service models.
  • There are 4 deployment models.

When delivering this understanding we tend to repeat those characteristics often.  They are:

  • Self-service
  • Network accessibility
  • Pooled resources
  • Elastic resourcing
  • Closely monitoring

Services being built today may feature the use of cloud resources but themselves may not actually be cloud services.  Walking along with those characteristics, we encourage students to ask, “can I order this up, pay and have it available, without human involvement?”. Then it’s self-service. Can service modification be done over a network? Does the underlying infrastructure automatically assign and un-assign the use of resources? Does the billing reflect up-to-the-minute information on when a customer provisioned/de-provisioned services?

Those are the starting questions that can be used to evaluate services when spotted, or as they are being built.

The service models are Software-, Platform-, Infrastructure- as a Service.  The concept of “[x] as a Service” is essential to understand when considering the degree of abstraction.

Breakdown of Cloud Computing Services
Cloud Services, image via Wikipedia

Service models let a person evaluating or implementing cloud to know what will be in their hands to manage vs what is being managed by a service provider.

And finally in the NIST-defined model  of cloud computing there are the deployment models – private, public, community & hybrid.

We start with this definition because from there we expect students to be understanding how in an MSc focused on Cloud Technology, they need to be oriented.

There are two forms of orientation I’ve experienced. It is knowing the responsibility for developers & software designers to build with cloud in mind, paying attention to relevant patterns & principles, such as service orientation.

And it is also the great empowerment one should feel when embracing use of these services. Literally, the savvy can provision servers, services and other resources via code. That is tremendously advantageous. The course is about exploring how so.

When I teach these courses, I come at the students as someone who’s been witnessing the change in how software is conceptualized, built & delivered.  It’s hoped that from the experiences shared, they’d be empowered to jump in, and take part.



My Programming Journey

A friend of mine asked me about where to start in terms of programming. I wrote this long piece on my start to try and answer his question.

It started with a letter in 1996.

My grandmother was at the time asking me about career ideas. I told her Computer Science. I didn’t really know what it was. It just seemed to put together two of my likes at the time, Computers and Science.

My family has generally been encouraging about my ideas in terms of career and pursuits, or at least, not overtly discouraging.

The seed of the idea for CS started much earlier, when on a visit to my uncle in the country, I saw he had a PC on his desk. Asked what he did, I think he said he was an analyst, then fired up a game of Ms. Pac Man.

That was it.

From there, I did IT in Secondary School. But it was a time of prioritizing finishing the syllabus over pursing dreams, so my entire class had to do the level at Technical Proficiency. This level essential prepares you to be a really good secretary.  We did the Office Suite, and little else. I wonder if they still have that around?

Anyway, this was back in the 90s, so the only real exposure I had beyond that was setting up my first email address (@Yahoo) in a time when passwords could be 4 characters.

I wouldn’t get back into anything IT related until starting University in 2001.  I applied to the University of the West Indies, for Civil Engineering. When I got there, I opted instead for Computer Science and Management. My uncle funded my first year’s tuition. Without him, I do not know when I would have gotten in.

The early courses were introductory, Java-based and fairly bland. Except for MicroEcon, where I earned the nickname for a day: Syllogism. Generally though, we had come from Secondary School where the goal in life was passing your exam. We weren’t disabused of that notion.

But needing to earn my keep to be able to stay in full time CS programme made me have to look around for opportunities to apply the growing skills.

First, it was joining the nascent team in the Student Activity Center (SAC), who were building and managing the computer facilities there.  Mr. Mike, the General Manager, essentially gave us a lot of room to spec out the rooms, the machines that would go there, the networking that was needed and the rosters for work. Looking back, that sort of freedom provided the first feeling of what University was about – responsibility to learn on your own, and stand behind the choices you made.

The labs at the SAC were the grounds for a kind of development that was very groovy. We worked late into the night, strangely, when I was there there wasn’t that much gaming. That mostly happened in other computer labs on campus or downstairs. Instead, there was a sort of civicness of the people who passed through there.

From the lab, a team, the Campus Pipeline (CP) team, was assembled. Another bunch of students, this time rolling out or helping to roll out the online portal for students to use in a Facebook-like way.  One nifty project required us to create import files in XML, via looking through a database of student records, which would then be loaded into CP.

My only tools were the javadocs, two courses on intro to Java, google and what was like a blackbox of magic at the time, a jar file made by one of our lecturers, I think Mr. Sheik, cs11.jar.

We were so new to programming, it took a long time for the incantation, “public static void main(String[] args)” to even make sense. It was just what you put to get JCreator to do the thing.

As it turns out the xml problem was just string operations (in my mind at the time). We had no end of assignments that was open a file, do a thing, then make another file.

After the CP gig, one of my most formative activities came from a course I wasn’t even supposed to be doing – MIS.

Management Information Systems was a course offered in the Social Sciences faculty for Management students to get a sense of IT in a non-combative way, I guess. I’m not even sure why I did the course. Maybe I was caught by the course outline. Maybe it was the lure of an easy A.

In that course, you had to come up with a project of your own choosing, and describe its benefits. Our project, e-commode, was poorly named. We were looking to provide an online version of the Student Advisory Services register of places for rent for off-campus students. It wasn’t bad. We probably got an A, and we changed the name, to e-commodators.

Another facilitator, Mr. Victor Cowan gave me an opportunity to do something real with what I had learnt. He ran the Student Advisory Services office and listened to my proposal after the course was completed to build out the e-commodator system for the University.

Since pricing for solutions wasn’t a course, and I was a second year student after all, the fee I charged Mr. Cowan worked out to be what an intern might have made for the summer. He was willing to make the leap with me and let me build out what became the Online Accommodation Student Information System, OASIS.

It was written in Classic ASP, with VBScript. I used a MySQL database, because I was fancier than MS Access (remember IT in form 5?) and it was free. I had never done a web project before. I hadn’t done the courses for it yet, but googling felt like the answer to every problem. Books, too. Finding those long-form VB tutorials and w3Schools (I know, I know) articles were enough to convince me it could be done.

In the end, it took the full two months, but we got OASIS up and running. In those days, there weren’t (any?) online mapping providers – this was 2003 – and so, I went down to WASA and paid the horrendous TT$700.00 per map, for digitized versions of maps of St. Augustine, Tunapuna, Macoya, Arima, Champs Fleur and a few other towns. Writing about it now, I feel like it was a big deal, but back then, it was just what was needed for the solution to make more sense.

I think they still use OASIS to this day, perhaps with some modification.

That work on OASIS was pivotal to how I took the next year. I literally blew through a course called Application something or other. Because the language was VBA and I had just spent all July-August writing VBScript for this site. I then took Internet I and II because the Internet.  Dr. Gardler remains one of my favorite lecturers.

My final project involved mysql, php and more upgrading.  Another site, the Main Library’s past paper website used plain html to keep track of past paper files that were sent from across campus. I converted it to what was essentially a CMS for past papers.  It was another project where I got to just figure out how things worked by searching online and understanding the technology and implementing it. This was with Ahmed and Frank, more people who were willing to provide the space for a student to explore and make something meaningful.

I spent my last year, realizing that as good as it felt to write those kind of solutions, the Design and Analysis of Algorithms required time, reading and deep thought.

I graduated in 2005 and started working at Teleios Systems that year.


Remember, remember! The fifth of November

This year’s Teleios Code Jam Finals was November 5.

We spent time again bringing light to the ideas around the Internet of Things.  It was a great event, really strong presentations were brought. Our winners, Team BlackIce demonstrated OceanGuard, an IoT solution for monitoring environmental data about the ocean.

Apart from the nerves, TCJ Finals Day has an energy all of its own, I was caught off-guard by it this year. We changed up how Phase 3 would have proceeded. With 5 questions to hit instead of the 1 demoralizing one, it made for a marathon of Teleios personnel catching those who were pressing through.

And then, just like that, it was all over.

As I said during opening remarks, we had interest from 19 teams, but 7 made it to the finals. I’m looking forward to see how we get those other students and faculty down to show off their ideas.

Teaching Cloud

I’m lecturing at the University of the West Indies this year.  I’ll be teaching the MSc. course in Cloud Technologies.  This year, I’ll be working along with Alysia Huggins. She’ll be bringing expertise in distributed systems to the course, but not just that, some very cool approaches.

  • We’re looking to have more interaction from professionals, so there’ll be in-class Skyping, interviews and assignments that require our students to get out and look around at what’s happening in the region ’round Cloud Technologies.

Their first assignment will be to take a look at IaaS and start to answer the question, “Is the West Indies ready for building/deploying it’s own IaaS services”?