<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on Andrew Walsh</title><link>https://www.awalsh128.com/posts/</link><description>Recent content in Posts on Andrew Walsh</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><copyright>© 2026 Andrew Walsh</copyright><lastBuildDate>Sat, 21 Nov 2026 00:00:01 -0800</lastBuildDate><atom:link href="https://www.awalsh128.com/posts/feed.xml" rel="self" type="application/rss+xml"/><item><title>Agent Skills for Claude Code</title><link>https://www.awalsh128.com/skills/</link><pubDate>Sat, 21 Nov 2026 00:00:00 -0800</pubDate><guid>https://www.awalsh128.com/skills/</guid><description>Installable skills that apply one set of conventions to READMEs, CI workflows, TypeScript and tests.</description></item><item><title>Cache APT Packages Action v2</title><link>https://www.awalsh128.com/cache-apt-pkgs-action-v2/</link><pubDate>Sat, 21 Nov 2026 00:00:00 -0800</pubDate><guid>https://www.awalsh128.com/cache-apt-pkgs-action-v2/</guid><description>A TypeScript rewrite of the cache-apt-pkgs-action, now in release candidate.</description></item><item><title>GitHub Dev Powerpack</title><link>https://www.awalsh128.com/gh-dev-powerpack/</link><pubDate>Sat, 21 Nov 2026 00:00:00 -0800</pubDate><guid>https://www.awalsh128.com/gh-dev-powerpack/</guid><description>One command copies composable template sets for repo hygiene, releases and CI into a new or existing repo.</description></item><item><title>Regex Explain for VS Code</title><link>https://www.awalsh128.com/vscode-regex-explain/</link><pubDate>Sat, 21 Nov 2026 00:00:00 -0800</pubDate><guid>https://www.awalsh128.com/vscode-regex-explain/</guid><description>Explain a regex in plain English on hover, and get a warning when it can backtrack catastrophically.</description></item><item><title>ts-apt, an APT Library for TypeScript</title><link>https://www.awalsh128.com/ts-apt/</link><pubDate>Sat, 21 Nov 2026 00:00:00 -0800</pubDate><guid>https://www.awalsh128.com/ts-apt/</guid><description>A typed TypeScript library for APT and apt-fast operations on Debian-based Linux systems.</description></item><item><title>Winston Host Adapters</title><link>https://www.awalsh128.com/winston-host-adapters/</link><pubDate>Sat, 21 Nov 2026 00:00:00 -0800</pubDate><guid>https://www.awalsh128.com/winston-host-adapters/</guid><description>Winston loggers for VS Code extensions and GitHub Actions, plus a small interface for any other host.</description></item><item><title>A Safer curl | bash</title><link>https://www.awalsh128.com/safer-curl-bash/</link><pubDate>Wed, 04 Nov 2026 00:00:00 -0800</pubDate><guid>https://www.awalsh128.com/safer-curl-bash/</guid><description>Download a script, check its SHA-256, and only then run it, using tools you already have.</description></item><item><title>Toggling Bluetooth on Linux Login Status</title><link>https://www.awalsh128.com/bt-toggle-linux-logins/</link><pubDate>Wed, 04 Nov 2026 00:00:00 -0800</pubDate><guid>https://www.awalsh128.com/bt-toggle-linux-logins/</guid><description>Automate a way to turn off Bluetooth on logout and turn back on for login.</description></item><item><title>Publishing a VS Code Extension from GitHub</title><link>https://www.awalsh128.com/vscode-ext-publishing-gh/</link><pubDate>Sat, 03 Oct 2026 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/vscode-ext-publishing-gh/</guid><description>&lt;p&gt;I publish my &lt;a href="https://github.com/awalsh128/vscode-keep-sorted" target="_blank" rel="noreferrer"&gt;Keep Sorted extension&lt;/a&gt; to both the&#10;&lt;a href="https://marketplace.visualstudio.com/" target="_blank" rel="noreferrer"&gt;Visual Studio Marketplace&lt;/a&gt; and &lt;a href="https://open-vsx.org/" target="_blank" rel="noreferrer"&gt;Open VSX&lt;/a&gt;. I&#10;wanted releases to come straight out of GitHub Actions instead of my machine. Getting there took more trial&#10;and error than I expected, so here is the setup in a form you can copy into your own extension.&lt;/p&gt;</description></item><item><title>Testing framework for VSCode extension development</title><link>https://www.awalsh128.com/vscode-ext-dev-and-testing/</link><pubDate>Sat, 01 Aug 2026 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/vscode-ext-dev-and-testing/</guid><description>&lt;p&gt;I created a VSCode extension recently&#10;(&lt;a href="https://github.com/awalsh128/vscode-keep-sorted" target="_blank" rel="noreferrer"&gt;awalsh128/vscode-keep-sorted&lt;/a&gt;) and learned a lot of lessons&#10;trying to set up the test environment. What I wanted was:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Tests that run against a real VSCode instance, not mocks.&lt;/li&gt;&#10;&lt;li&gt;An immutable test workspace, so every test starts from the same files.&lt;/li&gt;&#10;&lt;li&gt;A log file per test, so I can see what the extension did when a test fails.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Principles&#10; &lt;div id="principles" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#principles" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;Some things I learned the hard way about testing extensions.&lt;/p&gt;</description></item><item><title>Quick primer on service levels and production strategy</title><link>https://www.awalsh128.com/slos-slis-and-production/</link><pubDate>Thu, 16 Jul 2026 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/slos-slis-and-production/</guid><description>SLIs, SLOs, and SLAs, and how to use them for monitoring, on-call, and incident response.</description></item><item><title>VSCode Keep Sorted Extension</title><link>https://www.awalsh128.com/vscode-keep-sorted/</link><pubDate>Thu, 25 Dec 2025 00:00:00 -0800</pubDate><guid>https://www.awalsh128.com/vscode-keep-sorted/</guid><description>&lt;img src="logo.png" alt="Keep Sorted logo" width="64" height="64"&gt;&#10;&lt;div class="admonition relative overflow-hidden rounded-lg border-l-4 my-3 px-4 py-3 shadow-sm" data-type="note"&gt;&#10; &lt;div class="flex items-center gap-2 font-semibold text-inherit"&gt;&#10; &lt;div class="flex shrink-0 h-5 w-5 items-center justify-center text-lg"&gt;&lt;span class="relative block icon"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"&gt;&lt;path fill="currentColor" d="M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 128c17.67 0 32 14.33 32 32c0 17.67-14.33 32-32 32S224 177.7 224 160C224 142.3 238.3 128 256 128zM296 384h-80C202.8 384 192 373.3 192 360s10.75-24 24-24h16v-64H224c-13.25 0-24-10.75-24-24S210.8 224 224 224h32c13.25 0 24 10.75 24 24v88h16c13.25 0 24 10.75 24 24S309.3 384 296 384z"/&gt;&lt;/svg&gt;&#10;&lt;/span&gt;&lt;/div&gt;&#10; &lt;div class="grow"&gt;&#10; Updated November 2026 for version 1.2.1. This post originally announced the 0.0.1 release in&#10; &lt;/div&gt;&#10; &lt;/div&gt;&lt;div class="admonition-content mt-3 text-base leading-relaxed text-inherit"&gt;&lt;p&gt;December 2025. Commands, settings, and features below reflect the latest version.&lt;/p&gt;</description></item><item><title>Interviews are the Worst</title><link>https://www.awalsh128.com/interviews-are-the-worst/</link><pubDate>Mon, 14 Feb 2022 00:00:00 -0800</pubDate><guid>https://www.awalsh128.com/interviews-are-the-worst/</guid><description>&lt;p&gt;If you have experience in the software engineering field, an interview process can test the experience you&#10;have; projects, production scenarios, designs. Unfortunately, for junior positions and those out of college,&#10;there isn&amp;rsquo;t much to test for. Since most are computer scientists, you could test knowledge of algorithms and&#10;data structures but does that really prove the ability of a candidate? Knowing the upper bound complexity of&#10;an algorithm&amp;rsquo;s runtime is important but what about when a constant multiplying factor means the difference&#10;between production being up and down. We don&amp;rsquo;t have a solution for the Traveling Salesman Problem but we have&#10;very good and practical approximations (e.g. flight scheduling).&lt;/p&gt;</description></item><item><title>Compiler Basics</title><link>https://www.awalsh128.com/compiler-basics/</link><pubDate>Sat, 23 Oct 2021 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/compiler-basics/</guid><description>Introduction of compiler basics using a toy example.</description></item><item><title>Doxygen Themes</title><link>https://www.awalsh128.com/doxygen-themes-release/</link><pubDate>Sat, 23 Oct 2021 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/doxygen-themes-release/</guid><description>Customizable and modernized Doxygen themes.</description></item><item><title>Automated Testing for GitHub Actions</title><link>https://www.awalsh128.com/automated-testing-for-github-actions/</link><pubDate>Tue, 12 Oct 2021 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/automated-testing-for-github-actions/</guid><description>Create a testing harness for your created GitHub Actions.</description></item><item><title>Code Analysis for GitHub Projects</title><link>https://www.awalsh128.com/integrating-lgtm/</link><pubDate>Sun, 10 Oct 2021 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/integrating-lgtm/</guid><description>Integrate your GitHub projects with a code analysis tool.</description></item><item><title>Fluent C++ v0.1 Release</title><link>https://www.awalsh128.com/fluentcpp-v01-release/</link><pubDate>Sat, 09 Oct 2021 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/fluentcpp-v01-release/</guid><description>Fluent style querying for C++.</description></item><item><title>CMake Simple Library Example</title><link>https://www.awalsh128.com/cmake-simple-library/</link><pubDate>Thu, 07 Oct 2021 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/cmake-simple-library/</guid><description>An example of a simple library using CMake.</description></item><item><title>GitHub Actions - Cache APT Packages v1 Released</title><link>https://www.awalsh128.com/github-actions-cache-apt-pkgs-v1-released/</link><pubDate>Sat, 18 Sep 2021 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/github-actions-cache-apt-pkgs-v1-released/</guid><description>A GitHub action to cache APT packages for future workflow runs..</description></item><item><title>C++ validate and throw with a dynamic message in a single line.</title><link>https://www.awalsh128.com/validate-and-throw-with-multi-type-message/</link><pubDate>Fri, 03 Sep 2021 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/validate-and-throw-with-multi-type-message/</guid><description>Assert a condition and throw with a dynamic message in a single line in C++.</description></item><item><title>C++ Memory Semantics for C# and Java Devs</title><link>https://www.awalsh128.com/cpp-memory-semantic-for-csharp-java-devs/</link><pubDate>Mon, 21 Sep 2020 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/cpp-memory-semantic-for-csharp-java-devs/</guid><description>Understanding how memory semantics works in C++ from the perspective of a C# or Java dev.</description></item><item><title>Streaming UUEncoder in .NET.</title><link>https://www.awalsh128.com/streaming-uuencoder-in-net/</link><pubDate>Fri, 24 Apr 2015 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/streaming-uuencoder-in-net/</guid><description>&lt;h3 class="relative group"&gt;Flashback&#10; &lt;div id="flashback" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#flashback" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;The last time I used Unix-to-Unix format (AKA &lt;a href="http://en.wikipedia.org/wiki/Uuencoding" target="_blank" rel="noreferrer"&gt;UUEncoding&lt;/a&gt;) was when&#10;&lt;a href="http://en.wikipedia.org/wiki/Usenet" target="_blank" rel="noreferrer"&gt;USENET&lt;/a&gt; was still the big thing and&#10;&lt;a href="http://en.wikipedia.org/wiki/Mosaic_%28web_browser%29" target="_blank" rel="noreferrer"&gt;Mosaic web browser&lt;/a&gt; was just coming out. That was&#10;until recently, when I had a requirement to encode and decode this file type.&lt;/p&gt;</description></item><item><title>Get Windows Service name from executable in PowerShell.</title><link>https://www.awalsh128.com/get-windows-service-name-from/</link><pubDate>Mon, 20 Apr 2015 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/get-windows-service-name-from/</guid><description>&lt;p&gt;I was recently putting some PowerShell scripts together for deployment and maintenance of software to our&#10;machine instances. One of the requirements was to be able to discover the service name from a Windows Service&#10;executable that uses&#10;&lt;a href="https://msdn.microsoft.com/en-us/library/system.serviceprocess.serviceinstaller%28v=vs.110%29.aspx" target="_blank" rel="noreferrer"&gt;ServiceInstaller&lt;/a&gt;.&#10;I needed to be able to extract this value in a generic way in order to query the service and stop it if&#10;running. Here is what I was able to put together.&lt;/p&gt;</description></item><item><title>Log per class pattern.</title><link>https://www.awalsh128.com/log-per-class-pattern/</link><pubDate>Sun, 29 Mar 2015 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/log-per-class-pattern/</guid><description>&lt;h3 class="relative group"&gt;Rookie Moves&#10; &lt;div id="rookie-moves" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#rookie-moves" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;Awhile ago, I had originally created a single logger for each service and shared it statically across the&#10;application.&lt;/p&gt;</description></item><item><title>Creating XML based templates in log4net.</title><link>https://www.awalsh128.com/creating-xml-based-templates-in-log4net/</link><pubDate>Sat, 28 Mar 2015 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/creating-xml-based-templates-in-log4net/</guid><description>&lt;h3 class="relative group"&gt;Motivation&#10; &lt;div id="motivation" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#motivation" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;I decided to use &lt;a href="https://logging.apache.org/log4net/" target="_blank" rel="noreferrer"&gt;log4net&lt;/a&gt; for a recent project I had been working on.&#10;There is a concept of &lt;a href="https://logging.apache.org/log4net/release/manual/configuration.html#loggers" target="_blank" rel="noreferrer"&gt;loggers&lt;/a&gt;&#10;and &lt;a href="https://logging.apache.org/log4net/release/manual/configuration.html#appenders" target="_blank" rel="noreferrer"&gt;appenders&lt;/a&gt;. Loggers are&#10;composed of appenders and a log threshold. Appenders are consumers of logging information and provide specific&#10;implementations (eg. file, email, event log, database). You can configure the loggers and appenders either in&#10;the &lt;a href="https://logging.apache.org/log4net/release/manual/configuration.html" target="_blank" rel="noreferrer"&gt;application configuration&lt;/a&gt; or&#10;&lt;a href="http://www.roelvanlisdonk.nl/?p=723" target="_blank" rel="noreferrer"&gt;at runtime&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Using type converters for JSON.NET.</title><link>https://www.awalsh128.com/using-type-converters-for-jsonnet/</link><pubDate>Sat, 28 Mar 2015 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/using-type-converters-for-jsonnet/</guid><description>&lt;h3 class="relative group"&gt;Motivation&#10; &lt;div id="motivation" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#motivation" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;I had these &lt;a href="http://en.wikipedia.org/wiki/Flyweight_pattern" target="_blank" rel="noreferrer"&gt;flyweights&lt;/a&gt; that added a lot of overhead to the&#10;&lt;a href="http://en.wikipedia.org/wiki/Serialization" target="_blank" rel="noreferrer"&gt;serialization&lt;/a&gt; process. They weren't really needed in the&#10;serialized payload either. In fact, I could recreate the flyweight in memory from just a single property on&#10;the object.&lt;/p&gt;</description></item><item><title>Using CC.NET &amp; Gallio for priority based smoke testing.</title><link>https://www.awalsh128.com/using-ccnet-gallio-for-priority-based/</link><pubDate>Fri, 17 Oct 2014 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/using-ccnet-gallio-for-priority-based/</guid><description>&lt;h3 class="relative group"&gt;Pitfalls in Production&#10; &lt;div id="pitfalls-in-production" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#pitfalls-in-production" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;Being able to monitor&#10;&lt;a href="http://en.wikipedia.org/wiki/Development_environment_%28software_development_process%29" target="_blank" rel="noreferrer"&gt;production&lt;/a&gt; services&#10;for potential errors is critical. Especially if the services are dependant on external resources which may&#10;become unavailable or exhibit unexpected behavior. Even if you follow good software development discipline,&#10;this is always a source of concern. Think network outages, unannounced third party API changes, hosted&#10;services becoming unavailable, etc.&lt;/p&gt;</description></item><item><title>State behavioral pattern to the rescue.</title><link>https://www.awalsh128.com/state-behavioral-pattern-to-rescue/</link><pubDate>Mon, 17 Mar 2014 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/state-behavioral-pattern-to-rescue/</guid><description>&lt;h3 class="relative group"&gt;The Creeping Problem&#10; &lt;div id="the-creeping-problem" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-creeping-problem" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;I recently found myself developing a request-response style system, where the lifetime of a request could be&#10;interrupted at any moment. For most same process execution, like your average desktop application, this is a&#10;concern, but arises more often when dealing with multiple coordinated processes. My case ended up being the&#10;latter.&lt;/p&gt;</description></item><item><title>Understanding type theory (Part one: Lambda Calculus).</title><link>https://www.awalsh128.com/understanding-type-theory-part-one/</link><pubDate>Sun, 14 Apr 2013 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/understanding-type-theory-part-one/</guid><description>&lt;h3 class="relative group"&gt;Series Introduction&#10; &lt;div id="series-introduction" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#series-introduction" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;I initially was going to put this together as a single post but quickly realized that it would be a bit much&#10;to try and put all of the information into one post. To make it more digestable, I decided to break it up into&#10;separate parts. This is by no means a comprehensive study of lambda calculus or type theory, but rather a&#10;quick introductory series so you can can get started. My goal is that, by the end, you will be able to&#10;understand enough to start reading papers on your own and have some cursory knowledge of type systems. Also, I&#10;am targeting programmers that want to get a better understanding of the theory behind type systems in compiler&#10;design. If you are comfortable programming in functional languages, then you will start to see many parallels&#10;quickly. Although, I will give examples using an imperative approach to cover programmers who may not&#10;immediately appreciate these parallels.&lt;/p&gt;</description></item><item><title>PCAP-NG reader for .NET.</title><link>https://www.awalsh128.com/pcap-ng-reader-for-net/</link><pubDate>Wed, 10 Apr 2013 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/pcap-ng-reader-for-net/</guid><description>&lt;h3 class="relative group"&gt;Introduction &amp;amp; Scope&#10; &lt;div id="introduction--scope" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#introduction--scope" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;The PCAP-NG file format is used to store network captured data used by great programs like&#10;&lt;a href="http://www.wireshark.org/download.html" target="_blank" rel="noreferrer"&gt;Wireshark&lt;/a&gt;. There are several API's available for both&#10;&lt;a href="http://www.tcpdump.org/" target="_blank" rel="noreferrer"&gt;Linux&lt;/a&gt; and &lt;a href="http://www.winpcap.org/" target="_blank" rel="noreferrer"&gt;Windows&lt;/a&gt; but none that are ported to .NET. I&#10;decided to &lt;a href="https://github.com/awalsh128/PcapngFile/" target="_blank" rel="noreferrer"&gt;make one&lt;/a&gt; for my own use in building a network traffic&#10;replay agent.&lt;/p&gt;</description></item><item><title>Automated combinatorial and spot testing of web service operations.</title><link>https://www.awalsh128.com/automated-combinatorial-and-spot/</link><pubDate>Tue, 26 Mar 2013 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/automated-combinatorial-and-spot/</guid><description>&lt;h3 class="relative group"&gt;Introduction &amp;amp; Scope&#10; &lt;div id="introduction--scope" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#introduction--scope" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;When developing a new web service, you may need to do an initial spot test walk through the operations or try&#10;to break the service based on the permissible data type values. You could hand craft all the operations, with&#10;their respective arguments, into a handful of URLs but that would seem pretty inefficient. I found myself in a&#10;similar situation and wanted a programmatic way to walk through the service operations with a specific input&#10;data set. To be clear, I am not attempting to recreate a&#10;&lt;a href="http://www.soapui.org/" target="_blank" rel="noreferrer"&gt;full web service testing application&lt;/a&gt; but rather a simple script to spot check&#10;responses and catch any bugs in a web service endpoint's handler.&lt;/p&gt;</description></item><item><title>Text generation using Markov chains.</title><link>https://www.awalsh128.com/text-generation-using-markov-chains/</link><pubDate>Fri, 04 Jan 2013 00:00:00 -0800</pubDate><guid>https://www.awalsh128.com/text-generation-using-markov-chains/</guid><description>&lt;h3 class="relative group"&gt;Introduction&#10; &lt;div id="introduction" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#introduction" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;If you are already familiar with &lt;a href="http://en.wikipedia.org/wiki/Finite-state_machine" target="_blank" rel="noreferrer"&gt;finite automata&lt;/a&gt;, then&#10;understanding a &lt;a href="http://en.wikipedia.org/wiki/Markov_chain" target="_blank" rel="noreferrer"&gt;Markov chain&lt;/a&gt; will not be as hard. If you are not&#10;familiar with one, you can think of finite automata as a &lt;a href="http://en.wikipedia.org/wiki/Flowchart" target="_blank" rel="noreferrer"&gt;flowchart&lt;/a&gt;,&#10;with states and paths leading from one state to another&#10;&lt;a href="http://xkcd.com/627/" target="_blank" rel="noreferrer"&gt;based on some decision being made&lt;/a&gt;. An example could be a room with a light switch;&#10;there are the two states of having the light on or off. Using the light switch will transition you between the&#10;two states.&lt;/p&gt;</description></item><item><title>Reading and writing large binary data in T-SQL and ADO.NET.</title><link>https://www.awalsh128.com/reading-and-writing-large-binary-data/</link><pubDate>Wed, 03 Oct 2012 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/reading-and-writing-large-binary-data/</guid><description>&lt;h3 class="relative group"&gt;Introduction&#10; &lt;div id="introduction" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#introduction" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;In some cases, you may want to read/write binary data from/to your relational database. This can be a problem&#10;when the data set size exceeds the memory address size (eg. 32-bit processes) or the&#10;&lt;a href="http://msdn.microsoft.com/en-us/magazine/cc534993.aspx" target="_blank" rel="noreferrer"&gt;managed large object heap&lt;/a&gt; cannot load it all without&#10;throwing an &lt;a href="http://msdn.microsoft.com/en-us/library/system.outofmemoryexception.aspx" target="_blank" rel="noreferrer"&gt;OutOfMemoryException&lt;/a&gt;.&#10;In those cases, you will need to load the data into memory in chunks. Fortunately, the&#10;&lt;a href="http://en.wikipedia.org/wiki/Transact-SQL" target="_blank" rel="noreferrer"&gt;T-SQL&lt;/a&gt; syntax supports this operation.&lt;/p&gt;</description></item><item><title>Understanding compression and Huffman Coding.</title><link>https://www.awalsh128.com/understanding-compression-and-huffman/</link><pubDate>Thu, 20 Sep 2012 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/understanding-compression-and-huffman/</guid><description>&lt;h3 class="relative group"&gt;Definitions&#10; &lt;div id="definitions" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#definitions" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;In a lot of texts regarding compression you will run across various conventions of syntax to describe the&#10;coding of data. Much of them are used in fields like&#10;&lt;a href="http://en.wikipedia.org/wiki/Automata_theory" target="_blank" rel="noreferrer"&gt;automata theory&lt;/a&gt;, group theory and statistics. Although, the&#10;field of &lt;a href="http://en.wikipedia.org/wiki/Coding_theory" target="_blank" rel="noreferrer"&gt;coding theory&lt;/a&gt; itself has&#10;&lt;a href="http://en.wikipedia.org/wiki/Timeline_of_information_theory" target="_blank" rel="noreferrer"&gt;a long and rich history&lt;/a&gt; in the 20st century;&#10;much of the terminology is borrowed from fields that gave rise to it.&lt;/p&gt;</description></item><item><title>IMAPI version 2 managed wrapper.</title><link>https://www.awalsh128.com/imapi-version-2-managed-wrapper/</link><pubDate>Tue, 18 Sep 2012 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/imapi-version-2-managed-wrapper/</guid><description>&lt;h3 class="relative group"&gt;Introduction&#10; &lt;div id="introduction" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#introduction" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;Microsoft&#10;&lt;a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa366450%28v=vs.85%29.aspx" target="_blank" rel="noreferrer"&gt;introduced native image mastering&lt;/a&gt;&#10;support in Vista, going forward. The library itself is not too complex but the latest version of the&#10;&lt;a href="http://en.wikipedia.org/wiki/Image_Mastering_API" target="_blank" rel="noreferrer"&gt;image mastering API (IMAPI)&lt;/a&gt; has some quirks. This is well&#10;documented by &lt;a href="http://www.codeproject.com/script/Membership/View.aspx?mid=208197" target="_blank" rel="noreferrer"&gt;Eric Haddan&lt;/a&gt; in his&#10;&lt;a href="http://www.codeproject.com/Articles/24544/Burning-and-Erasing-CD-DVD-Blu-ray-Media-with-C-an" target="_blank" rel="noreferrer"&gt;article&lt;/a&gt;&#10;describing how to build an interop file and use it from .NET.&lt;/p&gt;</description></item><item><title>Implementing a bit reader/writer in C.</title><link>https://www.awalsh128.com/implementing-bit-readerwriter-in-c/</link><pubDate>Thu, 13 Sep 2012 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/implementing-bit-readerwriter-in-c/</guid><description>&lt;h3 class="relative group"&gt;Introduction&#10; &lt;div id="introduction" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#introduction" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;I was working on implementing a simple compression tool based on naive&#10;&lt;a href="http://en.wikipedia.org/wiki/Huffman_coding" target="_blank" rel="noreferrer"&gt;Huffman coding&lt;/a&gt; and initially assumed all of my&#10;&lt;a href="http://en.wikipedia.org/wiki/Prefix_code" target="_blank" rel="noreferrer"&gt;prefix codes&lt;/a&gt; would be at or under a byte long. Although I failed&#10;to account for the&#10;&lt;a href="http://www.arturocampos.com/ac_fib_huffman.html#Fibbonaci%20and%20Huffman" target="_blank" rel="noreferrer"&gt;worst case of Huffman coding&lt;/a&gt;,&#10;which can yield codes up to 255 bits in length.&lt;/p&gt;</description></item><item><title>Licensing using XML digital signing.</title><link>https://www.awalsh128.com/licensing-using-xml-digital-signing/</link><pubDate>Tue, 14 Aug 2012 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/licensing-using-xml-digital-signing/</guid><description>&lt;h3 class="relative group"&gt;Motivation&#10; &lt;div id="motivation" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#motivation" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;One of the main concerns in any licensing implementation is that authored license files are coming from the&#10;trusted authority (ie. your company) and not some third party. This can be accomplished in software by&#10;encrypting and decrypting the license with a&#10;&lt;a href="http://en.wikipedia.org/wiki/Symmetric-key_algorithm" target="_blank" rel="noreferrer"&gt;single key&lt;/a&gt;, but symmetric&#10;&lt;a href="http://en.wikipedia.org/wiki/Key_management" target="_blank" rel="noreferrer"&gt;key storage&lt;/a&gt; can be cumbersome and have added complexity.&lt;/p&gt;</description></item><item><title>Automate IIS enable on Windows 7.</title><link>https://www.awalsh128.com/automate-iis-enable-on-windows-7/</link><pubDate>Mon, 30 Jul 2012 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/automate-iis-enable-on-windows-7/</guid><description>&lt;h3 class="relative group"&gt;Background&#10; &lt;div id="background" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#background" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;There are plenty of sites that will tell you how to enable IIS through the Control Panel. Although, if you are&#10;tasked with enabling IIS automatically (eg. for an installer), it can be a nightmare. This is only really&#10;needed though in special cases where the installer has more control over the hardware specifications.&#10;Determining an upgrade or uninstall scenario with IIS can be very tough since you are not installing your own&#10;software but rather enabling a feature of Windows. With that in mind, we can propose a solution for automated&#10;enabling of IIS.&lt;/p&gt;</description></item><item><title>Converting thermocouple voltages to temperature.</title><link>https://www.awalsh128.com/converting-thermocouple-voltages-to/</link><pubDate>Wed, 25 Jul 2012 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/converting-thermocouple-voltages-to/</guid><description>&lt;h3 class="relative group"&gt;Background&#10; &lt;div id="background" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#background" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;Unlike most sensors used in data acquisition, thermocouples do not have a linear mapping between their voltage&#10;and celcius values. This means that instead of factoring some scalar value against the data, in order to scale&#10;it to engineering units (eg. volts to acceleration), an&#10;&lt;a href="http://en.wikipedia.org/wiki/Thermocouple#Voltage.E2.80.93temperature_relationship" target="_blank" rel="noreferrer"&gt;experimentally derived equation&lt;/a&gt;&#10;must be created to approximate the temperature at specific voltages. This non-linearity is primarily due to&#10;the materials being used to discover the temperature difference.&lt;/p&gt;</description></item><item><title>Bit specific builds in Visual Studio 2010.</title><link>https://www.awalsh128.com/bit-specific-builds-in-visual-studio/</link><pubDate>Mon, 23 Apr 2012 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/bit-specific-builds-in-visual-studio/</guid><description>&lt;h2 class="relative group"&gt;Using Conditioned Tags&#10; &lt;div id="using-conditioned-tags" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#using-conditioned-tags" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;The Visual Studio 2010 UI does not have options to handle conditional references based on what kind of&#10;configuration and platform you are running. For example, you may have a project reference that needs to change&#10;depending on whether you are doing a 32 or 64 bit build.&lt;/p&gt;</description></item><item><title>WPF and data multithreading deadlocks.</title><link>https://www.awalsh128.com/wpf-and-data-multithreading-deadlocks/</link><pubDate>Wed, 21 Dec 2011 00:00:00 -0800</pubDate><guid>https://www.awalsh128.com/wpf-and-data-multithreading-deadlocks/</guid><description>&lt;h2 class="relative group"&gt;WPF &amp;amp; Multithreading&#10; &lt;div id="wpf--multithreading" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#wpf--multithreading" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;In designing applications, it may be advantageous to run data processing methods on a separate thread from the&#10;UI. This allows greater responsiveness in the application and takes advantage of concurrent computation.&lt;/p&gt;</description></item><item><title>Tips for Java performance on Android.</title><link>https://www.awalsh128.com/tips-for-java-performance-on-android/</link><pubDate>Fri, 16 Dec 2011 00:00:00 -0800</pubDate><guid>https://www.awalsh128.com/tips-for-java-performance-on-android/</guid><description>&lt;p&gt;While Java may be a higher level language that makes code writeability easier, conventions must be broken when&#10;developing on Android to reap performance gains. This is especially true for games where logic and rendering&#10;must be done on a tight loop.&lt;/p&gt;</description></item><item><title>POCO not transforming into a POCO proxy.</title><link>https://www.awalsh128.com/poco-not-transforming-into-poco-proxy/</link><pubDate>Mon, 07 Nov 2011 00:00:00 -0800</pubDate><guid>https://www.awalsh128.com/poco-not-transforming-into-poco-proxy/</guid><description>&lt;p&gt;A POCO (Plain Old CLR Object) must be transformed into a POCO proxy&lt;br&gt;&#10;[MyNamespace.MyClass -&amp;gt;{System.Data.Entity.DynamicProxies.MyClass_0A943C2FC37D33304CEB497A9210C754E3F553B50315F8E6F0F7A6FAF43777F2}]{.Apple-style-span&#10;style=&amp;ldquo;font-size: x-small;&amp;rdquo;})&lt;br&gt;&#10;in order for features like lazy loading and change tracking to work.&lt;br&gt;&#10;&lt;br&gt;&#10;&lt;a href="http://msdn.microsoft.com/en-us/library/dd468057.aspx" target="_blank" rel="noreferrer"&gt;MSDN has a great article&lt;/a&gt; that explains how to prepare&#10;a POCO to be transformed into a proxy. If you find that an object retrieved or attached to the context does&#10;not show itself in the DynamicProxies namespace (eg. MyNamespace.MyClass instead of&#10;...DynamicProxies.MyClass), then you probably don't have a compliant class. You may have noticed this&#10;already when hovering your mouse cursor over an instance and seeing the runtime information on it.&lt;br&gt;&#10;&lt;br&gt;&#10;The distilled points are that your POCO must:&lt;/p&gt;</description></item><item><title>Detecting cycles in decimal digits and lists.</title><link>https://www.awalsh128.com/detecting-cycles-in-decimal-digits-and/</link><pubDate>Sun, 16 Oct 2011 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/detecting-cycles-in-decimal-digits-and/</guid><description>&lt;p&gt;I was recently working on solving &lt;a href="http://projecteuler.net/problem=64" target="_blank" rel="noreferrer"&gt;problem 64 for project Euler&lt;/a&gt; and one&#10;of the needed algorithms was a detection of cycles in a list. This routine works for detecting cycles in lists&#10;of cardinality greater than 2.&lt;br&gt;&#10;\&lt;/p&gt;</description></item><item><title>Entity Framework June 2011 CTP Bug</title><link>https://www.awalsh128.com/entity-framework-june-2011-ctp-bug/</link><pubDate>Sat, 08 Oct 2011 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/entity-framework-june-2011-ctp-bug/</guid><description>&lt;p&gt;I recently installed the Entity Framework June 2011 CTP to preview the enum support but ran into a bug along&#10;the way that reported an error while processing the template.&lt;br&gt;&#10;\&lt;/p&gt;</description></item><item><title>EF 4.1 Code First: Many one-to-one properties for same class type on an object.</title><link>https://www.awalsh128.com/ef-41-code-first-many-one-to-one/</link><pubDate>Wed, 05 Oct 2011 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/ef-41-code-first-many-one-to-one/</guid><description>&lt;p&gt;I just started using the Entity Framework recently to employ persistence for an already established code base.&#10;Initially I was using the &amp;quot;Model &amp;amp; Database First&amp;quot; paradigm where a designer is used to layout the data&#10;model. Although, this ended up being tedious since my&#10;&lt;a href="http://en.wikipedia.org/wiki/Plain_Old_CLR_Object" target="_blank" rel="noreferrer"&gt;POCO&lt;/a&gt; instance had to exactly match the&#10;&lt;a href="http://msdn.microsoft.com/en-us/library/dd456853.aspx" target="_blank" rel="noreferrer"&gt;POCO proxy&lt;/a&gt; instance in my model designer view. After&#10;upgrading to EF 4.1, I realized the&#10;&lt;a href="http://blogs.msdn.com/b/adonet/archive/2011/09/13/ef-code-first-fluent-api-with-vb-net.aspx" target="_blank" rel="noreferrer"&gt;&amp;quot;Code First&amp;quot; paradigm&lt;/a&gt;&#10;was the way to go since I had to adapt the persistence model to my already existing code.&lt;br&gt;&#10;&lt;br&gt;&#10;One of the earliest problems that I ran into was having more than one property on a class that referenced the&#10;same class type. This example was taken from&#10;&lt;a href="http://weblogs.asp.net/manavi/archive/2011/03/28/associations-in-ef-4-1-code-first-part-2-complex-types.aspx" target="_blank" rel="noreferrer"&gt;a great site&lt;/a&gt;&#10;that explored the different EF properties.&lt;br&gt;&#10;[]{.Apple-style-span style=&amp;ldquo;background-color: #f8f8f8; color: #2e2e2e; font-family: &amp;lsquo;Courier New&amp;rsquo;, Courier,&#10;mono; font-size: 12px;&amp;rdquo;}\&lt;/p&gt;</description></item><item><title>Pseudo random proportional scheduling in games.</title><link>https://www.awalsh128.com/pseudo-random-proportional-scheduling/</link><pubDate>Fri, 02 Sep 2011 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/pseudo-random-proportional-scheduling/</guid><description>&lt;p&gt;I have been working on a game where enemy characters must select a target seemingly at random but such that&#10;the distribution of selected targets is balanced. Initially I had come up with a randomization algorithm with&#10;weighted values for each target but this became cumbersome and much too complex.&lt;br&gt;&#10;&lt;br&gt;&#10;Then I remembered the scheduling algorithms from my Operating Systems class. In particular, the&#10;&lt;a href="http://en.wikipedia.org/wiki/Lottery_scheduling" target="_blank" rel="noreferrer"&gt;lottery scheduling algorithm&lt;/a&gt;.&lt;br&gt;&#10;\&lt;/p&gt;</description></item><item><title>Writing a TEDS (IEEE 1451.4) parser.</title><link>https://www.awalsh128.com/writing-teds-ieee-14514-parser/</link><pubDate>Wed, 17 Aug 2011 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/writing-teds-ieee-14514-parser/</guid><description>&lt;p&gt;I was tasked recently with writing a parser for TEDS bit stream data. There is an&#10;&lt;a href="http://standards.ieee.org/develop/regauth/tut/teds.pdf" target="_blank" rel="noreferrer"&gt;IEEE published paper&lt;/a&gt; with an overview of the&#10;standard but it doesn't give any examples for implementation. I was finally able to find a&#10;&lt;a href="http://standards.ieee.org/develop/regauth/tut/tdl.pdf" target="_blank" rel="noreferrer"&gt;paper&lt;/a&gt; that gave examples but still had trouble&#10;parsing the data. I finally realized there is not only 2 selector bits after the basic TEDS block but selector&#10;bits inside the standard template (2 in the case of template 25). Here are my main findings:&lt;br&gt;&#10;\&lt;/p&gt;</description></item><item><title>Reentrant lock acquires in CLR.</title><link>https://www.awalsh128.com/reentrant-lock-acquires-in-clr/</link><pubDate>Fri, 29 Jul 2011 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/reentrant-lock-acquires-in-clr/</guid><description>&lt;p&gt;I always like when a post gets to the point (especially after searching in Google). In short,&#10;&lt;em&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms741870.aspx" target="_blank" rel="noreferrer"&gt;if you perform an operation that waits to acquire a lock, the thread doesn't actually stop&lt;/a&gt;&lt;/em&gt;.&lt;br&gt;&#10;&lt;br&gt;&#10;In&#10;concrete terms of .NET coding, if you call the&#10;&lt;a href="http://msdn.microsoft.com/en-us/library/system.threading.waithandle.waitone.aspx" target="_blank" rel="noreferrer"&gt;WaitOne&lt;/a&gt; method on a&#10;thread, it may still process events that the CLR deems &amp;quot;high priority&amp;quot;. This can be a big problem if the&#10;event handlers go into the critical region you are trying to protect.&lt;br&gt;&#10;\&lt;/p&gt;</description></item><item><title>Namespaces for classes.</title><link>https://www.awalsh128.com/namespace-within-classes/</link><pubDate>Fri, 22 Jul 2011 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/namespace-within-classes/</guid><description>&lt;p&gt;When designing classes for outside use (eg. API) or as a library component for multiple applications,&#10;readability and easy element (field/function) selection is important. No developer likes hunting around for&#10;fields or functions; a legible and hierarchical organization of elements aids quicker turnaround time in code&#10;delivery.&lt;br&gt;&#10;&lt;br&gt;&#10;In some cases, a large class is needed that can possibly contain dozens or hundreds of elements. Naming&#10;convention can aid in this organization (ie. using common prefixes in field/function names) but are not&#10;inherent to the grammar of languages. Therefore, no semantic advantage can be taken from using these&#10;conventions.&lt;br&gt;&#10;&lt;br&gt;&#10;&lt;code&gt;class Store   ItemList clothingMensShirts   ItemList clothingMensShoes   ...   ItemList clothingWomensShirts   ItemList clothingWomensShoes   ...   ItemList hardwareToolsWrenches   ...   ItemList hardwareMaterialsWood   ...   ItemList electronicsGamesPCFallout3Copies   ...   ItemList electronicsAudioHeadphones   ...&lt;/code&gt;&lt;br&gt;&#10;&lt;br&gt;&#10;The current solution to the management of large classes is by using publicly exposed nested classes.&lt;br&gt;&#10;&lt;br&gt;&#10;&lt;code&gt;class Clothing inherits Department   ClothingSection mens   ...class Mens inherits ClothingSection   ItemList shirt   ItemList shoes   ...abstract class Store   ...   Department clothing   ...class IKEA inherits Store   ...IKEA newYorkStore = new IKEA();newYorkStore.buy(newYorkStore.clothing.mens.shirts[0]);&lt;/code&gt;&lt;br&gt;&#10;&lt;br&gt;&#10;This is a possible solution but also comes with it's own problems. Encapsulation of the nested class will not&#10;only hide information from the public user but also from the parent class as well. This can be problematic&#10;when designing an abstract class where the functions, that must be implemented, must also access non-public&#10;elements inside the nested. For example, in the store example, any data the top level class (Store) may want&#10;to access from the lower level ones (ClothingSection, ItemList) will be unavailable if that data must also be&#10;hidden from the public user.&lt;br&gt;&#10;&lt;br&gt;&#10;Also, the nested classes cannot be abstracted to require implementation from any inheriting class. Revisting&#10;the store example, this means that abstracting the ClothingSection class would require two new classes for one&#10;implementation. Creating not only a child Store but also a child ClothingSection class.&lt;br&gt;&#10;&lt;br&gt;&#10;Nested classes are helpful for creating logical hierarchies within a class or providing abstract functionality&#10;privately inside the class. Although, I would propose the use of namespacing inside a class instead. It would&#10;provide the logical hierarchy needed in a very simple way and allow for information sharing across the entire&#10;domain of the class. It would need a separate keyword though to prevent use outside of classes.&lt;br&gt;&#10;&lt;br&gt;&#10;&lt;code&gt;class Storeclassnamespace clothing   classnamespace mens      ItemList shirts      ItemList shoes      ...   ...   classnamespace womens      ItemList shirts      ItemList shoes      ...   ...   classnamespace hardware      classnamespace tools         ItemList wrenches         ...      ...      classnamespace materials         ItenList Wood         ...      ...   ...&lt;/code&gt;&lt;/p&gt;</description></item><item><title>Delete long file path names.</title><link>https://www.awalsh128.com/delete-long-file-path-names/</link><pubDate>Tue, 19 Jul 2011 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/delete-long-file-path-names/</guid><description>&lt;p&gt;I made the stupid mistake of importing an Eclipse project into my workspace when&#10;the &lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=279781" target="_blank" rel="noreferrer"&gt;import location was from the workspace itself&lt;/a&gt;. I&#10;went to delete the recursive folder when I encountered an error that the file path name was too long to&#10;delete.&lt;br&gt;&#10;&lt;br&gt;&#10;The &lt;a href="http://stackoverflow.com/questions/236533/how-do-you-automate-copying-file-with-path-too-deep-issues-in-windows" target="_blank" rel="noreferrer"&gt;best manual solution&lt;/a&gt;&#10;that I found was to go as deep as possible in the recursive folder and then map it to a virtual drive.&lt;br&gt;&#10;[&lt;br&gt;&#10;]{.Apple-style-span style=&amp;ldquo;font-family: &amp;lsquo;Courier New&amp;rsquo;, Courier, monospace;&amp;rdquo;}&lt;br&gt;&#10;[subst x: c:\recursiveFolder\]{.Apple-style-span style=&amp;ldquo;font-family: &amp;lsquo;Courier New&amp;rsquo;, Courier,&#10;monospace;&amp;rdquo;}[recursiveFolder\]{.Apple-style-span style=&amp;ldquo;font-family: &amp;lsquo;Courier New&amp;rsquo;, Courier,&#10;monospace;&amp;rdquo;}[recursiveFolder\...]{.Apple-style-span style=&amp;ldquo;font-family: &amp;lsquo;Courier New&amp;rsquo;, Courier,&#10;monospace;&amp;rdquo;}&lt;br&gt;&#10;[&lt;br&gt;&#10;]{.Apple-style-span style=&amp;ldquo;font-family: inherit;&amp;rdquo;}&lt;br&gt;&#10;[This can be quite an arduous process; I found myself creating up to 9 virtual drives. It eventually worked&#10;though and I was able to delete the recursive folder.]{.Apple-style-span style=&amp;ldquo;font-family: inherit;&amp;rdquo;}&lt;br&gt;&#10;[&lt;br&gt;&#10;]{.Apple-style-span style=&amp;ldquo;font-family: inherit;&amp;rdquo;}&lt;br&gt;&#10;[I also&#10;&lt;a href="http://processors.wiki.ti.com/index.php/Recursive_Directory_Bug_in_Eclipse_Project_Import" target="_blank" rel="noreferrer"&gt;found a site&lt;/a&gt; with&#10;a Perl script that deletes long file paths but haven't tested it myself.]{.Apple-style-span&#10;style=&amp;ldquo;font-family: inherit;&amp;rdquo;}&lt;/p&gt;</description></item><item><title>Representing scientific units in code.</title><link>https://www.awalsh128.com/representing-scientific-units-in-code/</link><pubDate>Wed, 13 Jul 2011 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/representing-scientific-units-in-code/</guid><description>&lt;p&gt;I have been working on implementing a stream reader for&#10;&lt;a href="http://standards.ieee.org/develop/regauth/tut/teds.pdf" target="_blank" rel="noreferrer"&gt;IEEE 1451.4 TEDS&lt;/a&gt; and came across this interesting&#10;&lt;a href="http://www.hpl.hp.com/techreports/96/HPL-96-61.pdf" target="_blank" rel="noreferrer"&gt;paper&lt;/a&gt; regarding representation of scientific units in&#10;code. It provides solutions to determining unit equivalency (eg. V/(m•kg/s²) = m/(s•A)). Also discovered some&#10;indivisible base units that can represent any unit (amp, candela, kelvin, gram, meter, mole, radian, second).&#10;With a bit to represent the placement (high for numerator, low for denominator) and a bit for presence, a unit&#10;storage type can be derived that only occupies 2 bytes.&lt;/p&gt;</description></item><item><title>Using Ubuntu 10.04 with SVN+HTTP.</title><link>https://www.awalsh128.com/using-ubuntu-1004-with-svnhttp/</link><pubDate>Wed, 13 Jul 2011 00:00:00 -0700</pubDate><guid>https://www.awalsh128.com/using-ubuntu-1004-with-svnhttp/</guid><description>&lt;p&gt;I setup a server recently using Ubuntu 10.04. LAMP was easy to configure, as was Subversion. Although making&#10;Subversion and Apache2 play nice together with DAV SVN was a nightmare. I followed the&#10;&lt;a href="https://help.ubuntu.com/10.04/serverguide/C/subversion.html" target="_blank" rel="noreferrer"&gt;guide provided&lt;/a&gt; but the website location just&#10;kept reprompting for my login.&lt;br&gt;&#10;&lt;br&gt;&#10;After hours of running in circles, I was able to find the solution. The &lt;em&gt;Require valid-user&lt;/em&gt; directive in&#10;/etc/apache2/mods-available/dav_svn.conf &lt;a href="http://www.linuxquestions.org/questions/showthread.php?p=4413943#post4413943" target="_blank" rel="noreferrer"&gt;required the Limit directive&lt;/a&gt;&#10;to be around it.&lt;br&gt;&#10;\&lt;/p&gt;</description></item></channel></rss>