Feed

All posts

162 recent entries. Last built 8 Jun 2026, 20:36 UTC. RSS

21 Dec 2016 · d_run · Miscellanea

Components á la carte

TL;DR - By exploiting Webpack’s async loading feature you can roll a feature-gating mechanism in your JavaScript app that only loads the code your end user is supposed to see. This is great for beta testing features and making smaller initial loads. You probably don’t need to do this in your application.

17 Dec 2016 · d_run · Miscellanea

Identicons with ClojureScript

A while back I put together a little graphics package written in Racket for generating identicons. This summer someone at work stumbled across it and asked if I could generate some of those identicons in the browser. I decided to give it a shot and whipped up a small subset of the original package in ClojureScript: identikon-cljs

22 Aug 2016 · hynek · Hynek Schlawack

Better Python Object Serialization

The Python standard library is full of underappreciated gems. One of them allows for simple and elegant function dispatching based on argument types . This makes it perfect for serialization of arbitrary objects – for example to JSON in web APIs and structured logs.

1 Aug 2016 · hynek · Hynek Schlawack

Please Fix Your Decorators

If your Python decorator unintentionally changes the signatures of my callables or doesn’t work with class methods, it’s broken and should be fixed. Sadly most decorators are broken because the web is full of bad advice.

31 May 2016 · hynek · Hynek Schlawack

Get Instrumented: How Prometheus Can Unify Your Metrics

To get real time insight into running applications you need to instrument them and collect metrics: count events, measure times, expose numbers. That used to be a clusterfuck of technologies and approaches. Prometheus changes that.

19 May 2016 · hynek · Hynek Schlawack

Conditional Python Dependencies

Since the inception of wheels that install Python packages without executing arbitrary code, we need a static way to encode conditional dependencies for our packages. Thanks to PEP 508 we do have a blessed way but sadly the prevalence of old setuptools and pip versions make it a minefield to use.

17 Feb 2016 · hynek · Hynek Schlawack

Python 3 in 2016

My completely anecdotal view on the state of Python 3 in 2016. Based on my own recent experience, observations, and exchanges with other members of the Python community.

19 Oct 2015 · hynek · Hynek Schlawack

Testing & Packaging

How to ensure that your tests run code that you think they are running, and how to measure your coverage over multiple tox runs (in parallel!).

12 Apr 2015 · hynek · Hynek Schlawack

Beyond grep: Practical Logging and Metrics

Your Python applications are running but you’re wondering what they are doing? The only clue about their current state is the server load after ssh -ing into the servers? Let’s change that!

8 Mar 2015 · d_run · Miscellanea

Sour Mash: getting your Clojure into a JAR

This weekend I decided to finally bite the bullet and deploy one of my Clojure apps as a JAR. “Certainly” I thought to myself, “there are great tutorials for this online”. Yes, yes there are, except none of them worked for me and in fact did lead to the consumption of some rye whiskey. Caveats: Every Clojure app is different, and the details of your app will determine the steps necessary to build a JAR. None of the information I found online specifically addressed the problems I had, so …

4 Jan 2015 · d_run · Miscellanea

Deterministic Pixels

I’ve always liked identicons, which WordPress and GitHub have used to great effect. The premise is simple: take a user identifier such as an IP or email address and deterministically convert it into an image based on a simple algorithm. To that I end I started hacking on Identikon - a little Racket program that generates different types of identicons based on rules modules.

15 Sep 2014 · hynek · Hynek Schlawack

virtualenv Lives!

Setting up Python to the point to be able install packages from PyPI can be annoying and time-intensive. Even worse are OS-provided installations that start throwing cryptic error messages. Especially desktops are prone to that but it’s possible to break the whole toolchain of a server by installing some shiny package you heard about on reddit .

12 Apr 2014 · hynek · Hynek Schlawack

The Sorry State Of SSL

TLS is the best technology we have for securing our communications. It comes with many sharp edges though. This talk tries to jumpstart a rough understanding and these links should help you to complete the picture.

3 Mar 2014 · hynek · Hynek Schlawack

Apple OpenSSL Verification Surprises

Apple ships a patched version of OpenSSL with macOS. If no precautions are taken, their changes rob you of the power to choose your trusted certificate authorities (CAs) and break the semantics of a callback that can be used for custom checks and verifications in client software.

16 Nov 2013 · d_run · Miscellanea

EventedArray: a JavaScript conveyor belt

This post takes a quick look at EventedArray, a small Array-like JavaScript data structure (written in CoffeeScript) that allows you to register callbacks on accessor/mutator operations and also create fixed size buffers. All examples are in JavaScript.

27 Jun 2013 · hynek · Hynek Schlawack

Life after Google Reader

Google killed its Reader and my beloved Reeder for Mac and iPad officially won’t get updated in time. I think to have found an adequate setup to replace both.

29 May 2013 · hynek · Hynek Schlawack

A Short Summary on Sybase SQL Anywhere and Python

As some of my older rage-filled articles indicated, we’re still running some services on SAP’s SQL Anywhere . Since it cost me many hours and sanity wrangling, I think it may be helpful to others to summarize the current situation for Python developers.

15 May 2013 · hynek · Hynek Schlawack

Know Your Models

In web development, we have an unfortunate double meaning for the word models . As evident as the separation of those two seems to seasoned developers, it shows again and again that it’s not as apparent to beginners.

5 May 2013 · d_run · Miscellanea

Get Functional with Underscore-Contrib

TL;DR - Fogus and Jeremy Ashkenas published the underscore-contrib repo recently which is loaded with functional JavaScript goodness based on the popular underscore library. I walk through a few examples of how I use it in the hopes you’ll get interested in working out new ways to solve your own day-to-day issues.

16 Mar 2013 · hynek · Hynek Schlawack

Solid Python Deployments for Everybody

Without orientation, deployments of Python applications can be tiresome and even painful. This talk attempts to replace anxiety and pain through informed annoyance.

6 Mar 2013 · hynek · Hynek Schlawack

Taking Some Pain out of Python Logging

Even the best of us hate logging in Python sometimes. And while a lot of its problems are actually just bad docs and terrible defaults in the past, there is some pain that can be avoided.

5 Feb 2013 · hynek · Hynek Schlawack

Hardening Your Web Server’s SSL Ciphers

There are many wordy articles on configuring your web server’s TLS ciphers. This is not one of them. Instead, I will share a configuration that scores a straight “ A ” on Qualys’s SSL Server Test in 2023.

16 Sep 2012 · d_run · Miscellanea

Hacking up sites with Middleman

TL;DR - I’m going to walk through how I rebuilt this blog using a static site generator. In the first half I walk through my decision for moving to a static site. You can skip down to the tech talk if you want.

13 Jul 2012 · hynek · Hynek Schlawack

How I Stopped Worrying and Started Loving PyLadies

When I read about PyLadies for the first time, my thoughts were a common knee-jerk: “separation is bad, dividing the community, …”. Like many of my privileged peers, I was pro-diversity but I thought this is the wrong way. My views changed over time and I filed it under “lessons learned”. Unfortunately, my old thinking patterns don’t cease to pop up in discussions, so I decided to share my perspective.

8 Jul 2012 · d_run · Miscellanea

Heroku and your demo: It's great till it isn't

In my previous blog post I linked to a demo application hosted on Heroku. Heroku is great, as you can use their free hosting to quickly get your demo up online using a variety of technologies. Unfortunately I ran into a few issues related to traffic spikes and bad weather. The cloud is great, until it’s not.

24 Jun 2012 · d_run · Miscellanea

Backbone.js and You

I’m currently working with the amazing folks at Arc90 on a pretty hefty project. It’s a great working environment that really stresses collaboration and learning, with weekly code and design reviews. We’re starting to use Backbone.js on a number of projects, so a quick talk was organized to explain the ins and outs to everyone. Since I had worked on some previous projects using Backbone, they asked me to do an intro.

19 May 2012 · hynek · Hynek Schlawack

My Road to the Python Commit Bit

Like many OSS fans, I always wanted to be an active part of the movement. My last big project was for the Amiga in the past millennium though. Nowadays I’m happy that after years of small-scale dabbling on various projects I’ve found my haven. I’d like to share my way to my recent gain of push privileges on the Python project and hope to inspire some of you to do the same.

3 May 2012 · hynek · Hynek Schlawack

Python Application Deployment with Native Packages

Speed , reproducibility , easy rollbacks , and predictability is what we strive for when deploying our diverse Python applications. And that’s what we achieved by leveraging virtual environments and Linux system packages.

23 Apr 2012 · hynek · Hynek Schlawack

Python Deployment Anti-Patterns

Deploying web applications is hard. No shiny continuous deployment talk and no DevOps coolness can change that. Or to use DevOps Borat’s words : “Is all fun and game until you are need of put it in production.“ There are some mistakes I see people doing again and again so I’d like to address them here.

25 Feb 2012 · hynek · Hynek Schlawack

Celery and Sybase SQL Anywhere

In our newest installation of “why you should not use Sybase SQL Anywhere” I’d like to report the latest problem I had to solve: for some reason, I couldn’t connect using sqlanydb from Celery tasks.

26 Jan 2012 · hynek · Hynek Schlawack

Fleeing from Gmail

So you came to the same conclusion as I: Google is actually evil indeed . That makes it kind of uncomfortable to have all your emails over there, doesn’t it? I for one decided that it’s time to leave and will show you how to do the same using an UNIX based OS.

31 Dec 2011 · hynek · Hynek Schlawack

My 2011

I never did a retrospective but 2011 deserves one.

14 Dec 2011 · hynek · Hynek Schlawack

Dead Simple Connection Pooling with Twisted

There is this common notion, that asynchronous IO is hard and that writing a custom connection pool is even harder. The nice thing however is, that in reality asynchronous IO is just “weird” in the beginning – and that a connection pool using async IO is so simple it hurts.

8 Dec 2011 · d_run · Miscellanea

Protip: URL Parameters with Nginx & PHP

If you’re using nginx as your webserver and need to pass URL parameters to your PHP front controller then some adjustments to your configuration file are necessary:

6 Dec 2011 · hynek · Hynek Schlawack

MacVim and the Clipboard

After switching to the Mac, I had one big itch that spoiled all the bliss: MacVim sometimes simply refused to cooperate with the system clipboard. As you can imagine, an editor that can’t exchange text with other software is a rather painful thing.

19 Nov 2011 · d_run · Miscellanea

For Programmers: The Best of edw519

A while back on Hacker News, a.k.a Ed Weissman posted his collection of tips and advice for programmers. It was amazing stuff.

6 Nov 2011 · d_run · Miscellanea

My little friend z

I’m a command line interface kind of guy, which is funny since I do everything on Macs. Then again, I first embraced PCs with an Apple IIe, which was a CLI only experience. One little tool I’ve had installed for a while is z by Rupa. It’s a nice little shell script that keeps tabs on the directories you’ve been cding in and out of and then lets you quickjump to them using a simple regex. So instead of remembering a long path like:

5 Nov 2011 · d_run · Miscellanea

Occupy Wall Street - Design Edition

My fellow worker bees over at Gabardine.com decided to flex their design chops by lending a hand to the folks downtown at Liberty Square. While Occupy Wall Street gives us a much needed civics lesson, and the 1% continues to skim the cream off your bank accounts, Scott Grant took some of the DIY signs from the occupation and re-made them as snappy posters.

30 Oct 2011 · d_run · Miscellanea

How to: Convert site to PDF with wkhtmltopdf and wget

A friend of mine emailed me the other day with a quick question: “What’s an easy way to convert an entire site to PDF? Are there tools for this?” Why yes, yes there are. In fact, it’s pretty easy to do if you’re on a Mac or Linux OS using wget and wkhtmltopdf:

1 Oct 2011 · hynek · Hynek Schlawack

Why Tomatoes Are Awesome

No, this isn’t going to be a smug post about nutrition. These tomatoes I’m going to talk about aren’t for eating but for kicking my ass to be more productive. I’m talking about the Pomodoro Technique of course.

28 Aug 2011 · d_run · Miscellanea

Introducing Phrap

Phrap is a super-light PHP database wrapper using PDO for basic CRUD operations with MySQL. If that doesn’t sound sexy, well, that’s because it isn’t.

22 Aug 2011 · hynek · Hynek Schlawack

My mutt and Gmail Setup

So you want quick offline access to your mails using mutt to fully exploit your SSD and yet still have everything nicely working in Google’s web interface? Additionally, you would like to have access to your Google Contacts just like in your phone and everywhere else? I’ll show you how!

10 May 2011 · hynek · Hynek Schlawack

Mercurial to Git

Mostly a note to myself as I forget it regularly.