All Posts By

Adam Anderson

Adam Anderson

Adam Anderson is a Microsoft Certified Solution Developer with over 20 years of experience. He started as a consultant using Delphi to rapidly deliver custom, high-quality database applications in a wide variety of industries. Over the course of his career, he has acquired a wide variety of skills including database design, query and index optimization; Database metaprogramming and databases with dynamic, self-modifying schemas; reporting with Crystal Reports, SQL Reporting Services, and Telerik Reporting; .NET Framework, ASP.NET MVC and Web API; ServiceStack; LINQ and Entity Framework; HTML, CSS, and Javascript; Kendo UI; Regular expressions; and lately, Node.js, Express, Angular, MongoDB, PostgreSQL, Redis, Windows Azure, AWS, and more. Fortunately, Adam likes learning new things and then writing about them!

Articles

Porting Azure Web Apps to Google Cloud Platform (GCP)

By | Cloud Platform, Google | No Comments

This is post 7 of 17 in the series “Google Cloud for the .NET Developer” Introduction So you’ve decided to port your ASP.NET 4.x Azure Web Apps to the Google Cloud Platform (GCP). The only option available today for hosting non-Core ASP.NET in GCP is with Windows Server VMs in Compute Engine. Let’s start by acknowledging that this is a move from a Platform as a Service (PaaS) to Infrastructure as a Service (IaaS), with all the typical tradeoffs: in short, you sacrifice rich features in exchange for increased granularity of control. With that in mind, let’s take a look…

Read More

Google Cloud Platform (GCP) Compute Engine – Windows Server VMs

By | Cloud Platform, Google | No Comments

This is post 6 of 17 in the series “Google Cloud for the .NET Developer” Intro to GCP Compute Engine If you’re a Windows .NET developer, then when you think cloud, your first thought is probably Microsoft Azure. However, Google Cloud Platform (GCP) has a very strong offering for Windows developers as well, starting with one of the most fundamental building blocks of cloud computing: the Virtual Machine (VM). The Google Cloud Platform’s name for VMs in the cloud is Compute Engine. It might be intimidating to step into an arena largely populated by unfamiliar Linux servers and enough foreign…

Read More

Google Cloud Platform (GCP) Overview

By | Cloud Platform, Google | No Comments

This is post 2 of 17 in the series “Google Cloud for the .NET Developer” The list of products available in Google Cloud Platform, while shorter than the lists from Azure or AWS, can still seem quite daunting. Here’s a quick overview of what’s available in the Google Cloud Platform (GCP) specifically for .NET applications. Compute GCP offers many products under the Compute umbrella, but most are not easily accessible to the Windows Server + IIS + .NET developer. The two main offerings of interest are Compute Engine and App Engine. Compute Engine Compute Engine is the family of services focused…

Read More

Awesome, Text-Based Diagrams with Mermaid

By | Visual Studio Code | No Comments

A picture is worth a thousand words. Plain text can convey high levels of detail, but when there are multiple entities involved, text fails to communicate the relationships between them well. In a recent incident, I needed to explain to myself and others how information flowed between four different actors in a transaction. Oral and written attempts would quickly become confusing because of the difficulty of keeping the state of all the different actors in our heads at once. In comparison, once the transaction was laid out in a diagram, the flow of information immediately become far easier to understand for…

Read More

Is an 80 Character Code Line Length Still Relevant?

By | C#, CSS, JavaScript, TypeScript, Visual Studio | No Comments

If you’ve spent any time reading about coding standards on the internet, you’ve probably come across the suggestion to limit lines of code to 80 characters and wondered if it’s still relevant today. The advise to limit lines to 80 characters is often connected to the historical limit of 80 characters in terminal windows. But what if your team is not subject to this constraint? Are there still any benefits to adopting this limitation? I tried living with it for a while and here are my takeaways. Growing pains Indentation When I first set out to try this style out,…

Read More

Web API Route Design for Non-CRUD Routes

By | ASP.NET, Web API | 2 Comments

Introduction I’ve been finding myself thinking a lot about route design for the web APIs I’ve been building lately. For your basic CRUD (Create, Read, Update, Delete) controllers, everyone knows that the POST HTTP verb maps to create/insert; GET maps to read/select; PUT maps to update; and DELETE maps to–brace yourself–delete. But what about routes that represent things beyond these fundamental but basic data manipulations? I’ve done a bit of reading and thinking about the subject, and these are a distillation of the lessons I’ve learned. URLs represent resources I mean, it’s right in the name: Uniform Resource Locator. But what…

Read More

How I Optimize My Focus and Productivity

By | Tools, Work | No Comments

Whether you work in an office or from your home, distractions can be a huge problem. They yank you out of the nearly trance-like state of focused productivity and bring you crashing back into your body in meatspace. Some distractions are external, and I think it’s common sense for most people to defend against these sorts of distractions by trying to mitigate them. Phone calls interrupting you? Silence your phone. Distracted by email and/or chat notifications? Mute them during certain hours and check them only at specific times. Distracting noises or conversations nearby? Wear some comfortable noise-suppressing headphones and play something…

Read More

Trip Report: Intro to Google Cloud Platform

By | Cloud Platform, Google | One Comment

Intro I recently had the opportunity to attend a day of training on the Google Cloud Platform (GCP) at the Google offices in Chicago. Being an overview, the content didn’t dip too deeply into any one topic, but gave a decent survey of the available services. Here’s a condensed summary of what we learned. Infrastructure and Application Services There are three main offerings in this category of services. First of all, there is the straight-up infrastructure of Google Compute Engine, which is simply a virtual machine in the cloud. You can choose from a variety of Linux and Windows operating…

Read More

Best Windows Git Client Redux

By | git | 7 Comments

It’s been over a year since I last wrote about Git tooling in the Windows ecosystem including my opinion on the best Git client for Windows. Here are some new clients I’ve tried since the last post and what I think of them. GitHub Last time I wrote about the GitHub client for Windows, I said I didn’t like it and that I found it bare of virtually any functionality at all. Since then, I read a post claiming that they (the creators of the program) wanted to make it the greatest client for Windows, so I thought I’d give…

Read More

Database Change Management With SQL and BAT Files

By | SQL Server | No Comments

Intro In my previous post I gave an overview of some different approaches to database change management that I’ve had personal experience with, finishing with a teaser about a new strategy that I cooked up for a scenario where I wanted something easy to manage without needing to install anything on the target machine. Using a combination of SQL and BAT files, this strategy is pretty bare-bones, but offers complete control over how scripts are applied, so it has a certain minimalist appeal. It also does not rely on a schema version table, but instead just queries metadata to decide…

Read More

Database Change Management Strategies Compared

By | SQL Server, Visual Studio | 2 Comments

Intro It is a challenging problem to manage database change in any project that uses a database. In this post, I’ll recap some of the approaches I’ve tried in the past and what I like (or don’t like) about them; then in the next post I’ll describe a new one that I recently composed with one BAT file and multiple SQL files and have been quite pleased with. This post assumes that the target database is SQL Server. Some of the techniques described could be modified to apply to other databases, and some are vendor-specific. Comparison of Database Change Management Strategies Monolithic Upgrade Script The…

Read More

Escaping From Relative Paths in Node.js With DI

By | JavaScript, node.js | No Comments

I’ve written before about one way to escape from relative-path “hell” in Node.js by leveraging the built-in behavior of the require function to look in the node_modules folder starting in the current folder and working upwards until it can’t go any further. This approach has some great benefits and I do like it a lot, except for one major problem: My preferred code editor–Visual Studio Code–automatically omits the contents of node_modules folders from search results by default. I have managed to configure my preferences in the past to exclude only the root node_modules folder while including lower ones, but the…

Read More

Node.js + Express.js Video Walkthrough Part 2

By | JavaScript, node.js | One Comment

This is post 2 of 2 in the series “Node.js + Express.js Video Walkthrough” After my recent series on Node.js culminating in an introduction to Express.js, I wanted to give a tour of what an Express.js project looks like, but I also thought that doing so in written form would result in a lot of copy-pasted code that would obscure the bigger picture of the project strucure. So instead, I thought that maybe a video would be a good way to show things in action! This is the second half of a two-part walkthrough of the structure of a Node.js…

Read More

Node.js + Express.js Video Walkthrough Part 1

By | JavaScript, node.js | No Comments

This is post 1 of 2 in the series “Node.js + Express.js Video Walkthrough” After my recent series on Node.js culminating in an introduction to Express.js, I wanted to give a tour of what an Express.js project looks like, but I also thought that doing so in written form would result in a lot of copy-pasted code that would obscure the bigger picture of the project strucure. So instead, I thought that maybe a video would be a good way to show things in action! This is the first half of a two-part walkthrough of the structure of a Node.js…

Read More

Getting Started with Node.js in Windows – Web Apps With Express

By | JavaScript, node.js | No Comments

This is post 3 of 3 in the series “Getting Started with Node JS” Recap In my first post, I went over the basics of Node.js package management with the NPM CLI. In the second, I went a little deeper and delved into the the basic architectural foundations of a Node.js application. Today, we will take all of these things and apply them to create the skeleton of a web application capable of reading data from request URLs and bodies and responding with HTML templates or JSON formatted data. Choices! If there’s one thing that really differentiates the ecosystem of Microsoft .NET…

Read More

Getting Started with Node.js in Windows – Node Modules

By | JavaScript, node.js | No Comments

This is post 2 of 3 in the series “Getting Started with Node JS” Introduction In the previous post, I gave a quick idea of what Node.js is and then fell down the rabbit hole of the topic of NPM. With all that said and done, you should have a basic working knowledge of how to manage NPM packages, both locally and globally. So now let’s turn to the topic of Node.js programming itself. In the previous post about NPM, I mentioned that NPM uses a file named package.json to keep track of dependencies so others can reinstall packages that your…

Read More

Getting Started with Node.js in Windows – NPM

By | JavaScript, node.js | No Comments

This is post 1 of 3 in the series “Getting Started with Node JS” Introduction I’ve already written a few posts about my own journey to find a good Node.js development environment on Windows: journeying from the familiar environment of Visual Studio, to the opposite end of the spectrum with Sublime Text, and then finally somewhere in the middle with Visual Studio Code, where I have dwelt happily ever since. But in the telling of that journey, I’ve glossed over the meat of getting to know Node.js itself, and so that’s what I’m going to do in this post: share…

Read More

Configure VSCode to run NPM tasks

By | node.js, Visual Studio | No Comments

Did you know that you can configure VSCode to run NPM tasks? It’s in the documentation, but not everyone reads the entire manual before jumping in. After all, that code isn’t going to write itself! The feature isn’t visible in any of the menus, either. They are visible in the command palette (ctrl+shift+p), which I like to make use of as much as possible, and I think that’s where I noticed the feature first. Well, maybe I saw it in the docs; I’m that kind of guy. I read the manuals for games before playing, too. …I know. Configuration is super easy,…

Read More

JavaScript: The Semicolon Debate

By | JavaScript | 6 Comments

Emacs or Vim? Tabs or spaces? Android or iOS? In the world of technology, there are always some contentious topics that are hotly debated, yet ultimately come down to a matter of taste, will therefore never be truly settled, but will nevertheless provide fuel for the fire for years to come. I recently learned of another such topic that I want to weigh in on: semicolon-free JavaScript. I actually stumbled across this debate while browsing the configuration options for JSHint. There it was, “asi“, complete with a description that just invited further investigation. I did my research and read posts on both sides…

Read More

Escaping From Relative-Path require() in Node.js

By | JavaScript, node.js | No Comments

Introduction As an ASP.NET web developer coming to Node.js, one thing that you will notice quickly is the difference in how you reference code in other files. In .NET, you declare at the top of each file which namespace the enclosed code belongs to, and you can then reference that code from any other file simply by importing the namespace; relative file position is irrelevant. In Node.js, this is not the case; every file is implicitly a module, and other files can only reference and load them with the synchronous require function. The simplest way to use require in your own project…

Read More

Node.js in Visual Studio Code review

By | JavaScript, node.js, Visual Studio | 4 Comments

Over the last two posts, I’ve described my experience searching for the best Node.js development setup for me, an ASP.NET developer working in Windows. First I tried Node.js Tools for Visual Studio but found the experience sluggish and frustrating. Next, I moved to Sublime Text 3 with some plugins and command-line based tools, where I lost a few creature comforts but gained more than enough speed in my day-t0-day operations to compensate. But then one of my peers mentioned Atom, so I thought I’d have to give it a serious look. As you might have guessed from the title of…

Read More

Node.js on Windows with Sublime Text 3

By | node.js | One Comment

I recently posted about my experiences developing Node.js apps with Node Tools for Visual Studio: the good and the painful, and why I decided to try something else. I kept hearing good things about Sublime Text over the years, so I thought this would be a good opportunity to try developing with just a good text editor and an ecosystem of command-line tools. Over the course of the first few days, I organically added plugins and utilities as needed to make my development life as comfortable as I could. This is the setup I ended up with: Editor and plugins…

Read More

Node.js Tools for Visual Studio (NTVS) review

By | JavaScript, News, node.js, Visual Studio | No Comments

Here at Falafel, we started out as a .NET consulting and training company and that’s been our bread and butter for many years. But lately, I’ve had the opportunity to get my feet wet with some Node.js projects and I’ve been learning a lot and having a lot of fun. One of the first challenges I faced was to get a comfortable development environment set up to edit and debug my Node.js code. It took no less than three different approaches before I found one that I really liked, and I want to share the journey and lessons learned with…

Read More

Scaling relational data up and out with Azure SQL Database

By | Azure | One Comment

This is post 28 of 31 in the series “A Cloudy 29 Days of Microsoft Azure” Unlike some of the other topics this month, Azure SQL Database is comparatively straightforward and easy to understand: It’s the same SQL Server you already know and love, but in the cloud as a service. Of course, it’s never quite that simple. There are some differences between Azure SQL Database and SQL Server running in a VM, but that list is rapidly shrinking. Now the unsupported list is filled mainly with things you’d expect not to be available in a cloud environment, like FILESTREAM and commands that access…

Read More

Move and transform data in the cloud with Azure Data Factory

By | Azure | One Comment

This is post 27 of 31 in the series “A Cloudy 29 Days of Microsoft Azure” In the Microsoft Azure, there are many ways to store your data: Azure Storage (Tables, Queues, and Blobs), Azure SQL Database, Azure SQL Data Warehouse, DocumentDB, and you could even consider the Hadoop-based HDFS to be a form of storage as well. Each different kind of storage has its own strengths and weaknesses and tends to be favored in certain business scenarios. For example, you wouldn’t create an OLTP application backed by Blob or Hadoop storage; you’d use a relational database like Azure SQL Database…

Read More