Happy New Year 2020

Happy new year!

Happy new year!

A big happy new year to you from Geoff here at blog.mbedded.ninja. Looking back at this blog in 2019, below are some interesting statistics from the 2019 year.

Statistics for 2019

This is the second year in a row in which I have used Google Analytics for statistics.

Summary

YearNo. Page ViewsNo. Users
201783k41k
2018116k63k
201999k49k
A comparison of the number of page views per week for the 2018 and 2019 years. Image from Google Analytics.

A comparison of the number of page views per week for the 2018 and 2019 years. Image from Google Analytics.

A comparison of the number of users per week for the 2018 and 2019 years. Image from Google Analytics.

A comparison of the number of users per week for the 2018 and 2019 years. Image from Google Analytics.

A page view is a single view of a page (which can be a returning or new user). A user is a unique person who has visited this website at least once.

Ranked by number of page views:

The top 10 most visited pages of 2019. Image from Google Analytics.

The top 10 most visited pages of 2019. Image from Google Analytics.

Compared to the top 10 pages of 2018:

The top 10 most visited pages of 2018. Image from Google Analytics.

The top 10 most visited pages of 2018. Image from Google Analytics.

For the first time ever, we see Linux-related pages take over the top positions that were held by Altium-related pages for at least the last 5 years. There were no hugely different page categories that entered the top 10 list this year.

Acquisition

The top channels of 2019. Image from Google Analytics.

The top channels of 2019. Image from Google Analytics.

The top referrers of 2019. Image from Google Analytics.

The top referrers of 2019. Image from Google Analytics.

Goal Completion

Looking back at the goals set at the start of 2019, most of them were fully completed!

  • DONE: Utilize Hugo to it’s fullest capabilities. Although the migration from Wordpress to Hugo is complete, I feel like I have not yet explored all of the possibilities that Hugo allows. This includes sitemaps, RSS feeds, automatic thumbnail creation, better shortcodes, e.t.c.
  • PARTIALLY DONE: Find a way to reliably detect dead links as they occur, along with an easy way of fixing them. This was enabled for internal links everytime the site is compiled (using a Hugo shortcode), but is harder to do for external links due to the amount of time/bandwidth required to check all the links.
  • DONE: Move all of the mbedded.ninja GitHub repos into my own personal account, as there is no real need for a mbedded.ninja “organization” on GitHub, at it just leads to extra work and confusion on where repos are.
  • DONE: Remove all the excess images in the blog repository. As a result of the Wordpress migration, there are many copies of a single image, each at a slightly different pixel size (I’m assuming they were created as part of a page load speed optimization in Wordpress). These are un-needed as Hugo can resize images at build time to correctly fit the container on the page. These extra images are just using up repo space.
  • DONE: And of course, as always, add more content!

Plans For This Year

  • Integrate more of the calculators at calc.mbedded.ninja into the pages of this blog (blog.mbedded.ninja). calc.mbedded.ninja is not getting the exposure I first hoped. It could potentially be because of the SPA’s (Single Page Application) poor SEO (Search Engine Optimization), as it uses the Javascript framework Vue to render everything on the client side. Google’s search bots are meant to be able to handle indexing this sort of thing in 2019, but it still may be performing worse in the search rankings than it it was SSR (Server Side Rendered).

December 2019 Updates

  • A new section on Hugo timeouts added to the Hugo page.

  • Fixed three issues preventing me from upgrading from Hugo v0.54.0 to v0.60.1, and then upgraded! The two issues were:

    • Hugo was getting stuck while building the site upon upgrade from v0.56.3 to v0.57.0. Hugo would not report any error, but would not finish building the site even after waiting for 30mins. Memory usage would keep increasing until all system resources were consumed. I had a feeling that this may be due to infinite recursion occurring somewhere. I disabled the menu shortcode that I wrote, as that used recursion to build the menu structure, and then the Hugo build completed. After looking over the menu shortcode code and verifying that the recursion should be terminating properly, on a hunch I tried updating all the index.md pages to _index.md, which allowed me to re-enabled the menu shortcode.

    • Hugo would timeout with the following error:

      3:42:50 PM: Error: Error building site: "/opt/build/repo/content/electronics/projects/columbus-radio/index.md:1:1": timed out initializing value. This is most likely a circular loop in a shortcode
      

      but only when building on the CICD server (Netlify). I removed this columbus-radio page and would fail on another specific page. While these specific pages didn’t use any unique shortcodes that the other pages didn’t, I did notice that these pages contained a large number of image resources.

      A screenshot showing the number of image resources in the `columbus-radio` page.

      A screenshot showing the number of image resources in the `columbus-radio` page.

      Hugo had a default timeout of 10s per page, and pages with a large number of image resources were taking longer than this to process (the images are scaled and resampled). This was an easy fix, I just increased Hugo’s timeout to 30s in config.toml:

      timeout = 30000
      
    • Images and other HTML elements that used shortcodes disappeared from the website. This occurred between v0.59.1 and v0.60.0. This ended up being caused by Hugo’s switch from using Blackfriday to Goldmark as the default markdown renderer, and along with that the associated increase in the default security settings to now allow inline HTML within markdown. This issue was fixed by adding the following to config.toml:

      [markup.goldmark.renderer]
          unsafe = true
      
  • Updated the Rust page with code examples showing how to use cargo, the basics of ownership, casting in Rust, and information on IDE support.

  • Added a new page on Map Tile Servers.

  • Updated the tmux page with a walk-through on how to install tmux from source.


November 2019 Updates

  • Added information on masked arrays to the Numpy page.

  • Added Euler Angle support (e.g. RPY) to the 3D rotations calculator.

  • New introduction to different map projections.

  • Added a new React page.


October 2019 Updates

  • Updated the mv (move) page with information on using extended bash glob extensions to provide exclusion patterns.

    $ mkdir new_sub_dir # Create a new sub-directory to move all files/directories in PWD into
    $ mv !(new_sub_dir) new_sub_dir # Move all files/directories in PWD into new_sub_dir, excluding new_sub_dir itself (avoiding the obvious recursion problem)
    
  • The Introduction To Rotation Matrices page has been updated with tutorials/example on how to combine rotation matrices and how to calculate the rotation matrix to describe the rotation between two reference frames, as well as a section on how to convert RPY (roll-pitch-yaw, or Euler angles) to rotation matrices.

    $$ \mathbf{R} = \begin{bmatrix} \hat{u_x} & \hat{v_x} & \hat{w_x} \\ \hat{u_y} & \hat{v_y} & \hat{w_y} \\ \hat{u_z} & \hat{v_z} & \hat{w_z} \end{bmatrix} $$

  • Added an interactive 3D rotation visualizer to the Quaternion page, which shows you how a right-hand coordinate system XYZ is rotated in 3D space by either a rotation matrix, quaternion, or angle-axis rotation. This tool is also very useful to convert between the three ways of describing a rotation (when you enter a rotation in one notation, the other two get updated automatically).

A screenshot of the 3D rotation visualizer and converter.

A screenshot of the 3D rotation visualizer and converter.


September 2019 Updates