keynav - retire your mouse.

Keynav is a piece of an on-going experiment to make pointer-driven interfaces easier and faster for users to operate. It lets you move the pointer quickly to most points on the screen with only a few key strokes.

Note that I said pointer, not mouse. The mouse simply drives the pointer. We can drive the pointer with other devices too. keynav turns your keyboard into an fast pointer mover.

What does it do?

You select a piece of the screen. The screen is initially wholely selected. One move will cut that region by half. A move is a direction: up, down, left, and right.

Read more...

Debugging java threads with top(1) and jstack.

At work, we’re testing some new real-time bidding on ADX and are working through some performance issues.

Our server is jetty + our code, and we’re seeing performance problems at relatively low QPS.

The first profiling attempt used YJP, but when it was attached to our server, the system load went up quickly and looked like this:

load average: 2671.04, 1653.95, 771.93

Not good; the load average while running with the profiler attached jumps to a number roughly equal to the number of application threads (3000 jetty threads). Possible PEBCAK here, but needless to say we couldn’t use YJP for any meaningful profiling.

Read more...

SSL handshake latency and HTTPS optimizations.

At work today, I started investigating the latency differences for similar requests between HTTP and HTTPS. Historically, I was running with the assumption that higher latency on HTTPS (SSL) traffic was to be expected since SSL handshakes are more CPU intensive. I didn’t really think about the network consequences of SSL until today.

It’s all in the handshake.

TCP handshake is a 3-packet event. The client sends 2 packets, the server sends 1. Best case, you’re looking at one round-trip for establishing your connection. We can show this empirically by comparing ping and tcp connect times:

Read more...

fex - flexible token-field extraction

What is fex?

Fex is a powerful field extraction tool. Fex provides a very concise language for tokenizeing strings and extracting fields.

The basic usage model is that you provide a series of delimiter and field selection pairs. Tokens can be any character, while field selections have a specific syntax.

Download

Releases are available on GitHub.

Sometimes simpler than cut and awk

cut(1) from GNU coreutils (on Linux) does not support negative offsets, so you cannot ask cut to only show you the Nth field from the end. Additionally, to cut by multiple fields, you end up having to write cut ... | cut ... | cut ...

Read more...

Headless wrapper for ephemeral X servers

For various projects I’m doing right now, I need an easy way to automatically run code in an X server that may not necessarily be the active display. This code may even run on servers in production that don’t have video cards or monitors attached.

For some history on this, check out this post on xvfb and firefox. You can solve the problem in that post by simply launching firefox with the tool below, and your X server will exit when firefox exits.

Read more...

Dynamic DNS and DHCP - Easy to do, and you'll thank yourself later

Preface

This article will cover how to setup dns with dynamic updates aswell as configuring your dhcp server to push updates to it aswell.

I assume you already know how to setup plain old dns aswell as plain old dhcp. This is not an introduction to either of those. I used BIND 9 and ISC DHCPD v3 for this article.

If there’s anything this article doesn’t cover with respect to what you are looking for, leave a comment and I’ll do what I can.

Read more...

Xvfb + Firefox

Resig has a bunch of unit tests he does to make sure jQuery works properly on whatever browser. Manually running and checking unit test results is annoying and time consuming. Let’s automate this.

Update (May 2010):

See this post for more details on automating xserver startup without having to worry about display numbers (:1, :2, etc).


Combine something simple like Firefox and Xvfb (X Virtual Frame Buffer), and you’ve got a simple way to run Firefox without a visible display.

Read more...