Christopher
Stoll

Finding Related Jekyll Posts Using LSI, for Github pages

Finding Related Jekyll Posts Using LSI, for Github pages

On this site I write about, what I like to believe is, a diverse set of topics. The normal way of presenting posts using a sequential list does nothing to help people discover other material on the site which they may also be interested in. I wanted to provide visitors with a list of links to content which is similar to the page they are currently viewing. However, due to limitations in the platform I’m using, there was no option to simply turn this on. So, I wrote some code and implemented an algorithm to solve this problem.


Backpacking Trip Report: Archer's Fork

Backpacking Trip Report: Archer's Fork

If you are an Ohioan who is into backpacking and haven’t been to Archer’s Fork yet, you should plan a trip. It is one of the most remote backpacking sites in the state. To illustrate how far out this trail is: we normally grab a meal at a restaurant near the trailhead before heading into the backcountry; the Archer’s Fork trailhead is about an hour drive from the nearest restaurant (possibly longer if you don’t download directions before leaving an area with cell service). For someone from northeastern Ohio, that’s a crazy long way from food. While on the trail you are unlikely to run into other people, which further enhances the feeling of remoteness. The best part may be that it’s only two and a half hours away from the Akron area, so most people in eastern Ohio should be able to get there in under four hours.


Climbing Trip Report: Muir Valley

Climbing Trip Report: Muir Valley

Our climbing group was finally ready to move out from under the sodium lights of the indoor climbing gym. So, half of us having completed a lead climbing course, we decided to travel down to the Muir Valley and attempt some outdoor sport routes. Located in Kentucky’s Red River Gorge, one of the largest and most popular sport climbing areas in the Eastern United States, Muir Valley has over 20 crags spread across more than 360 acres of land. The most important part, for us, was that it also has nearly 120 routes which are rated 5.9 or lower.


Getting Started with Embeded Elixir on Nerves

Screenshot of testing code

In his talk at CodeMash this year, Joel Byler mentioned a platform named Nerves which quickly and easily packages up Elixir projects for embeded applications. Joel said the platform boots in seconds, the framework takes care of all the low-level tasks, and the tooling handles all the work required to convert Elixir applications into embeddable firmware. It sounded too good to be true, so I had to try it out.

Getting up and running was actually super easy; I installed Nerves and built my first app in minutes. And, it did boot up incredibly fast, but that first app didn’t actually do anything. I needed to get my device connected to the wireless network so that I could start doing more interesting stuff, and that is when I ran into problems. I have a Raspberry Pi 2 which doesn’t have built-in WiFi, so I have a TP-Link TL-WN725N USB adapter. Unfortunately, Nerves Raspberry Pi 2 system only supports Ralink RT53xx (rt2800usb), RealTek RTL8712U (r8712u) and RealTek RTL 8192 (rtl8192cu) devices.

My first thought was, “I guess I will have to get the latest Raspberry Pi Zero to get this thing working.” Maybe I just wanted an excuse to buy a new little toy, but I’m supposed to have technical skills, so I shouldn’t buy my way out of this problem. Besides, I have used the TL-WN725N adapter in the past and I knew that there was a Linux driver for it. The question was, how do I get that driver installed in Nerves? Here is how I made it work.


Testing the Rails

Testing the Rails

A new year, a new programming language. I have recently started developing web applications using Ruby on Rails, rather than React+Redux on Flask+SQLAlchemy+Sqitch on Python. I’m enjoying the relative simplicity; it allows me to focus on creating complexity in other places, places where it will actually help me produce more features in less time. One area where I like to do more with less is in tests. No one likes to spend coding time writing tests, but it makes development easier and more productive in the long run, so it’s an absolute requirement.

One project I’m working on has an administrative area which is only accessible to privileged users. I needed to write test which ensure privileged users get access and everyone else does not. I could just fill in the default Rails generated tests for the authorized user, then copy and modify them for unauthorized users, but that becomes tedious if I want to check more than two roles.


Literally a Single Page App

Inspired by a few talks I saw at CodeMash, I wanted to perform some experiments with React. I just wanted to focus on the React code, not set up build pipelines, so I wanted a single page app which was literally a single page (except for the Javascript requirements, of course). Below is the template I used for my experiments. It is super simple, all it does is source react.development.js, react-dom.development.js, and babel-core from CDNs. I just wanted to document it so that I don’t have to look it up in the future. At the bottom of the page is a larger example which includes some actual React code.

<html>
<head>
  <script crossorigin
    src="https://unpkg.com/react@16/umd/react.development.js">
  </script>
  <script crossorigin
    src="https://unpkg.com/react-dom@16/umd/react-dom.development.js">
  </script>
  <script crossorigin
    src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.min.js">
  </script>
  <script type="text/babel">
    // React code goes here
  </script>
</head>
<body>
  <div id="root"></div>
</body>
</html>

You would not want to use the in-browser babel script for production code.


Stranger Things at Coffee and Code

Stranger Things at Coffee and Code

Like season 2 of Stranger Things, Coffee and Code is adding some new characters. One of those new characters is me, Chris. I bring some new skills which will help to round out the Coffee and Code team. For example, while completing a masters degree I worked with a computer vision algorithm called seam carving. Seam carving is a great algorithm to demonstrate how the team’s capabilities are growing since what it does is immediately visible. I’m going to tell you a little about how seam carving works and give some examples from the latest season of Stranger Things 2. There should be no spoilers here, but we will be working with images from the latest season, so you may want to turn back now if you have not watched the entire season yet.

Seam carving is a technique for adding or removing portions of an image without changing the main elements of that image. The devil is always in the details, but from a high level the process is pretty basic. The algorithm analyzes an image to determine which areas are less interesting. Then, it carves seams through those areas in ways which are hopefully not noticeable. Easy peasy.


Of Juices mixed with Honey.

Of Juices mixed with Honey.

Found in a very old book1 while researching historical mead recipes:

Honey is the Countrey-mans ſugar, wherewith they often condite Cherries, Goosberies and Pears, Apothecaryes alſo, not for want of ſugar, but by the Phyſicians adviſe confect certain juices, fruits and flowers with honey, and make them into Conſerves, ſapes, and ſyrups: conſerves, as honey of Roſes called by the Arabians Geneljabin, and by the Greeks Rhodomel, which is made of one part of the flowers of red roſes bruised, and three parts of honey deſpumed: Sapes as honey of grapes, which confected of one pound of dry grapes, clenſed and macerated for a whole day in three pounds of water, then boyled to the half, afterwards ſtrained, and mixed with an equall quantity of honey deſpumed: ſyups, as another kind of honey of roſes, which is made of an equall quantity of deſpumed honey, and red roſe juice, the Mercuriall honey, or Mel Mercuriale, is alſo confected after the like manner, and cocted to the conſiſtency of a thicker ſyrup.