SQL schemas should have documentation strings

May 16, 2013

One thing I spend a lot of time doing at work is pick­ing apart appli­ca­tions writ­ten by peo­ple who have come before me and left leav­ing nary a trace of their inten­tions. Soft­ware devel­op­ers should write more com­ments. It’s either a form of hubris to think that you will be the last per­son to see your code and you will never need to reread it, or a form lazi­ness to sim­ply not care and take the time to type some sim­ple, high­-level doc­u­men­ta­tion into your code.

How­ev­er, occa­sion­ally it’s not the devel­op­er’s fault that there are no com­ments. Some­times com­ment­ing just does­n’t make as much sense. One such place is in SQL schemas... Read More

The Right/Left Spectrum is a Political Delusion

April 18, 2013

The polit­i­cal spec­trum across the devel­oped world is often divided along the lines of Right ver­sus Left. This dichotomy dates back to the French Rev­o­lu­tion when mem­bers of the Gen­eral Assem­bly clam­ber­ing most for change and rad­i­cal action sat to left of the cham­ber while those who urged cau­tion sat to the right. Since then, this dual­ity has become part of the stan­dard tax­on­omy for nearly every polit­i­cal move­ment.

These days, politi­cians are either ‘Right-wing,’ ‘Left­-wing,’ or more occa­sion­al­ly, ‘Mod­er­ate.’ George Bush was right, Obama left. The Tea Party is right wing, while the Green Party is left wing. Anar­cho-syn­di­cal­ists are left­ists, while anar­cho-­cap­i­tal­ists are right-wingers. Every­thing and every­one is either left or right, lib­eral or con­ser­v­a­tive, Bol­she­vik or Bour­geois, and peo­ple fight long hard ver­bal wars over who belongs in which cat­e­go­ry... Read More

My Embedded Music Player and Sound Server

April 10, 2013

Some months ago, I got a Rasp­berry Pi in the mail and pro­ceeded to install MPD on it. After a few days play­ing with an embed­ded MPD server and fig­ur­ing out what I liked and did­n’t like about the arrange­ment, I decided on a sig­nif­i­cantly more elab­o­rate project to build on it. I wanted to be able to con­trol the play­er, even if all of the com­put­ers in the house were off. I also wanted to run player while using my desk­top, which I could­n’t really do because they shared the same desk­top speak­ers. I ended up with a list of fea­tures for an embed­ded music sys­tem... Read More

A kind of an alarm clock

March 08, 2013

One thing I’ve writ­ten about before is the prob­lem of Compulsive Inter­net Use before. One thing I’ve tried in the past to deal with is was my Shutdown Nag. This, at the time, was a quick exten­sion to my Window Manager which would lock the com­puter at a pre­set time and then give me the oppor­tu­nity to save my work before shut­ting the com­puter down for the night. It worked rea­son­ably well, but I’ve since changed the win­dow man­ager I use from Stumpwm to Xmonad and the old tool no longer works. I’ve since intended to replace it with a sim­i­lar win­dow man­ager agnos­tic tool, but had­n’t the will to actu­ally go through the effort to write it, until now... Read More

Reading a Rotary Encoder from a Raspberry Pi

January 30, 2013

I wanted to attach a knob to my Raspberry Pi to act as a vol­ume con­trol for my MPD based jukebox. Tra­di­tion­ally vol­ume con­trol devices are imple­mented with poten­tiome­ters act­ing as inputs for ampli­fiers. A poten­tiome­ter is a hard­ware device with a knob or a slider that, in a word allows for a vari­able volt­age input into a cir­cuit. (Potentiometers are called ‘pots’ for short and their very com­mon. You prob­a­bly inter­act with them every day even if you don’t know it. If you’ve ever used a phys­i­cal vol­ume con­trol on an ampli­fier or a pair of speak­ers or an ampli­fier or a knob on a dim­mer switch, that knob was prob­a­ble attached to a ‘pot’.) The prob­lem here is that this is a very hard­ware ori­ented method of set­ting vol­ume, when what I really wanted to do was set the software vol­ume set­ting on the Rasp­berry Pi. I wanted to be able to change the vol­ume from the oper­at­ing sys­tem (a la alsamix­er) or through the MPD client, and still be able change it up or down by phys­i­cally turn­ing the knob on the device. Essen­tial­ly, I wanted the ALSA PCM ele­ment vol­ume to increase as I turned the knob clock­wise, and decrease as I turned the knob coun­ter­clock­wise, I wanted to actual vol­ume to be inde­pen­dent of the posi­tion of the knob and because a poten­tiome­ter is an absolute input device which returns it’s posi­tion and can­not be turned indef­i­nitely there was no way to make one work for what I need­ed... Read More

Idle Internet is Bad for the Soul

January 23, 2013

Waaay back when I first fin­ished col­lege and moved out on my own, I remem­ber tak­ing a small amount of pride in not intend­ing to own a tele­vi­sion set. My think­ing was that if I did­n’t own a tele­vi­sion, I could avoid some of the most addictive dis­trac­tions that mod­ern peo­ple deal with. Rather, all I would get was an Inter­net con­nec­tion, which would be much more edu­ca­tion­al, pro­duc­tive, and less addic­tive than tele­vi­sion. I would spend my time chas­ing ‘el­e­vat­ing’ pur­suits. I could be a mod­ern renais­sance man.

Damn I was a fool... Read More

My New Raspberry Pi

December 01, 2012

So, after 6 months of wait­ing, a Raspberry Pi finally arrived in the mail a few days ago and I’ve finally had the chance to play with it.

Brand New Pi ... Read More

Election Ideas

November 09, 2012

One of the endur­ing com­plaints peo­ple have with Amer­i­can polit­i­cal sys­tem is the two party sys­tem. We have two war­ring polit­i­cal par­ties which posi­tion them­selves in the cen­ter of Amer­i­can pol­i­tics and take oppo­sites sides of every con­tro­ver­sial issue at stake and them some. They cre­ate an arti­fi­cial dichotomy where Amer­i­can vot­ers are con­sis­tently forced to choose side on issues which they would oth­er­wise not care about in order to choose the “lesser” of two evils. The two par­ties have a polar­iz­ing effect on Amer­i­can pol­i­tics where peo­ple are lumped into “right” and “left” cat­e­gories and have their views increas­ingly flan­der­ized. The two party sys­tem is clearly a prob­lem, but how can it be dealt with? Here are a few sug­ges­tion­s... Read More

The "Numbers" Stations

October 25, 2012

So I’ve recently come across “num­bers” radio sta­tions. What these are, are short­wave radio sta­tions across the world which reg­u­larly broad­cast streams of seem­ingly ran­dom num­bers. To give you an idea, here’s a record­ing of the Lincolnshire Poacher:

... Read More

Why Git Needs an Editable History

August 29, 2012

Once upon a time, I was work­ing on a per­sonal pro­gram­ming project which I kept in a pub­lic repos­i­tory on Github when I unthink­ingly com­mit­ted some sen­si­tive infor­ma­tion into git and pushed it to the repository.(It was a data­base login. I know that I could have just changed the login; I did so, and later deleted he whole data­base. That’s not the point. It’s impos­si­ble that you did­n’t use a sim­i­lar pass­word else­where and even if you did­n’t, it could still reveal infor­ma­tion about your pass­word cre­ation process. It’s bet­ter to restrict that kind of infor­ma­tion as much as pos­si­ble and not get sloppy.) It was a remark­ably hare­brained mis­take I admit, but these things hap­pen to every­body sooner or lat­er. Any­way, I did­n’t notice my mis­take right away and I pushed a lot more changes to the pub­lic repos­i­tory before notic­ing what I had done, sev­eral mon­th’s worth... Read More

Smart People

August 18, 2012

Smart peo­ple some­times believe the dumb­est things. I know peo­ple who can read through mas­sive tomes in an after­noon, trans­late pages from one dead lan­guage to another and yet despite all evi­dence to the con­trary, believe fer­vently in the effi­cacy of home­o­pathic medi­cine. I’ve known oth­ers who are con­vinced that George Bush ini­ti­ated the bomb­ing of the World Trade Cen­ter but are oth­er­wise as well spo­ken as any per­son your likely to meet. I know a man who can hold the designs for vast com­puter net­works in his head yet still believes every­thing he reads in the news with­out ques­tion, so long as reaf­firms his prior belief­s... Read More

Functional Parsing With Clojure

May 21, 2012

Recently I built a small webapp to allow me to view my org files online. I know that I can export org files to HTML and scp them to my server, but this was for a TODO list among other things and I wanted to both pass­word pro­tect it and pos­si­bly also make so that I could per­form sim­ple edits to the file from the web. As a result, I decided to write a webapp which parsed and con­verted the org file to HTML on the fly with each request. What resulted was a very sim­ple web appli­ca­tion, writ­ten in Clo­jure, which can dis­play a direc­tory of org files online. If you want to use it, you can get the code here.

Any­way, while writ­ing this, I strug­gled a lit­tle with Clo­jure’s mostly func­tional nature to write an effi­cient and clean parser/­trans­la­tor for the org files. The issue is that, for me, the most nat­ural way to parse some­thing more com­pli­cated than a sim­ple sequence of tokens, is to use a state engine to keep track of the con­text while pars­ing in each new char­ac­ter, line, or token... Read More

The Million Dollar Space Pen

May 07, 2012

In the 1960’s NASA needed a writ­ing instru­ment that could be used in the vacume of space. In order to com­bat this prob­lem, they spent over a mil­lion dol­lars on R&D in devel­op­ing the Astro­naut Pen. When faced with the same prob­lem, the Rus­sians used a pen­cil.

Or so the leg­end goes. Actu­ally the truth is a bit dif­fer­ent. In the begin­ning of the space race, both NASA and the Soviet Union used pen­cils. But pen­cils break, and they are also inflam­mable. In space, both of these things are very bad... Read More

On Pulling a Godwin

April 30, 2012

Godwin’s Law:

As an online dis­cus­sion grows longer, the prob­a­bil­ity of a com­par­i­son involv­ing Nazis or Hitler approaches 1.

In 1990, Mike Godwin made the above obser­va­tion. To date, it has held up, as peo­ple today seem to like com­par­isons to Hitler just as much as they did in 1990. In addi­tion, there’s a corol­lary to God­win’s law which states that if you are the one to make that com­par­ison, or to pull a God­win, then you are the one who is wrong... Read More

Why can't we do pipes smarter?

March 27, 2012

Some­times I think that Unix is pretty awe­some. You can strip it down to noth­ing but a ker­nel and a shell and maybe a few driver­s/­mod­ules and end up with a per­fectly use­ful, if min­i­mal, sys­tem. At the same time you can build Unix out into any­thing from a desk­top sys­tem to a high traf­ficked web­server to even a phone OS depend­ing on your def­i­n­i­tion of Unix. Unix is pretty flex­i­ble is what I’m say­ing.

A lot has been writ­ten about the flexibility and power of Unix. Suf­fice to say, Unix’s power is due in a large way to its mod­u­lar­ity and the com­pos­abil­ity of its com­po­nent pro­grams. One key ingre­di­ent of this com­pos­abil­ity is the ven­er­a­ble pipeline idiom, Unix’s abil­ity to feed the out­put stream of one pro­gram to the input stream of anoth­er. Pipes actu­ally are quite amaz­ing, at the shell, they turn a set of small util­i­ties into a com­plete sys­tem admin­is­tra­tion toolk­it... Read More

Adding a new key to an public key secured SSH server

March 11, 2012

If you use SSH to admin­is­ter your own server there’s a strong pos­si­bil­ity that you use public key authentication rather than pass­word authen­ti­ca­tion to log into it. Pub­lic key authen­ti­ca­tion is gen­er­ally more desir­able than pass­word authen­ti­ca­tion for a num­ber of rea­sons. For one, it’s more secure; it does­n’t trans­mit any secrets over the wire and has a much larger secret to guess, mak­ing snoop­ing and brute force attacks prac­ti­cally impos­si­ble. Noth­ing secret is stored on the server either so one com­pro­mised login can­not com­pro­mise other logins. Because keys are unique to client, it becomes sim­ple to dis­able logins which have become com­pro­mised or have out­lived their use­ful­ness. Final­ly, if one knows what one is doing, one can set up key based authen­ti­ca­tion so that it does not require any pass­word entry to login, which is a great con­ve­nience.

One incon­ve­nience how­ever with pub­lic key authen­ti­ca­tion how­ev­er, is that log­ging in from a new machine is some­what more involved. You’ve can’t just install PuTTY (or what­ev­er) and type your pass­word to login. You need the a key to login and this com­puter does­n’t have it. Now, your first temp­ta­tion when pre­sented with this sit­u­a­tion might be to copy one of your pri­vate keys to the new machine and log in with it. How­ever there is an eas­ier way. Tem­porar­ily enable pass­word authen­ti­ca­tion on the server and add the new client while it’s open. All you need is access to an already active client. I’ll show you what to do... Read More

Leaky Clojure Macros

February 29, 2012

EDIT: I did­n’t real­ize when I wrote this that I sounded as crit­i­cal as I did. I’d like to make clear that this post about a minor philo­soph­i­cal dif­fer­ence and not about any real usabil­ity prob­lems with Clo­jure.


Clo­jure is prob­a­bly my cur­rent favorite pro­gram­ming lan­guage. It com­bines most of the advan­tages of Lisp with the most impor­tant advan­tages of Java and intro­duces a num­ber of ideas not present in either. Some of those ideas nearly unique to Clo­jure. In all, I believe Clo­jure occu­pies a pretty awe­some sweet spot in lan­guage design that is hard to beat. Despite that, there are at least a few “warts” in the lan­guage, (there always are,) and I’m going to write about one here which annoys me.

Clo­jure’s core lan­guage seems to con­tain a num­ber of leaky macros. For a lan­guage com­mu­nity which seems to try so hard to be func­tional and avoid macros when­ever pos­si­ble, pre­sum­ably to avoid leaky abstrac­tions, this baf­fles me. The biggest offender I think, is the “with­-open” macro... Read More

Belief in Tigers

February 04, 2012

I’ve just fin­ished read­ing the book Life of Pi. I per­son­ally think that it’s a fan­tas­tic book and the author, Yann Martell, does a bril­liant job mak­ing the quite out­landish and sur­real story seem so believ­able. I’ll con­fess that through the first half of the book or so, I thought I was read­ing a true story; he’s that good. Of course, that’s actu­ally part of the point of the sto­ry. It delib­er­ately chal­lenges what one accepts as cri­te­rion for belief by ask­ing the ques­tion, “Be­tween two equally com­plete and sound expla­na­tions for an event, which makes the bet­ter sto­ry?”

... Read More

Big Brother is Watching You Poop

January 28, 2012

Big Brother

He’s kind of got a fetish.

... Read More

How to prevent your Facebook profile from being "hacked"

January 23, 2012

I’d like to ask you a ques­tion. It’s a lit­tle per­son­al, but in this day and age of social net­works and online exhi­bi­tion­ism who really cares about pri­vacy and per­sonal space? Any­way, here goes: when was the last time you got your Face­book account bro­ken into by a hack­er? Nev­er? Good, you’re either lucky or you know how to defend your­self against online attacks. How­ev­er, far too often I find myself up against spam and van­dal­ism being sent to me via Face­book, email, etc. from peo­ple who are osten­si­bly my friends and would­n’t be send­ing me adverts for “V14­gra” if they could help it. Real­ly, con­sid­er­ing that defend­ing one’s online accounts from attack isn’t that com­plex, and how dam­ag­ing these attacks can be,(They’re bad enough when you know about them, but iden­tity theft can take years to be dis­cov­ered and by then you’ll be out thou­sands of dollars.) There’s really no excuse for not doing so. In that spirit I’m writ­ing this as a prac­ti­cal guide to defend­ing one­self from online attack­s.... Read More

Blackout Day, The Public Consciousness, and a general defense of Slacktivism.

January 19, 2012

Yes­ter­day, hun­dreds of websites(Including such nota­bles as Wikipedia, Red­dit, and even my rather unim­por­tant cor­ner of the web.) were “blacked out” in protest against two pieces of par­tic­u­larly oner­ous leg­is­la­tion, SOPA and PIPA.((For those whe don’t know, these are anti-piracy bills (in the sense of copy­right infringers, not open seas maraud­ers) which threaten to emplace dra­conian mea­sures which will affect thou­sands of per­fectly legal and inno­cent web­sites and busi­nesses along with the crim­i­nals. Google has more info. )) In addi­tion to the black­outs, many other web­sites posted infor­ma­tion about these two bills on their web­sites along with rea­sons to oppose them. As a result 18 senators, some of who had pre­vi­ously been cospon­sors, have newly announced their oppo­si­tion to these bills. In addi­tion, the sub­ject has broached the national con­scious­ness and now main­stream new orga­ni­za­tions across the coun­try are report­ing on the debate. With all ker­fluffle, one would think that the black­out has served it’s pri­mary pur­pose in spread­ing aware­ness and dealt a pow­er­ful blow to forces attempt­ing to push these bills through Con­gress.

There are, how­ev­er, dis­sent­ing voic­es. Maddox an indi­vid­ual known for his con­tro­ver­sial enter­tain­ment web­site has made the claim that “Black­out Day” is just another exam­ple of Inter­net “Slack­tivis­m,” which will ulti­mately go nowhere and is a symp­tom of the gen­eral malaise and of todays gen­er­a­tion of protesters: peo­ple who will protest any­thing so long as they can do so from the safety and com­fort of their own com­puter screen­s... Read More

Fruitcake

January 02, 2012

The Masons and the Pow­ells have fin­ished with their lat­est film endeavor: Fruitcake. This is the first time to my knowl­edge that they’ve attempted to make a com­edy of some sort that was­n’t a spoof and I guess it’s an inter­est­ing pro­ject. The premise is that a drunken young man hides an engage­ment ring meant for his girl­friend in a fruit­cake and mails it to her fam­i­ly. After sober­ing up and real­iz­ing just how stupid that was, he trav­els across coun­try attempt­ing to chase it down as it gets re-gifted time and again.

The show is fun­ny, in spurt­s... Read More

Self Awareness

December 27, 2011

So I read a book. I know. Sur­prise! This book is called Blindsight, it’s by Peter Watts, and you can read it here. This is an inter­est­ing book. It’s a piece of hard sci­ence fic­tion, which means it focuses on the explo­ration of sci­en­tific the­ory and main­tains strong fidelity to sci­en­tific accu­ra­cy. Blindsight also heav­ily fea­tures vam­pires. Weird, yet this isn’t the most inter­est­ing thing about this book. What is the most inter­est­ing thing is what this book is attempt­ing to say about the human condition: That human con­scious­ness is a super­flu­ous, and prob­a­bly tem­po­rary aber­ra­tion of the nat­ural progress of evo­lu­tion... Read More

URI Prefix Middleware for Clojure Ring

December 02, 2011

So I’ve been work­ing with Clojure webapps again lately and I noticed how I keep for­get­ting what mid­dle­ware is, what it does, and how to use it. This is a shame because it’s actu­ally not very com­pli­cated and it’s quite use­ful once you get it. So I’m going to place here a write-up on mid­dle­ware and an exam­ple of its use... Read More

Your code is not "Beautiful"

December 01, 2011

I have a pet pieve. Actu­al­ly, I have many, but only a few worth com­plain­ing about. One of these is when pro­gram­mers describe their cre­ations as “beau­ti­ful.” At first blush it might seem strange that peo­ple would describe com­puter code, filled with semi-colons, parentheses, and brackets as “beau­ti­ful.” One might be tempted to ask whether they were just in love with their syn­tax high­lighters. How­ev­er, I’ll be fair. The term “beau­ti­ful” in this sense refers not to visual aes­thet­ics, but to a sort of notional aesthetic: ideas which seem so sim­ple and ele­gent that they pro­vide a cer­tain sense of plea­sure when one comes to under­stand them. When coders use beau­ti­ful as an adjec­tive to describe their pro­grams, they aren’t describ­ing the visual asthet­ics of their com­puter code, they are dis­cussing the pre­summed ele­gence of their solu­tions. They are declaim­ing the clev­er­ness of their own inven­tion­s... Read More

Proof of God

November 27, 2011

I just bought a car today. The sway bar broke on the old one and instead of get­ting it fixed I decided to drive on it while look­ing for a new car. I spent sev­eral weeks plan­ning, research­ing, weigh­ing pri­or­i­ties, fret­ting over trade-offs and just all around pulling out my hair all the while wait­ing in anx­ious antic­i­pa­tion for my cur­rent model fall apart while I’m driving down the high­way and 65 miles an hour. I wanted a car that was small, fuel effi­cient, reli­able, and sporty. Even­tu­al­ly, I decided that money was pri­or­ity one and sporty had to go, ulti­mately pick­ing a used Honda Civic. How bor­ing… and yet very prac­ti­cal. It’s just the kind of thing I would get. Any­way, you may be won­der­ing what this has to do with God and His proof there­of... Read More

Stumpwm shutdown nag

November 20, 2011

I use Stumpwm as my pri­mary win­dow man­ager on my desk­top at home. Stumpwm is actu­ally a pretty neat win­dow manager: it’s tiled, pro­vides facil­i­ties for group and be con­trolled com­pletely from the key­board, no mouse nec­es­sary, but it’s chief advan­tage to me is that it’s writ­ten and con­fig­ured with Common Lisp, which make it much eas­ier for me to script and mod­i­fy. I can arbi­trar­ily load pro­grams, libraries, and code into the Stumpwm run­time in real­time while it is still run­ning just to see if and how it works. This actu­ally makes it much more deeply mod­i­fi­able than most other win­dows man­agers (or indeed, pro­grams of any sort,) and I’ve taken advan­tage of this from time to time.

One of my more peren­nial prob­lems is a sort of insom­nia that I have. I’ve found how­ev­er, that if I limit my com­puter usage in the evening and spend a cou­ple hours away from it before going to bed, it becomes much less of an issue. This presents a bit of a dis­ci­pline prob­lem how­ever with me hav­ing to remem­ber and be will­ing to do so every night. That’s a pain so I fig­ured why the hell not write a pro­gram that helps me with this? Stumpwm seemed like a nat­ural place to put it. ... Read More

What Happened to Classical Music?

November 06, 2011

So… It would seem that clas­si­cal music is dead. That might seem like a bold claim. After all, peo­ple still lis­ten to clas­si­cal music all the time. It has it’s own sta­tions on the radio. There are whole orches­tras devoted to it. It’s the first thing peo­ple learn in most music class­es. Many peo­ple ded­i­cate their lives to play­ing and improv­ing at clas­si­cal music. All this is much more than is ded­i­cated to say, jazz. I’m not say­ing jazz is dead am I? No, (well, may­be) but I am say that clas­si­cal music is dead, or largely so.... Read More

A Lisp Daemon

October 31, 2011

I’ve been fid­dling with Sacraspot lately and I dis­cov­ered that the tech­nique I’ve been using to dae­mo­nize the server and inte­grate it into my init-en­vi­ron­ment was­n’t work­ing prop­er­ly. This is a lisp appli­ca­tion which I was run­ning with start-stop-­dae­mon. The prob­lem was that for some rea­son, start-stop-­dae­mon was fail­ing to fully dae­mo­nize the appli­ca­tion. The Repl seemed to con­flict with start-stop-­dae­mon’s abil­ity to do this prop­erly and while it would look like it worked at first, once one closed the shell which lisp was started from, the lisp process would close.... Read More

Why do people give Evolution a Telos?

October 23, 2011

What is evo­lu­tion? Seri­ous­ly. Think about what that word is sup­posed to mean. It means grad­ual change over time. It usu­ally refers to the process which life on Earth has gone through over the past some­thing odd mil­lion-­bil­lion years. Now think about what we sup­pos­edly know about evo­lu­tion. It works by ran­dom muta­tion and nat­ural selec­tion, mean­ing small changes accu­mu­late in dif­fer­ent species and changes which improve the odds of repro­duc­tion of an indi­vid­ual or pop­u­la­tion rel­a­tive to other pop­u­la­tions will be prop­a­gated and con­tribute to long-term, sub­stan­tial change. That is, it’s driven by nat­ural forces and ran­dom chance. So why do peo­ple insist on assign­ing tele­o­log­i­cal pur­pose to a mate­ri­al­is­tic phe­nom­enon like evo­lu­tion?... Read More

Kowloon

October 09, 2011

In its day, one of the more inter­est­ing places on earth was the Kowloon walled city. Just out­side of Hong Kong prop­er, on a dis­puted part of the Kowloon penin­su­la, Kowloon walled city was not so much a city as it was a neigh­bor­hood. And, it was­n’t so much a neigh­bor­hood as it was the clos­est thing to a nest that human beings have every built or inhab­it­ed. Actu­al­ly, even ‘nest’ is the wrong word, ‘hive’ would be bet­ter. Only 0.01 sq mi in area,(6.5 acres) at its peek, the Kowloon Walled City housed an esti­mated 33,000 peo­ple, mak­ing it the most densely pop­u­lated place on earth. ... Read More

Website Filters

October 02, 2011

I’ve been writ­ing this blog and main­tain­ing this site for almost two months now. For most of that time, I’ve been main­tain­ing it using a pro­gram called nanoc which gen­er­ates a sta­tic web­site from some tem­plates and source files. I talk more about that here.

One of the things I like about this setup is that it give me a lot of flex­i­bil­ity in how this web­site works. For exam­ple, I can apply a series of fil­ters to my source files to gen­er­ate the final web pages I want. I use Markdown, for exam­ple, to con­vert most of my blog posts (Like this one!) from a leg­i­ble plain text to html. I can also write my own filters: I’ve writ­ten two of them and I thought that they were worth shar­ing even if they did­n’t merit there own pro­ject­s.... Read More

Powers Algorithm

September 29, 2011

So I was brush­ing up on my algo­rithms knowl­edge and I stum­bled across some­thing that rather blew my mind. It turns out I’ve been com­put­ing pow­ers the wrong way all this time. ... Read More

Produce at least something!

September 26, 2011

While doing doing a project prop­erly from the start is a fine goal, there’s some­thing to be said for just ship­ping. It’s pretty rare that that you have all of the require­ments from the get-go and you cer­tainly can’t pre­dict every prob­lem that’s going to arise while your project is in pro­duc­tion. If you attempt to antic­i­pate every fea­ture you could need it’s likely that the project will never be fin­ished, it’s cer­tain they you’ll waste a lot of time on uneeded fea­tures, and it’s still pos­si­ble that you’ll miss fea­tures and bugs that are impor­tant. In fact, it’s more likely that you’ll miss things as many issues don’t arrise or make them­selves appar­ent until you reach pro­duc­tion... Read More

Politics Game

September 20, 2011

So I have an idea for a web-based game. I don't have time to write it just yet, but I thought I'd out­line the con­cept here for now instead.

The gen­eral premise is that of play­ers com­pet­ing in an elec­tion for pres­i­dent of a fic­tional coun­try. Each player will have to court lob­by­ists, polit­i­cal par­ties, pub­lic opin­ion, eth­nic groups, etc by mak­ing cam­paign promis­es, estab­lish­ing posi­tions on issues, mak­ing back­room deals, adver­tis­ing, etc.

I've divided up the gen­eral aspects of the game as below. The spe­cific mechan­ics haven't been worked out yet; they'll prob­a­bly take a turn a day struc­ture where play­ers man­age their can­di­dates through a panel which allows them to sched­ule actions and set gen­eral poli­cies. ... Read More

Keeping up

September 16, 2011

I kind of hate Face­book. There I said it. Now, I hate Face­book for a lot reasons: the chronic pri­vacy issues, its walled gar­den nature, the shal­low level of com­mu­ni­ca­tion it encour­ages, the fact that it’s tak­ing over the Inter­net, but one rea­son in par­tic­u­lar bugs me the most. Now, I know this makes me a rather sore sport, but I hate how Face­book turns me into the odd man out.

You remem­ber that big party back in col­lege? The one that every­one went to? Every­one but you? You remem­ber out for months after­wards every­one would laugh about some­thing that hap­pened at that party and when you would ask what was so funny every­one would just say, “You really had to be there?” Do you remem­ber that? Well, for me, Face­book is that par­ty.... Read More

The Impossibility of Asimov's Laws of Robotics

September 10, 2011

Recent­ly, I lis­tened to a story about an Asi­mov style robot. You know, robots which sur­pass their cre­ators and have to deal with the exis­ten­tial con­fu­sion which aris­es…

Any­way, this story reminded me of one of the major sta­ples of Asi­mov’s robots which is the so-­called Three Laws of Robot­ics. The story did­n’t actu­ally make use of these laws but I’m not actu­ally talk­ing about that sto­ry. What I am talk­ing about are Asi­mov’s Three Laws of Robot­ics and why I think that they’re impos­si­ble.... Read More

Time Travelling Vampire

September 08, 2011

Time Trav­el­ling Vampire

What did you really think would hap­pen?

... Read More

Does Freedom of Speech cover Pornography?

August 30, 2011

A recent debate attended has prompted me to think about the issue of just how exten­sive the right of free­dom of speech should be in a mod­ern soci­ety, specif­i­cally whether pornog­ra­phy should be pro­tected under the guise of free­dom of speech. In prin­ci­ple, we tend to think of free­dom of speech as being pretty absolute, that we should be able to say what­ever we want with­out regard for the con­se­quences and peo­ple should have to accept that. How­ev­er, in prac­tice, this right seems to be abridged all the time. We need a per­mit for most kinds of demon­stra­tions, some things such as slan­der are for­bid­den out­right, and adver­tis­ing is sub­jected to such a dizzy­ing array of restric­tions that one must won­der whether it was ever con­sid­ered free at all. ... Read More

Cyberpunk

August 27, 2011

So, I’m about a third of the way through the book Snowcrash. It’s one of the stan­dard nov­els of the cyber­punk genre of books that were pop­u­lar in the 80s and early 90s. ‘Cy­ber­punk’, for those unfa­mil­iar with the term, refers to sci­ence fic­tion sto­ries fea­tur­ing com­put­ers and com­puter hack­ers. Usu­ally there is some kind Inter­net which man­i­fests itself as a com­plex vir­tual real­ity which rebel­lious pro­tag­o­nists log in and out of to per­form heroic deeds which would be impos­si­ble in the real world. ... Read More

Nanoc, Routes and File Extensions

August 24, 2011

So I’ve encoun­tered my first major nui­sance in using nanoc. In nanoc, the file­names of source files are treated rather unin­tu­itively and it can be con­fus­ing why one can’t have mul­ti­ple files with the same name but dif­fer­ent exten­sions at first. I haven’t found a lot of infor­ma­tion about this so I’ll put down a quick writup on this. ... Read More

Nanoc and this site.

August 21, 2011

So, I’m cur­rently work­ing on get­ting my house in order. By ‘my house’ I mean this web­site. I’ve been look­ing for a way to get a nice com­bi­na­tion blog, project port­fo­lio that a lot of soft­ware devel­op­ers seem to have. I decided early on that I wanted a sta­t­i­cally gen­er­ated site as that would sim­plify a lot of things from server secu­ri­ty, to main­te­nance. It’d be eas­ier to migrate. Also, and this is impor­tant, it would be a lot sim­pler to use Emacs as my pri­mary edi­tor if I use a sta­tic gen­er­a­tor rather than a solu­tion like Word­press or Blog­ger which gen­er­ally require edit­ing lit­tle boxes on a web­site which I hate. (I sus­pect this can be worked around with WP, but I’d rather not try.)... Read More

Living in the Moment

August 11, 2011

I recently fin­ished read­ing the book How to Sur­vive in a Sci­ence Fic­tional Universe. This is an inter­est­ing book, both in its unusual style but also in its strange plot­ting and sub­ject mat­ter. The book is a lot eas­ier to read if you don’t try too hard to under­stand what is going on and how things work in the world that the author cre­ates.

The book takes place in world which is lit­er­ally fic­tion, even from the view­point of the char­ac­ters. Sci­ence in this world is based on sto­ry-­lines and expressed in terms of human emo­tions. This is inter­est­ing but is not deeply impor­tant to the sto­ry. It would seem to be more a styl­is­tic choice on the part of the author, except for that moment in the story where the pro­tag­o­nist describes how the con­cept of time travel (which is an inte­gral part of the sto­ry,) works in a sci­ence fic­tional uni­verse.... Read More

The First World War; The more interesting one.

August 07, 2011

Most peo­ple are aware of the First World War and have some knowl­edge of its his­to­ry. They know that it was started when some Aus­trian prince was shot and that it ended when the Eng­lish invented tanks and drove them into Ger­many. They know that in between there was a lot of fight­ing and that a lot of it had to do with trenches and machine guns and gas masks and Red Bar­rons and many might be able to name drop the Somme or Gal­lipoli. But, when it comes down to it, every­one remem­bers the Sec­ond World War bet­ter.

And why not? The Sec­ond War was big­ger, broad­er, loud­er… It had clear vil­lains and clear heroes. The motives of all sides were clear and every­thing was black and white (al­most.) What’s more, even though there was an unprece­dented amount of tragedy in that Sec­ond War, he good guys won and peace was restored through­out the world. All in all, it had all the mark­ings of a great story and was quite pho­to­genic. ... Read More

1890's Airship craze.

August 06, 2011

The turn of the twen­ti­eth cen­tury was a pretty crazy time. Major Euro­pean wars were a thing of the past (or so peo­ple thought.) The world had mostly been con­quered by Euro­peans and was rapidly being tamed. Tech­no­log­i­cal advance­ment was on the rise and new won­ders, such as recorded sound, mov­ing pic­ture, elec­tric lights, the tele­phone… Oh yeah! And in 1896 and 97 men from Mars were trolling about the Amer­i­can mid­west, kid­nap­ping peo­ple and tak­ing them hostage in their air­ships. ... Read More