Always Read the Code Dependencies – Azure Cosmos DB

TL;DR – go to the last line…

Thinking about the Azure Cosmos DB? Chances are you are already on .NET Core (2.0 hopefully at least). The Microsoft Cosmos DB official documentation starts here. From there you can navigate down into all the documentation.  In fact Microsoft documentation offers this blanket statement:

Developers already familiar with Azure Table storage may have used the WindowsAzure.Storage package in the past. It is recommended that all new table applications use the Azure Storage Common Library and the Azure Cosmos DB Table Library, however the WindowsAzure.Storage package is still supported. If you use the WindowsAzure.Storage library, include Microsoft.WindowsAzure.Storage.Table in your using statements.

So what do you need to know about Cosmos DB? Well like everything else in programming, “What do you want to do?” and the follow on, “How much are you willing to pay?” Aside for SQL Server, the reason you might want Cosmos DB is scale, management, and reliability.  But you can read about that stuff yourself (shameless plug – hire us).

So to the point of this article.  Your code is on .NET Core and you think you want to use Cosmos DB, and you want all of its goodness. You’ve read the docs and decided that the DocumentDB is out because it cost more due to its provisioning and the Table storage meets your needs. You also want to follow the “Microsoft official recommendations”. Sorry! The libs they recommend only work with the old .NET Framework – not with .NET Code as of this writing 5/9/2018. Stick with the WindowsAzure.Storage libraries.


I Don’t Sell Clouds!

I give you the computer program that you want or need – customized just for you.

The programs and services are very real that I deliver.  I charge you a fair price for the program, you get it fast.  Today, it is likely delivered as a cloud hosted application because its more cost effective in most cases.  I don’t sell you clouds.  The cost of programs I build are the same as they were before the clouds appeared.  The labor has not changed, only the delivery.

I sell my expertise, my experience, and my skill and those of my team. It is my intellectual property developed over years in the industry.  I use these libraries and tools that I have built to deliver programs that work.  And I deliver them faster than other developers.  This means you get a quality product, you get it fast, and you get it at a lower cost.  You remember the old Work truism: Better, Faster, Cheaper; pick any two.

I give you all THREE – quality, fast, and low cost.

I don’t sell clouds!

Why is this important?  People are confused (that’s nothing new) by the “techno-babble”, advertising hype, and misinformed technologist.  I ran head-long into this during the week where the true value proposition was misplaced.  They were focused on cloud cost and totally neglecting the actual application needed.  So we are going to look at this.  If you already know everything, you should stop reading now while I talk to people who are really trying to make an informed decision about computer programs.

If you are a person who is a developer or a person who is contemplating cloud solutions as a part of you business needs, then you might be interested.

I do sell custom solutions that run on cloud platforms.  I do this because it lets me beat the Work truism.  It works for my system but it does NOT work for other developers.  I’m happy to back that up – you can call me about it.  It would be TL;DNR here.

First lets simplify the “Cloud” hype.  The NIST has defined what a cloud is in Pub 800-145 where you can read in section 2, “Service Models” that there are three cloud models: SaaS, PaaS, and IaaS.  We are focused on the PaaS model, “Platform as a Service”.

Let me quickly give you the layman’s definition of the other two.
1- SaaS, software as a service: is a canned (pre-built) application program. It does what it does. You don’t get to change it.  Many let you “customize” it. But you can’t delete or add to its features.  This is the same stuff you use to buy in a box or download from a seller and you installed it on your machine.  With SaaS the only difference is it is installed on a cloud machine – not yours.
2- IaaS, infrastructure as a service: is “rent-a-computer”.  You go to the “rent a box” cloud provider, pick a bunch of options and a few minutes later you have a computer (VM) ready.  YOU, are still responsible for the programs, licenses, deployments.  In-short, everything you had to do yesterday, you have to do today with IaaS.  Except look at the box; you can’t see the box, its in the cloud.

Remember, I don’t sell clouds!  I sell custom application programs, not canned software or empty boxes.  A custom application program is a “made to order, to your specifications”.  You get to decide on the features like how fast it runs, how much storage it has, what the screens, reports, and everything else about your application program do.

PaaS, platform as a service: is a collection of services implemented in a cloud platform.  When you are deciding on the features of your custom application your are creating a requirement for cloud services so your app can do what you want – makes sense right.  The truth is custom applications do this right now without the cloud.  In fact ALL applications work this way.  How you ask?  Your computer (tablet, phone, etc.) has an “operating system (OS)” that you use to “run” your apps.  Your computer provides your app with “OS services” to run.  You can see them easily on Windows computers (open: Control Panel/System and Security/Administrative Tools/Services) there is a big long list.  Without these services your computer will just sit there and do nothing.  NOTE: not all cloud providers offer all three service models.  The big three (Amazon, Google, Microsoft) offer all three cloud models in very different implementations.  This is the point where you generally will need an expert to help you.

My company Intact has simplified all of this for you.  Intact have PowerLine PaaS.  You don’t need to concern yourself about all this cloud stuff.  And do you really need to care about it?  You didn’t care before the cloud.  You purchased applications for your business because you needed it.  All the OS services necessary, you just assumed they were there or more likely, you didn’t even know about them.  So why do you suddenly care – oh! Its the hype.

I don’t sell clouds! I use cloud to provide you the custom application that you need/want, that works the way you want.  That is what is really important.  I earn a living providing you services delivered with Quality, Speed, and Value.  Work truism – BUSTED!

fetch(http… Developer Pain

Let’s face the fact – browser wars are still ON! I think it is on a different dimensional time/space coordinate these days – consumers really don’t care anymore, “My device [substitute: tablet, phone, thermostat, etc.] has an app that works; what’s wrong with your site/service?” they rant!  So who cares then?  Developers.

The point is, the consumer (developers seem to forget they too are consumers) does have an “app for that” and it most likely uses the underlying browser technology installed on their device.  So we developers are thus obliged to DWI.

We cannot control it.  We cannot change it. We can only barely influence a small segment of it.

In my opinion developers are worse than the general population when it comes to complaining about perceived incomplete features. I don’t know, but maybe we developers are just built that way.  We will call Microsoft by all sorts of names that really should not be used around children, when they release new “incremental” builds, leaving out the very thing, the very API that will solve all our immediate issues on our current punch list.

I don’t know Jake but he acknowledges the same sentiment:

Bit of a rant: it bothers me that as developers, we preach iterative development and release, but when we’re the customers of that approach the reaction is all too often “HOW DARE YOU PRESENT ME WITH SUCH INCOMPLETE IMPERFECTION”.

I found Jake’s comment while trying to DWI in the browser war.  I have reluctantly come to terms with HTML5/CSS/JavaScript (and all the variants), they are absolutely “facts of life” in the developer world.  My government customers are still building applications and technology as if they can control the user’s choices.  What they seem to forget is users are voters.  Sooner or later IT becomes a problem that cannot be ignored.  When it does voters do what they do – vote.  Government is yet to DWI!

Maybe DWI is a good plan for long-term business success. Yep, it is a business expense to DWI when DWI = change.  It is also a business expense to loose a customer.  Customers like voters will tolerate a problem for a while.  When tolerance runs out, its like Crosby Stills Nash and Young song title form way back, they’re: “Long Time Gone”.  Your customer could be “Long Time Gone” too, if you don’t DWI – timely.

fetch(… Browsers are mini-operating systems. More and more the browser is being integrated deeply into work-flows – at very low levels, just like an operating system call.  As this happens there will be no other choice in implementations.  The developer will suddenly find the choices have already been made.  While I wasn’t looking browsers changed.  I am “re-thinking” a lot of my current code development practices.  I am as Captain Picard (Star Trek TNG in Darmok episode) was in the closing scene: Darmok, His eyes wide open.

I understand.

CodeSolve: Complex Forms and Validation

I’ve been in business since 1981 (admittedly I was pretty much clueless back then) developing business skills and working with customers who helped me understand business.  That might seem strange but here is the truth – even if you are dead sure you have the correct solution for your customer and they disagree or show hesitancy, you better shut up and listen.  I often remark to people about how surprised I am, I ever got jobs when I was younger.  I think about it and one thing I did do, was listen to my customer.  My father taught me to listen (anybody who knows me, knows that was a hard job.)  I am also naturally curious, wanting to know more so that helps me stop and listen.

Forms and Validation

Nice setup for a discussion about “forms” and validation.  Why forms? People need information (data) to do an activity, business or otherwise.  Forms create a repeatable method for obtaining the needed information.  Validation is the activity of ensuring the necessary information is obtained AND it is correct for the purpose.  We are going to leave aside the “work-flow” right now and concentrate on just the form and validation.

Years and years ago we made forms on paper.  Believe it or not there are books and books written on the subject of form design.  Why all that concentration on form design?  To validate the data on the form.  Example, the IRS 1040, likely the most well known form in the US.  This form incorporates the design principals necessary to obtain the correct and accurate information to file your tax information.  I worked as a consultant for the Florida Department of Revenue on a system to process tax-payer form submissions and to deliver the data into computer databases.  Forms can be complex.  The more complex the form the higher chance for users to supply incorrect/inaccurate data.  Validation is critical.  In your life, how many times have you had to re-do a form because you could not understand how to fill it in.  Example, the IRS W-9 and W-2 employment forms are less than a single page and come with four pages of instructions.  Until you get it right you are not getting paid.

In computers program development form design is almost an afterthought.  I’ve seen some really bad forms.  I also have seen well designed, well conceived data capture systems.  After all these years I can say with assurance, the form where people enter information into a computer is just a fraction of the software.  My estimate is that for every entry, 2/3 of the code is somehow related to checking the entry rules ensuring good data is obtained.  This could be reduced if you think for a while about how people will interact with the form and maybe even read a little about best practices in form design.

The Point

Validation of form data should be constrained to the visible data.  That means that you should design forms is smaller blocks.  Yes, tabbed forms are cool and other gimmicks in code to “Wow” users are built by coders who, by the way, will never, ever use the form.  Remember the discussion up top about listening?  What you want is good data, not wow-factor.  In form design, simple forms will deliver better data, cost less, with less user aggravation.

We have had customers who designed nice paper forms.  Their computer designs followed the paper design pattern as you might imagine.  That is fine as long as the filer is in person with the person typing on the computer.  The Internet has broken that connection yet we still make forms the old way.  Have you ever been on a site (I’m thinking about several government sites) where I fill in the form and press the “Submit” and… It says there is an error in the form.  OK, which page, which field, what don’t you like about my answer???  Of course after screwing around with it for ten minutes the computer throws in the towel and announces that my form can’t be processed – call your administrator!  I HATE those things – you do too!

You want good data, useful data? You want it to cost less to build and maintain? You want happier customers and maybe even more customers?  Then invest time in form design.  Simple forms delivers better quality data.

Naturally in my parting shots I must plug CodeSolve and PowerLine.  We strive for simple design and we listen to customers.

Microsoft Access – Why Nobody Has a Converter

I, as many others likely have discovered after 25 years, Microsoft Access defies attempts to use automation to convert the application itself to a modern application.  Access is a Windows desktop app.  Therein lies the first part of the problem in using automation to convert the application to a modern app.  It is designed for the Windows operating system (pre-Windows 10).  Windows is an “event” driven system.  In an event driven system a user can “click” anywhere – in the app or somewhere outside the app. Because of this “click anywhere” capability developers had to handle an endless set of possibilities.  More than half the code we wrote back then was there just to handle the “operator”.  A modern web application can have events, true, but the container application is handling much of the event notifications that come to the working application. They are filtered down to those that apply to the task at hand.

So we now know that the underlying architecture is totally different, dependent on a browser and not on Windows even if it is running on a Windows machine.  This means that developers have a different set of parameters to contend with in a modern app must be “cross-platform” independent.  Cross-platform lets a modern app work on Windows, IOS, or Android in a multitude of browsers.

While the above is certainly a challenge to using automation to convert existing Access (or any other Windows desktop app) to modern form, it could be done if Windows architecture were the only set of issues.  Access is in a special class of desktop, applications being both an application for getting work done (user targeted) and an application “development” platform.  Once upon a time it was a benefit to “extend” an application by using the Visual Basic for Applications (VBA) extensions Microsoft made available to developers.  VBA as it was called was a subset of the Visual Basic (VB) development environment and allowed developers to include it in their own applications.  The idea was that a developer could extend any app by writing Visual Basic code that the application would then run. As you might imagine, the resulting application had two modes of operation, runtime and development.

The automation killer: A developer could use the Visual Basic to create any type of work-flow imaginable! Work-flows are almost always augmented by external systems or simply through human knowledge.  I call this “human-ware” where a person is effectively part of the logic and control of the application.  Human-ware cannot be converted to a new application using automation, because the connective information is not part of the code and cannot be deduced without the human who knows the special steps not part of the program’s code.

Here is a simple example: Suppose we have an Access application to record data about a person. Suppose these persons are visitors, customers, or associates.  We want to record information about them in our system and put them in categories so we can search for them later. I’m the developer and you tell me this is what you want to do. So I decide to create a screen that lets you record all the information on a single form. Naturally on that form you must specify the category the person is in.  Another developer is smarter than me deciding to use a menu with three buttons for that you press a button to indicate the person’s category. This ensures that it always matches on a search. A third developer is a VB jockey, decides to use your actions (events) to trigger code to run and uses an “interview” method of data collection for all the person data by presenting you questions to answer. All three of these get the same information but use very different approaches (work-flows) to arrive at the outcome.  In all three cases Access was the application.  In reality it is much more convoluted than this with a mix of all of the above and more.

It is not practical or cost effective to attempt to automate conversion of Access apps to a modern platform.  Intact had an Access decoder that dumps everything (forms, tables, modules, objects – everything) to flat text files. We use these with our CodeSolve robotics to re-innovate the application as an Azure Cloud application service.  With CodeSolve conversions generally take less than a week for fairly complex applications.

If you are interested in learning more visit our CodeSolve site.

Set-IT-and-Forget-IT: No IT Doesn’t Work that Way Anymore

Forever, (or at least since ’81 and the IBM PC) individuals and businesses have purchased (or acquired through other channels) their software to run on their PC’s and they expected it to run there for years and years.  And in most cases it did.  There was nothing to compel you to do differently.

Well in case you have been caught napping, the smart phone came along more than 10 years ago and as they say, “The world changed.” It truly has changed the face of computing and the notions of software that runs on computers (including all devices.)

What is the big deal? You ask… Well for most individuals the big deal is really not a big deal. When the device you have (PC, tablet, smart-phone, TV, whatever) is out of date you do what most people do, go to Amazon or Best Buy and come home with a new X Box, you get the picture – software is included. In other words, “No thinking required, No brainer, Not a problem.”

For businesses that is not the case. [Shakespearean Aside: My definition of a business in this post excludes those very small businesses that are virtually “one-man” operations who behave as individuals.]  Business owners follow time-honored and government regulated practices which immediately put the brakes on the, “lets just upgrade” mentality.  The non-business person who likely is employed by one, is even guilty of saying lets just get new software.  The problem with that thinking is simply this, the customer will be affected and that is a negative (unless you are Apple).

Fortunately for you I am not going into all that business hoopla; there are plenty of online articles and debate enough already for you to do your own research.

The Point of this Post:

Today, computers (including all devices) are effectively disposable equipment with an expected lifetime of approximately three (3) years.  With hardware refresh rates shorting even more.  Cars, for example, are on a one year refresh rate.  Yes, I know cars last more than a year but it is out of date in one year.  You practically have no choice now but to take it regularly back to the dealer for a software upgrade.  In the computer business this is a “patch” or “bug fix.”  So if high-ticket priced items are on a schedule, then it is reasonable to assume that devices follow the same type of curve.  They do.

Businesses must alter their purchasing practices of the software that drives/supports their line-of-business.  If you continue to think that your software is a fixture like your building, then you are going to be in a financial predicament in the near future.  Software is a service, hardware (infrastructure) is a lease.  Start recalculating your business plans.  If you need help, you need to contact someone like me to assist you.

(Note: All companies mentioned in this article are owners of their various trademarks and other intellectual property. I make no claim to any of their respective rights and have used them here as common well-known public companies for illustrative purposes. I am or have been a customer of each.)

Visual Studio 2017 and Windows 10 Fall Creator Update (.NET 4.7.1)

This just a short note on compatibility.  If you are having this weird compile time error in Visual Studio 2017 15.4.x similar to: “… missing assembly reference. You must add a reference to assembly (netstandard Version”, error then this might help.

The issue is the tooling in Visual Studio not knowing about .NET 4.7.1. These days Windows, Visual Studio, and .NET are not any longer released together so there are and will continue to be mismatches in OS’s, tools, and .NET releases.  You have a couple choices.  1- If you like the bleeding edge then DWI.  2- If your earning a living, use only versions that are listed on the .NET and Visual Studio sites as Latest Stable.

Now, I obviously am one of those in the DWI category.  To use .NET 4.7.1 you must have Visual Studio 2017 15.5 Preview 2 or you will get build errors.  Naturally you forked your code before targeting 4.7.1 and netstandard 2.0 together – right, you did this?

Good luck…