Stub Remote API Calls Locally with Nginx

One of the things that makes distributed systems development somewhat of a challenge is interacting with all the remote APIs that your system requires to function properly. I find this a challenge when developing on the train (as I spend over 2 hours a day on one). 4G LTE is great and all, but there are dead zones and dropouts that make some API calls annoyingly long to respond. Lately I’ve been messing around with stubbing out the remote calls locally using nginx, so I thought I would share how I do it. Read On →

One Reason I Like LINQ in C#

This is one of my favorite things about LINQ in C#. This code: var nonBlank = false; foreach (var byteval in arrayOfBytes) { if (byteval <= 0) continue; nonBlank = true; break; } Becomes this code: var nonBlank = arrayOfBytes.Any(byteval => byteval > 0);

SQLAlchemy Deferred Column Loading

We have a small monitoring Flask web app using SQLAlchemy that we use to keep an eye on the status of some jobs in our processing pipeline. Yesterday we noticed that our DB was getting nailed everytime we refreshed the main status screen, which does NOT show the stack trace (which can be VERY large for big jobs). We needed a way to only pull those fields when they were displayed, but at the same time I didn’t want to have a seperate model just to use on the main status screen. Read On →

MonsterMash: Flask, ZeroMQ, and EchoNest Remix

Off and on for the past couple of months I’ve been working on a side project using flask, zeromq, and the remix api by echo nest. If you take a look online, there are a lot of excellent guides to introduce you to flask, but not many that dive into something more complex or closer to something that an engineer in more distributed services would need to put together. I’ve seen some great guides on organizing larger applications, but not so much commentary about how the experience was. Read On →

A Preview of My Silly Little Python Mash Up Generator...

So I’ve been working on a little side project web app to get familiar with both flask (a python web microframework) and zeromq (the socket library that acts as a concurrency framework), along with remix from echonest. There was this exchange with Brad from devmynd tonight on twitter. Coupled with the promise of tons of rain from our friendly neighborhood meteorologist, I was inspired to create this unholy amalgamation of mash up nonsense. Read On →