Blog

During the course of the day I encounter lots of challenges, some of which take minutes to solve and others that take much longer. My goal for this section is to keep track of these challenges and their solutions. I will turn the longer ones into articles, while the shorter ones will stay as blog entries. You can expect topics to range from very specific programming challenges to broader topics like life.

Below is a list of the recent blog entries. You can also browse the blog by using the tags on the right side, or if you know what you are looking for then you can use the search box at the top right.

Logitech MX Ergo Trackball Review – Great Upgrade from the Logitech M570

Logitech MX Ergo Trackball

I switched to a trackball earlier this year because my wrist was getting tired after a few hours of using Microsoft’s Sculpt Ergonomic Mouse. After some search, it seemed that my only good option for a trackball was the predecessor to this trackball, the Logitech M570. I was a little disappointed in the build quality and the scroll wheel of the M570, so I was happy when Logitech announced the MX ERGO and pre-ordered it.

I used the M570 since July until the start of October when the MX ERGO arrived. Even though the MX ERGO cost almost twice what the M570 is going for, I am glad to see that the build quality is way better. The angle on this trackball also feels much more comfortable than the M570, which laid a lot flatter. I have now gotten used to the steeper angle on this and M570 now feels odd and a little “off.” Given how much time I spend using the trackball, I can easily justify the cost for myself.

I was looking forward to the inclusion of Bluetooth, but I was also a little concerned that it might not work as seamlessly as the proprietary Logitech adapter. After using it for a few weeks now, I am glad to report that it works just as well as the Logitech adapter and that now I don’t have to worry about connecting/disconnecting yet another USB device.

The older Logitech M570 Trackball

With Logitech’s new “Logitech Options” software for macOS, I have noticed that the forward/back buttons seem more reliable than the M570 buttons and that they now seem to work with more applications than their previous software/drivers. I have noticed that their Logitech Options Daemon software keeps using 1-2% CPU majority of the time. I am contemplating trying to use this mouse without the Logitech software, but I haven’t done it yet.

An additional benefit with Logitech’s new Options software is that I no longer have to run an additional application (called Scroll Reverser) to reverse the scroll direction. Their Options software has an “option” to reverse the scroll direction.

One thing that I am curious to see pan out over the next few months is the battery life. I did not use the M570 long enough, but I have heard that it easily lasts longer than a year. Logitech advertises the MX ERGO’s battery to last four months. My trackball shows about 2/3 battery still left to go after almost two-and-a-half weeks. Given that it’s sitting on the desk with easy access to plenty of micro-USB charging cables, I guess recharging this won’t be too big of a deal.

Overall, I am happy with my purchase and would recommend it.

Fluentd configuration for PHP errors

Lately, I have been working on centralizing the logs from all of our servers and application layers.  I decided to use Fluentd instead of Logstash because it claims better reliability without jumping through hoops (e.g. adding a kafka layer).

Anyways, working on the configuration, I noticed that it doesn’t have any default configs for PHP errors.  My quick google search didn’t reveal anything either.  So, I decided to write the regex myself.  Here is what I ended up with.  This also accounts for multiline stack traces.

<source>
 @type tail
 tag SERVERNAME.php.errors

 # Example
 #[03-Sep-2017 22:51:06 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 65536 bytes) in Unknown on line 0

 format multiline
 format_firstline /^\[(?<time>[^\]]*)\] (?<level>.+?):/
 format1 /^\[(?<time>[^\]]*)\] (?<level>.+?):\s+(?<message>.*)/
 time_format %d-%b-%Y %H:%M:%S %Z

 read_from_head true # Read the file from the start.

 path C:\webroot\php_errors.txt
 pos_file C:\opt\td-agent\tmp\hd-dev01.php.errors.pos
</source>

To Automatically Follow Redirects or Not?

I have recently been working on a SMART on FHIR integration with an EHR vendor.  One of the REST calls required posting some data and retrieving a launch code.  During development, I use Postman to test the functionality.  This call kept failing, and I could not figure out why.

Read full post… “To Automatically Follow Redirects or Not?”

Long-term Impact of the Upcoming Self-Driving Vehicles

I am cautiously and excitedly looking forward to the upcoming revolution of connected and self-driving vehicles. This advancement is bound to change so many things and the ways that we do those things. Taxis and truck driving are the most apparent professions that will see the initial impact, but this will also impact many other occupations and areas.

Read full post… “Long-term Impact of the Upcoming Self-Driving Vehicles”

Play Button iTunes Patch Updated to Version 1.1

I have had a backlog of changes that I wanted to make to the iTunes patch.  I finally took some time this weekend to work on those and release version 1.1.  The major improvement in this version is the check for System Integrity Protection.

Take a look at this commit for more details about this round of changes.  You can download the latest version on the project page.

Screen shot of the v1.1 patch on macOS Sierra

The Artist, not the Technician!

If you talk to anyone that has interacted with me on the entrepreneurship front you will learn that I am a big fan of the E-Myth Revisited book by Michael Gerber.  I really like this book, and especially like the three roles that it defines.  I have blogged about it in the past, but there is one thing that I don’t like about it: i.e. calling one of the roles the “technician.”

The title of this role has bugged me ever since I have read this book, but it wasn’t enough for me to go searching.  Interestingly, on January 16th, I finally ran into someone that had the same issue!

Read full post… “The Artist, not the Technician!”

Downloading All of Your High-Resolution Facebook Photos

Facebook Logo

I had a need for downloading all of my facebook photos.  One way you can do this is by downloading a full copy of your facebook data.  Unfortunately, this only includes the low-resolution version of your photos.  There are some other options online, but most looked pretty sketchy.

I knew about facebook’s Graph API and played around with it a little before.  So, I decided to use this as an opportunity to work with that a little more and play around with the go language.

Read full post… “Downloading All of Your High-Resolution Facebook Photos”

Starting a business? Make sure to read this book!

I have worked in numerous job functions ranging from front-end programming to high-level business planning and execution, and lead two businesses so far.  After recently reading The E-Myth Revisited I wish someone would have suggested it to me some time ago because it provides a great perspective, especially for folks like myself who are coming from a very technical background.

Read full post… “Starting a business? Make sure to read this book!”

Website Moved to HTTPS (SSL)

SSL has been the flashy new thing lately so after realizing that https://thebitguru.com was pointing to my old Django site I decided that it was time for me to fix that and migrate all traffic to https.  The first question, as you can imagine, was where to get the SSL cert.

Read full post… “Website Moved to HTTPS (SSL)”

A Big Concern with IoT – Security

Nest Thermostat

I am excited about the Internet of Things (IoT) phenomenon that we have been going through over the past few years.  Some old timers might even bring up X10, from who knows how long ago, but for my generation, I feel like the Nest thermostat was really the intro of IoT to the mainstream.  I see the value of IoT devices and I have a few IoT devices at home myself.  This list has only grown over time.  There are two major concerns with IoT devices that are always in the back of my mind: 1) Security, and 2) Privacy.  I will focus on Security for this post.

Read full post… “A Big Concern with IoT – Security”