Monitoring Sidekiq Queue Latency Using AWS CloudWatch

When you have a Rails app that depends on Sidekiq (and Redis) for processing background jobs, it is critical to monitor queue latency to make sure there are enough Sidekiq workers running based on the volume of jobs at any given time. In Sidekiq, queue latency is the difference between when the oldest job was enqueued and the current time. To take full advantage of distributed job processing, the latency of each job queue must remain very low.
Read more →

m3u8 v0.4.0: EXT-X-MEDIA support

There is a new release of the m3u8 gem available that includes support for EXT-X-MEDIA attributes. This extends the library to support features such as subtitles, closed captions, and alternate audio/video in master playlists. Several fixes and improvements have also been included from contributors recently and it is nice to see there is some interest in the project. EXT-X-MEDIA is handled through the new MediaItem class: hash = { type: 'AUDIO', group_id: 'audio-lo', language: 'fre', assoc_language: 'spoken', name: 'Francais', autoselect: true, default: false, forced: true, uri: 'frelo/prog_index.
Read more →

m3u8 v0.3.0: Playlist Parsing

I just released a new version of my m3u8 gem, this new version provides parsing of m3u8 playlists used in HTTP Live Streaming (HLS). It represents a significant refactoring since the original scope of the project was limited to only generation of playlists. You can now read a playlist into the newly extended object model, modify or add segments/child playlists, and generate a new m3u8 output file. There is a new items array made up of either PlaylistItem instances for master playlists or SegmentItem instances for regular playlists containing MPEG transport stream files (MPEG-TS).
Read more →

Lamb-Richman Dataset Generator

In 2011 I wrote a library that generates or extends the Lamb-Richman dataset using COOP station measurement data from the US (NOAA/NWS) and Canada (when available). Recently I got around to adding it to GitHub so anyone (especially those in academia) can use it to extend or regenerate the dataset further for climate science. The library is written in C# targeting the Mono framework on OS X but should work on Windows as well.
Read more →

m3u8: Generate m3u8 playlists for HTTP Live Streaming in Ruby

m3u8 is a ruby gem facilitates the generation of m3u8 playlists for HTTP Live Streaming (HLS). You can use this to serve up playlists from a rails application for the integration of authentication and other customizations, while serving the actual MPEG transport stream files (.ts) from a CDN. You can also use m3u8 to generate playlist files as part of an encoding / production pipeline. Creating a master playlist for adaptive bitrate streaming is very straightforward.
Read more →

Gull: Ruby Client for Parsing Alerts from NOAA/NWS

I recently published a ruby client called Gull for parsing alerts from the National Weather Service. The core feature is downloading the alerts from the NWS xml feed and parsing them into objects. These alerts contain tornado warnings as well as a slue of other advisories, watches and warnings that can be issued. Why Gull? It’s the type of bird featured on the NOAA logo, otherwise known as a seagull, which sounds better but was already taken in Ruby Gems.
Read more →

Toxic Technical Debt

There is some debate going on over what exactly technical debt means to a software project. The main issues seem to be what makes up technical debt and whether it should ever be acceptable to take it on. Dirty Code Is Not Technical Debt I do not believe authoring dirty code or code without corresponding tests should be considered technical debt at all. However, I do sympathize in that the debt analogy still makes sense.
Read more →

Working Effectively with Legacy Code

I’m attempting to strengthen a weakness in my knowledge; that weakness is making changes to legacy code with a high degree of confidence. As Michael Feathers puts it in his book Working Effectively with Legacy Code, Legacy code is simply code without corresponding tests. It doesn’t have anything to do with when the code was written or what language it was written in; legacy code is code without tests, often poorly implemented.
Read more →