Clinton Dreisbach

Dad, programmer, game designer.

2017

Word to color 2017-02-13

I had to write some code today to convert words into colors, which was a lot of fun. I liked it so such I had to put a working example online. The code is a simple function. How it works: We have three channels: red, green, and blue. Iterate over the...

2017

A simple guide: reinforcement learning 2017-02-07

I ran across an article in Wired about a poker AI that can beat human champs. Buried a few paragraphs in, I saw: "[Libratus, the AI] relied on a form of AI known as reinforcement learning, a method of extreme trial-and-error. In essence, it played...

2017

A favorite development tool: direnv 2017-01-03

direnv has been the most useful tool in my software development repository in the last two years. It's a simple tool: it loads and unloads environment variables when you move into or out of a directory. It's fast, extensible, and never screws up,...

2017

A good year except for that one thing 2017-01-01

It is a weird feeling to have had, except for the election and dire existential fear, a pretty good 2016. On a personal level, one of the most important years of my life. I went from having a baby and a 4-year-old to having a very active and bright...

2016

My programming story, part 5 2016-08-14

After I graduated from high school, I went to college like many of my classmates. I decided to go to the University of Alabama in Huntsville because I could afford it and it was as far from home as I could get in the state of Alabama. It probably...

2016

Building Dashboards with Django and D3 2016-07-18

I gave this talk at DjangoCon 2016. The slides I used are embedded below. Check out the open-source code behind this and the live preview. My workplace recently collaborated with several police departments to build a dashboard showing 911 (also known...

2016

PyCon 2016 2016-06-02

I just arrived home from PyCon 2016. It was a fantastic experience, on par with the year before. I didn't go alone this time: I brought four of my great co-workers and also ran into a lot of old and new friends. It was so hard to decide which talks to...

2016

P-Values and Confidence Intervals Made Easy 2016-06-01

I was recently asked to give a lecture explaining p-values and confidence intervals to budding Python programmers. Given that I don't have a stats background at all, I was pretty intimidated, but I learned a lot from Jake Vanderplas' "Statistics for...

2016

A Guide to Docker 2016-04-05

I'm using Docker on my latest project at work. When I wrote up a guide to using it for my co-workers, they asked if I'd make it public. Here it is, made general. Docker is a tool to coordinate the different parts of an application. It allows us to run...

2016

Simple Ansible Makefile 2016-02-28

I love using Ansible for deploying projects these days, but I don't like typing the same long command over and over. It's usually something like this: ansible-playbook -i hosts --vault-password-file=.vault-password.txt site.yml It's simple to create a...

2015

Year in Review 2015 2015-12-30

Every year seems bigger than the one before, but 2015 felt stuffed -- in a good way. Family My two sons turned 4 and 1 this November. I'd already forgotten what it was like to have an infant and then a baby. It is amazing and tiring and weird. Two...

2015

Converting to Lektor 2015-12-27

My blog has been hosted on Silvrback for the last year or so, and I've really enjoyed it. As a service, they do a great job and I'd recommend them to anyone. I've been cutting back expenses, though, and trying to host more of my stuff myself. A few...

2015

Building scikit-learn transformers 2015-06-07

scikit-learn is a great library for doing machine learning in Python, and one of my favorite things about it is its interface. All objects in scikit-learn, whether data transformers or predictors, have a similar interface, making it easy to use your...

2015

PyCon 2015 2015-04-13

PyCon 2015 was an incredible experience. This was my first PyCon, and I was amazed at the welcoming community and the level of quality. At most conferences, the talks are hit-and-miss: for every great talk you see, there's one you don't get a lot out...

2015

A mutineer's handbook 2015-03-17

I started reading Laurie Penny's Unspeakable Things over lunch today and found the best sentence: Public 'career feminists' have been more concerned with getting more women into 'boardrooms', when the problem is that there are altogether too many...

2015

How to be a better feminist ally 2015-01-18

This last few days online have been awful for anyone with a heart in the tech world, from Linus Torvalds continuing to be a bully and pshaw the need for diversity to outpourings of rage over this to the backlash against that rage, including doxxing...

2014

Deathly sore 2014-12-15

I took my son Dashiell to something called Defy Gravity today. It's a giant room filled with trampolines, plus something called a "ninja course." Did you know jumping on trampolines is hard work? When I was a kid, I thought it was the easiest thing in...

2014

Demo Day December 2014 2014-12-14

At the end of each semester at The Iron Yard, our students present their final projects to the local development community and potential employers at our Demo Day. We had our most recent one this Friday, and it was fantastic. It was particularly...

2014

My programming story, part 4 2014-12-12

The summer between my junior and senior year of high school, I lived with my grandma in Auburn, AL, and attended Auburn University for a semester, taking Chemistry 101, Calculus 101, and a computer science course that used Fortran. My grandma was...

2014

My programming story, part 3 2014-12-11

Windows and Visual Basic happened for me at the same time. My parents got a new computer with this Windows operating system on it. I'd never seen a graphical user interface before, so it blew my mind, but I couldn't figure out how to make it do...

2014

My programming story, part 2 2014-12-10

Around 1986, I discovered Logo). It came on a cartridge for my PCjr, and I was very excited to find out there was more than one programming language in the world. (I know, how did I not know this? We lived in a pre-Internet world, though, and I lived...

2014

My programming story, part 1 2014-12-09

I wrote my first program on an IBM PC XT my parents had bought to run the books for their farm. It was in the BASIC programming language. That computer came with a collection of ring binders, one of which contained a reference for BASIC. I don't...

2014

My theory of code schools 2014-12-08

Note: I'm an instructor at The Iron Yard. Nothing in this blog post is their opinion or endorsed by them. I doubt any of it is controversial,but it's my thoughts and doesn't necessarily reflect anyone else's. When I first considered working at a code...

2014

Better terminal history using bash 2014-12-07

When working in the terminal, I find it very useful to be able to quickly search through what I've done before. Often there's a command that you used that you can't quite remember. The default shell on most computers is bash, and you can customize it...

2014

Memories from a big rig 2014-12-06

My dad owns and operates a turfgrass farm. When I was a young kid, I would go on deliveries with him. He'd drive an eighteen-wheeler loaded with grass, usually to Columbus, GA. There was a time he listened to a lot of Tony Robbins audiotapes. That guy...

2014

Two semesters of teaching 2014-12-05

I've just hit the end of my second semester teaching at The Iron Yard here in Durham. (Well, it's a week from the end, but I got knocked out of commission early because of this guy. Thanks to everyone on staff for being supportive and letting me...

2014

Building a classification engine 2014-12-04

Tonight, I built my first stab at an engine for the Reading Machine to classify articles that get pulled in via RSS or social media links as interesting or not interesting to me. I already see a few problems with what I built, but it's a good first...

2014

Dad snapshots 2014-12-03

The other day, Dashiell and I were headed to Little River Regional Park to learn about birds together. Even though it's December, it was over 60 degrees out, so we had the windows rolled down. I was playing Public Enemy's "Welcome to the Terrordome"...

2014

For the love of Brogue 2014-12-02

There is no computer game I have spent as much time playing as Brogue. Brogue's your standard person-goes-in-a-dungeon-and-kills-stuff sort of game, but more importantly, it's a roguelike, a particular style of game born from the...

2014

Normalizing text with Python 2014-12-01

For the Reading Machine, I've started by tackling the problem of classifying articles as interesting or not interesting. To do that, I need a normalized set of words in an article to compare probabilities. (This uses naive Bayes classification, which...

2014

Recursively searching up directories 2014-11-30

I found myself needing to search up the directory tree for a specific file recently, much like git does to find the .git directory above it or rbenv does to find the .ruby-version file that will tell it which Ruby runtime to use. It wasn't as simple...

2014

The Reading Machine 2014-11-29

Google Reader's death affected me hard. Not emotionally -- Ask Sandy's death, now that was emotional -- but as a consumer of information. It left a big hole that nothing's filled for me. Now it's a storm of articles linked to on Twitter, sometimes put...

2014

Five Pounds, Eleven Ounces 2014-11-28

Today, I watched my son Thorin get born. His momma worked very hard and he slipped out into the world. We spent 36 long hours getting him there and I am so tired I am going to fall into a coma, but it was the most beautiful thing I've ever seen.

2014

Thankful, 2014 2014-11-27

This year, I'm thankful for: My wife and son, so much. They are the reason I do it all. My new son, soon to be born! I cannot wait to meet you, little guy! I felt your foot through your mom's belly the other night and it was super-weird but also...

2014

Istanbul (not Constantinople) 2014-11-26

Around three years ago, I began the process of changing my name from Clinton Nixon to Clinton Dreisbach: that is, I took my wife's last name. I did it six years after we were married, which made it a bit more unusual. For years, I'd been considering...

2014

Beating the Odds 2014-11-25

I love making little games in new programming languages. Blackjack is one of my favorites to implement, and I often give it as a first-week assignment in my programming classes. Lately, I've been in love with making Monte Carlo simulations. When I was...

2013

My bash prompt 2013-10-29

My prompt has expanded and contracted over the years. When developing more in Ruby and Python, I found it very important to keep my current language versions in the prompt, but these days it's more important to me that my prompt works on every...

2013

Teen Tech Camp 2013 - Python and Pi 2013-08-17

On August 13, I was lucky enough to get to help with the 2nd annual Durham County Library Teen Tech Camp. It was organized by Julia Elman and Sarah Kahn, while Kurt Grandis developed the curriculum. All I had to do was stand in front of a room of...

2012

Quines! 2012-02-17

A quine is a program that, when run, outputs itself. Here's one you can run in your browser: quine = function () { console.log("quine = %s; quine()", quine) }; quine(). "Whorld" by Zol, using Context Free ArtIf you are using Chrome or Safari to look...

2012

Hunt the Wumpus using Racket 2012-02-05

"Hunt the Wumpus" was the first game I ever typed into a computer. Gregory Yob wrote it in the early 1970s, and I found it in The Best of Creative Computing, Volume 1. I copied the code painstakingly into Disk BASIC on an IBM PC XT. And then I played...