David Brownman

Posts Tagged "programming"

  • Bogosort in Practice

    For whatever reason, there's a lot of humor in programming. From bogus HTTP responses to fun jargon, we're a funny bunch. In practice, the only thing funnier than an idea is an idea that actually runs, so I decided to see how awful Bad Code could really be.

    The searching and sorting of arrays is a popular (and central) topic in computer science. There's been a lot of time and effort spent ensuring we can sort array as efficiently as possible. Typically, efficiency in sorting methods is measured as a function of input length vs number of loops. A great sort won't appreciably increase ruznning time as the input gets longer. A bad sort, on the other hand...

    When the topic of bad searches come up (at parties or whatever, as it does), a crowd favorite is always the infamous bogosort. The idea is simple: take an array, randomize it, and check if it's sorted. If not, repeat! In the best case, you got really lucky and this sort is very fast. Most of the time, you're less lucky and this is actively awful. Let's see how this would shake out in practice.

    Read more
  • The Great Migration

    As I'm back in the job market, I figured it was time to clean up some of my site internals. I've learned a lot about a lot since I first built it and my scss in particular was really showing its age. While I was in the trenches, I realized there was another big pain point I could fix: my blog.

    For a long time, I had my blog in two places. It actually lived on tumblr, but I mirrored it on the blog section of my site using tumblr's APIv1. This was accomplished with some jQuery that would trigger on load and populate a <ul> element.

    This was fine, but it meant I was maintaining two sets of css and user experience was inconsistent depending on which platform they were reading on. I was already leveraging middleman to generate my static site and found that they have a blogging extension. Moving all my posts would allow me to check my posts into git and use triple ` notation for code blocks. The only hiccup was that tumblr has no way to export all of your posts, so it was time to dive back into their API. The game was afoot.

    Read more
  • Heroku CLI Plugins and You

    We as developers are working in a golden age of programming where pushing code has never been easier. My personal favorite place to deploy things is Heroku because of its customizability, clear (and cheap) pricing structure, and powerful tools.

    The most powerful place developers interact with the Heroku platform is on the command line. The recent release of a new version of their CLI gave me a great excuse to rewrite an abandoned plugin that I relied on. Unfortunately, save a pair of very helpful doc pages, there were relatively few resources on some of the corner cases you hit while developing a plugin. Here, I'll aim to guide you through some of them.

    Read more
  • Errors Are Usually Bad! A Cautionary Tale

    The worst part about programming is that the computer does exactly what you tell it to. Exactly.

    Here at RelateIQ I work in Internal Tools, or building products for other employees. My most recent project has involved a pythong script moving data out of a database and into the product itself so a bunch of users could be slung through our new Marketo integration and contacted.

    Read more
  • The Week of Code is Here!

    As you may or may not be aware, Code.org is a non-profit that aims to bring computer science education to people of all ages. They put out some great videos like this one illustrating how cool computer science is. Their message is one about the future and I think it's something really worth pursuing because at its core, it's a message about how you can change the world.

    Read more