Emotional Equations

This one always comes to mind:

Disappointment is the difference between expectation and reality

I think this is attributed to Chip Conley from “Emotional Equations”. I’m preparing to read this book. Interestingly, I hit this very same point (equation) when dealing with team members. It is an entirely different context than the book, which I should add.

One of the interesting constants in business is having to deal with the duel expectations of your coworkers and yourself. Almost in every instance, your expectations and your coworkers expectations will not align. This misalignment is a catalyst for disorder and conflict.

I’d like to keep exploring this idea in my next few posts.

Thoughts: Everything is awesome

Here are some thoughts for anyone reading this…

Most people think that they are doing better than most of their coworkers.

You may say, “but I feel like I’m not doing too well at my job.” That would put in the minority then. Most of your coworkers think that someone else is the problem. Everyone allows for the possibility that they are not preforming perfectly, but those are just minor discrepancies in a stream of better than average work.

This is all about perspective. Many individuals only see their work and not the work others do. Without knowing it, one can judge others on how helpful they are to achieving their own goals, not those goals assigned to the others they are observing. Without the proper perspective, you can’t judge the performance of your coworkers.

Keep in mind that this is possibly an issue your manager has with you. Your manager may judge you on how well you are helping them achieve their goals, while not truly understanding how well you are working toward the tasks assigned to you.

Thoughts: Nobody wants to be told what to do, even when they ask

Here are some thoughts for anyone reading this…

A developer shouldn’t have to ask for things to do.

If you have developers asking for work, you have problems.

There are two major things going on here. One, you have a developer who doesn’t know what the team is focused on. Two, you have a team that isn’t marketing, internally, what the priorities are.

Let’s start with #1. There are types of developers who want to be “tasked out.” They want a task they can take away, work on, then deliver for someone to verify. There is nothing wrong with this. Arguably, these developers are common. A team needs to know how to make the most out of these types of developers. The software process needs to supply them with work. These developers suffer when the software process and team structure cannot support them.

As for #2, you shouldn’t expect a developer to “just know” what to work on. You should expect a developer to know where to go to get the priority items to work on and where to get the information necessary to complete the work. If a developer is asking for work. More than likely, either there is no defined work to be done (no backlog), or the team isn’t able to convey the priorities and how to accomplish them.

A developer will only ask for something to do if they don’t have anything more interesting they want to do.

In the past, I’ve seen developers go for weeks or months without executing on anything significant. Most of the time, this has been because no one on the team was explicit asking them to work on an item. Moreover, they usually had something that was keeping their interest. It may have been an unrelated task or a side project.

At the end of the day, the core problem is the team being unable to work together cohesively. If a developer feels that nobody is aware of the lack of effort they are putting in towards the team’s goals, and takes that opportunity to work on items they are interested in or just not work at all, then the issue is with the makeup of the team.

Search and Replace with Regular Expressions in VSCode

One of the little gems in Visual Studio Code (VSCode) that I like, is the regular expression support in the search box. It is very powerful, but the thing that I like most is how simple it is.

There isn’t a large dialog with several options. It’s just a small button that changes a simple text search into a pattern matching search.

Here is the link to the video

Note: I wanted to try uploading a video on Youtube for this. I’d like to produce content on Youtube in the future, but I have no experience with it. The embedded video is basically me experimenting with the platform.

Quick note: Bitbucket and Github Pull request

I thought that maybe I was just not used to the interface.

I thought that maybe I just preferred the way I had been doing things.

I thought that maybe I didn’t see the features for the trees.

Over the years, I’ve become very used to Bitbucket’s style of pull requests and the interface that is used to process them. It isn’t perfect, but it is very navigable and generally I like the way it works.

Over the last six to twelve months or so, I’ve been using the Github pull request interface. It is drastically different. Where Bitbucket puts each file in a separate screen. Github puts the each Diff in a continuous layout. You simply scroll through the changes until you have seen all of them.

I think part of the problem is that Bitbucket is focused more on corporate projects begin run internally, while Github is all about open source projects being run by distributed individuals or teams.

Github’s interface is better for small changes and Bitbucket’s seems to be better for large changes. That seems to be the basic driver. Open projects with many developers tend to commit smaller changes in a more organized manner. Private projects, run internally of a company, tend to commit large changes for new or existing features.

I could be totally wrong. It may be that I just don’t know all of the Github features.

Browsing for Analytics and Data Science topics

I was doing some browsing on different topics around Analytics and Data Science. Things like tools and concepts.

This is a really informative video on Data Science history and where things are going: https://www.hitachivantara.com/en-us/video/data-science-101-pentahoworld.html

I’ve also been looking into KNIME Analytics platform: https://www.youtube.com/watch?v=YE02NMRkfEc

Thoughts: Leadership change-ups are not what you think

Here are some thoughts for anyone reading this…

The biggest affect of changes in leadership is not a new leader’s ideas and strategies. It’s the change in the motivations of former subordinates.

When a leader is replaced, the immediate effect is constraints that were placed on subordinates are removed. Sometimes these constraints are explicit directives and sometimes they are due to implicit motivations.

Employees don’t challenge their leadership, they just stop working for them.

Employees who don’t respect their leadership often use indirect means of undermining their work. A good read on this topic is Simple Sabotage (affiliate link) . A change in leadership has the intimidate effect of giving the workers the motivation to show that they are not the problem, and their former leadership was the problem.

Teams are successful only when they are willing to cooperate as a group to succeed. There are no single successes.

Good leaders can be effective, set strategy, and direct the course of business. Just like every other worker, it takes time for them to do this. Therefore, any alteration seen in the overall effectiveness of a team due to leadership changes are due to the willingness of workers to succeed where they were not before.

Cake build system: Command line arguments

I keep on forgetting how to form the command line in PowerShell for a Cake build script with multiple command line arguments.

In Cake, command line arguments are available in the build script as shown below:

var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
var version = Argument("build_version", "1.0.0.0");
var releaseCandidate = Argument("release_candidate", "0");

As you can see, the arguments can have a default value. For example, the default target is “Default”. That looks like this in the Cake script

Task ("Default")
    .IsDependentOn ("BuildSolution")   
    .IsDependentOn ("Run-Unit-Tests")
    .IsDependentOn ("BuildPackages");

Let’s say that we want to pass into the script the build version and a release candidate number.

.\build.ps1 -ScriptArgs "--build_version=1.0.0.12","--release_candidate=1"  

In Cake. You define a default build script called “build.cake”. Cake’s main script is called build.ps1, which bootstraps Cake and runs the “build.cake” script.

The example repository will teach you everything you need to know about Cake in about 15 minutes.

Merge Query for C#

I’m in the process of getting MergeQueryObject setup on github. This was one of my personal projects. Previously, I had been maintaining it in a private repository, but I think it is in a form where it would be usable by others.

https://github.com/JasonDV/MergeQueryObject

https://www.nuget.org/packages/ivaldez.Sql.SqlMergeQueryObject/

List of features:

  • Support for surrogate or natural primary keys
  • Update from a target table given a collection of DTOs.
    • Option to preform only Updates and no Inserts or Deletes.
  • Insert from a target table given a collection of DTOs.
  • When a collection of DTOs is “merged” into the target table, any records in the target table not in the collection of DTOs will be deleted.
    • Option 1: Ignore Deletes
    • Option 2: Delete from a target table given a collection of DTOs.
    • Option 3: Mark for Delete (“soft delete”) on records in target table given a collection of DTOs.
  • Target updates to only specific fields by using a DTO that partially matches the target table
  • Target changes to a portion of a very large table.
    • For example, target changes to a specific date range
  • All features of BulkLoader are supported.
  • Create a temporary source table or Create an concrete source table.

MergeQueryObject’s primary use is performing updates, inserts, and deletes into a large target table using minimal C# syntax. The basic “merge” concept comes from the fact that a source temp table is setup with the wanted values and the Merge statement executes the necessary actions to make the target table match the source table. This can be done for the entire table or portions of a table.

It is a low level utility that sits just above the database and works with POCO DTOs, using my other project BulkLoader to load the temp table.

Creating Query Objects is something that should be done for complex SQL. It helps with maintainability of the code and makes it easier to conceptually test and verify, since the query object has only one responsibility.

Cross-platform targeting

SQL BulkLoader was my first attempt at multi-targetting a nuget package.

https://github.com/JasonDV/SQLBulkLoader

There are some interesting best practices around this concept.

https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/cross-platform-targeting

Normally, when working on line-of-business applications, I have a lot of control over what .NET target I’m using. I choose mostly based on which targets are current and what is installed on the deployment infrastructure. Getting configuration changes to deployment environments is often time consuming; therefore, I avoid it unless upgrades justify the time.

In the future, I’ll explore some of my justifications when putting together a solution and choosing technologies, structure, and environment.