Sunday, April 22, 2018

I saw Kevin Grossnicklaus speak on Azure yesterday.

Kevin was the opening act for this event. Everything in Azure at its highest level is a "resource." A resource can mean many things. DTUs (database transaction units) are a measurement of how many concurrent calls you need per X number of users, etc. Underneath Azure there is a very rich API and it is possible to talk to Azure through PowerShell scripts. There are datacenters for Azure all over the world. It possible to have your stuff randomly assigned to a CSP (cloud service provider) and it also is possible to specify a datacenter. US DoD East is for example a data center for the American government to secure its doings and isolate its data from other data.

The European Union has stricter data-keeping standards than America and there will be the need for European interests to be hosted on EU compliant servers such as "North Europe" in Ireland. The Brexit is challenging British use of the "North Europe" server apparently. Kevin touched on IaaS versus PaaS versus SaaS though his description of PaaS was different from my original understanding as suggested here. Infrastructure as a Service entails spinning up VMs. You may pick your operating system, be it Red Hat or be it Windows. Software as a Service can mean IIS in the cloud or it can mean subscribing to someone else's Azure hosting software for a fee. That's not really new. Platform as a Service was however described today as maybe something like a SQL database in the cloud that you could limitedly talk into through a connection string, more limited in scope than spinning up SQL Server yourself on a IaaS VM but also a little more to the point as well. Paying for a subscription to use Visual Studio or the PowerBuilder IDE for SAP stuff are other examples. Key Vault, a service for saving private keys in your apps, is yet another PaaS trapping still. Setting up your own infrastructure outside of Azure entails a lot of chores that go away with IaaS and from there even more chores go away with PaaS and finally SaaS takes the most off your plate as seen here:

Beyond the portal at https://portal.azure.com there is a shell at https://shell.azure.com and you may run command line commands there such as az vm list to see a list of your VMs. Logic Apps make for the modern BizTalk implementations, inter-organization middleware (bridges between OS and software or software and a database or whatever) allowing for process automation. Cerebrata has UI tools for Azure. Storage Explorer is sort of the FileZilla for file storage at Azure. There is a distinction between Premium and Standard Storage which has to do with whether or not you are using RAID (Redundant Array of Independent Disks and originally Redundant Array of Inexpensive Disks) Arrays which spread work across multiple disks. Crazy things you may use in Azure like the Face API for recognizing an identity based upon a photo allow you to up your game in terms of what you can realistically do when you build an app. The so-cost-prohibitive-it's-impossible is getting easier as you don't have to roll it yourself.

Kevin mentioned that a lot of the kids he works with have never seen a five and a quarter inch floppy disk and don't know what they are beyond a save icon. I wasn't used to seeing all of the fountains at the event. You never see these anymore in Texas because they are so wasteful. I'm not in Texas anymore though.

What are TypeScript Typings?

This was per this a tool to install typings which made jQuery or moment.js play nicely with TypeScript. Basically, the challenge was that while JavaScript is "untyped" there are types in TypeScript and if you want to use jQuery or moment.js or some other untyped JavaScript library amongst the types it can cause chaos. There are type declaration files with .d.ts extensions that give types to the untyped faking it like it fits, get it? This came up on page 23 of "ASP.NET Core 2 and Angular 5" by Valerio De Sanctis which gives the reader an enormous guilt trip for maybe being eventually mad at the fact that the code at the Packt site will eventually be out of date as things change over time and the book ages five or ten years. I digress. The Stack Overflow article I reference here also suggests that npm now takes care of this problem and not the thing in the first link I provide, not any longer anyways.

Saturday, April 21, 2018

I saw a talk on App Services for developers today.

The speaker was an R. Michael Querimit of Microsoft and the event was the 2018 Global Azure Bootcamp, a Microsoft sponsored community event designed to promote Azure. Michael Querimit asked the room "Who here is a developer?" or something like that and a lot of us put our hands up. He built on top of that by suggesting that if we do all of the things that distract us from development, such as prepping a machine to host the code, the Azure way, at the cloud, that an immense amount of time will be saved allowing us to really focus on the real work and be more productive. He went out to the Azure Portal and showed us a lot of tricks and, yes, it all seemed pretty easy. There is a distinction between Web Apps, API Apps, Mobile Apps, and Logic Apps with the last of these being workflows and the first three being very similar variants of IIS hosted applications in the cloud with only the included-by-default .dlls changing up across the three. Michael focused on Web Apps and made one and went on to show off how if a processor rose above 80 percent (or whatever percentage you'd like) usage that a new instance of the app could be set up to offset the heavy traffic. You can write your own rules (all in the labyrinth-deep cockpit of controls that is the Azure Portal) that kick in for as much while allowing yourself to otherwise have as few instances as possible to save costs. There is a brief cool down period when a spike or a drop happens before a rules-based addition or reduction kicks in to make sure the phenomenon is the new normal and not just a fluke. In Michael's words, this, and similar features, allow the little guy to be just as flexible and robust in the DevOps sphere as major enterprises. All of the settings you might put in a Web.config file can just get stored in the various settings in Azure Portal if you'd like. You can push an app to a staging deployment before really rolling it live to troubleshoot and test. There may be times that you will need to talk to on-premise data, for example if your organization is just afraid to have its sensitive data out in the wild, and that is all doable too. Telemetry data (data gathered from endpoint interactions) gets sent to Application Insights and Application Insights can tell you all sort of metrics on what is going on with your stuff. There are helpers for HIPAA and PCI compliance.

This event was at St. Louis Community College in Bridgeton, Missouri which is a St. Louis border town. Microsoft held similar events today in other U.S. Cities and I believe also beyond the states in the world at large. I guess that would make the "Global" part of 2018 Global Azure Bootcamp make sense.

There are a lot of ugly brown buildings in St. Louis. Many of them were once-upon-a-time, one hundred years ago, beautiful red brick buildings which have turned brown over time, but today's building was just built with an ugly brown exterior to begin with. Inside however, you would not believe how over-the-top posh things were. Just look at that fountain! This is kinda a good analogy for Azure itself. I've never warmed to it because it seems ugly from the outside looking in. I am surprised by how beautiful it gets upon closer inspection.

Friday, April 20, 2018

holding Ctrl and using the scrollwheel and/or holding Ctrl and using the plus and minus keys at Google Chrome's browser

This will zoom the browser in and out.

Loop through all of the values in an enum in TypeScript.

enum LetterGrade {
   A = 'A',
   B = 'B',
   C = 'C',
   D = 'D',
   F = 'F'
}
 
for (let grade in LetterGrade) {
   console.log(grade);
}

 
 

The above will give us A to F, but what is below will give us 0 to 4 before A to F and then A to F as well.

enum LetterGrade {
   A,
   B,
   C,
   D,
   F
}
 
for (let grade in LetterGrade) {
   console.log(grade);
}

Model changes which are ultimately JSON changes will cause errors far downstream in an Angular app.

There is no real type safety in JavaScript in spite of how much TypeScript will have you believing that there is. If a type hydrated from an API call is supposed to be a number and you get an object instead the code won't blow up until you do something later on like try to run the number with the CurrencyPipe. It is a little tricky to put your finger on exactly what went South quickly.

best format for dates kept in JSON?

This suggests this:

2014-03-12T13:37:27+00:00