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 step and I’d like to talk about it.
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 ancient-in-computer-years game Rogue. In a roguelike, the world you play in is randomly-generated and the gameplay is exceedingly hard. Together this makes scenarios you can’t win even with perfect play. And there’s no save-and-reloading, so forget trying multiple ways to get out of a bind.
Read more...
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 to figure out as I expected.
Here’s the shell function I ended up with:
findup() { _path=$(pwd) while [[ "$_path" != "" ]]; do if [[ -e "$_path/$1" ]]; then echo "$_path/$1" return 0 else _path=${_path%/*} fi done return 1 } The first few lines of this should be pretty obvious: I’m defining a function, then setting a variable, _path, to the current working directory.
Read more...
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 it, but couldn’t quite figure out why. I knew I wanted to as a feminist in order to make a small, tiny attack on the traditional way of doing things, but there was something deeper.
Read more...
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.
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 Unix-based machine I might log on to.
I keep my prompt setup in a file called prompt.sh, of course.
Here’s what my prompt looks like after running a command for 10 seconds that resulted in an error:
Read more...
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 awesome teens and teach them to program in Python all day, which was awesome. I am one of the rare people who enjoys public speaking, and I love helping people learn about technology, so I was in heaven.
Read more...