Life is Short by Paul Graham

Paul Graham's recent essay, Life is Short, discusses making the most of our short lives by focusing on the things that really matter.

With our youngster almost ready to leave the nest, I try to remind friends (and myself) to be conscious of how brief their kids' childhoods will be. Paul Graham puts it into perspective in his essay, Life is Short:

Having kids showed me how to convert a continuous quantity, time, into discrete quantities. You only get 52 weekends with your 2 year old. If Christmas-as-magic lasts from say ages 3 to 10, you only get to watch your child experience it 8 times. And while it's impossible to say what is a lot or a little of a continuous quantity like time, 8 is not a lot of something. If you had a handful of 8 peanuts, or a shelf of 8 books to choose from, the quantity would definitely seem limited, no matter what your lifespan was.

Year in Review: 2015

I started 2015 on a great streak, but it didn't hold up all year. Here are the habits I need to pick up again and a few other targets for 2016.

It's that time of year again when most of us take a moment to reflect on what we've achieved in the last year and set some new (or old as the case may be) goals for the new year. I had a great 2014 as far as habit building, but 2015 lost traction and slipped a lot. It'll take a ton of effort to get my momentum back in 2016, but I know I have it in me since I've done it before.

Regular exercise isn't something I felt I needed as a young person, but I've been trying to develop the habit as I approach middle age. My goal for 2015 was to exercise at least a little every day just to maintain a habit of doing so, because it takes less willpower to exercise more if you're already doing it. I did very well for the first 7 1/2 months with only 1 day missed. Then I went out of town for a week, didn't exercise at all, and became Lazy Me again. I could count on one hand the number of times I exercised in the last 4 1/2 months of the year, and I can feel the impact it's had on my body. Maybe this is what "almost 40" should feel like, but I'm making it a priority to develop the exercise habit in 2016.

Command Line Plugin Added to Prism

After making several changes proposed by another contributor, my Command Line plugin is now part of the Prism project.

Back in February, I wrote about how to style shell commands using CSS. I wanted to submit that code to the Prism project, but I got distracted by other things. By the time I finally got around to submitting it, there were changes to the main project that affected the plugin code. I updated the plugin to incorporate their changes and submitted my first GitHub pull request at the end of November.

Another Prism contributor, zeitgeist87 (Andreas Rohner), was quick to provide useful feedback and offered some great suggestions for expanding the plugin's functionality. Andreas' suggestions resulted in a more flexible plugin that works for any type of command prompt as opposed to only shell/terminal sessions. Besides project-specific details I wasn't aware of, he also helped me with some general best practices for GitHub collaboration that I'm grateful for. People's willingness to help others is part of what's most impressive about the open source community.

Core Web Application for PHP Released

The Core Web Application Libraries provide a logger, database layer, and MVC framework for PHP. The code is available on GitHub along with 2 example projects.

When I built this site, I chose to start from scratch for several reasons. I could've thrown something together using any one of the open source content management systems, but I've been down that road before. Once you customize a popular CMS, it becomes an outright burden to keep up with security fixes and other updates. It's convenient to have so many features and plugins at your disposal, but having thousands of lines of unused/inapplicable code with frequent vulnerability fixes can leave you with an uneasy feeling about what's creeping into each release. Once you have multiple sites in that state, maintaining them starts to feel cumbersome or, worse, like a second job. Additionally, I wanted the freedom to use the code in any project I work on whether I retain ownership of the finished product or not.

That's why I created the Core Web Application Libraries and released the code under the Apache License Version 2.0. They're a lightweight and flexible base for building small to medium-sized websites using PHP. I didn't want to build yet another "kitchen sink" solution that tries to appeal to all developers everywhere. My aim is to keep it lightweight so developers can become intimate with the code while providing enough flexibility that they can extend it to do whatever they want. Security is a primary focus and keeping the code lean makes it easier for anyone to audit at any time. It can't address all possibilities, of course, but my intention is to provide a secure foundation "out of the box" so that any additional measures the developer takes are icing on the cake.

New Domain

This site has moved to a new domain, chriswells.io. Expect more frequent updates now that the move is complete.

It's been several months since I posted, so the site might have seemed dead already. We had a couple of hectic releases at work, which took time away from this site (and everything else). Also, I wasn't quite satisfied with the original domain name. It was a bit awkward to type and I knew I'd have to type it often. Since I wasn't sure if I would change domains or not, I didn't want to create too much content before deciding.

There's been a lot going on behind the scenes, though. I've done tons of refactoring and general code clean-up in what little time I had available. I also added several features to make site maintenance easier for myself. Finally, I built a fresh server to host the new domain and parked the old domain on top of it with redirects in place. Over the next couple of months, I intend to resume regular posting and release some source code. I'm looking forward to ramping up again.

Blank Results in MySQL Workbench on FreeBSD

An incompatibility with glib 2.42 causes MySQL Workbench to display a blank results grid. Here's how to patch the source code and recompile the port on FreeBSD.

There's one area where I simply don't like using the command line and that's SQL queries. When I'm working with a database, I appreciate having a decent GUI. That's why I was frustrated when I launched MySQL Workbench and found that the output was blank with no results being displayed for any query. The table editor also showed no data—no column names, indexes, nothing.

Blank select results

Empty results grid and blank output.

Open Source and the Free Software Ride

Despite existing open source revenue models, even popular projects are facing extinction. Is the free software ride over or is there something we can do?

Open source software powers the modern world. From operating systems to web servers and desktop applications, not only does open source deliver, but it provides truly competitive options. Given the prevalence of free and open source software, or FOSS, why are seemingly successful projects on the brink of collapse? The developers of TrueCrypt laid down their keyboards and walked away. Werner Koch announced that he was unable to justify further effort on GnuPG after 18 years. When critical security vulnerabilities were discovered, the OpenSSL maintainers revealed that they were grossly understaffed with a single full-time employee and averaging $2k per year in donations.

Those three projects alone are likely responsible for over half of the world's secure computing. I won't suggest that all FOSS developers should be rich, but anyone that makes that level of positive impact on society shouldn't have to choose between making further contributions or feeding their family. If there's an upside to these revelations, it's that the problem is out in the open. In response to the GnuPG article, the community stepped up with $135k in donations in a single day plus another $160k from just 3 companies. OpenSSL's announcement led to the Linux Foundation creating the Core Infrastructure Initiative to help fund core open source projects. If this money was available all along, why did we need an emergency to put the money where it belongs? It's time for us to agree that "free" software is about freedom rather than price.

HTML Validator Can't Connect Over HTTPS

When the W3C Markup Validation Service couldn't connect to my site using HTTPS, this simple configuration change resolved the issue.

A few days ago, someone pointed out that the HTML validation link in my footer was leading to an error message. Invalid markup? Surely not! I clicked the link to load the W3C Markup Validation Service and it screamed "Sorry! This document cannot be checked." The error message stated "500 Can't connect to chriswells.io:443" and "If you made recent changes to your domain name (DNS) configuration, you may also want to check that your domain records are correct, or ask your hosting company to do so."

HTML Validation Error

HTML Validation Error

Style Shell Commands with CSS

Do you provide shell, terminal, or other command line examples on your site? Learn how to style them with CSS using a custom, lightweight plugin for Prism.

Updated on 12/30/2015: The Command Line plugin is now part of the Prism project, but it may be converted from a plugin to a language add-on. I've left this blog entry here for reference.

I launched this site before it was "code complete" and there are still features I've yet to implement. One of the next posts I wanted to write involved shell commands, so I needed to address styling those commands to make them easy to read and understand. I searched for some examples to see what others suggested before deciding that shell commands are essentially just code samples, so I switched gears to decide how I wanted to implement general code highlighting.

Fix an LCD Monitor That Won't Turn On

When your LCD monitor won't turn on, keep it out of a landfill by repairing it yourself for a few bucks. Grab a screwdriver and soldering iron for an easy fix.

My workstation consists of a FreeBSD desktop with dual LCD monitors and a MacBook Pro provided by my current client for anything that requires access to their network. Both monitors had some age on them, so it was only a matter of time before one died. I've used a dual monitor setup for so long that having only one monitor makes me feel... well, half as productive. When my primary monitor finally cashed in its chips a few months ago, that left me not only less productive but also using a very old LCD given that it was my former secondary. I immediately found a great deal on a shiny, new replacement that brought me up to date with a 23.6" 1080p primary monitor. Although I had 2 monitors again, my former primary sitting in the floor waiting to be recycled seemed to be taunting me.

I searched for solutions and found this to be a common issue with LCD monitors. It wouldn't display anything—not even a "no signal" message—and the power light continuously blinked blue. The most common cause seemed to be one or more bad capacitors, but I've never been good with a soldering iron and I had no experience with this kind of repair. Still, given that I had nothing to lose and the dead monitor was better than the one I was using for my secondary, I decided to try my hand at repairing it. If you have a similar issue (or a monitor that won't turn on at all), it's probably worth trying the steps below at a minimum. Of course, do so at your own risk, be sure to unplug it first, it's not my fault if you do something dangerous or careless, ask your mom before playing with electronics, etc., etc.