Posts
The Fullscan Strawman pattern (ramblings)
Database indices enable highly optimized execution paths for the retrieval of information. However, they have their own limitations when the data patterns and query patterns become more complex.
Take, for instance, a table containing data for several thousand employees within an organization with the following fields:
Employee ID First Name Last Name Gender Department Location Manager Profile Picture When we start with no indices on the table, the database server would read each and every row before being able to give us a result for just about any query.
Posts
Blog Comments (ramblings)
One of the best indicators of audience engagement when running a blog is the comment count. Visitors to a blog can click on an article heading that interests them, read and learn something from it. Or they can decide it’s too boring and move on. However, when somebody posts a comment, it’s because they have read something that they have formed a strong opinion about. And when that comment gets a reply, you have a series of discussions built around the content of the blog.
Posts
Docker Compose With a Database
Applications being built to run in containers can have a database included in the stack. It creates a better experience for someone who just wants to try the application after finding it on a GitHub repository… or for quality control engineers to run tests against a blank slate.
We typically specify a connection string or hostname to the database within our applications, through a config file or environment variable. When using Docker Compose, the hostname of the database server will be the name of the service set by us in the docker-compose.
Posts
Qemu for x86-64 and ARM Emulation
Qemu provides the ability to emulate a CPU so you can run code built for a different CPU architecture than what you actually have. For example, if you have an Apple Silicon M1 CPU and you want to run code compiled for the AMD x86-64 CPU, you can emulate an x86-64 CPU to run the application.
To get started, install Qemu (on MacOS: brew install qemu) create a disk image to use as the primary storage for your virtual machine:
Posts
Jekyll, Where is the Pagination? (rant)
When I thought of starting my second ever self-hosted blog (my first self-hosted blog was powered by WordPress), I immediately thought of Jekyll. I had previously attended a townhall meeting of Jekyll developers, and although I didn’t do much apart from building a static website (with pages, not posts), I decided to use it as a platform for my blog.
For Day 0 operations, it was perfect. I could use a text editor to build the content, and Markdown is very easy to write even for somebody who has not been employed in any technical capacity (at one time, people were expected to hand-code Markdown in wikis… then WYSIWYG editors were not just preferable but they were required for product acceptance).
Posts
The Problem With Generated Code (rant)
Code Generators are great! I picked up my imaginary suitcases and walked from the Sinatra (Ruby) and Flask (Python) microframeworks to the Ruby on Rails ecosystem because Rails could generate a complete user interface, aware of the relationship between models with a slight modification to the template. And being able to generate a config file with defaults for most add-on gems for Rails makes it that much better.
However, generated code is often ugly when it tries to do too much.
Posts
Windows Share Wifi - From a Command Line
Do you remember when we had wired Ethernet cables and the only way to connected to the LAN was with a CAT5 cable, and mobile phones had to sit out of the party? And then Microsoft Windows gave us a way to create a gateway for WiFi devices to connect to the Wired LAN like this:
netsh wlan set hostednetwork mode=allow ssid=myhotspot key=12345678 netsh wlan start hostednetwork It only worked when the network interface supported the Hosted Network feature (look for it in the output of netsh plan show driver).
Posts
Oh My Zsh
If you reveal to someone you are using the bash shell in 2023, they are going to assume you have either been living under a rock, or you likely also have a Toyota Corolla ‘66 (…which, BTW, is the best Corolla). All the cool kids now use zsh.
What are we working with? To look up which shell you are using, a tell-tale sign the prompt. If it has a $, you likely have bash.
Posts
Bloglessness
Bloglessness is where I will be posting my tech ramblings. After living years without having a tech blog, I started wondering if I still am true to the trade. Presentations that I delivered did not have a Twitter username, a blog URL, a Patreon link, a buy-me-coffee button, or any kind of merch page. Some of that is going to change this year, in 2023.
Bloglessness is going to be about everything that I didn’t get to share because of my blogless existence - some nifty vi tricks, personalizing the command-line shell, code that I have been writing as prototypes, and things that would make one’s jaw drop in awe while staring at a terminal window.
Posts
Vim Literal Character
TIL to insert an actual character in Vim, while in insert mode, press Ctrl-V followed by the key you want to type literally. This is quite useful if you want to include an actual Escape character (such as when writing macros), or when you want to force an actual Tab character (if you have :set expandtab, it will replace the tab with spaces).