Mary's Room is a poor argument for Dualism.

October 18, 2023

Mary is a bril­liant sci­en­tist who is, for what­ever rea­son, forced to inves­ti­gate the world from a black and white room via a black and white tele­vi­sion mon­i­tor. She spe­cialises in the neu­ro­phys­i­ol­ogy of vision and acquires, let us sup­pose, all the phys­i­cal infor­ma­tion there is to obtain about what goes on when we see ripe toma­toes, or the sky, and use terms like ‘red’,’ ‘blue’, and so on. She dis­cov­ers, for exam­ple, just which wave-length com­bi­na­tions from the sky stim­u­late the reti­na, and exactly how this pro­duces via then cen­tral ner­vous sys­tem the con­trac­tion of the vocal chords and expul­sion of air from the lungs that results in the utter­ing of the sen­tence ‘The sky is blue’. [..] What will hap­pen when Mary is released from he black and white room or is given a colour tele­vi­sion mon­i­tor? Will she learn any­thing or not? It seems just obvi­ous that she will lean some­thing about the world and our visual expe­ri­ence of it. But then it is inescapable that her pre­vi­ous knowl­edge was incom­plete. But she had all the phys­i­cal infor­ma­tion. Ergo there is more to have than that, and Phys­i­cal­ism is false.

…So goes the famous Mary’s Room thought exper­i­ment… Read More

Universals and the Game of Life

January 19, 2023

The Problem of Universals

In this world we are sur­rounded by par­tic­u­lar things. A table, a chair, a house, a per­son… these are all indi­vid­ual par­tic­u­lar things. But, many of the par­tic­u­lar things around us have some­thing in com­mon. An apple is red and so might be a fire hydrant. A horse is fast and so is a race car. Napoleon was a per­son and so was his wife. Philoso­phers often use the term universals to describe these things that dif­fer­ent par­tic­u­lar objects have in com­mon, or in other words, any word that can be pred­i­cat­ed, or said, of mul­ti­ple things is a universal. That means just about any­thing, “Horse” in a uni­ver­sal, because it refers to a cat­e­gory of things called “hors­es”. “Hu­man” is a uni­ver­sal because it refers to a cat­e­gory of things called “hu­man­s”. “Red­ness” is a uni­ver­sal because it’s pos­si­ble for more than one thing to be the color red. “Large”, “short”, “white”, “table”, etc… just about any adjec­tive or noun that isn’t a proper noun is arguably a uni­ver­sal… Read More

Civilizations are complex systems

May 20, 2016

There is an inter­est­ing paper called How Com­plex Sys­tems Fail. It’s a col­lec­tion of 18 related obser­va­tions about com­plex sys­tems and about when and how they fail. The obser­va­tions are as follows:

  1. Complex systems are intrinsically hazardous systems.
  2. Complex systems are heavily and successfully defended against failure.
  3. Catastrophe requires multiple failures – single point failures are not enough.
  4. Complex systems contain changing mixtures of failures latent within them.
  5. Complex systems run in degraded mode.
  6. Catastrophe is always just around the corner.
  7. Post - accident attribution accident to a ‘root cause’ is fundamentally wrong.
  8. Hindsight biases post - accident assessments of human performance.
  9. Human operators have dual roles: as producers & as defenders against failure.
  10. All practitioner actions are gambles.
  11. Actions at the sharp end resolve all ambiguity.
  12. Human practitioners are the adaptable element of complex systems.
  13. Human expertise in complex systems is constantly changing.
  14. Change introduces new forms of failure.
  15. Views of ‘cause’ limit the effectiveness of defenses against future events.
  16. Safety is a characteristic of systems and not of their components.
  17. People continuously create safety.
  18. Failure free operations require experience with failure… Read More

Using a Parallax 28340 RFID reader on the Raspberry Pi

January 11, 2016

Recent­ly, a fried told me he was hav­ing trou­ble get­ting a Par­al­lax RFID reader work­ing on a Rasp­berry Pi for a project he was work­ing on. I won­dered how hard it could be so I got one of the read­ers for myself and hooked it up to a Pi. It turns out that it was harder than I thought it would be, but only because I did­n’t know what I was doing.

When the reader is con­nected to the com­put­er, it is auto-­mounted as a ser­ial port at /dev/ttyUSB0. You might think that because the let­ters ‘tty’ are in the device name that this is a TTY device, but it turns out that TTY devices are just con­nected over ser­ial ports. This was not actu­ally a TTY device. Once I under­stood that, it turns out that con­nected to a ser­ial port on Linux though Python is actu­ally rather sim­ple. One just needs the pyserial library.

Here are some instruc­tions and sam­ple code to get this device work­ing with a Rasp­berry Pi… Read More

Toothpaste

October 22, 2015

So, the other week I was in the store pur­chas­ing some tooth­paste. Now tooth­paste, at least in Amer­i­ca, is a great exam­ple of that phe­nom­enon of a huge num­ber of indif­fer­en­ti­at­able choices you often get when shop­ping at a typ­i­cal gro­cery store. There are maybe a dozen brands of tooth­paste and each brand has maybe a dozen prod­ucts all adver­tis­ing slightly dif­fer­ent advan­tages in the realm of tooth care. One tube of tooth­paste offers defense against cav­i­ties while another adver­tises that it will pre­vent plaque build up. Now, never mind the fact that the default expec­ta­tion is that all brands of tooth­paste will help pre­vent cav­i­ties, there is really no way for the casual shop­per to really eval­u­ate the claims of these dif­fer­ent products.(With the excep­tion of anti-sen­si­tiv­ity tooth­paste where I imag­ine a per­son with sen­si­tive teeth could tell if the tooth­paste helped.) If one uses one brand of tooth­paste for a year and never gets a cav­i­ty, there is gen­er­ally no way to know if it was that tooth­paste which pre­vent­ed, or if any brand would have done.… Read More

Unix, Awk, Perl, and Scsh

January 19, 2015

I’m going to be expand­ing on something I’ve talked about before. This idea of Unix’s sup­posed sim­plic­ity and how Unix has devi­ated over the years rather fas­ci­nates me.

Some years ago I remem­ber read­ing the The Art of Unix Programming by the vocif­er­ous Eric Ray­mond. I remem­ber this book mak­ing a strong impact on how a I thought about sys­tem design and the writ­ing of new pro­grams. TAoUP is not, by itself, a rev­o­lu­tion­ary book. Rather, it is a col­lec­tion of received wis­dom regard­ing the design of the Unix oper­at­ing sys­tem and of pro­grams intended to be run in the Unix envi­ron­ment. I think that the most impor­tant idea put for­ward in the book is the notion of Unix, rather than sim­ply being a plat­form on which to run large com­pli­cated pro­grams, is rather a col­lec­tion of smaller pro­grams, uni­fied by a few metaphors.… Read More

Om and Reagent

January 14, 2015

I’ve been play­ing, of late, with Clo­jure­Script fron­t-ends, specif­i­cally with Om and with Reagent. Between the two, I like Reagent much bet­ter. The short rea­son why is that it feels much more ‘Clo­jur­ish’ and the pro­gram­ming model feels much more acces­si­ble, espe­cially to some­one already famil­iar with Clo­jure/­Clo­jure­Script. Om, by con­trast, feels like a thin­ner wrap­per over React And even though it does a num­ber of neat things, it’s ulti­mately more unwieldy. (I haven’t tried the other Clo­jure­Script React wrap­per, Quiescent. It looks promis­ing, leav­ing the ques­tion of state man­age­ment to devel­oper entire­ly, unlike either Reagent or Om. I’ll have to take a real look at it sometime.)

Both of these frame­works are basi­cally wrap­pers for Reactjs which is one of the more unique Javascript front end frame­works out there. The quick low-­down on React is that it is a tool for gen­er­at­ing a UI (ba­si­cal­ly, your HTML DOM), from appli­ca­tion data. Instead of attempt­ing to mutate a sta­tic DOM in-­place, React effec­tively regen­er­ates the DOM from scratch with every update to the appli­ca­tion data. React has a num­ber of tricks to make this per­for­mant, significantly: cre­at­ing a stripped down vir­tual DOM which the appli­ca­tion code oper­ates on instead of the browser’s actual DOM. Oper­at­ing on the VDOM is quicker than oper­at­ing on the browser’s native DOM and it can be diffed with older ver­sions to allow React to selec­tively update the browser’s DOM. The end result is that using React involves defin­ing a lot of objects called ‘com­po­nents’ which gen­er­ate HTML from plain Javascript data. This means you can sep­a­rate your appli­ca­tion log­ic, which gen­er­ates and oper­ates on the appli­ca­tion state from your UI layer which is merely passed the appli­ca­tion state (or a part of it.) This makes it rather func­tional in con­cep­tion, mak­ing it a good match for Clo­jure­Script, which is strictly func­tion­al… Read More

Why systemd is taking over

October 20, 2014

Sys­temd has been the con­tro­ver­sial hot-but­ton topic for the Linux com­mu­nity for the past few years. Sys­temd replaces the tra­di­tional Sys­tem V init sys­tem and basi­cally just redoes the whole core of the oper­at­ing sys­tem. It takes over the init sys­tem, the log­ging sys­tem, and all of the auto­matic launch­ers for X, and just crams them into this sin­gle mono­lithic sys­tem. Sys­temd changes everything and for what? Aside from faster boot times, What does sys­temd give us that we did­n’t have before and why are all the dis­tros adopt­ing it? I’ll tell you why… Read More

Conways Game of Life in Clojurescript

September 26, 2014

I was read­ing Complexity by M. Wal­drop and I started think­ing about cel­lu­lar automa­ton. One thing led to another and I ended up build­ing an instance of Conway’s Game of Life in the browser. I wrote it in Clo­jure­script and if fea­tures the abil­ity to step for­ward and back­wards through sequence, as well as detect end states with some basic cycle detec­tion. It runs in near real­time which was a bit of a feat as Con­way’s Game of Life is a rather CPU inten­sive appli­ca­tion to run a real­time for a pat­tern of any real size. It’s still not quite as fast as a good GoL imple­men­ta­tion should be, but I feel like this appli­ca­tion nev­er­the­less rep­re­sents a bit of a case study of a per­for­mance inten­sive appli­ca­tion writ­ten in Clo­jure­script… Read More

Web Applications

September 05, 2014

Web appli­ca­tions have come a long way in the past decade or so. Back in the 90s a ‘web appli­ca­tion’ was basi­cally a group of web forms and web pages hid­den behind some CGI scripts. In 2004, the same thing was basi­cally still true though peo­ple were maybe using servlets rather than CGI. Nowa­days how­ev­er, web appli­ca­tions can be very sim­i­lar to native appli­ca­tions in terms of func­tion­al­ity and usage. Over the years, the web has trans­formed from a doc­u­ment deliv­ery sys­tem to an appli­ca­tion deliv­ery sys­tem and we’ve suc­ceeded in repli­cat­ing just about every native appli­ca­tion in web form to some degree or anoth­er. This is kind of wild.

Yet, to a large degree, web appli­ca­tions still suck… Read More

What constitutes cheating?

July 22, 2014

I just fin­ished read­ing Michael Lewis’s book Flash Boys. Its the first Michael Lewis book I’ve read and I’m not yet cer­tain what I think of him as an author or a jour­nal­ist. I’ll prob­a­bly read a few more before I’m cer­tain.

What I am cer­tain of is that Flash Boys is a very inter­est­ing book. It’s about high fre­quency trad­ing and its effects on the stock mar­ket. It mainly details the less eth­i­cal tac­tics of high fre­quency traders as well as the cre­ation of IEX, a stock exchange designed to counter those tac­tics. It raises some very inter­est­ing ques­tions about the effects of tech­nol­ogy not just on the stock mar­ket but in gen­er­al, and for me, also raises ques­tions about what con­sti­tutes fair-­play in a free mar­ket… Read More

More fun with Clojure lazy sequences

July 13, 2014

Recently I was writ­ing some code to ingest new entries for my church search web­site. The appli­ca­tion is writ­ten in Clo­jure, but the down­load­ing is done with an exter­nal script that down­loads new entries and saves them as files in a direc­to­ry, but at a slow rate. I wanted to be able to spec­ify a range of entries to down­load, and have the script run and then have my appli­ca­tion ingest the files that the script gen­er­ates. I wanted this to work con­cur­rent­ly, with mul­ti­ple down­load­ers and mul­ti­ple ingesters run­ning at the same time. And I wanted all of this to be trig­gered from Clo­jure.

This is basi­cally a con­cur­rency prob­lem so it’s a good thing I was try­ing to do it in using Clo­jure. The most obvi­ous solu­tion would be to launch mul­ti­ple down­load­ers, and then have a thread which watches the direc­to­ry, feed­ing filepaths to ingester threads using chan­nels and core.a­sync. Unfor­tu­nate­ly, I’m stuck using an older ver­sion of Clo­jure for this project for the moment and core.a­sync is not avail­able. Thank­ful­ly, lazy sequences can be used as a sub­sti­tute for chan­nels in a pinch… Read More

Parsing an AJAXy website.

June 24, 2014

Pars­ing a web­site used to be rather straight­for­ward affair: You down­load the web­pages and then you poke through the HTML with reg­u­lar expres­sions until you find what you’re look­ing for. You could set up a pretty good data extrac­tor going in Perl rather quick­ly. Later e replaced the reg­u­lar expres­sions with proper HTML parsers, but on the whole the process remained rather sim­ple.

These days how­ev­er, it’s rarely so sim­ple. AJAX, which is essen­tially the prac­tice of hav­ing the web­page com­mu­ni­cate with the server through javascript, has become so com­mon we don’t even call it AJAX any­more. Now we just call it ‘The way things are done.’(Calling a web­site ‘dy­nam­ic’ is another alternative.) This is nice in a way because it allows web appli­ca­tions to be much more respon­sive and inter­ac­tive. A mod­ern web­site feels more like a client pro­gram than a down­loaded doc­u­ment. On the other hand, this makes it much harder to parse web­pages… Read More

The Network is not Free

June 05, 2014

When attempt­ing to scale soft­ware sys­tems, that is, make it pos­si­ble for the sys­tem to take on a higher load or more users, peo­ple usu­ally take on of two strate­gies. ver­ti­cal scal­ing and hor­i­zon­tal scal­ing. Ver­ti­cal scal­ing is the prac­tice of buy­ing newer and faster com­put­ers on which to run the soft­ware while hor­i­zon­tal scal­ing is the prac­tice of sim­ply buy­ing more com­put­ers on which to spread the soft­ware across. Between the two, hor­i­zon­tal scal­ing is often inter­preted as hav­ing the bet­ter scal­ing poten­tial. Unfor­tu­nate­ly, this is not always the case and can lead to some naive attempts to solve very intractable prob­lems… Read More

Concurrency and Locks

May 06, 2014

I’ve been read­ing a book on Lin­ux’s net­work­ing inter­nals and it occurs to me that it’s not always nec­es­sary to use con­cur­rency seman­tics to main­tain shared state. So long as the state­ful ele­ment is nat­u­rally atomic and has only one writer glob­ally in the pro­gram, it’s safe to use it with­out con­cur­rency seman­tics. One exam­ple that I’m think­ing of is in the Linux ker­nal’s time man­age­ment func­tions. The vari­able jiffies is glob­ally avail­able in the ker­nel which mea­sures the num­ber of ticks since the sys­tem boot­ed. (The length of a tick is archi­tec­ture dependent.) jiffies is only changed in one place, the inter­nal time­keep­ing code, but it can be read by any part of the sys­tem. Because jiffies is a sin­gle numer­i­cal val­ue, oper­a­tions on it are atomic so it’s impos­si­ble to read it in an incon­sis­tent state and because it is only writ­ten to by one part of the appli­ca­tion, race con­di­tions are also a non-is­sue. So locks, STM and other forms of con­cur­rency seman­tic are unnec­es­sary in this instance. I sus­pect that this could apply to any global coun­ter.

Read More

Bitcoin Prospects

December 06, 2013

When I first heard about Bit­coin sev­eral years ago, I was dis­mis­sive that a cur­rency not backed by a cen­tral bank or valu­able com­mod­ity could suc­ceed as a cur­ren­cy. It still seems doubt­ful to me that Bit­coin could estab­lish itself as a proper world cur­ren­cy, but recent events have lead me to believe that it’s possible and that those involved are not nec­es­sar­ily par­tic­i­pat­ing in a de-­facto ponzi scheme. Bank of America seems to be get­ting into the game so Bit­coin looks to me like it might be on it’s way to legit­i­ma­cy. With this in mind, I thought I’d do some back­-of-the-en­ve­lope cal­cu­la­tions to see if I could fig­ure out the likely future worth of Bit­coins and the value of invest­ing in them at the present time… Read More

Some fun with D3 and Clojurescript

December 04, 2013

I was recently play­ing around with D3 and ClojureScript and I ended up cre­at­ing this silly exhaustive sort sim­u­la­tor for the TSP. I ended up learn­ing a cou­ple of things… Read More

Lazy Sequences in Clojure

November 29, 2013

I was look­ing for some more infor­ma­tion on how to con­struct lazy sequences and real­ized that there is lit­tle in the way of doc­u­men­ta­tion on lazy sequences in Clo­jure. These design notes were the best I could find on the sub­ject and while they are illu­mi­nat­ing, I thought the con­cept could be explained bet­ter.


Lazy Sequences are an inte­gral part of the Clo­jure pro­gram­ming lan­guage but one you don’t see in a lot of other pro­gram­ming lan­guages. A sequence, in Clo­jure, is a sort of metatype or pro­to­col. It sig­ni­fies a class of datas­truc­tures which store items in a log­i­cal sequence, such as arrays or lists. Clo­jure has sev­eral types of sequences includ­ing clas­sic Lisp-style lists, vec­tors (which cor­re­spond most closely to arrays in other lan­guages,) and lazy sequences… Read More

Simulating Blackjack

November 05, 2013

I’ve been a lit­tle bit inter­ested in black­jack of late and in card count­ing. It turns out that this is a topic about which it is easy to get infor­ma­tion. I sup­pose there is a huge mar­ket for advice for would be card coun­ters.

Black­jack is inter­est­ing in that it is the only casino card game in which it is pos­si­ble to beat the house edge through clever play, though to do so requires a lot of work. Essen­tial­ly, the rea­son is that a stan­dard game of black­jack already has a very thin edge for the house, only about 0.28% if you play an opti­mal strat­e­gy, (according to stats I found online,) so if you can get a fur­ther edge you can beat it. Card count­ing lets you do this, but only be a very thin mar­gin.

I was con­sid­er­ing attempt­ing to fully model a black­jack game math­e­mat­i­cal­ly, but this would have been very labor inten­sive. Also, it’s been done a lot of times before. So, I thought it would be fun to instead sim­u­late a game of black­jack and com­pare var­i­ous strate­gies to see how much they lose or gain over time… Read More

How *not* to score a business partner

September 26, 2013

Some time ago I sub­scribed to the local RSS feed for ‘com­puter gigs’ on Craigslist. I was hop­ing that this might lead to some side money but so far most of the stuff adver­tised has been data-en­try posi­tions or word­press theme updates. Stuff that would be a waste of my time, in other words. Any­way, after fol­low­ing the feed some time, I came across some rather inter­est­ing stuff… Read More

My experience with MongoDB

September 20, 2013

I’ve recently just fin­ished switch­ing a project from using MongoDB to PostgreSQL and I’m 100% cer­tain I’ve made the cor­rect deci­sion in doing so. Run­ning at basi­cally the same load, Post­greSQL returns queries much faster and uses much less CPU and RAM. Despite it’s pop­u­lar­ity a few years ago, Mongo really strikes me as a bit of a mess… Read More

Tactile: A Structural Emacs Lisp Mode

September 13, 2013

Of all the fea­tures usu­ally attributed to Lisp, by far the most dis­tin­guish­ing is it’s unique sort of homoiconicity. The lan­guage itself is rep­re­sented in the same syn­tax as its chief datas­truc­ture (the singly linked list,) and is in fact parsed into that datas­truc­ture for pre-process­ing before it is actu­ally com­piled or interpreted.(Lisps of all sorts can come in com­piled or inter­preted variations.) This fea­ture allows Lisp code to be manip­u­lated pro­gram­mat­i­cally far more eas­ily than most pro­gram­ming lan­guages. Usu­al­ly, this is used to extend the lan­guage through Lisp macros, but I won­der why it isn’t more often used to enable bet­ter edi­tors and IDEs… Read More

Is watching the News a Terrible Idea?

July 15, 2013

The thing about peo­ple, is that we are ter­ri­bly sus­cep­ti­ble to a thing called confirmation bias. When we have an idea or opin­ion, even just a hunch, and we look for evi­dence to either con­firm or deny that notion, we have a ten­dency to pre­fer evi­dence which sup­ports our hypoth­e­sis than evi­dence which refutes it. This is why, for exam­ple, peo­ple can believe in such zany con­spir­acy theories. Gen­er­al­ly, if you start with a hypoth­e­sis and look for evi­dence prov­ing its truth, you will find it, no mat­ter the hypothesis.(This is partly why sci­en­tific exper­i­ments gen­er­ally need to be ‘fal­si­fi­able’ to be con­sid­ered reliable.) This is also why, I think, dif­fer­ent peo­ple given the same infor­ma­tion through the same news­me­dia, will arrive at wildly dif­fer­ent con­clu­sions.

Here’s my theory: It’s com­mon knowl­edge that the news gets things wrong. Head­lines are fre­quently mis­lead­ing, facts are missed, peo­ple are mis­quot­ed, etc. This is a fact of life and some of it is due to hon­est mis­takes by news­peo­ple but often it’s due to par­ti­san pol­i­tics or agen­das get­ting in the way of facts. The worst is in pol­i­tics when two news orga­ni­za­tions can take the same story and spin com­pletely dif­fer­ent nar­ra­tives. Most peo­ple take this in stride and know to be skep­ti­cal of the most out­landish things they hear about in the news, espe­cially from less reli­able sources. The prob­lem is, how do peo­ple know what is out­landish or likely to be true, with­out a source of facts as the base­line? Fact check­ers can invest the time to fol­low infor­ma­tion to its source and deter­mine facts, but most peo­ple don’t have the time to fact check every news arti­cle or polit­i­cal sto­ry. Instead, we fact check sto­ries which seem false to us, and the arti­cle which seems false to us are those with which we already dis­agree. This is the con­fir­ma­tion bias at full effect.

The prob­lem is then, by con­sum­ing news, peo­ple will absorb sto­ries they agree with, and dis­pute sto­ries that chal­lenge them, and thereby con­tin­u­ally be rein­forced in their point of view… Read More

Is watching the News a Terrible Idea?

July 15, 2013

The thing about peo­ple, is that we are ter­ri­bly sus­cep­ti­ble to a thing called confirmation bias. When we have an idea or opin­ion, even just a hunch, and we look for evi­dence to either con­firm or deny that notion, we have a ten­dency to pre­fer evi­dence which sup­ports our hypoth­e­sis than evi­dence which refutes it. This is why, for exam­ple, peo­ple can believe in such zany con­spir­acy theories. Gen­er­al­ly, if you start with a hypoth­e­sis and look for evi­dence prov­ing its truth, you will find it, no mat­ter the hypothesis.(This is partly why sci­en­tific exper­i­ments gen­er­ally need to be ‘fal­si­fi­able’ to be con­sid­ered reliable.) This is also why, I think, dif­fer­ent peo­ple given the same infor­ma­tion through the same news­me­dia, will arrive at wildly dif­fer­ent con­clu­sions.

Here’s my theory: It’s com­mon knowl­edge that the news gets things wrong. Head­lines are fre­quently mis­lead­ing, facts are missed, peo­ple are mis­quot­ed, etc. This is a fact of life and some of it is due to hon­est mis­takes by news­peo­ple but often it’s due to par­ti­san pol­i­tics or agen­das get­ting in the way of facts. The worst is in pol­i­tics when two news orga­ni­za­tions can take the same story and spin com­pletely dif­fer­ent nar­ra­tives. Most peo­ple take this in stride and know to be skep­ti­cal of the most out­landish things they hear about in the news, espe­cially from less reli­able sources. The prob­lem is, how do peo­ple know what is out­landish or likely to be true, with­out a source of facts as the base­line… Read More

Like a Flock of Birds

July 10, 2013

Imag­ine, if you will, a flock of birds. There are thou­sands of them scat­tered in a field rest­ing, until, sud­denly in one glo­ri­ous motion they lift off at once. The entire flock rises into the sky, flips back and forth, as if it were a sin­gle organ­ism with a sin­gle pur­pose, and comes to rest at once on some power lines. It’s an amaz­ing sight, espe­cially with larger flocks of birds, and it’s an exam­ple of emer­gent behav­ior… Read More

The Brood

June 02, 2013

As I sit, I lis­ten to the buzz of a mil­lion rav­en­ous, lust­ful insects. My usu­ally peace­ful neigh­bor­hood has been invaded by a swarm of black, red, and orange crea­tures who have emerged from the earth like zom­bies and have pro­ceeded to lay claim to all before them. I speak, of course, of the periodical cicadaRead More

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 PiRead 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­tions… 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 beliefs… 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 screens… 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­tions… 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