The blog is currently being ported from WordPress to over 12 years of static pages of content. If there's an article missing that you're hoping to see, please contact me and let me know and I'll prioritize getting it online.

Search and Replace in Bash script

I recently had a colleague ask me how to do in-line regular expression matching for a Bash shell script. Since Bash v3 only offers a regex matching check and not the full s/foo/bar/ regex syntax, I offered to look into other alternatives. My natural instinct was to look for a Perl cmdline regex parser, which works great if you’re manipulating a file and not shell variables. In the end, since he only needed a simple search and replace, and not an actual regular express, this sufficed:

Continue Reading

multi-threaded Perl, I've missed you...

When I was a senior engineer at The Rubicon Project, I inherited some Perl code to analyze log data for online advertising impressions. It eventually hit a maximum on the multi-core systems I had at my disposal and so rewrote my code to use threads. In Perl. Yes, you read that correctly. It was actually one of my prouder engineering feats in my career, to scale some software that could analyze a few million ad impressions per day to scale up to handling more than a billion data points per day.

Continue Reading