Skip to main content

Engineering & Code

Engineering & Code explores the full stack of modern tech—from bits and transistors to cloud fleets and formal proofs. Here you’ll find clear, rigorous walk-throughs of software design, embedded hardware, security architecture, and the physics that underpins them, always paired with code, schematics, and reasoning you can put to work.

Shellshock: Bashing Bash for Fun and Profit

The latest fundamental computer security vulnerability, termed Shellshock, was discovered by a vulnerability researcher Stephane Chazelas (a linux shell expert living in the UK) which allows for arbitrary code execution on linux or mac computers through creating a custom environment variable. If you haven’t already, you need to patch your system(s) and you might be […] read more

Playing with Matched Filters

During my time on the red team, we continually discussed the role of matched filters in everything from GPS to fire control radars. While I’m having a blast at DARPA where I work in cyber, I wanted to review an old topic and put MATLAB’s phased array toolbox to the test. (Yes, radar friends this […] read more

One Time Pad Cryptography

This was much harder than it should have been. While this is the certainly the most trivial post on crypto-math on the webs, I wanted to share my MATLAB xor code in the hope that I save someone else’s time. It is a basic property of cryptography that a one time pad must be used […] read more

Cryptography

We are swimming in a sea of information. Without encryption this whole operation would be a very public event. Encryption enables our communications to be anonymous or secure and makes e-commerce and private communications possible. Because of this, I registered for Dan Boneth’s cryptography course. At this point, I’ve only watched one lecture, but I […] read more

Gradient Descent

[mathjax] It has been awhile since I’ve studied optimization, but gradient descent is always good to brush up on. Most optimization involves derivatives. Often known as the method of steepest descent, gradient descent works by taking steps proportional to the negative of the gradient of the function at the current point. Mathematically, gradient descent is […] read more

FlexEvents: WOD 3 Simulation

During a recent CrossFit competition, flex on the mall, we had to accomplish a team chipper in which we were able to pick the order of team members in order to minimize our workout time. The workout was simple: 50 burpees, 40 over the box jumps, and 30 kettle-bell snatches. Each exercise had to be […] read more

Fun with Bessel Functions

[mathjax] Well, I certainly forget things faster than I learn them. Today is a quick review of Bessel functions and their applications to signal processing. The Bessel functions appear in lots of situations (think wave propagation and static potentials), particularly those that involve cylindrical symmetry. While special types of what would later be known as […] read more

Excel Sorting and Grouping

I had two tables downloaded from Amazon: Items Order Date Order ID Title Category 1/26/14 102-4214073-2201835 Everyday Paleo Family Cookbook 1/13/14 115-8766132-0234619 Awesome Book A 1/13/14 115-8766132-0234619 Awesome Book B and Orders Order Date Order ID Subtotal 1/6/14 102-6956821-1091413 $43.20 1/13/14 115-8766130-0234619 $19.42 1/16/14 109-8688911-2954602 $25.86 I’m building our Q1 2014 taxes and needed rows […] read more

Sampling Exploration

[mathjax] I needed to review the Nyquist–Shannon sampling theorem. The coolest thing about Nyquist is that it expresses the sample-rate in terms of the function’s bandwidth and leads to a formula for the mathematically ideal interpolation algorithm. What is sampling? Sampling is nothing more than converting a signal into a numeric sequence. Shannon states: If […] read more

Practical Cutting Stock Problem

Warning. This post is for an audience of close to zero. My technical friends will find this pretty basic, and my non-technical friends will find this too technical. Welcome to the middle space that I occupy between these two worlds. I wanted to build this series of retaining walls to replace the overgrown ivy and […] read more