19 April, 2010
Comments (View)

Binary Search

After reading Are you one of the 10% of programmers who can write a binary search?, I decided to find out if I was. Here’s my submission (written in about 30 minutes in python):

# the list to be searched
data = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]

# what we're searching for
search = 7

# we could do this recursively, but without tail
# call optimization we'd just reach a stack overflow
# shortly - lame - so we'll go iterative
found = False
while not found:
    # did we run out of data?
    if len(data) == 0: break

    # partition the list (take advantage of default
    # integer division in 2.6)
    p = len(data) / 2

    # proceed based on data at partition
    if data[p] == search:
        found = True
        break
    elif data[p] > search:
        data = data[:p]
    else:
        data = data[p+1:]

if found:
    print "Found it!"
else:
    print "Not found."

I had a bit of an easier time thanks to python’s arbitrary length integers, and list splicing notation. This algorithm would have been a lot more error prone in C/Java style language.

14 April, 2010
Comments (View)

Best Reason to Get an iPad

6 April, 2010
Comments (View)

The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.

— John Carmack (via reddit)

16 March, 2010
Comments (View)

Come One, Come All!

Thursday March 18th at 7:30 I’ll be playing transition pieces for a science themed poetry reading at the Creole Gallery in Old Town. I’ll be doing my best to add a nice old school Sci-Fi vibe. $3 donation. Open Mic readings after the show ends. Hope to see you there!

12 March, 2010
Comments (View)
I realized that I own 11 guitars but only have 4 stands.  So, I guess I need one of these - or maybe I should get rid of a few guitars…

I realized that I own 11 guitars but only have 4 stands. So, I guess I need one of these - or maybe I should get rid of a few guitars…

11 March, 2010
Comments (View)
I finally got my Peavey DDL-3 Digital Delay working tonight.  If you tweak it just right, it doesn’t develop the odd percussive sound most delays experience when set to infinite feedback.  Some soldering this weekend should fix it for good.

I finally got my Peavey DDL-3 Digital Delay working tonight. If you tweak it just right, it doesn’t develop the odd percussive sound most delays experience when set to infinite feedback. Some soldering this weekend should fix it for good.

7 March, 2010
Comments (View)
The latest bike building project begins to take shape.  Hopefully under 20lbs. when fully built.

The latest bike building project begins to take shape. Hopefully under 20lbs. when fully built.

4 March, 2010
Comments (View)

The First, First Album!

So, what should I happen to find this morning, but Drawing on Eve’s first attempt at recording our first album. It’s raw, and noisy, and it’s wonderful. I listened to the whole thing - hilariously on a tape titled “Olivia Newton John’s Greatest Hits”. What’s amazing is that most of the songs changed very little between this rough first recording and our official first album. Some of the more interesting differences:

  • Prologue, Epilogue, Julia, 11:00, and Scorched Paper Way are all missing - Scorched Paper Way, Prologue and Epilogue hadn’t been written yet, I was thinking Julia was too soft for the album at the time, and 11:00 was, frankly, mostly filler.
  • Saturday Night Seduction/sns - both versions had a little intro Ryan played - it’s probably better this was cut. Also, Ryan sings the full 3rd chorus over the solo on both versions instead of coming in at “Fly away with us.” I remember thinking he shouldn’t do that, but didn’t want to tell him how to run his song.
  • Golden, Life, and Anonymous - slightly different lyrics.
  • Dave has harmonica, and it’s mostly AWESOME - I wish we had kept that. Also, Jake does a sinister laugh at the end - and there’s the sound of a knife being sharpened and something being chopped at the beginning
  • Glyss This - this version is hilarious - I actually sing totally different lyrics during the verses. During the break, instead of instrumental solos, we say things:
    • Jake - “Remember me?”
    • James - “Hey doobs!” - a common saying of the main subject of the song
    • James again - The best scream I ever recorded - I swear - really!
  • When I Was - Mostly the same - except there’s Harmonica on this one too - which is not nearly as good as on Dave.

If there’s any interest - like if there’s still one DoE fan out there who actually is curious - and the other guys don’t mind, I’ll digitize the tape and post it.