In a chat interface, text is the natural medium. The user is driving, and free-form text is the right tool for “here’s where I want to go next.” But sometimes the AI is the one that needs something specific from the user, and the moment that happens, text flips from the obvious choice to a bad one: ambiguous, high-friction, and one more thing the model has to parse and…
Like most devs, I keep a mental backlog of useful-to-me project ideas. In my younger (pre-kids) days, I’d easily spend 20 or 30 hours a week playing around with personal projects, interesting programming languages, or new frameworks. As I grew and felt more constraints on my personal time, that changed; it became a few hours here-and-there, spread sparsely. Personal dev projects became…
I’ve been using QubesOS (a xen/fedora distribution focused heavily on security by isolation) for a couple weeks now, and I’ve been really enjoying it. There are plenty of rough egdes when it comes to user-friendliess (granted, I’m on a beta release), but I’ve been able to get some pretty cool stuff working. Probably the coolest is having an independent VM which acts as a…
The next virtualization strategy I’m testing out is KVM. I’m using Proxmox as the management layer (similar to how I used XenServer on top of Xen), and this provides a nice API, command-line interface, and web-based GUI. Proxmox also makes it easy to do common tasks like pool servers and live migrations. To start, the first task is to automate getting a VM running. Xen and KVM KVM…
Having spent a week playing with various features of XenServer (with a focus on automation), I’ve only scratched the surface of what it can do. I have a sense, though, for the power of the system, and what it would take to get it to work at my company. It has all the features that we need to start, some nice-to-have features that we’ll probably use, and then extras beyond that which we…
One of the great features of a hypervisor management suite like XenServer is the ability to migrate a running VM from one physical host to another without affecting running services on that VM. This allows you to balance VMs appropriately across your hypervisors, as well as evacuate a hypervisor so it’s safe to perform maintenance. Doing this migration through the GUI gives you a…
Using Xen pools, you open the door to a lot of cool features, including high availability of VMs, migration of running VNs, and automatic placement of machines. Setting up the pool is pretty easy. Prereq There are some requirements/recommendations for pool servers listed in the XenServer docs . For me, I’m using identical hardware, so the only weird thing I had to do was to unbond my private…
Creating VMs from scratch in XenServer is a bit of a hassle, but that’s OK because it’s not a frequent task. Typically you’d create one (or a few) base templates, and then make copies whenever you want to spin up a new disk. This process is very simple and straightforward in XenServer, and easily automated. Prep Using the method described in my last post , create a basic install…
When creating a new virtual machine in XenServer, the typical path is to clone a pre-built template of the type of linux/Windows you want to install, and add a network repository from which it can grab its packages. While this works well for popular OSes, it doesn’t help when you want to install something. To work through the manual process of installing something custom, I got Vyatta setup…
I’m starting to dive into choosing from a variety of server virtualization options for work in order to determine which solution to roll into our environments. First up is XenServer , with which I’ll stand up a pool of a couple machines and test out provisioning new servers, live migration, network isolation, and other cool features. While these tasks are more straightforward using the…
At my job, we have quite a few servers, all on dedicated hardware. Most of our servers relate directly to storing data on disk, and so physical hardware makes sense. For the scores of random, smallish servers, though, physical hardware is overkill. To help manage this inefficiency, we’re looking at various virtualization options, including XenServer, KVM, and containers/jails/zones. To…
I bought an antique telegraph sounder a while back, and I’ve been working on a project that will click out emails from my Etsy store when I get an order. I’ve gone through several generations, and come up with something I really like. What follows is a description of my process for going from concept to finished piece. The code & PCB are open-source, and can be found on my github .
When setting up a new Raspberry Pi , it’s helpful to have console access, which could mean hooking up a screen and keyboard to the pi. Another option is to connect your pi to your computer with a USB cable, and connect to the serial console (similar to connecting via SSH or telnet). You need a special cable, but it saves you from having to keep a monitor and keyboard just for the pi.
At TempoDB , we maintain multiple environments (production, staging, etc), and each environment is in a datacenter (Dallas, Seattle, etc). For the most part, we want strict separation between environments, but we have a growing list of traffic that ought to be allowed to flow between them (see below). We designed a new architectural primitive which allows us to securely permit some traffic, while…
I picked up a new Mac Mini this Friday to play around with Xen at home. Right now I run a few services off of one server in my apartment, but I’d prefer to have separate VMs for each service, because I find that more manageable. The platform I’m using is XCP (Xen Cloud Platform; an open-source alternative to Citrix XenServer). It requires the whole drive, so dual-booting isn’t an…
I put up a handful of small servers with SSH honeypots running, and have been watching who tries to break in. I didn’t publicize the addresses, or point any DNS at them, but they almost immediately got found by hackers across the globe. Here’s a visualization and analysis of the data so far. What’s a Honeypot? A honeypot is a fake service that runs on a standard port, waiting for…
(Cross-posted to blog.tempo-db.com ) In addition to our REST API and language-specific client libraries, we now offer the ability to bulk import data by uploading CSVs. The intent of this feature is to support the initial load of large amounts of historical data (many millions or billions of data points). By sending us CSVs (instead of just using our API normally), customers save themselves from…
I opened my Etsy store in January (about 9 months ago), and have learned a lot about effectively marketing my store. For the first several months I was trying everything I could think of to increase my visitor count, and I did get a ton of people coming into my store, but the effort required on my part was substantial, and 3 months in I lost interest. That’s when things got interesting.
I have two similar data collection projects, both of which collect time-series data and serve it up with graphs and such. The first one I did uses postgres, and manually (in code, not postgres) manages averaging, data at various resolutions, and a few other complicated issues that are inherent in time-series data. For the second project , I went with RRD instead of postgres, and it vastly…
A while back I built my own thermostat using an Arduino, nodejs, and Google Calendar. It worked really well, but when I moved to a new apartment last year I couldn’t use it (because I now have window units instead of centralized heating/AC). I finally got around to putting it back together this weekend, but I had to rip out the (now unused) thermostat code. What was a…
The site I’m working on now , deploys as static files. I haven’t put up a non-server-side-dynamic site since high school, so I’m exploring my options. I thought I could just throw the whole thing up on Amazon S3, but was surprised that it was slower than the current setup (nginx on Linode). I have been reading about the importance of fast load speeds on conversion, google…
My Etsy store has been doing well, but I’d like to overcome the friction of requiring an Etsy account. To reach a wider audience, I’d like to additionally offer my products on a site that wasn’t specific to a community. To that end, I created a tool which generates a static HTML + Javascript eCommerce site. Here’s the result: Creative Retrospection . Goals I looked at a few…
It’s hard to say what sort of sales rate is reasonable or average for a new Etsy store. I spend a fair amount of time in the team forums, and the general consensus I’m getting is that it’s really hard to make any/many sales for smaller shops, but that larger shops (100+ items) tend to make several sales per week. Given that understanding, I have set a goal for myself that I think…
I opened my Etsy store two weeks ago today, and I’ve learned a ton in the time. I have a long way to go before having any significant success, but it’s a fun experiment and side-project for me. Here’s where things stand so far. Sales First and foremost, I got my first two sales at just under two weeks in. This is great, mostly because it’s encouraging. I am well beyond my…
I’ve been experimenting with laser cutting lately, and starting to get some results I like. It turned out to be more accessible than I expected, and what started as a single-purpose project is growing into an interesting creative outlet (You can follow my experiments on my Etsy store ). Here’s what I’ve learned so far. Why & What to Laser Cut Laser cutting is awesome. You create…
Here’s a quick post to show off my first project using the LED canvas I have been working on (nicknamed Square Wave). It’s based on the old snake game , where the player controls a snake that slithers around looking for apples that appear and disappear. When he finds (and eats) an apple, he grows. When he crashes into himself, he dies. Watch on YouTube Code The code is open source, and…
Arduino is awesome, but using their IDE is uncomfortable for people that would prefer vim or emacs. There is an option in the IDE to allow you to use an external editor, but you still need to use the GUI to get access to the compile & upload tools. Here’s my setup, for a vim-only setup (would be similar for emacs). Goals My goals for this project are simple: Proper syntax highlighting…
As prep for future projects, I’ve built a simple 2D array of individually addressable LEDs. This canvas will ultimately serve as the platform for some games (snake, pong, etc), but I’m hopeful that other people will find this useful and come up with some cool applications. The Hardware I previously wrote about different types of LED strips. For this project, I went with the cheaper…
I picked up a telegraph sounder on ebay this week. I don’t know much about its heritage, but it definitely looks vintage. I wrote some code (see below) to get my Arduino to clack away on it. In the video, the sounder is tapping out the Gettysburg Address, which is the example text in the code. How Telegraph Sounders Work Mechanically, they are very simple, which is the reason that, even…
LED strips are growing in popularity and ease of use. I’ve been playing around with them lately (with my Arduino), and, for the uninitiated, here’s an overview of what’s available, and how much it costs. Introduction The strips are flexible ribbons of PCB material, with LEDs periodically fixed on them. They come in two basic varieties: addressable and non-addressable. With an…
Ruby’s standard library includes the Singleton module, which lets you easily implement the singleton pattern. It can make unit testing a little difficult, though, because you cannot easily instantiate different versions of the class. This post will look at three solutions, two of which are hackish/wrong, and one of which is basic and clean (imho). The Problem Let’s say we have a…
At Braintree , the developers get every other Friday to work on non-work-related projects of their choosing. Collaboration is encouraged, but even if you end up working on something alone, it’s a great way to spread your excitement about whatever interests you at the moment (and it’s a nice perk to the job). This week, my project was to get some LED strips unboxed and working. The…
Before releasing my coffeescript RRD library , I needed to write some tests around it (RDT: Release-Driven Testing). I went with Vows (in coffeescript), and I had no problems writing tests around the few synchronous ( gasp ) functions, but the asynchronous parts just didn’t work. At first, I punted on it, and switched my vows from coffeescript to javascript (which all the docs/examples are…
I’ve completed the first pass of what seems to be a popular electronics self-education project: a home thermostat. I’ve already written about some of the software, and now I’d like to share some of the hardware details. Detecting the Temperature The brains of the project is an arduino nano (a digital microcontroller). It has an input connected to a temperature sensor from…
For Hot or Not , I wanted to leverage as much existing code (open-source libraries) as possible, so I could focus on the more interesting application logic. I found a library to work with the database (RRD), but there were a few things about it that didn’t fit my needs, so I ended up releasing a new library. What follows are the reasons I decided to build my own solution, and the downsides…
Last week I had a post make it to the Hacker News front page, and my site immediately went down. After fighting with it for a while, I was able to get it limping along well enough to last the day, and since then I’ve made several simple changes that serve as a much more robust solution. I imagine there are a ton of self-hosters out there with similar setups as I had, so hopefully the details…
Recently, I’ve worked on two projects ( Power Hungry , Hot or Not ) which (among other things) collect write-once data over time, and graph the results. The projects collect very different data, but this task was painful enough in postgres that I ended up switching to a temporal database for the second go, and it made the data collection & querying much easier. What follows is a brief…
My latest project, Hot Or Not, is live! It combines Arduino, NodeJS, Coffeescript, and Google Calendar, to make a thermostat which is remotely controllable via the internet. You can check out graphs of the data on the site , and get the code on github . There were three basic things I wanted to address with this project. I will discuss each in more detail in future posts, but here’s an…
I finished my first significant electronics project in a while: Power Hungry . The idea is that I use sensors to monitor the actual voltage & amperage usage of various devices in my apartment, and I wirelessly transmit that to a base station, which calculates various statistics. The results are then beamed to my linode server, where I have some graphs of the data. The ultimate goal is to use this…
I recently picked up a graphic LCD display and a clear touchscreen panel for a project I’m starting. They’re a lot of fun (and pretty cheap), but there are a lot of wires needed to get it hooked up, which means it’s somewhat fragile to move around. If (like me) you like to move around when you code (couch/coffeeshop/bed/etc), then you’ll want to build a breakout board for…
For Inspectinator (a sinatra microapp), I needed a database-less authentication solution that was as lightweight as possible, but with a reasonable amount of security and maintainability. I came up with something that suits this purpose well, and I’m sharing it in case anyone is looking for something similar. I call it EasyAuth. To use EasyAuth to authenticate your sinatra app, you first…
I’ve been wanting to experiment with sinatra for a while, so I popped something off my things-to-do-someday list and put together Inspectinator . It’s aim is pretty straight-forward: parse standard ruby #inspect strings into a more palatable form. It parses a string into a system of nested objects, and displays it as a tree. Some simple jQuery let’s you drill down to the level of…
For Inspectinator , I needed a lightweight token generator to allow people to share their results. I found a great solution, and learned a cool ruby trick, too. The trick is in Fixnum (and Bignum), #to_s takes an optional argument: a number in (2..36). That number is the base it will print the number in (default is 10). So, for instance (from the ruby docs), to convert a number to binary:
This weekend I was in Nashville, TN for Ruby Hoedown 2009 . There were some great talks – my favorites were Ben Mabey’s Cucumber talk , Luigi Montanez’s talk on using public data APIs for civic coding, and Jim Weirich’s excellent (and impromtu) talk on Git’s internals. After my recent difficulties with getting Rhodes working for mobile development, I was really…
I’ve been playing around with Erlang lately, and it’s been quite a departure from the language I’m most comfortable with (and use everyday): Ruby. As part of my exploration, I’m doing a variety of sample problems (from the “Programming Erlang” book, among other places) in both Ruby and Erlang, and comparing the different implementations I come up with. Erlang…
As part of my Erlang self-education, I’m doing a selection of sample problems (from the “Programming Erlang” book) in both Erlang and my language of choice: Ruby. The idea is to explore the differences between these very different languages. Today’s problem is to write a ring network benchmark. Given a network of N nodes, where each node is pointing to the next in line (or…
I came across this issue the other day at work, and I’m not really sure how I feel about it. It doesn’t necessarily seem right or wrong, but was definitely unintuitive for me… Since Rails 2.1, we have had dirty object checking, which prevents ActiveRecord from saving an object if if hasn’t changed: >> person = Person.first Person Load (0.9ms) SELECT * FROM…
Continuing towards my goal of developing an application in ruby for my Android (see part 1 ), I’ve been getting into Rhodes , which is an open-source project that aims to allow you to build native apps for a variety of mobile platforms, all from a lightweight ruby framework. For Android, it uses xruby (not Jruby). I started with the documentation at the Rhodes wiki , and checked out a Google…
Of course, now that I have a new G1 , I want to start writing apps for it. Android apps are written in Java, but not having touched that since college, I started looking at ways to get ruby onto it instead. There was plenty of chatter about the possibility of running jruby on the device, but there are also frameworks that claim to allow you to write apps in ruby and push them to a variety of…
I use vim daily for my routine development work, and I get along fine with it. When I first got into it, I scrambled up the steep learning curve until I got to a plateau where I could be productive, and haven’t given it much thought since then. I can do all the basic stuff (and a few cool tricks), but other than that my editor is pretty low on the list of things I want to devote thought to.