Posts by Tag

401k

Creating a Budget and Sticking to It

The hardest part of doing anything is starting. If you’re someone who has delayed getting serious about retirement savings, or budgeting in general, I would ...

MySQL

MySQL drop column if exists

Idempotence describes the property of operations in mathematics and computer science that means that multiple applications of the operation do not change th...

agile

Scrum in a Nutshell

Scrum is a fundamentally adaptable process. One of the core pieces is the retrospective, where the team can collaboratively change the process itself. Team m...

Agile Motivations and Objections

Often when I first start talking to someone new about Agile and/or Scrum, they have questions and occasionally objections. More often they just don’t underst...

ajax

Quick and dirty Ajax on any FORM

I have been trying to write as much unobtrusive javascript as possibly lately. Mainly this means getting everything working without any javascript in the pi...

analytics

ant

Ant java.library.path

Maybe this will save someone an hour... to set java.library.path from inside an ANT Java task, you need to set the parameter fork="true".

apache

Splunk/Rsyslog/Apache/Ubuntu Quickstart

I've been using Splunk for several years. It's a great tool for log file visualization and analytics. One thing I use it for is to generate a graph of avera...

per subdomain robots.txt in Apache

When I develop a website, I tend to go subdomain crazy. If the site is crazy.net, I probably configure www.crazy.net, admin.crazy.net, static.crazy.net, you...

api

REST API Design

REST APIs operate over HTTP, use standard verbs like GET and POST, expose a common-sense URL structure and return resources in a well-defined format, typical...

app

awk

First AWK script

I have been aware of AWK as a "general purpose programming language that is designed for processing text-based data" since college. But until today I never s...

backup

bash

beautifulsoup

Sanitize HTML with Beautiful Soup

If you have a website that displays user-generated HTML (emails, rich text entry, etc), you likely want to scrub that HTML before you display it. At the ver...

Parsing invalid xml with Beautiful Soup

Sometimes, bad xml happens to good people. In my case, I was getting a text stream back from a web-service call that proported to be xml, but was actually n...

blog

Introducing Advocoders

Hiring engineers is tough, especially right now with a general shortage of qualified candidates and record demand. Good companies realize they need involve t...

book-review

bootstrap

cache

Per-request Query Caching in Django

The Django ORM is a wonderful thing. It makes it so easy to access the database, that sometimes you forget that it’s even happening. That is, until you open ...

career

celery

Customizing Celery with Task Arguments

Celery is an awesome distributed asynchronous task system for Python. It’s great out of the box, but a couple of times I have needed to customize it. Specifi...

Celery fail silently context manager

Celery ships with an configuration option called CELERY_ALWAYS_EAGER which causes all tasks to be executed immediately instead of being asynchronously execut...

chrome

coldfusion

CFHTMLHEAD and CFCONTENT reset

I ran into some trouble this week attaching my JSON Exception Handling to a new ColdFusion feature. Specifically, there was content from that page that surv...

ColdFusion JSON Exception Handling

When calling a ColdFusion end-point from an Ajax call, the caller is expecting a certain format. In my projects, that's usually JSON. Regardless, it would be...

computer-science

cron

csrf

csv

database

Why Database Integrity Matters

Given the rise in popularity of NoSQL solutions, typically set apart by their explicit forfeiture of traditional RDBMS features, you might think that age old...

datawarehouse

debugging

django

Introducing Django Migratron

Django Migratron is a schema migration tool for Django. Why write another schema migration tool? Here is how we stack up against other tools.

Read only Django shell

Say you have a bunch of developers that occasionally need Django shell access to production, but you want this to be an exceptional event. Here is a drop-in ...

Introducing Django Pyfixtures

Django fixtures were initially touted as a great way to pre-populate your database, mainly for testing. Over time, various community leaders have suggested t...

Keep Track of Vim Tabs Per Git Branch

Mylyn is a “task lifecycle management framework” plugin for Eclipse. I’m not 100% sure what that means, but I know I really liked one particular feature. On ...

The Post/Redirect/Get (PRG) Pattern

Anyone who has used a web browser has probably encountered the dreaded “form resubmission” dialog. This happens when the user tries to refresh or use the bac...

Django aggregation, group by day

This week we had a hackathon to develop a better internal dashboard page that shows things like records added to the system over time. Not having generated ...

Django reset database connection

Django handles database connections transparently in almost all cases. It will start a new connection when your request starts up, and commit it at the end ...

Django Performance: Latency Kills

Do you know how many database queries your Django pages are making? If you're like me, you probably don't know exactly. That's the beauty of the ORM; it abs...

Django: show me the sql!

This week, I noticed that there was a select query in our production system without a where clause, and it was running a lot. Tracking it down, I found the ...

Per user timezones in Django

A common requirement for sites that deal with dates (most of them), is to display date and time values in the individual user's timezones. Luckily, there ar...

Django: uniform image resizing

Sometimes, you want all the thumbnails you're creating to be the same dimensions. For example, your layout may require a certain width so that all the items...

Django log form ValidationErrors

Forms are the primary way your users communicate with your website. Hopefully, the users are always entering data in the correct format, and the form always...

Django HTML5 input placeholders

HTML5 has a bunch of nifty progressive enhancements to forms, one of which is placeholder text. Here is an example, along with the required code.

Django forms date field format

Django defaults dates in forms to the format "2010-01-15". But changing the default format is fairly straight-forward, though there appears to be some confu...

Unit testing Django with doctest

There are two main ways to write tests in Django; doctests and unit tests. Units tests will be familiar to you if you're coming from Java. You basically wri...

Django - Externalize settings.py

In Django, settings.py is where you store configuration such as database connection strings, directory paths for static and media resources, as well as cach...

Python/Django: First Impressions

I've started a brand-new codebase at work. With new code comes the possibility of a new language/platorm. What we really needed was speed; we don't know exa...

docker

documentation

dotfiles

dropbox

easymock

email

How to not get caught in spam filters

Reliably sending email without getting caught in spam filters is a full-time job, for someone. Surely not for an end-user, but for every end-user email, the...

facebook

finance

Creating a Budget and Sticking to It

The hardest part of doing anything is starting. If you’re someone who has delayed getting serious about retirement savings, or budgeting in general, I would ...

firefox

fixtures

Introducing Django Pyfixtures

Django fixtures were initially touted as a great way to pre-populate your database, mainly for testing. Over time, various community leaders have suggested t...

flask

Optimizing Flask client tests

When writing Python integration tests, it’s useful to put slow code such as database access in a setUpClass method, so that they are only executed once for...

forms

Django log form ValidationErrors

Forms are the primary way your users communicate with your website. Hopefully, the users are always entering data in the correct format, and the form always...

Django HTML5 input placeholders

HTML5 has a bunch of nifty progressive enhancements to forms, one of which is placeholder text. Here is an example, along with the required code.

framebreaking

gcharts

gdata

git

gmail

greasemonkey

gtd

Using OmniFocus for GTD

Over the years, I’ve gone through many todo systems. From paper, to text files, to Evernote, to iOS Reminders (ugh), I’ve tried an array of solutions. Maybe ...

gunicorn

hadoop

Hadoop from a Python Perspective

I’m just coming off a project where we decided to use Hadoop for the first time. We’re a Python shop developing an analytics feature. We have about 150m reco...

Sqoop/HBase Quickstart on Linux

Sqoop is a tool for bulk copying data between a relational database like MySQL and HDFS or another Hadoop based data store like Hive or HBase. It can either ...

HBase/Pig/Python Quickstart on OSX

Having spent a good chunk of the last two weeks getting a prototype analytics system running, I thought I would write up my findings. I was pleased to find t...

haystack

hbase

Hadoop from a Python Perspective

I’m just coming off a project where we decided to use Hadoop for the first time. We’re a Python shop developing an analytics feature. We have about 150m reco...

Sqoop/HBase Quickstart on Linux

Sqoop is a tool for bulk copying data between a relational database like MySQL and HDFS or another Hadoop based data store like Hive or HBase. It can either ...

Hive with HBase Quickstart

Though there is some decent documentation, I found that setting up Hive with a HBase back-end to be somewhat fiddly. Hopefully this guide will help you get s...

HBase/Pig/Python Quickstart on OSX

Having spent a good chunk of the last two weeks getting a prototype analytics system running, I thought I would write up my findings. I was pleased to find t...

heroku

hibernate

Hibernate Search - Query API helper

If you are programmatically generating a query string and then parsing it with the query parser then you should seriously consider building your queries dire...

Hibernate Search - Query API helper

If you are programmatically generating a query string and then parsing it with the query parser then you should seriously consider building your queries dire...

hive

Hive with HBase Quickstart

Though there is some decent documentation, I found that setting up Hive with a HBase back-end to be somewhat fiddly. Hopefully this guide will help you get s...

housing

Picking a place to live in the East Bay

My wife and I recently bought a house in the San Francisco bay area. Having no family in the area, and no real ties to any neighborhood, it was surprisingly ...

html5

Django HTML5 input placeholders

HTML5 has a bunch of nifty progressive enhancements to forms, one of which is placeholder text. Here is an example, along with the required code.

hudson

ie7

iframe

interview

My favorite coding interview question

Every software engineering interview I have ever participated in has involved a coding exercise. For one position, I would expect three two five separate cod...

java

The case of the OOM Killer

An aircraft company discovered that it was cheaper to fly its planes with less fuel on board. The planes would be lighter and use less fuel and money was sav...

Java replaceAll() File.separator

When dealing with file paths, it's not uncommon to construct a path where the file separators are missing or duplicated. Ie, instead of c:\temp\test.txt, yo...

Ant java.library.path

Maybe this will save someone an hour... to set java.library.path from inside an ANT Java task, you need to set the parameter fork="true".

Deploying Jersey to JBOSS

I spent the afternoon playing around with Jersey in JBOSS. Jersey is a Java API for publishing REST web-services, and JBOSS is the application server we use...

Java phone number format API

So, you have a database with millions of phone numbers with free-for-all formatting. Ie, the UI does not enforce any constraints and the users are typing in...

javascript

Chained Select Progressive Enhancement

Perhaps you have encountered a chained select control in your travels. The canonical example would be on Monster or CareerBuilder, picking your area of expe...

Quick and dirty Ajax on any FORM

I have been trying to write as much unobtrusive javascript as possibly lately. Mainly this means getting everything working without any javascript in the pi...

ColdFusion JSON Exception Handling

When calling a ColdFusion end-point from an Ajax call, the caller is expecting a certain format. In my projects, that's usually JSON. Regardless, it would be...

Ajax grid performance in IE

Generating a grid (table) view from the results of an Ajax call is a common Web 2.0 use case. But performance can be an issue, especially on IE7.

jax-ws

jaxb

Using JAXB without a schema

A Yahoo HotJobs API project has been my first exposure to REST APIs. Usually, I'm working with SOAP web-services. Bullhorn is actually thinking about trying ...

jquery

jQuery hashtag input control

This jQuery snippet will turn an INPUT element into a hashtag input control. For example, if the user type "jobs business networking", it will translate it ...

Quick and dirty Ajax on any FORM

I have been trying to write as much unobtrusive javascript as possibly lately. Mainly this means getting everything working without any javascript in the pi...

keepassx

latency

Django Performance: Latency Kills

Do you know how many database queries your Django pages are making? If you're like me, you probably don't know exactly. That's the beauty of the ORM; it abs...

linux

Development on a Mac versus Linux

I love the Mac computing experience. Their laptop hardware, like their phones, feel solid and elegant. OSX usability is excellent, though it is myopically ge...

Switching from Ubuntu Unity to LXDE

Canonical was founded with the goal of bringing polish, consistency and usability to the Linux desktop. Derided unfairly by some as not contributing much tec...

litmus

lucene

Numeric Range Searches in Lucene

One of the reasons Lucene is awesomely fast is that it treats all data as strings. This is a perfect optimisation for most searching tasks. However, it does...

Hibernate Search - Query API helper

If you are programmatically generating a query string and then parsing it with the query parser then you should seriously consider building your queries dire...

lxde

Switching from Ubuntu Unity to LXDE

Canonical was founded with the goal of bringing polish, consistency and usability to the Linux desktop. Derided unfairly by some as not contributing much tec...

manager

Don’t Split the Team Until You Have To

If you have a team that is unable to work effectively, there could be any number of causes. If you’re thinking about splitting the team into two or more team...

Saying the Same Thing Multiple Times

To communicate something to an organization of people, you need to repeat yourself. The more people involved, the more you will need to repeat yourself if yo...

Estimating Epic Stories in Three Steps

In Agile, an Epic story is a potentially large placeholder story in the backlog. Typically they will be broken down into manageable stories during grooming b...

Trading off Value, Quality and Time

The traditional Iron Triangle tries to explain in graphical form how software projects need to make hard tradeoffs between scope, schedule and resources.

Best Practices for Meetings

Every team meeting needs a primary owner. If you are the owner of the meeting, it’s your responsibility to make sure that this is a great use of team time.

Long Term Software Estimates

False scheduling to match a patron’s desired date is more common in our discipline than elsewhere in engineering because it is VERY DIFFICULT to make a vi...

Tiger Team Survival Guide

A tiger team is a diversified group of experts brought together for a single project, need, or event. They are usually assigned to investigate, solve, bui...

Management 101

Coming off some annual management training, I realize that I need to write some of these learnings down, in order to actually internalize them. This is mostl...

Using Points vs Hours for Estimates

One of the key innovations of Agile is that estimates should NOT be in hours, but in points. But it doesn’t just intuitively make sense. As a result, many te...

Using OmniFocus for GTD

Over the years, I’ve gone through many todo systems. From paper, to text files, to Evernote, to iOS Reminders (ugh), I’ve tried an array of solutions. Maybe ...

Topics for One on Ones

I like to ask other managers what kind of questions they ask during their one on ones. Everyone has their own style, so I often get some interesting response...

mechanize

meetings

Best Practices for Meetings

Every team meeting needs a primary owner. If you are the owner of the meeting, it’s your responsibility to make sure that this is a great use of team time.

mock

nagios

Nagios check for Varnish Backends

We recently starting using Varnish to cache un-authenticated requests to our web farm. It even has this great feature called grace mode, where it will keep ...

netbios

Name resolution failure caching in SMB

If you have a production file server failing, you have serious problems. Client requests are failing. But they may not be failing quickly. If your product i...

newboss

Trading off Value, Quality and Time

The traditional Iron Triangle tries to explain in graphical form how software projects need to make hard tradeoffs between scope, schedule and resources.

Best Practices for Meetings

Every team meeting needs a primary owner. If you are the owner of the meeting, it’s your responsibility to make sure that this is a great use of team time.

Long Term Software Estimates

False scheduling to match a patron’s desired date is more common in our discipline than elsewhere in engineering because it is VERY DIFFICULT to make a vi...

Cross Functional Scrum Teams

Teams are also cross-functional; Team members must have all of the skills necessary to create an increment of work. - Scrum Guide

Management 101

Coming off some annual management training, I realize that I need to write some of these learnings down, in order to actually internalize them. This is mostl...

Using OmniFocus for GTD

Over the years, I’ve gone through many todo systems. From paper, to text files, to Evernote, to iOS Reminders (ugh), I’ve tried an array of solutions. Maybe ...

Lessons Learned at My Most Recent Job

Today is my first day of “unemployment” in the last 12 years. I’m switching jobs, soon to start at NerdWallet. This time, I decided to take a couple of weeks...

Topics for One on Ones

I like to ask other managers what kind of questions they ask during their one on ones. Everyone has their own style, so I often get some interesting response...

newrelic

nginx

nginx + SSL reverse proxy tutorial

If you have an existing HTTP application that you want to enable SSL for, nginx provides a convenient reverse proxy mode. In this mode, nginx is just respon...

nose

oauth

object-oriented

opensource

Introducing Advocoders

Hiring engineers is tough, especially right now with a general shortage of qualified candidates and record demand. Good companies realize they need involve t...

Democratic Product Management

In 2007, Dell launched their IdeaStorm site. It was the first example I had seen of a website where users can go to vote on features. From their FAQ:

osx

Development on a Mac versus Linux

I love the Mac computing experience. Their laptop hardware, like their phones, feel solid and elegant. OSX usability is excellent, though it is myopically ge...

p3p

performance

Django Performance: Latency Kills

Do you know how many database queries your Django pages are making? If you're like me, you probably don't know exactly. That's the beauty of the ORM; it abs...

Ajax grid performance in IE

Generating a grid (table) view from the results of an Ajax call is a common Web 2.0 use case. But performance can be an issue, especially on IE7.

pickle

pig

HBase/Pig/Python Quickstart on OSX

Having spent a good chunk of the last two weeks getting a prototype analytics system running, I thought I would write up my findings. I was pleased to find t...

plaintext

Sanitize HTML with Beautiful Soup

If you have a website that displays user-generated HTML (emails, rich text entry, etc), you likely want to scrub that HTML before you display it. At the ver...

podcast

postfix

How to not get caught in spam filters

Reliably sending email without getting caught in spam filters is a full-time job, for someone. Surely not for an end-user, but for every end-user email, the...

Postifx Header Based Routing

I run a custom web-based email site. Some users requested the ability to smarthost any outbound mail from their accounts through an arbitrary server. In the...

postgres

Django aggregation, group by day

This week we had a hackathon to develop a better internal dashboard page that shows things like records added to the system over time. Not having generated ...

Django reset database connection

Django handles database connections transparently in almost all cases. It will start a new connection when your request starts up, and commit it at the end ...

prg

Keep Track of Vim Tabs Per Git Branch

Mylyn is a “task lifecycle management framework” plugin for Eclipse. I’m not 100% sure what that means, but I know I really liked one particular feature. On ...

The Post/Redirect/Get (PRG) Pattern

Anyone who has used a web browser has probably encountered the dreaded “form resubmission” dialog. This happens when the user tries to refresh or use the bac...

process

The Role of Specifications in Agile

It’s commonly said that everyone does Agile differently. In my experience, it’s also common to do basically whatever you want and call it Agile. It can be u...

Democratic Product Management

In 2007, Dell launched their IdeaStorm site. It was the first example I had seen of a website where users can go to vote on features. From their FAQ:

profile

pyflakes

python

Optimizing Flask client tests

When writing Python integration tests, it’s useful to put slow code such as database access in a setUpClass method, so that they are only executed once for...

Per-OS virtual environments in Python

A common setup for web development is to have a virtual machine on your Mac running all your code. Typically this involves a shared folder containing the cod...

Getting Started with Sphinx docs

Everyone knows that you should write documentation for your code. Writing documentation actually is not that hard. Like any type of writing, the hardest part...

Celery fail silently context manager

Celery ships with an configuration option called CELERY_ALWAYS_EAGER which causes all tasks to be executed immediately instead of being asynchronously execut...

Hadoop from a Python Perspective

I’m just coming off a project where we decided to use Hadoop for the first time. We’re a Python shop developing an analytics feature. We have about 150m reco...

Dynamic Attributes in Python

One of the strengths of a dynamic language is that it allows you to more easily work introspection and light weight meta-programming into your every day code...

Introducing Django Migratron

Django Migratron is a schema migration tool for Django. Why write another schema migration tool? Here is how we stack up against other tools.

HBase/Pig/Python Quickstart on OSX

Having spent a good chunk of the last two weeks getting a prototype analytics system running, I thought I would write up my findings. I was pleased to find t...

Mocking HTTP calls in Python tests

There are at least a few decent libraries out there for mocking out HTTP calls in Python unit tests. The best solution looks like HTTPretty. One feature that...

Per-request Query Caching in Django

The Django ORM is a wonderful thing. It makes it so easy to access the database, that sometimes you forget that it’s even happening. That is, until you open ...

Nagios check for Varnish Backends

We recently starting using Varnish to cache un-authenticated requests to our web farm. It even has this great feature called grace mode, where it will keep ...

Stripping control characters in Python

Want to remove ASCII control characters from a string? Have Unicode control characters that can't be encoded into XML? Here is how to strip them with regex ...

Parsing invalid xml with Beautiful Soup

Sometimes, bad xml happens to good people. In my case, I was getting a text stream back from a web-service call that proported to be xml, but was actually n...

Unit testing Django with doctest

There are two main ways to write tests in Django; doctests and unit tests. Units tests will be familiar to you if you're coming from Java. You basically wri...

Django - Externalize settings.py

In Django, settings.py is where you store configuration such as database connection strings, directory paths for static and media resources, as well as cach...

Python/Django: First Impressions

I've started a brand-new codebase at work. With new code comes the possibility of a new language/platorm. What we really needed was speed; we don't know exa...

Mint.com backup

Mint.com is a great personal finance tool. I started using it once I made the switch to Linux at home. I used to use Quicken, but I really didn't want to co...

blogger backup

Want to backup your Blogger posts? Here is a quick Python script that does just that. It will create an HTML file for each post, with the subject of the pos...

pythonmeme

qa

Two (more) Weeks in QA

Due to our regular QA engineer being out on vacation, I once again has the opportunity to do a tour of duty in QA. This time, for a big mobile release. I pre...

QA 101 - How to Write a Bug Report

The purpose of a bug report is to enable an engineer to fix the bug. In companies with no dedicated testing/QA resources, bug reports get generated by many d...

My two weeks in QA

We all tend to tie our self-esteem strongly to the quality of the product we produce - not the quantity of the product, but the quality. [Lister, DeMarco: "...

rabbitmq

rails

react-native

reading-list

QA 101 - How to Write a Bug Report

The purpose of a bug report is to enable an engineer to fix the bug. In companies with no dedicated testing/QA resources, bug reports get generated by many d...

Using OmniFocus for GTD

Over the years, I’ve gone through many todo systems. From paper, to text files, to Evernote, to iOS Reminders (ugh), I’ve tried an array of solutions. Maybe ...

Topics for One on Ones

I like to ask other managers what kind of questions they ask during their one on ones. Everyone has their own style, so I often get some interesting response...

Scrum in a Nutshell

Scrum is a fundamentally adaptable process. One of the core pieces is the retrospective, where the team can collaboratively change the process itself. Team m...

regex

Stripping control characters in Python

Want to remove ASCII control characters from a string? Have Unicode control characters that can't be encoded into XML? Here is how to strip them with regex ...

Java replaceAll() File.separator

When dealing with file paths, it's not uncommon to construct a path where the file separators are missing or duplicated. Ie, instead of c:\temp\test.txt, yo...

Regular Expression: Negative Lookahead

People understand instinctively that the best way for computer programs to communicate with each other is for each of the them to be strict in what they emi...

rsyslog

Splunk/Rsyslog/Apache/Ubuntu Quickstart

I've been using Splunk for several years. It's a great tool for log file visualization and analytics. One thing I use it for is to generate a graph of avera...

sax

screenscraping

scrum

Cross Functional Scrum Teams

Teams are also cross-functional; Team members must have all of the skills necessary to create an increment of work. - Scrum Guide

Scrum in a Nutshell

Scrum is a fundamentally adaptable process. One of the core pieces is the retrospective, where the team can collaboratively change the process itself. Team m...

Agile Motivations and Objections

Often when I first start talking to someone new about Agile and/or Scrum, they have questions and occasionally objections. More often they just don’t underst...

security

Keep those passwords safe

The easiest way to guess a password isn't to guess it at all, but to exploit the inherent insecurity in the underlying operating system. Bruce Schneier

selenium

shell

Read only Django shell

Say you have a bunch of developers that occasionally need Django shell access to production, but you want this to be an exceptional event. Here is a drop-in ...

smb

smtp

Postifx Header Based Routing

I run a custom web-based email site. Some users requested the ability to smarthost any outbound mail from their accounts through an arbitrary server. In the...

soap

solr

source-control

spam

How to not get caught in spam filters

Reliably sending email without getting caught in spam filters is a full-time job, for someone. Surely not for an end-user, but for every end-user email, the...

splunk

Splunk/Rsyslog/Apache/Ubuntu Quickstart

I've been using Splunk for several years. It's a great tool for log file visualization and analytics. One thing I use it for is to generate a graph of avera...

sql

Django: show me the sql!

This week, I noticed that there was a select query in our production system without a where clause, and it was running a lot. Tracking it down, I found the ...

sqlite

sqoop

Sqoop/HBase Quickstart on Linux

Sqoop is a tool for bulk copying data between a relational database like MySQL and HDFS or another Hadoop based data store like Hive or HBase. It can either ...

ssh

ssl

nginx + SSL reverse proxy tutorial

If you have an existing HTTP application that you want to enable SSL for, nginx provides a convenient reverse proxy mode. In this mode, nginx is just respon...

startups

subprocess

svn

syslog

Splunk/Rsyslog/Apache/Ubuntu Quickstart

I've been using Splunk for several years. It's a great tool for log file visualization and analytics. One thing I use it for is to generate a graph of avera...

testing

How to write effective unit tests

Unit tests differs from integration testing primarily in terms of what you’re testing for. Where as with integration tests, you testing for whether the entir...

Python Mock Cookbook

The python mock library is one of the awesome things about working in Python. No matter what code you’re unit testing, it’s possible to mock out various piec...

threads

timezone

Per user timezones in Django

A common requirement for sites that deal with dates (most of them), is to display date and time values in the individual user's timezones. Luckily, there ar...

tmux

tutorial

Dynamic Attributes in Python

One of the strengths of a dynamic language is that it allows you to more easily work introspection and light weight meta-programming into your every day code...

twitter

jQuery hashtag input control

This jQuery snippet will turn an INPUT element into a hashtag input control. For example, if the user type "jobs business networking", it will translate it ...

ubuntu

Switching from Ubuntu Unity to LXDE

Canonical was founded with the goal of bringing polish, consistency and usability to the Linux desktop. Derided unfairly by some as not contributing much tec...

Ubuntu keyboard shortcut cheatsheet

Everyone assumes that using keyboard shortcuts is more efficient than using the mouse. But by how much? One 2005 study found that keyboard shortcuts are app...

Letting ssh remember your passwords

If you're like me, you ssh into the same small set of machines over and over. Maybe sometimes you run commands that sit on top of ssh, like scp for file cop...

ui

unit-tests

unity

unobtrusive

Chained Select Progressive Enhancement

Perhaps you have encountered a chained select control in your travels. The canonical example would be on Monster or CareerBuilder, picking your area of expe...

upstart

userscripts

uwsgi

vagrant

varnish

varnishlog top pages by IP address

Here are some quick recipes for getting information from varnish about top offending IP addresses, which pages those IP addresses are accessing, and which I...

Nagios check for Varnish Backends

We recently starting using Varnish to cache un-authenticated requests to our web farm. It even has this great feature called grace mode, where it will keep ...

view

Keep Track of Vim Tabs Per Git Branch

Mylyn is a “task lifecycle management framework” plugin for Eclipse. I’m not 100% sure what that means, but I know I really liked one particular feature. On ...

The Post/Redirect/Get (PRG) Pattern

Anyone who has used a web browser has probably encountered the dreaded “form resubmission” dialog. This happens when the user tries to refresh or use the bac...

vim

pydev colorscheme for gvim

I'm trying to make the switch from Eclipse to vim. I've started compiling a vimrc github project. So far, the only customization I had to implement myself w...

Stupid vim tricks

Quick hit today. Ever open a file in vim, only to realize that you need sudo to write to it? Usually, you have to exit out of vim, open vi as sudo, and make...

vpn

web

workplace

xml

Parsing invalid xml with Beautiful Soup

Sometimes, bad xml happens to good people. In my case, I was getting a text stream back from a web-service call that proported to be xml, but was actually n...

Using JAXB without a schema

A Yahoo HotJobs API project has been my first exposure to REST APIs. Usually, I'm working with SOAP web-services. Bullhorn is actually thinking about trying ...

xmlspy

Using JAXB without a schema

A Yahoo HotJobs API project has been my first exposure to REST APIs. Usually, I'm working with SOAP web-services. Bullhorn is actually thinking about trying ...

xorg

xss

Sanitize HTML with Beautiful Soup

If you have a website that displays user-generated HTML (emails, rich text entry, etc), you likely want to scrub that HTML before you display it. At the ver...

youtube