2019 Year in Review

It is time to look over 2019 to see if or how I have grown, what or where I put my focus, and determine whether or not I need to re-align myself for the coming year.

Blog

I migrated from BitBucket Pages to GitLab Pages for various reasons. There were a few hiccups along the way but overall it seems to have been a pretty smooth transition.

Part of my goal after the migration was to consistently produce content. Perhaps I was too ambitious with my goals/expectations. I was able to produce consistently throughout October but fell off in November due to numerous issues and frustrations with my Raspberry Pi-Hole project.

Over this next year, I would like to keep the goal of producing content regularly and personalizing and/or creating a blog theme. At this time, I want to focus on the content to be more how-to’s, and notes, and improve my communication.

Books

One of my goals for 2019 was to read 12 books. I thought a book a month was reasonable and achievable. And for the first quarter of the year, it seemed like it was going to be. I was able to make my way through the following:

I am not sure what happened after that to cause me to get off track. I started reading Getting Things Done to re-emphasize some of the techniques he provides. The irony is not lost on me that this was the book to break my trend.

Although important, I am not sure I want to have a reading goal for 2020 - except for finishing Getting Things Done.

Pluralsight Courses

PluralSight may be part of the reason I was unable to complete my reading goal for 2019. Throughout 2019, I completed the following PluralSight Courses and started several others:

I planned on creating posts reviewing each one containing my notes to keep them in a central location. Unfortunately, I was not happy with the format/quality of the few courses that I did create reviews for. While I still want to create those entries, I need to figure out how to communicate the review effectively.

I also took the C# Skill IQ Evaluation and scored in the 95th percentile with a 248. I plan on improving this score in 2020, but also want to take courses to build other skills.

Programming Languages

I have worked with C# for a decade. While I love the language, I have started to feel as though the problem space has become stagnant and repetitive. It seems as though I am not the only one feeling this way either.

This is not to say that I think .NET is dying/dead. I still very much enjoy it and have much left to learn about it - particularly with the quality of life changes .NET Core is providing. I simply want to expand my thinking and skill set and learning a new programming language may be better suited to that.

Specifically, I am considering Go and Functional Programming. Begrudgingly Pragmatically, I am considering JavaScript/TypeScript and React/React Native.

Projects

I have no shortage of projects. My problem is in finishing them and/or making them public.

One of those projects this year was my Raspberry Pi-Hole, but have not circled back to it yet. Once that project is completed, I plan on making a Raspberry Pi Development Server. The idea is for it to contain a dockerize Jenkins, Redmine, SonarQube, and/or other software used in my development lifecycle. It is portable enough that it can be brought with me on the go or can be configured with a VPN and accessed remotely.

In December, I started JHache.Enums to experiment with BenchmarkDotNet and write high-performance C# code.

Software Setup

On a day-to-day basis, I use:

  • Visual Studio
    • CodeMaid
    • Editor Guidelines
    • File Icons
    • File Nesting
    • Power Commands
    • Productivity Power Tools
    • Roslynator
    • Shrink Empty Lines
    • SonarLint
    • StyleCop
    • VSColorOutput
  • Visual Studio Code
  • SourceTree
  • LINQPad

I started trying to learn Rider.

With the announcement that Google Chrome would be making it more difficult for ad-blockers, I looked at alternatives. I tried Brave and Vivaldi, but due to several issues, I am switching back to Firefox.

I looked at Fork and GitKraken as SourceTree replacements. GitKraken is my favorite, if I only had a single account it would probably be my daily driver. Overall, Fork looks like a good replacement for SourceTree but I have not spent enough time with it. I can say its merge tool is one of the best.

For productivity, I settled on TickTick for task management and Dynalist as my work journal.

I gave up on trying to get HyperJS to work the way I wanted. Initially, I tried Windows Terminal but ended up returning to Cmder.

I am starting to use Docker for Windows but still need more exposure to using it.

Tech Setup

I upgraded my wife’s computer so she could do her design schoolwork. Given the programs, she needs to run and that she does not game too much I opted for an AMD Ryzen 3700X and NVIDIA 2070 Super. She also got a Secret Lab Omega

My computer (~10 years old) and desk are due for an upgrade this year. Additionally, we are looking to soundproof my office to get a streaming setup started.

Work

I accepted a new opportunity working on a WPF Prism application (as evidenced by blog posts and Pluralsight history).

Lacking

Going over this year I realize three areas are lacking: family, relaxation, and exercise. These are areas I will need to make time to focus on in 2020.

Prism Module InitializationMode Comparison

Introduction

As part of my self-improvement challenge, I have been watching the Introduction to Prism course from Pluralsight. I chose this course so I am better equipped for my team’s Prism application project at work where I was recently tasked to improve the startup performance.

At this time, the project contains sixty-nine IModule implementation types; however, that number is continuing to grow. All of these modules will not be loaded at once and some of them may not be used/loaded at all. Some of them are conditionally loaded during runtime when certain criteria are met.

While watching the Initializing Modules video I found myself wondering if anything would change if I were to change these conditionally loaded modules InitializationMode from the default WhenReady to OnDemand. My reasoning behind this is because Brian Lagunas explains that WhenReady initializes modules as soon as possible or OnDemand when the application needs them in the video. Brian recommends using OnDemand if the module is not required to run, is not always used, and/or is rarely used.

I have a few concerns:

  1. Impacting features because the module is not loaded beforehand or the Module initialization is not done manually.
  2. No performance impact because this project handles module initialization itself to parallelize it instead of letting Prism manage it.

In the end, only benchmarking each option will provide information to make a decision. To do this I used JetBrains dotTrace, focusing on the timings for App.OnStartup, Bootstrapper.Run, Bootstrapper.ConfigureModuleCatalog, and Bootstrapper.InitializeModules. Since we try to load modules in parallel, I ended up adding the timing for this as well - otherwise, the timing may have appeared off.

Baseline - InitializationMode.WhenAvailable

The first step was to gather baseline metrics.

Profile #1Profile #2Profile #3Profile #4Profile #5MinAverageMedianMaxSTD
App.OnStartup584546874220454549734220485446875845551.6462635
Bootstrapper.Run5954398625983293277925983722329359541215.581013
Bootstrapper.ConfigureModuleCatalog11487673635111.51.5558.15111148385.1511911
Bootstrapper.InitializeModules184109117857171113.210918439.0404918
Asynchronous Module Initialization182122332311257125641821230023112571274.6590614

Not terrible, but not ideal. The application splash screen is displayed for about 4.5 seconds on average on a developer machine with only a few conditional modules enabled.

InitializationMode.OnDemand

With the baseline determined, a comparison can be made when switching the modules to be loaded OnDemand.

Profile #1Profile #2Profile #3Profile #4Profile #5MinAverageMedianMaxSTD
App.OnStartup5419396943915919549039695037.654195919733.0750575
Bootstrapper.Run2770219720172086223820172261.621972770266.0320281
Bootstrapper.ConfigureModuleCatalog408374340352388340372.437440824.40983408
Bootstrapper.InitializeModules143676969666682.86914330.1224169
Asynchronous Module Initialization1926163916991603163216031699.816391926117.3292802

All the Bootstrapper methods seemed to have improved, but overall the App.OnStartup took approximately the same amount of time.

Summary

There was an impact, but not in the overall startup time - which I find a little peculiar. It seems as though the overhead may have been shifted elsewhere in the startup process.

This may mean a hybrid approach to Bootstrapper.InitializeModules does have merits although not as much as I had hoped. Another option may be to change the Bootstrapper.ConfigureModuleCatalog to conditionally determine to add modules instead of applying a ‘safe’ default. Or perhaps I am diagnosing the wrong problem and should at other options - such as switching Dependency Injection frameworks.

In any case, I am going to discuss this as an option with my team - and see if additional testing can be done with more conditional modules enabled.

Increasing Productivity by Beating Procrastination Review

Today, I decided I was going to challenge myself to write a blog post and/or watch a Pluralsight module/course every day. I have been feeling stagnant lately and want to get back into improving myself. I cannot think of a better way to start that adventure than by writing a blog post about a Pluralsight course on productivity and overcoming procrastination.

Stephen Haunts put together the Increasing Productivity by Beating Procrastination course that was released on December 11, 2018.

One of the most significant threats to our productivity at work is procrastination and the difficulty in getting focused. This course will teach you how to understand procrastination and offer practical tips for beating the habit and getting focused.

The course has four main modules:

  1. What Is Procrastination?
  2. Understanding Procrastination
  3. Overcoming Procrastination
  4. Developing an Ability to Focus

What Is Procrastination?

In this module, Steven defines procrastination as:

The habit of putting off or delaying, especially something requiring immediate attention.

From my personal experience, this seems like an accurate definition.

He continues by outlining why he thinks we procrastinate:

  1. Fear of Failure
  2. Procrastinators are Perfectionists
  3. Low Energy Levels
  4. Lack of Focus

Fear of Failure and Perfectionism seem like the same thing. However, this is probably the biggest reason why I procrastinate. These are also the two that make absolutely the least amount of sense. “Failure” is the best way to learn - this is how all children learn. Somewhere while growing up this learning paradigm shifts into avoidance of failure.

“I have not failed. I’ve just found 10,000 ways that won’t work”

Low Energy Levels seem like they could have a contributing impact on productivity, particularly toward the beginning of the week. The phrase “a case of the Mondays” supports this:

symptoms of a useless or horrible Monday morning after returning from the weekend, used in the movie Office Space

Lack of Focus seems a little too open-ended considering the Attention Deficit Disorder society we live in. Everything is competing for focus at the same time and we only have a limited supply of it and willpower. Perhaps this is what the author means.

Understanding Procrastination

With Procrastination defined, the author continues with identifying where procrastination occurs to try to help train your awareness of it. With this there are some things we individually will need to accept to decrease the chances of procrastination occurring:

  1. Accepting we are not perfect
  2. Understanding failure is not fatal
  3. Aim to do your best and be happy about the output
  4. Try to develop a healthier lifestyle to get more energy
  5. Go to bed earlier
  6. Reduce screen time before bedtime

The nature of the first few seems very Zen/Stoic.

Zen:

An approach to an activity, skill, or subject that emphasizes simplicity and intuition rather than conventional thinking or fixation on goals.

Stoic:

of or pertaining to the school of philosophy founded by Zeno, who taught that people should be free from passion, unmoved by joy or grief, and submit without complaint to unavoidable necessity.

The remaining ones seem related to each other but do play an important part in our lifestyles and self-improvement.

The overall message seems to be “do the best possible, reflect, and improve”.

Overcoming Procrastination

Stephen provides the following options to get rid of obstacles that lead to procrastination:

  1. Avoid the distraction (move away from the distraction)
  2. Blocking the distraction (prevent the distraction from occurring)
  3. Satisfy the need (hunger)
  4. Confront the distraction (environmental noise)
  5. Just start the task

Out of all of these, Just Start the Task has been the biggest boon to my productivity. I find that within five minutes of starting a task, I have overcome my procrastination.

It is for this reason, I appreciate techniques/frameworks/guidelines such as the Pomodoro Technique, Kanban, and Getting Things Done. These tools are what I use as the foundation for the habits that the author encourages building. For Stephen, creating a habit should have the following guidelines:

  • A productive mindset
  • Set goals (measurable and prioritized)
  • Identify tasks that can be turned into habits
  • Put a place and time for the habit (define your habits environment)
  • Remind yourself of the goal

Summary

Overall, the course did not provide me with any new insights or tools to help me overcome procrastination. But realistically, should there be? David Allen, the creator of Getting Things Done admits in his book that he would not be teaching how to do anything new but would be providing the framework that utilizes all we know.

If nothing else, the course was a different perspective and reassurance that others suffer from procrastination. My biggest takeaway from the course will be “If you fail, forgive yourself, make adjustments, and try again.” Must be my perfectionism wanting to get it right the first time or not at all.

Six Reasons Why I Chose Hexo

Introduction

For most small websites today, website speed and server security trump dynamic content. Once a small website has established a theme, it is unlikely to change. And even when dynamic content is needed; such as comments or contact forms, some services allow this dynamic content to be embedded using JavaScript. This is exactly why static site generators have become all the rage for personal and/or developer blogs. Enough where the number of options can be overwhelming, just take a look at the size of the scrollbar on StaticGen when no filters are applied.

Three Reasons Why I Chose NodeJS

WordPress has been the de-facto choice for years. They even know how much of the internet is built using WordPress. I used to use WordPress too, but only because I felt like I had no other choice. I was happy to finally have a way to get away from WordPress. Although their new Ghost blogging platform was a candidate I was considering it was eventually discarded due to some of the security concerns I had about it.

The first step to deciding which static site generator to use is to narrow it down by programming language. Conveniently, this is also a filter that StaticGen provides. The most popular ones that I had heard about were Jekyll (Ruby), Hugo (Go), Hexo (JavaScript), Pelican (Python), and DocPad (CoffeeScript). I could eliminate a few already based on my previous experience with the languages they used: namely Ruby and Go.

This left me with three potential language choices. Since I had some experience with Python from my college days I thought I would try something new. And it would probably be a good thing for me to try to get over my blatant hate for all things JavaScript. This led me to the decision that the blogging framework had to be built with NodeJS. Unfortunately, JavaScript has several different flavors and StaticGen does not allow you to select multiple languages at a time. At least not by default.

Getting A List of Frameworks

I dug through the source code for StaticGen and found that I could use Developer Tools to select multiple languages at once. The edit turns the option value from this:

1
2
3
<option value=".lang-javascript">
JavaScript
</option>

to this:

1
2
3
<option value=".lang-javascript,.lang-coffeescript">
JavaScript
</option>

A separate option could also have been added, but I only wanted JavaScript-based frameworks. The resulting list was still fairly large, but it was much better than before. To reduce the list further I made the rule that I would only consider projects that had more than 500 stars - which would allow me to test a few that were under DocPad. DocPad was the deciding factor because it was the lowest of the frameworks that I had heard about.

I had a pretty thorough plan that I was going to try each framework and rate it in its ease of installation, ease of use, theme support, and upgradeability. Honestly, there were still too many frameworks for this kind of analysis. However, I did go through them all and gave each framework an attempt to win me over. I may make a post with the results of this analysis.

Six Reasons Why I Chose Hexo

Hexo turned out to be the ideal blogging framework for me, and here are the reasons why:

1. Hexo Knows What It Is and What It Is Not

Hexo sells itself as:

A fast, simple, and powerful blog framework

Which is exactly what I was looking for. At this time, I only need a blogging platform for publishing blog posts. Should I ever need additional functionality, I may consider an alternate framework.

A lot of the other top frameworks on StaticGen are build tools that are better for sites that are not specifically designed to be blogging platforms. This is great for the amount of flexibility and control but is more than I am looking for at this time.

2. Hexo Keeps It Super Simple

Everything about Hexo was easy.

  • [x] Installation
  • [x] Setup
  • [x] Installing Themes
  • [x] Installing Plugins
  • [x] Custom Theming

And the documentation is thorough enough that should any questions arise, the answer can likely be found in it. The only time I became lost was when I tried to go through the source code to understand how it was passing variables from the configuration files to the plugins while trying to set up another framework to do something similar.

3. Hexo Is Still Actively Maintained

Hexo is still being actively developed/maintained. Both in the forms of themes, and plugins; but also the core repository.

4. Extensible

Hexo comes with sane default values that will work out of the box, but these can also be changed using the plugin library. Alternatively, entire themes can be applied that have been built by other people if you do not want to do any of the work yourself.

5. Cross-Platform Support and Baked In Package Manager

Not specific to Hexo, but to NodeJS - but it still is a benefit to using Hexo as opposed to creating a custom static site generator. But even if Hexo does not have a plugin for a particular technology, a plugin can be created and added to npm.

6. Pluralsight Author Endorsed

By far the weakest reason on this list, but I still included it here because it provides more resources to learn about Hexo.

In the video course the course author advocates for DocPad, but on Twitter, the course author has switched to Hexo.

Conclusion

Hexo might not be for everybody, but it met (and exceeded) the criteria that I was looking to fill at this time. Other frameworks would have been ideal in other situations - but for getting a blogging platform out quickly Hexo just made sense.