Misc Technical

Applying Thompson Sampling To The Interview Process

(Image by Macoto Murayama) NOTE: This post is not necessarily advocating for this approach. I think it’s an interesting idea so I’m putting it out there. This approach, as is, does not account for subjective biases, but it could provide the data to measure and compensate for them. One of the problems I’ve observed with interviews candidates across several companies is their informality. It often feels more like reading tea leaves than finding the best person. While many companies attempt to make this more rigorous, they…

Misc Opinion Uncategorized

Skepticism and Discursive Machines

Skepticism emerges as a reaction wherever a certain, commonly held notion of truth begins to unravel. Operating with this notion of truth, we can try to slip out of the grasp of skepticism, but inevitably we trace the same maddening circle right back into its clutches. Can we model this worldview as a machine? Factual Discourse Machines The Classical Factual Discourse Machine We take as our starting point the most naive view of factual discourse possible. All factual discourse involves acts of demonstration. I present…

Technical

Let’s Write An Ethereum Virtual Machine Disassembler

In this article we’ll discuss writing a disassembler for the Ethereum Virtual Machine (EVM). While writing disassemblers doesn’t necessarily require much knowledge of the machine the instructions are for, it’s actually quite a fun way to get your feet wet. During this tutorial we’ll be using the D programming language. Why D? Honestly there’s no great reason. It’s mostly because I think it’s clearer and simpler than the alternatives for this kind of low-level code. Let’s get started. Introduction When writing…

Ben Laposky, Oscilon
Technical Tips

Simple Software Verification, Part 3: Karnaugh Maps

(Image by Ben Laposky) Series Parts Part 1 – Execution Tables Part 2 – Trace Tables Part 3 – Karnaugh Maps Welcome to the third and final article in this mini-series on software validation. In this article we’re going to discuss state machines, what desirable properties they should possess, and then I’ll demonstrate a simple tool for verifying them called Karnaugh Maps. Identifying State Machines As a general rule of thumb, you can identify a program that is a potential…

Technical Tips

Simple Software Verification, Part 2: Trace Tables

(Image by Leonardo Solaas) Series Parts Part 1 – Execution Tables Part 2 – Trace Tables Part 3 – Karnaugh Maps Welcome back! In the previous article I explained why you might be interested in software verification techniques and then showed you how to use Execution Tables to verify your software for specific cases. In this article, we’ll generalize Execution Tables into a format that will allows us to create simple inductive proofs about our loops. Trace Tables To demonstrate this…

Technical Tips

Simple Software Verification, Part 1: Execution Tables

Series Parts Part 1 – Execution Tables Part 2 – Trace Tables Part 3 – Karnaugh Maps (Image by Manfred Mohr) Introduction If you’re a software developer, and you work somewhere even remotely sane, then chances are good you employ some form of automated testing in your day-to-day practice. Automated testing is a wonderful and extremely valuable tool, but there is nevertheless something slightly fanatical and suspicious about the claims of those who prescribe it as the strategy for managing software quality. Namely, experience teaches us that…

Technical

Fixing Python’s title Function

Python’s title function has some weird side-effects when you’re titlizing a string like, for example, a street name: >>> “62nd”.title() “62Nd” >>> “West 62nd st.”.title() “West 62Nd St.” 1 2 3 4 >>> “62nd”.title() “62Nd” >>> “West 62nd st.”.title() “West 62Nd St.” Here’s how you can fix this: import re def fixed_title(input_string): parts = re.split(r’\s’, input_string) for idx, value in enumerate(parts): if re.match(r'[A-Za-z]’, value[0]): parts[idx] = value[0].upper() + value[1:] return ‘ ‘.join(parts) 1 2 3 4 5 6 7 8…

Opinion Technical

Forensic Analysis of “No Silver Bullet”

(Image by Lee Ufan) I. Our task — Software engineering has a long and hallowed tradition of uncritically evaluating and citing evidence [1][2]. It is our keenest joy to snatch a quote or cite a statistic without any critical evaluation of the source. As far as one might like to dig into the past this is the way it has always been done, and maybe the way it always will be done. Perhaps in the early days the fight for…

Opinion Technical

Why Software Process Never Works

Nothing induces more ambivalent feelings in working software developers than the idea of process. On the one hand we crave the sanity, insight, and opportunity for self-improvement that processes promise. On the other, we actively fear trying to introduce them into our organizations. Stories of botched or half-assed attempts to apply some new-fangled methodology are as common as dirt. Often times the end result can be worse than if nothing had been done at all. One popular explanation for this…

Technical Tips

Monitor Celery Queue Consumption Speed

A lot of times when using the python Celery library it’s useful to be able to monitor how fast the queue is being consumed. This is useful if you need to do a back of the envelope to see how long  a queue will take to chew through, or just to see how the current status of the queue to make sure there aren’t any blockages. So I decided to whip up a simple script to do just that. While this…