Danger Zones

TL; DR

I’ve built a map of the location updates from the Ministry of Works and Transport of Trinidad and Tobago based on flooding and where was/is impassable. You van view it here.

“Technical” details

That tweet above is kind of how I got the idea in my head to build out an example of the approach.

When I sat down to do create a version of a good approach, I had all kinds of options in my mind. Should it be rendered on the client or server side? React or Angular? Should I use Google Maps, Leaflet & MapBox or something else? How would I generate the data?  Should I try and parse some tweets? What’s the fastest way to get data? Who has the data?

Since I didn’t want to spend all evening in analysis paralysis, I just dove in and began pulling things together. I had recently set up a new dev environment, so my regular tools for some ideas weren’t restored yet. No node, npm or React was set up. So I started downloading packages, installers and tools.

And then I remembered glitch! I literally paused mid environment setup and jumped onto searching in glitch. Glitch is like online development environment that comes prepackaged with the resources you need to get up and running with with minimal fuss. Now, you have to have a sense of what you want to build and what tech to use. Which I did. A few searches later, I found a great starting point, something that already had the Leaflet stuff built in.

Having the base I wanted, I needed to get the content of these tweets represented as geojson:

Again, numerous options, parsers to write and just ideas swirling around. But while spelunking online for stuff to use, I found geojson.io – a WYSIWIG for generating geojson. I had to handcode the stuff, switching between Google Maps, Open Streetmaps and Waze but I just wanted an early result.

And I got it: a map that presents the information that @mowtgovtt tweeted about the state of impassable regions in the country.

 

Advertisements

Funky Azure Functions

Let’s talk about watering plants.

When I was younger, in my family, I was assigned the task of watering the flowering plants around the house. Thinking back on it now, there was easily 50 plants of all shapes and sizes. So, I would have to shuffle around the yard, bucket in hand, dipping and watering. Some plants would get two dips, others one. I couldn’t use the hose, because that might damage the roots of the younger plants. I hated it.

Ever the creative, I used to come up with outlandish ideas to solve the predicament. Sadly, I never implemented any of them. Thus, I was left to water these plants by hand.

Last week, for Caribbean Developer Week, I came up with a demo, featuring Azure Functions, that is the nearest to a solution to my plant watering needs back then that I have ever come.

I built three Azure Functions:

  1. Setup Waterer
  2. GuidEnqueuer
  3. Plant Waterer

Setup Waterer actually created more Azure Functions. Those would be Timer functions, each potentially able to run their own schedule.

GuidEnqueuer, alas poorly named, but good at pretending to be a plant food source, would receive an Http post and enqueue it. Plant Waterer would pick this up and display on a console. No actual plants benefited from this demo.

As I gushed previously, I created the Setup Waterer function on top of the Azure Fluent SDK and it worked fine. Functions making functions. That’s what I wanted to show really, and things worked well.

The code is available on my repo here.

Cloud, fluently.

So, I really dig the Azure Fluent SDK. It feels incredibly intuitive. Once you have familiarity with the lay of the land in terms of resources in Azure, then following on from examples of using the Fluent SDK looks as easy as using linq to get data access queries done.

It looks like the team behind it is ensuring the SDK stays up to date with Azure resources as they are released. Prior to being introduced to Azure Fluently (my name, lol), I was trying to find a way to create Azure Function applications on demand.  One of my recent Stack Overflow questions was in that vein.

But then along came this SDK. Now, I could do something like this:


IAzure azure = GetAzure();

var newName = (fnNamePrefix + DateTime.Now.Ticks).Substring(0, 19);

var storageAccount = azure.StorageAccounts.List()
 .Where(x => x.Name.Equals(storageAccountName))?.First();

MemoryStream stream = CreateZip(indexJs, functionJson);

var functionUrlZip = UploadZip(storageAccount, newName, stream);
 stream.Position = 0;
 var websiteApp =
 azure.AppServices.FunctionApps.Define(newName)
 .WithRegion("East US")
 .WithExistingResourceGroup(resourceGroup)
 .WithExistingStorageAccount(storageAccount)
 .WithAppSetting("WEBSITE_USE_ZIP", functionUrlZip)
 .Create()
 ;

Which lets me programmatically create an archive of the bits for a function (JSON), upload it and then, create the actual function. Notice, this function is powered by that experimental feature -> pointing to a zip file for your web app (WEBSITE_USE_ZIP).

I could have used this creation step to instead get the function’s publish profile and then upload the files via FTP to the newly created app as well.

This versatile way of engaging with Azure Resources, from a creational/management perspective is really compelling and I’m looking forward to using it more in the future.

#TheFutureIsFluent

 

See a flood, tweet a flood

Brandon was a student of mine in 2016. He did the Cloud Technologies course as an elective in his GIS programme at UWI.

During the course, one of the assignments is to develop a proposal for a cloud service. The proposal should address service model, delivery model and deployment. It also needs to talk about how each of the 5 characteristics of cloud services would be delivered.

Brandon and his team proposed flood identification as a service.  That is, it would grab user generated content and use that to identify if floods are happening in real time. After the proposal, he continued refining the proposal and is now testing it. He published this video to explain how it works:

I dig how he used a Twitter bot to receive the feedback as well. I hope his findings reveal a productive solution.

Good job, Brandon!

Hello World 2.0

Hey,

Last year, I saw this:

And I thought, “Aye, I would love to contribute to that!” So, I sent a session proposal and it was accepted!

Now, I get to join an impressive lineup of my peers and share on technologies I find to be exciting, relevant and impactful. I’ll be talking about topics I’ve been working with for a while now, including chat-bots, AI, language understanding and other cloud services.

What’s also groovy is that for this week, there’s a pretty sweet discount on attendance:

Registrants can save 40% on attendance. All Access tickets will be priced at $2495 TTD + VAT and a 1 Day Pass at $1495 TTD + VAT. This means that registrants can get a Full Access ticket for less than the cost of a regularly priced 1 Day Pass.

You can get more details of the conference here.

I saw the guys at Microsoft Build do this, and I loved the idea, so I’m doing a version of it here, it’s a “Convince Your Boss” template that’s amazing:

Convince Your Boss!

Dear <Insert Manager/Boss/Supervisor Name>

I’m really glad that we’ve been exploring ways for me to stay current with all the new technologies that could significantly make how we work more efficient, robust and competitive. I think I’ve found a place that helps us advance those goals.

In May, the signature gathering of ICT minds in TT and the region is happening, it’s called ICT Pro TT and it looks amazing. There’ll be talks from local luminaries, researchers and professionals in the ICT space, talking on Cloud, BI, AI and Leadership. 

They’ll be joined by award winning professors, international speakers and representatives from IBM, Google and Microsoft who will share a breadth of experience and expertise in some of the same areas we are considering for our next steps.

But one of the best reasons for me to attend is that this will provide a place for me to find and mingle with the community of seekers in our local ICT space. I want to see and hear from my peers who are actively trying to advance the nation by building great companies and organizations that are data-driven, willing to make new things and learn along the way.

Normally, we’d have to consider the expense of travel, accommodation and other amenities to access all this goodness in one space. ICT Pro TT helps remove all that and brings the value here. Thus, I’d love if you strongly consider having <Company Name> send me to this event.

Hack for nutrition

Last weekend, I attended the Trinidad and Tobago leg of the WSIS’ Hack Against Hunger event.

I was talking with Dr. Bernard about a new Teleios Code Jam initiative and she let me know what was going on at the weekend.

So, I went on Saturday to hear what it was about and wondered if I’d have any time to build something simple.  The hackathon had a really nice premise:

HAH_Snippet

Hackathons tend to be pressure cookers, so I wasn’t game to spend all night and day building something. Largely because my wife and child would not have been impressed, but I could have carved out some space to put an idea together.

“Carving out some space” really meant getting three hours of sleep while stumbling around datasets, doing the dishes and taking care of baby. An good solution came together, though.

I tackled nutrition, using my own experiences with trying to find the best food for my family. Best of course being relative. One might think that means most expensive, when really, it can mean, most appropriate. For example, our pediatrician told us, lay off the flour-based spaghetti and dive in to more ground provisions for our baby girl. That stuff can be pretty cheap in the local market.

Thus, I spent my time hacking together a virtual assistant that will help with finding out both the locally produced foods and their nutritional content. I called the bot Miss Mary. Largely because the old lady in the market that I ask questions like “what’s this thing?” and “how do you know that pepper’s good?” 1. It was cassava yam and 2. Because she ate it raw. I don’t know her name, but she reminds me of a shopkeeper in a place I used to live, who was called Miss Mary.

Presentation time, I didn’t have one, so I put this together to help tell the story.

I wasn’t able to stay for the remaining presentations, but I was told they were really good. I’m looking forward to hear more of what was built! Ultimately, the first prize went to Sterling & Keshav. For their troubles, they’ll be headed to Geneva later in March to compete once more.

All the best, guys! 🙂 #KeepHacking

PS: I’ll release a version of Miss Mary a bit later on, I was excited to share the story! 🙂

Bots State

Ok, in 2016/2017 these were the bots I made:

Nurse Carter

Hansard Speaks

Time for Water

For some reason, I feel like there were more. Most likely, that’s because of perhaps just iterating on those above. I did make a few PoCs for work, like collaborating on the Teleios Code Jam one with our intern at the time, Joshua.

I also made a few ones we used for demos with clients, those put together things like QuikWorx, our low code solution creator at Teleios with SharePoint and Cortana.

This year, there are a few I’m going to go after in addition to iterating on the ones above. A friend of mine asked me to make a hybrid QnA CUI application. This tweet by Gary Pretty about a new way to sync QnAs might bring that back up.

My next new bot will be one that uses the Consumer Affairs Division data in some way. I hope to finish that over this long weekend in Trinidad.

One of the changes I’ve not been on top of have been to the Microsoft Bot Framework.  They’ve gone to General Availability and bots on the bot framework developer portal need to be moved over to the azure portal by March 31.  I’ll both move and update dependencies with the move to keep current with how to do things on the framework.

So, that’s it. I hope for more collaborations with the updates this year and perhaps more frequent updates.