The MEIPO Framework

I made this up out of whole cloth to help someone with mock interviews, but I think it’s broadly applicable to a lot of situations, particularly interview questions or technical conversations.  The idea is to work through goals from a high level to a nitpicky level of detail in an orderly way. Let’s say someone […]

How to manage Windows services with Salt

Suppose, not entirely hypothetically, that you need to manage a Windows service with Salt. You’re grabbing an executable from, I don’t know, say GitHub, and you want to be able to easily upgrade the service. You might start with something like this (I’m omitting other stuff you need to set up the service): windows_service_exe_file: file.managed: […]

On writing résumés

I know that the market is hot, especially in the tech business.  Regardless of industry, background, or skillset, you need to answer to one important question: How do you add value? This isn’t difficult.  Include a “summary” or “objective” section.  Tell me what you’re about.  How do you solve problems?  Do you like to dive […]

Online reviews are a scam

This may come as no surprise to many folks. And I’m fairly sure that Google won’t exactly promote the facts, or this post. But it’s true: try writing a truthful negative review for a business you’ve had problems with. I’ll bet you it gets hidden. But of course, Google won’t tell you that it’s hidden. […]

Black-Scholes functions for Google Sheets

// THANK YOU! brazenly stolen from https://www.math.ucla.edu/~tom/distributions/normal.html // within the spreadsheet, of course, you can just use =NORMSDIST(X) function normalcdf(X){ //HASTINGS. MAX ERROR = .000001 var T=1/(1+.2316419*Math.abs(X)); var D=.3989423*Math.exp(-X*X/2); var Prob=D*T*(.3193815+T*(-.3565638+T*(1.781478+T*(-1.821256+T*1.330274)))); if (X>0) { Prob=1-Prob } return Prob } /** * Provides d1 for Black-Scholes. * * @param {30} DTE T-t in days to expiration […]

Handy commit hook

I try really hard to set myself up for success in the sense that I believe in setting up my environment to discourage mistakes (poka-yoke). I’ve been known to leave Office files open while I’m working in git, and occasionally things can get confused. To wit, I present a pre-commit hook that will prevent a […]

Detecting character encodings

This is a quick and dirty script inspired by this post, but it can definitely be a useful tool: #!/usr/bin/env python from chardet import detect from sys import argv for fn in argv[1:]: with open(fn, “rb”) as f: print(fn, detect(f.read())[‘encoding’])

No fault go-arounds

In aviation, if you think there’s going to be a problem with a landing or a take-off, you stop, pull away, and try again.  There are two somewhat conflicting quotes that I love: If you can walk away from a landing, it’s a good landing. If you use the airplane the next day, it’s an […]

minHash implementation in PowerShell

Could not have done it without the Better Programming article. function minHash($a, $b, $shingleLength=3, [switch]$caseInsensitive=$False) { # adapted from https://betterprogramming.pub/identify-similarities-between-sentences-in-python-e9f71d454d1d function jaccardDistance($a, $b) { $toTest = [System.Collections.Generic.HashSet[string]] @($b) $intersect = [System.Collections.Generic.HashSet[string]] @($a) $intersect.IntersectWith($toTest) $union = [System.Collections.Generic.HashSet[string]] @($a) $union.UnionWith($toTest) if($union.Count -eq 0) { return $null } return $intersect.Count / $union.Count } function shingles($s, $len=3, [switch]$caseInsensitive=$False) { […]