Sunday, October 15, 2017

I recently needed a clean Windows 10 desktop for testing purposes. I couldn't use Docker, Vagrant, VirtualBox or any of the other local-to-my-computer VM solutions. I tried the Amazon Workspaces solution but it had the typical UX of 30 questions I don't know the answer to. I just wanted a desktop that could download from the Internet.

Monday, September 18, 2017

Are you seeing this error from your ADO.NET Code Trying to Connect To Your SQL Server via Active Directory Authentication:

Exception=System.Data.SqlClient.SqlException (0x80131904): Failed to authenticate the user NT Authority\Anonymous Logon in Active Directory (Authentication=ActiveDirectoryIntegrated). Error code 0x800703FA; state 10 Illegal operation attempted on a registry key that has been marked for deletion.
The issue might be that you are running a windows service or a scheduled task with a user that has logged off. In Windows Server the registry hive for the current user is loaded when the user logs into the machine, and unloaded when they log off. This means that if you service account is running under a user that is logged off then the registry hive will not be available. ADO.NET AAD in .NET 4.6.1 uses the registry hive of the running user -- which could be the user of a service.

To solve this problem you need to tell Windows Server not to unload the registry hive for users when they log off.

NodeJs & .Net Core

NodeJs and the Asp.net ecosystems have used very different paradigms until recently. This article will show you where they are similar – the 10,000 feet view – when using the Asp.net Core 2.0 environment.

With NodeJs, as the developer you might have chosen to build a web server or a cli tool. Your favorite interactive development environment (IDE) might just be a terminal window or Google Chrome DevTools.

With Asp.net (not .Net Core), Microsoft provided the web server (IIS) and the IDE (Visual Studio). You can develop many different applications including web sites and cli tools. With .Net Core 2.0, the focus is on portable code, and the result feels much closer to NodeJs.

For this article, I'm going to ignore all issues that would make the comparison apples to oranges and instead focus on issues that make the comparison apples to apples.

Moving forward, any reference to Asp.net Core 2.0 will be just .Net Core. NodeJs 6.9.1 will be just Node. The example project name will be kittens so you can see how it is used when it is relevant.

Text Only

The files of both .Net Core and Node are both text files. A project has a single configuration file. The top of each code file references the libraries that are used in the file.

In .Net Core 1.0, the project file was a package.json, but in .Net Core 2.0, the project file is a *.csproj file. The package file for .Net Core is created with the cli of "dotnet new...". The XML of the .Net Core file will be familiar to .Net developers.

In Node, the project file is the package.json created by the NPM cli of "npm init" with the result of a JSON object containing information about the project. I added expressjs to the package so the dependencies object would have an entry.

In their own way, each of the package files configure the project but in very different ways. The .Net Core file is focused on the .Net Core version and final built assets of the project – things the compiler and dependencies need to run.

The Node package.json file lists all dependencies to pull in, as well as meta data about the project – it is the single location a developer touches to control the project as a whole, including building and testing. I usually have a long list of items in the Node package.json scripts section for building, testing, and running.

Execution

Both Node and .Net Core applications are built via terminal/command line. Both are executed in the context of the parent application: dotnet or node.

While Node needs a single point of entry of a javascript file, such as kitten.js, .Net Core uses the project name (<name>.csproj).

> node kittens.js

> dotnet kittens.dll

Dependencies are added to Node projects with the npm or yarn package managers. The dependencies are placed in a folder named node_modules.

> npm add <packagename>

For .Net Core dependencies, use the NuGet package manager. There isn't a single list of dependencies in a human readable format that is opened/viewed by developers on a regular basis.

> dotnet add package <packagename>

Both npm and dotnet allow you to specify versions but it is optional. Npm and yarn have been dealing with package interdepencies and version conflicts. I believe both are now able to avoid version conflicts of interdepencies.

Deployment

Both platforms allow you to 'git clone' then install the package dependencies and run.

.Net Core uses a folder containing many files depending on the execution platform (windows, mac, linux). For Node, just install and run a single file. Node will then find the rest of the files.

> dotnet restore && dotnet ./<path-to-bin-directory>/kittens.dll

> npm install && node kittens.js

Serverless

The reason I mention serverless is you may not want to deal with the execution environment details.
Node has a variety of host platforms and open-source projects to run serverless.

Currently, the best way to run .Net Core serverless right now is Azure Functions. While there are other platforms such as AWS Lamdba that can run .Net Core code, those platforms may be slightly behind (or vastly behind) release .Net Core platform ability.

Docker

Docker containers are a great way to develop and deploy applications. I always look for owner created containers. If it works for them, it will work for me.

For Node, the specific owner container isn't that interesting because there are a million ways you may want to run Node and a different container may get you much closer to your needs in terms of dependencies and tools.

For .Net Core, the owner container is probably the best bet for the short-term while the project is still new-ish.

Sunday, May 7, 2017

"In 2001, 17 individuals gathered in the Wasatch mountains of Utah to find common ground around Agile. After much skiing, talking, relaxing, and eating, they arrived at four common values that led to the development of the Agile Manifesto."[source] [Wikipedia]Going to AgileManifecto.org, we see just 14 people listed, what appears to be their feeling on what promised so much hope some 15 years ago.

Mike Beedle

Arie van Bennekum

Alistair Cockburn

" “Agile has become overly decorated. Let’s scrape away those decorations for a minute, and get back to the center of agile. The center of agile is … ” [2015]

Ward Cunningham

" "I have seen my ideas diluted as they diffused through the industry". You said "I’d much rather move to the next idea than struggle to keep the last idea pure." [2011]

Do you want Crappy Agile? [2016] " it encourages you to track “metrics”. Do you want Crappy Agile? That’s how you get Crappy Agile, at least far too often."

"Scrum is good, when done as intended. Otherwise it can be oppressive and dangerous to developers. Let's study: Defense Against the Dark Arts of Scrum." Dark Scrum

Jon Kern

"The only thing that has me mildly torn--and only mildly, because "to each his own" and "what-evs" come to mind--is the craze surrounding Scrum. Scrum, scrum, scrum, scrum. Part of me is happy that there are legions out there turning the sod under, trying to sow the agile seeds via Scrum. Another part of me thinks it is like Corn-to-Ethanol. A waste of energy for the dumbfounded among us, spurred on by lots of lobbying." [2011]

"As Agile moves into bigger companies and into less adventurous ones, those undocumented values are getting watered down. If that continues, I’m afraid Agile will be this decade’s fad that changes nothing."

Question - Agile is good if selling it is your bread and butter

Many agile signatures appear to have become disillusioned by how Agile is commonly being adapted in the industry. Some people have stopped writing and posting on it. Others have proposed derivatives of it in the hope of getting back to core values. Others are making a good living from preaching the gospel of agile.

My view? Simple, I started using RAD back in 1979 and been using the concepts (without the dogma) for the last 37 years. The best implementation have been where the product owner/customer was very technical and detail orientated and put in the needed hours. The worst cases were scrum was magically expected to make management easy and not require their heavy engagement or hours with the products they owned or manage.

I like the concepts and practice them instinctively, I hate the "rote-application of the manifesto"