Writings

Technology, open source, personal essays, and everything that isn't climate.

Audio Perception of Distorted Speech

Listening to the sine-wave speech sound again produces a very different percept of a fully intelligible spoken sentence. This dramatic change in perception is an example of "perceptual insight" or pop-out. We have argued that this form of pop-out is an example of a top-down perceptual process produced by higher-level knowledge and expectations concerning sounds that can potentially be heard as speech:

There are audio samples at their website which demonstrate this.  It's really neat to hack your perception.

Related: Visualizing Watson Speech Transcripts · Comparing Speech Recognition for Transcripts · Interesting Listening

Curling Open House in Norfolk Connecticut

Curling Open House In Norfolk Connecticut

For folks in Dutchess County in NY, or Western Connecticut, that have been enjoying Curling, you should know that the Norfolk Curling Club is running an Open House this weekend. Today's events are over, but tomorrow between 1 and 5 pm you can go and check out the sport.  We did this back in 2006 during the last Olympics.

As you can see, you will get to throw stones, which is just awesome.  This picture is of Pyg, one of the members of our Poughkeepsie contingent that came out out for the open house in 2006, we ended up taking a 2 week course, which was brilliant.  They seem to be running things a bit earlier this time around, I suspect in hopes of getting more play in for people before they close down the clubhouse for the year.

If you have any interest in Curling, you should check it out.

Related: Curling, End2 · Curling... Freaking Sweet · The End of Curling Season

Ebook pricing

Dear Publishers,

I really do expect that your ebook pricing is going to be at least 50% lower than you list price for your print book.  O'Reilly's 20% lower model just doesn't do it for me, and the fact that I can buy the dead tree copy of almost any of ora's books at Amazon for less than the ebook directly from the publisher, makes no sense.

Why is it that I demand this price differential?  Because the book is not lendable.  I'll be a good citizen and not hand around your PDF to friends, at least not if I keep a copy, because I do get that that violates the spirit of the sale.  I'm actually ok with that, because I like your content and I want you to keep making it, and am happy to tell others they should buy a copy of the PDF as well.  But that limitation limits the value of the book substantially.

I'm also not buying anything with DRM, period.  There is no way I'm buying something that's tied to a device that is going to go out of fashion some day.  And, if I buy something electronically from you I expect that you'll keep a copy of it for me forever.  Pragmatic Programmers does quite a good job on most of these fronts.

Otherwise, I'm going to keep going to the library, like I've been doing.  It has many of the advantages of ebooks, i.e. not taking up space in my house, and it's 100% discounted.  Plus, the Librarians are one of the few groups that are trying to ensure we have a sane copyright policy in this country.

Related: Ebook pricing · The Ugly Business of Books · The way tech books should be ordered

HTTP 410: Gone - Geocities

I just ran a link checker for one of the websites I'm running, and got the first ever http error code 410: Gone that I've seen, for something that was a Geocities page.  This seems to be in the correct spirit of 410 as embodied by Mark's blog post on it.

For those that have no idea what I'm talking about, don't worry, it's geekery about the specifics of how the web works under the covers.

Editors note: in 2026, the original site is itself gone. Fortunately it lives on in the wayback machine

Related: Never known an open web · Cool Eco Houses · Web Application Security

Automating mailman with ruby mechanize

One of the things I've found is that people forget events quite often, so I try to make it easy for people to know when and what the next MHVLUG meeting is.  One of the ways I've been doing this by setting the footer on our mailing list to list the next couple of meetings.  This has worked out well, except for when I forget to go and update it.

Mailman doesn't have an API, but you can get past that by using ruby's excellent mechanize package, which lets you nicely script complex interactions with websites.  With an hour of time I pulled together this script which now runs every night and automatically syncs from our icalendar feed and updates the mailing list footer appropriately.

#!/usr/bin/ruby

require "pp"
require "rubygems"
require "mechanize"
require "tzinfo"
require "icalendar"
require "open-uri"

@@upcoming =<<END
Upcoming Meetings (6pm - 8pm)                         MHVLS Auditorium
END

def next_meetings()
    open("http://mhvlug.org/calendar/ical") do |file|
        cal = Icalendar.parse(file)
        # ruby collections are sometimes quite compact, so here is the
        # short hand:
        #   Icalendar returns an array, so get the first element
        #   then get the events array
        #   then filter that by only events in the future, and Wed at 6pm
        #   then only get the first 3 ([0..2] is an array slice)
        events = cal.first.events.
            select { |a|
                (a.dtend > Date.today) and
                (a.dtstart.wday == 3) and
                (a.dtstart.hour == 18)
            }[0..2]

        events.each do |e|
            str = e.dtstart.strftime("%b %e - ") + e.summary
            str.gsub!(/  /, " ")
            @@upcoming += "  " + str + "n"
        end
    end
end

def update_mailman
    a = WWW::Mechanize.new

    # this is the page we want to go, but we aren't logged in yet, so it will give
    # us a login form
    login_page = a.get("http://mhvlug.org/cgi-bin/mailman/admin/mhvlug/nondigest")

    # find the form that gets us back to where we want to go, and set the adminpw field
    nondigest_page = login_page.form_with(
                         :action => "/cgi-bin/mailman/admin/mhvlug/nondigest"
                     ) do |f|
        # set your password here
        f.adminpw = "XXXXXXX"
    end.submit

    # we only care about updating 1 field, name=msg_footer, so find the right form
    # update the field, and submit
    p = nondigest_page.form_with(:action => "../../admin/mhvlug/nondigest") do |f|
        footer = f.msg_footer
        footer = footer.split("MHVLS Auditorium")[0]
        footer.gsub!(/Upcoming Meetings.*/, @@upcoming)
        puts footer
        f.msg_footer = footer
    end.submit
end

# pull from ical
next_meetings

# push to mailman
update_mailman

And now, one more manual task is being done by agents automatically for me.

Related: Ruby Snippet - Tagging mp3 files · Getting my head around Drupal: mhvlug.org version 4 a detailed guide · 700 Ruby Hobos

The Onion on the Science Channel

Via The Onion:

SILVER SPRING, MD—Frustrated by continued demands from viewers for more awesome and extreme programming, Science Channel president Clark Bunting told reporters Tuesday that his cable network was "completely incapable" of watering down science any further than it already had. "Look, we've tried, we really have, but it's simply not possible to set the bar any lower," said a visibly exhausted Bunting, adding that he "could not in good conscience" make science any more mindless or insultingly juvenile. "We already have a show called Really Big Things, which is just ridiculous if you think about it, and one called Heavy Metal Taskforce, which I guess deals with science on some distant level, though I don't know what it is. Plus, there's Punkin Chunkin." "Punkin Chunkin**,** for Christ's sake," added Bunting, referring to the popular program in which contestants launch oversized pumpkins into the air using catapults. "What more do you people want?"

The entire article is hilarious, go read it.  Seriously, this is how I typically feel when I see stuff coming through on any of the Discovery properties.  The History channel isn't doing much better of late either.

Related: Science Blog · Why we need more focus on Science · Definition of SyFy