Idea wall

160403_Insulation

I have been a fan of cards on a wall for years. I buy the 1/2″ 4’x8′ sheets of insulation. In the past, they were about $8, but the latest at Home Depot is more like 14.

In my current setup, I added a few curtain rails along the top of my whiteboard. Then, I cut the insulation boards down to a smaller size and use them for “cork boards”.

Here is a recent example of one of my boards.
IMG_1755

Luke – What is this board for?

He came in this morning and asked why I had all the cards on the board. I figured it would be easier to show him than to explain it. I grabbed a clean board and we started “brainstorming” the treehouse he wants to build. He likes things a little more visual, so I printed some pics and attached them to the cards.
IMG_1757

When I first put the clean board up and told him it was for the treehouse, he was pretty skeptical. I believe he was thinking were going to actually start building the treehouse right now. However, once we got a few cards on the board, I think he got the idea. He is a fan now (although, I am sure he rather just have the treehouse)
IMG_1758

Here is an example of the top of the board where you can see the curtain rods. And, I know you are wondering… Yes, I did wrap the edge in a little Duct tape just to give it that professional look. 🙂
IMG_1761

Movie Clips & Quotes

Summary

I have wanted (needed) this for years, so I figured I would finally create a post. In many situations, a movie quote or a scene from a Seinfeld episode will go through my head. I figured I may as well link some of them somewhere, so here it is. These are not in any order and I have made no effort to prevent spoilers.

HeartbreakRidge
Heartbreak Ridge (1986)

What’s your assessment of this alert? (gunny)…It’s a cluster…

I am not a fan of the F-Bombs, but his movie brings back so many memories and much of it is exactly as I remember, including the F-Bombs.

top

PaleRider
Pale Rider (1985)

There’s nothing like a nice piece of hickory


top


WeWerSoldiers
We Were Soldiers

Take care of your men … and don’t call me grandpa


top

Commercials

Larry Bird vs. Michael Jordan – Nothing but net

Somebody was going on and on the other day about how one thing affected another thing, and yet another thing. All I could think of was this old commercial where they are standing on the Sears tower and they say, “off the expressway … over the river … off the billboard … through the window … off the wall … nothing but net

top

NightShift
Night Shift (1982)

This movie has so many lines, I should probably create a separate page for it. It is some early Michael Keaton at his best. It wasn’t easy to see Henry Winkler in this role, since he was the Fonz in my mind. However, he delivers some pretty good lines too.

Prostitution scene

By 1982 standards, I would guess this should have a viewer warning but if you have watched TV in the past 10 years, I am pretty sure you have seen much worse.

top

MrMom
Mr Mom (1985)

220 / 221 … Whatever it takes


top

Volunteers
Volunteers (1985)

What was time again?

I always think of this one when I get twisted around on my words…

top

Bambi (1942)

If you can’t say something nice…


top

AFewGoodMen
A Few Good Men (1992)

We Follow Orders or People Die

This is one of the best movies. It is chock-full of quotes.

top

Because they stand on a wall


top

You Can’t Handle the Truth!

This clip is full of great lines.
Jessep: You want answers?
Kaffee (Tom Cruise): I think I’m entitled to them.
Jessep: You want answers?
Kaffee: I want the truth!
Jessep: You can’t handle the truth! Son, we live in a world that has walls. And those walls have to be guarded by men with guns. Who’s gonna do it? You? You, Lt. Weinberg? I have a greater responsibility than you can possibly fathom. You weep for Santiago and you curse the Marines. You have that luxury. You have the luxury of not knowing what I know: that Santiago’s death, while tragic, probably saved lives. And my existence, while grotesque and incomprehensible to you, saves lives…You don’t want the truth. Because deep down, in places you don’t talk about at parties, you want me on that wall. You need me on that wall.
We use words like honor, code, loyalty…we use these words as the backbone to a life spent defending something. You use ’em as a punchline. I have neither the time nor the inclination to explain myself to a man who rises and sleeps under the blanket of the very freedom I provide, then questions the manner in which I provide it! I’d rather you just said thank you and went on your way. Otherwise, I suggest you pick up a weapon and stand a post. Either way, I don’t give a damn what you think you’re entitled to!

top

a good excuse

Kaffee: Excuse me, sorry I’m late.
Capt. Whitaker: That’s alright, Danny, I know you don’t have a good excuse, so I won’t force you to come up with a bad one.
Kaffee: Thank you, sir.
top

OfficeSpace
Office Space (1999)

What would you say…you do here?

Another classic. I have people skills!!!

top

RedOctober
The Hunt for Red October (1990)

Speak your mind Jack

In a recent Yammer discussion, a supervisor type person asked for feedback on an idea. While the easy (and possibly wise) thing to do would have been to keep my opinion to myself, I went a different route. I prefer open and honest communication. It doesn’t have to be brutal truth, but things just seem to function so much better when we can freely share ideas. Afterwards, I sort of felt like Jack in this scene.

top

The Treasure of the Sierra Madre (1948)

We Dont Need No Stinkin Badges!

I have heard this quote from my first days in IT. Anytime the discussion centers around something we don’t have, this comes to mind.

top

CrimsonTide
Crimson Tide ( 1995)

Preserve Democracy, not practice it

This reminds me of the saying, “Salute and Execute”. There are times where this is the only right answer. I guess I had never really thought about this until I heard this line. The brave men and women that defend our country follow orders. Life in the military is far from democratic, but that is exactly what they fight to defend.

Bravo Hunter…You new to shut up and enjoy the view

I am often reminded of this scene when I in a room and somebody else walks in. Most people feel some form of “small talk” is required. It isn’t by me. If I had something I wanted to say, I would say it. But, I don’t feel the need to talk about the weather just because we happen to be in the same room, elevator, or whatever.

top

JerryMaguire
Jerry Maguire (1996)

Brutal truth

Avery: What was our deal when we first got together? Brutal truth. Remember?
Jerry: I think you added the “brutal.”

It’s a Wonderful Life (1946)

I want to live again!

It is strange that this is how I felt after I got my internet working again at home. I was getting 4-5 Mbit and living with it. Once I found and replaced the bad switch, I was back to 60-70 Mbits! It reminds me of the time I was able to get nearly all the 640K of RAM in my computer and I was so excited I want to share the good news with my wife. She just shrugged. 🙂
Anyways, after being on a crawling network for a few days, it is awesome to be back to “normal”.

top

DaysOfThunder
Days of Thunder (1990)

Now y’all heard of a “Japanese Inspection” …

Have you ever asked somebody for somthing that was “time critical?”. When I do, this clip comes to mind…

top

Microservices – my recent journey

Summary


I have been watching videos and reading for the past couple months about Microservices. It is very timely, since I have been doing maintenance work on a monolith project, parts of which are more than 10 years old.

I wanted to create this page to have a place to reference some of the material I have found along the way.

Mastering Chaos – A Netflix Guide to Microservices

It is always good to gain more insight into how things work at Netflix. In this video, Josh Evans covers this history of the early Netflix to today, and some of where it is headed.

Little Boy Dominoes Topple Out of the Tent

Ok, this one is not so much about Microservices as it is just 24 seconds of funny. I saw this video as part of a talk where the lady was making the point that we don’t realize the impact of design decisions unless we measure (or in this case watch) our product (API) being used. The mom laughing as she films it and the final boy make me laugh every time.

top

Spotify Engineering Culture part 1


top

Spotify Engineering Culture part 2


top

Challenges in Implementing MicroServices

This video is from Fred George. I have it set to begin where he starts talking about rivers, streams, and ponds. From there, he blends into the car rental application which is a great example of an incremental application.

Here is an expanded and more recent version of that same talk.

top

Microservices • Martin Fowler


top

A Day in the Life of a Netflix Engineer


top

Microservices @ Spotify

Kevin Goldsmith going into more detail about how Spotify uses Microservices.

top

Microsoft Azure Service Bus Brokered Messaging Deep Dive

Alan Smith – the same guy that does the PluralSight course on the same subject. With the speed of Azure, this may be a little dated, but I think the majority of it still applies.

top

Agile is Dead • Pragmatic Dave Thomas


top

Agile Product Ownership in a Nutshell

This is the same guy that did the Spotify culture videos.

top

“The Eight Fallacies of Distributed Computing”

by Stephen Asbury. I liked this video where he is trying to shed some light on the issues of distributed computing. He is not saying, “Don’t do it”. Instead, I think he is just helping to remind us of the things to be aware of and code for.

top

Wunderlist – Chat Fowler

From Homogeneous Monolith to Radically Heterogeneous Microservices Architecture

top

Applying the Saga Pattern

Caitie McCaffrey

top

Patterns and Practices for Real-World Event-Driven Microservices

This lady is from Jet (that wants to compete with Amazon) and they are a big Azure and F# shop

top

Juval Lowy on Microservices

This is a very smart guy talking about Microservices and how to think of them. The volumne is a little low, but it is definately worth watching.
https://channel9.msdn.com/Blogs/raw-tech/Juval-Lowy-On-Microservices
top

Integrate Database Migrations with Octopus Deploy

Summary


Prior to Octopus, we had a proprietary way of deploying database changes. Moving to Octopus Deploy forced us to find an alternative approach. I had used Fluent Migrations on an earlier project and I was excited about using it again.

Benefits

  • Database source is treated as first class citizen and remains in the project.
  • Full text search can easily be done to find each time a field or sproc was changed.
  • Stored Procedures can be easily compared between migrations.
  • Version History maintained in database (see screen capture below) showing exactly when each migration was applied (and Version, ITMS, PBI, or other info).
  • Multi-user Two people can be working on their own db changes at the same time, each in their own migration. (The normal rules that both of them should not be changing the exact same objects still apply).
  • Ability to apply multiple “iterations” during a sprint (instead of waiting until the end)
  • All Database changes are tracked together.
  • This approach eliminates the need to push a db change using email or some other method. In our current environment, we are forced to do that. For a simple change, it just doesn’t make sense to create a new branch of managed code, jump through the Fortify hoops and everything else that is involved in rolling a simple change, force all users out of the system, etc… With this approach, adding a simple migration should take less than 30 minutes and it is done.
  • Gives visibility to all changes, which can greatly assist troubleshooting down the road.
  • Fortify Tango not required. The current Implementation folder is not part of the Fortify process and this shouldn’t need to be either. There is no User component to this. This is not an application that is being installed for the user.
  • Database changes are not tightly coupled to managed code changes. Some people would list this as a Con, but having them “separate” has some benefits.
  • Best Practices (and possibly worst) are more easily followed for future devs on how to script an extended property or foreign key. The prior scripts are part of the project and can be searched and copied.
  • Developer is not forced to use migrations. The can still wait until right before the deploy, let a tool do the compares, generate the scripts, and then just copy them into the folder.
  • Deploy and rollback can easily be ran multiple times during development, EXACTLY as they will be ran during deployment.
  • Visual Studio 2015 new project – added by default
  • Screens

    Migration history in DB

    Migration01

    PowerShell script

    Migrate02

    Technology / Tools

Markdown site (Wiki) to share project information

Summary

I needed an easy way to share information with other members of our team. Some people were using OneNote, which is a great product, but sharing things can be a little clunky. Our organization was working towards an enterprise solution for this problem, but I needed something right now for what I was working on.
I chose Markdown since I figured it would be easy to convert it to whatever solution the company decided. This ended up being a very useful tool and provided a quick easy way to collaborate with other teammates.

Screens

Home Page

Wiki01

Home Page – Markdown

Example markdown
Wiki02

Checklists

Added ability to easily create lists.
Wiki03

Tools used

Wiki04

Help pages

To make it easy for others to edit pages, I created a simple help page with examples.
Wiki06

Wiki05

Read Database Settings

Since this is custom code, it was easy to add the ability to execute Sql statements when the user clicked a link. In this example, I display the AppSettings by environment on the page.
Wiki07

Go/NoGo Dashboard for System Health

Summary

The idea for this project was to create a “Health” dashboard similar to Amazon or Azure. In our environment, we don’t seem to have a problem getting emails when things fail.

Our problem was that were not getting notified about events that should have happened but did not. For example, if the process to import a file normally runs every morning, but it does not run one morning, we didn’t know about it. Since it didn’t run, it did not send an email about any problem.

Another benefit of a health dashboard is for a quick “sanity check” when a problem is reported. As a first step, we can check the dashboard to see the overall health of the system.

Screens

Home Page

The main page allows the user to quickly filter the checks by the environment (Prod, Test, Dev).
Gng01

Home Page – Dark

I am not a designer (I can barely match a pair of socks). However, I do like options. Bootstrap/BootSwatch made it easy to do that. I allow the user to pick the theme they like, simply by clicking the links in the lower right of the screen.
Gng01b

Dashboard filtered by tag

The system supports tags to make it easy to group related checks. For example, all tasks running on a specific server may be tagged with that server name.
Gng02

Edit Task & Tags

Example of screen to edit task description and tags along with any notes for the specific check.
Gng03

Show Triggers

Each check can have multiple triggers. This allows some pretty flexible scheduling as shown in this example.
Gng04

Edit Trigger

Clicking a trigger in the list brings up the modal edit dialog. I tried to use buttons to make it easy and visual for the user to “see” the schedule.
Gng05

View Actions

Gng06

Edit SQL Action

Example dialog to edit the Sql used for the check.
Gng07

History Tab

The helps determine how often a check is failing. It also includes any notes that were added about a failure.
Gng08

Edit Event Note

Clicking the pencil in the far right column allows the user to enter a note about a specific event. This can be helpful to explain why some event failed.
Gng09

Export to Excel

This serves two purposes.

  1. Backup of existing configuration.
  2. I didn’t complete this piece, but the idea was to be able to add checks to the spreadsheet and import it back into the system.

Gng10

WebAPI Generated Doc

Here is an example of the API Doc we get for free with WebAPI.
Gng11

Trello Punch List

Trello screenshot showing a portion of the project punch list.
Gng12

Technology / Tools

  • C#
  • WebApi
  • AngularJS
  • Bootstrap/BootSwatch
  • Windows Service

Sql Code Snippets

Creating a custom snippet

Create a Snippets folder somewhere (I like c:SqlSnippets)

Sql01

Use the following template as your first snippet

<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets  xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Logging - Standard Template</Title>
      <Shortcut></Shortcut>
      <Description>Insert script to read Logging</Description>
      <Author>Company Name Here</Author>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
    </Header>
    <Snippet>
      <Code Language="SQL">
        <![CDATA[
 SELECT
        DATEADD(hour, DATEDIFF(hour, GETUTCDATE(), GETDATE()), TimeStamp) AS RunTime
      , Message
      , UserName
      , . . .
 FROM Logging.dbo.LogTable WITH (NOLOCK)
WHERE TimeStamp > DateAdd(MINUTE, -30, GetUtcDate())
ORDER BY TimeStamp
]]>
      </Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>

Open Code Snippet Manager (^KB)

Sql02

  • Click Add button
  • Navigate to your new Snippets folder
  • Click the Select Folder button

Expand your Snippets Folder

Sql03

Cleaning up the Insert Snippet Dialog

Insert Snippet in Query window

  • Press ^KX to bring up the Insert snippet window (before our change)

Sql04

This dropdown is too busy and it is hard to find our custom snippets.

  • Go back to the Code Snippets Manager (^KB)

Sql05

  • Open the folder shown in the Location textbox.
  • Make a backup folder to save these scripts and move all files into the backup folder

Folder before backup

Sql06

Folder after backup

Sql07

Remove Missing Folders

Go back to the Code Snippets Manager and click the *Remove* button for all the missing folders. When you are done, it should look like this.
Sql08

Insert new Template

Finally, the payoff. Press ^KX to Insert a tempalte. It should be clean like this:
Sql09

Senior Software Developer – Resurgent Capital Services

Jun 2014 – Present

  • Created a File Validation site using Azure, SignalR, & Redis. Project included unit tests and I was able to obtain 97% code coverage.
  • Developed a Go/NoGo Dashboard to provide a “quick glance” of system health. The site includes an AngularJS website, WebAPI service layer, and a Windows Service to perform the system checks.
  • Created a simple Wiki site to display and edit Markdown to help document projects and share information.
  • Integrated Database Migrations with Octopus Deploy
  • Installed Discourse in Azure in attempt to foster group discussions. (Jury is still out on people using the tool)
  • In addition to the fun projects listed above, I have also helped maintain existing legacy applications. (Some of the apps have 12+ year old stored procedures that still run hundreds of times per day)

Azure, SignalR, & Redis File Validation Site

Summary

This project was to develop a site to validate files. The user will drop a .csv file on the page (or click the Browse button to find a file). After the file is uploaded, it will be analyzed to determine if it matches the expected format.

This was an Azure project from the beginning, which made it fun. I was also able to use SignalR to provide immediate feedback to the user as the file was being analyzed. I use Redis on the server to store the results for the last 7 days. Purging old results is automatic, since Redis can expire a key after a set number of days.

The site uses FluentValidation for the many rules to check the file. This tool made some pretty complex validation much easier. It also helped eliminate what would have been a bunch of repetitious code.

Screens

Main Screen

When the user loads the site, this is the first screen they see. They can either drop a file on this page or click the browse button for a file picker dialog.
The User textbox and associated button was a temporary way of grouping SignalR messages. The name really should have been changed to Group instead of user. The idea is that everybody listening in Group “Fred” would receive the same messages. This is important because of the next screen.

150722_Clean

Receiving File Screen

As the file is being analyzed, results are being sent back to the browser. The top 5 errors encountered are entered in the green list (not sure why I made it green). The gauge animates to show the number of lines processed.
150722_ErrorsGreen

Upload Complete Screen

When the analysis is complete, the user will either see a green check mark indicating the file is good, or they will see the green check mark with the red “not” circle indicating there were problems. A DataTables grid appears at the bottom of the page where they can view all the errors (using paging).

150722_Failure

History List Screen

The user can view the history for the last 7 days. This screen had as much value to me as the developer as it did to the user. Before I added this screen, I would get an email saying some file didn’t validate. The email was not very descriptive as to why it didn’t validate and I was left searching log messages to figure out the problem. This screen allowed me to easily see why a file failed validation. I added a date picker to select the day and view the results.
150722_HistoryList

History Detail Screen

Once a file is clicked from the History List Screen, this screen displays the detailed error messages for that file.
150722_HistoryGrid

Code

Code Coverage

I know how rare it is to get 97% code coverage. I have been on projects where we were happy with 75-80% (and many where we had none). This was really helpful when we needed to do a version 1.1 of this project. I made the required changes, ran my tests. Some of them were broke, as they should have been, based on the new requirements. I fixed those tests and added a few more.
I highlighted the catch block above, since that is the code that is hardest for me to get code coverage on. I know many people would eliminate the try/catch and let it bubble up. That would “fix” the code coverage issue, but I am not really sure that is a fix. In my experience, I like to catch the error as close to where it happened as possible. Often, I can add parameters that were passed to the method in the error handler so I know what value it was working with when the error occurred.

CodeCover_141027

Code Execution Time

We all agree that our unit tests should be fast so they can be run often. However, this was another one of those rare cases that I don’t see on most projects. It ran all 130 tests in under 2 seconds.
TestsPassed_141002_1130

Technology / Tools

  • C#
  • SignalR
  • Redis
  • Azure
  • FluentValidation
  • AngularJS
  • DataTables
  • DropZone

NoSql, YesSql, MaybeSql – A hybrid approach

UPDATE: I don’t usually claim something as an original idea. Anything formed in my brain is just an amalgamation of the videos I have watched and the stuff I have read. For this idea of just creating a JSON field in each table, I don’t remember seeing it anywhere else before. That is why I thought it was neat when I was perusing the Octopus tables today, and I noticed they also include a JSON field in each table. They even went as far as to make theirs Not Null, which I didn’t do.
OctopusJson

Others can argue when to use Sql vs a NoSql solution. There is a time and place for each. I have went down both paths and there usually comes a time where the grass looks a little greener on the other side. Sql is great for creating related tables and helping to ensure referential integrity at the database level. However, it can be a little cumbersome to add one simple field to an existing table. Even if you are doing migrations from code, there is some work involved.

On the other hand, NoSql is great at handling this “jagged” data. You simple add new properties to your json object and store it. However, the problem I have had with NoSql in the past is that you have to put more thought into your data design up front to know how you will want to pull it out. Often, ad hoc queries require a full table scan. Some of these things may no longer be true, but who can keep up with how quickly things change around us?

Anyway, in some recent work, I stumbled across an approach that I think combines the benefits of both approaches. Others have probably been doing some version of this for years, but it just clicked for me the other day. The “trick” is to create a VARCHAR(max) field where we can store a json object. This gives me most of the relational goodness of Sql along with the ability to easily add “minor” fields, without touching the database. This will not work for “major” fields that are a key to another table or something that is going to be searched often. However, for something like adding a link to store the gravatar on a user record, this can be pretty sweet.

Finally, some code. Here is the script I use to create a table. The key is line 21, where I add my JsonData field. Any table that might need “extended” in the future gets this new field.

150721_SqlPerson

Here is the C# code for the Person object.

public class Person : EntityBase
{
    public long PersonId { get; set; }
    public long TenantId { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }

    public Person_NoSql NoSql { get; set; }

    public Person()
    {
        NoSql = new Person_NoSql();
    }

    public string JsonData
    {
        get { return JsonConvert.SerializeObject(NoSql); }
        set { NoSql = JsonConvert.DeserializeObject<Person_NoSql>(value); }
    }

    public class Person_NoSql
    {
        public string UrlAvatar { get; set; }
        public string AnyOtherField { get; set;}
    }
}

The code to use the new property is pretty simple.

Person person = mgr.GetPerson(personId);

if (!ReferenceEquals(null, person))
{                       
    FirstName = person.FirstName;
    LastName = person.LastName;

    UrlAvatar = person.NoSql.UrlAvatar;
    AnyOtherField = person.NoSql.AnyOtherField;
}

I am using Dapper for the data layer. When it sees a JsonData field returned from a query, it maps it to the JsonData string property on the object. As far as Dapper knows, this is just another string field.

That is pretty much it. I thought this would be a longer post, but in the words of the great “Forrest Gump”, That’s all I have to say about that