Archive for the ‘Technology and Computers’ Category

Tw00t

Friday, August 22nd, 2008

Against much better judgment Lauren has explained that she does not any longer want to be my API for interfacing with Twitter:

Steven: Hey did you know Lambie is in the panel picker for SXSW
Lauren: Yes. He sent a twitter note about it….etc.

Today I join, under a great curmudgeonly cloud. Upside, I’ll be much more in the know about parties during SXSW, so, yay.

http://twitter.com/sgharms

Information Shadows

Thursday, August 21st, 2008

I found this presentation on information shadows by Mike Kuniavsky via Daniel’s site. Given my interest in Symbolic Systems, it really hit a sweet spot. Here’s a short abstract:

My presentation, called Information Shadows: How ubiquitous computing serializes everyday things (1.2MB PDF) is my attempt at showing how ubiquitous computing technology is, in essence, turning whole classes of everyday objects into serials, or services, by creating pervasive digital access to the objects’ metainformation, their information shadows. In the process, I talk about blenders, timeshares, Cuddle Chimps, City Carshare, and Exactitudes. I think it’s a fun talk, and I’m really happy to have had the opportunity to articulate these ideas in this forum.

Source

Around the 3rd section I lost the flow of the argument, so I wrote out this précis to try to help me keep the ideas straight. If, after seeing the original, you want to see an attempt at condensing the material read on.

(more…)

In an earlier post I provided code demonstrating my “functional” Perl idiom. The purpose of that code was to take a very simply formatted text file and to turn it into LaTeX Beamer formatting.

Well, recently I found the application iFlipr. In addition to being a site where you can upload flash cards, it also has an iTouch / iPhone version so that you can review when you’re in the bus, in a waiting room, etc.

So, I needed some code to transform my generic data set into–not LaTex–but iFlipr format. With but the most trivial of changes, I was able to accomplish this. The high readability of “functional” Perl made this, literally, a 3 minute affair.

Here’s the diff:

56c56
<               &produce_beamer_body(
—-
>               &produce_iflipr_body(

81c81
< sub produce_beamer_body
—-
> sub produce_iflipr_body

83c83
<       (my $latex_output_file = $_[0]->{file} ) =~ s/..*$// ;
—-
>       (my $iflipr_output_file = $_[0]->{file} ) =~ s/..*$// ;

85,93c85,86
<       open (LATEX, ">$latex_output_file.tex");
<      
<       # A technique to tell Perl not to paginate
<       # ( i.e. re-print LATEX_TOP format ) again
<      
<       my $ltx = select LATEX;
<       $= = 9990;
<       select $ltx;
<      
—-
>       open (IFLIPR, ">$iflipr_output_file.iflipr.txt");

>              
96,97c89
<       my @order = sort { $a  <=> $b } ( keys ( %$ds ) );
<       for ( @order )
—-
>       for ( keys %$ds )

100,103c92,93
<               $part    = $ds->{$_}[1];
<               $meaning = $ds->{$_}[2];
<               chomp($word, $part, $meaning);
<               write (LATEX);
—-
>               $meaning = $ds->{$_}[2];       

>               print IFLIPR "$word\t$meaning\n";
105,107c95,96
<
<       print LATEX $end_of_document;
<       close LATEX;
—-
>       

>       close IFLIPR;

If you’ve not thought about writing code in this fashion, I hope this entices you! Either that or we should all take up Haskell or Lisp “Lisp (programming language) - Wikipedia, the free encyclopedia”)

Perl things I always forget

Wednesday, August 13th, 2008

This idiom, I love it so much but I use it fairly infrequently, but it’s absolutely gorgeous

#Assign to another variable the result of a RegEx]
($new= $old) =~ s|foo|bar|g;

And this one I just forget, because I tend to use hashes

#Remove element from an array based on index:
splice(@array, 3, 1);

How I write Perl

Friday, August 1st, 2008

When I write Perl, on my own, it looks like the following. This is Perl written in the “functional” style I advocate.

The code takes a listing of simple definitions:

    tree
    noun
    something organic with leaves

        _etc._

and turns it into LaTeX Beamer–class slide markup.

    
    \frame{
        \frametitle{tree       }
        \begin{itemize}
            \item tree
              \pause
        \item noun
        \pause
        \item
    something organic with leaves
        \end{itemize}
    }
    

When the Beamer LaTeX code is complied with pdflatex it produces a slide show that winds up looking something like…

You can see how something like this is handy for someone studying their GRE Vocabulary builder. Code after the jump.

(more…)

Safari v. Mozilla

Thursday, July 24th, 2008

I think the balance has shifted again, I think I’m going back to Firefox as my default browser.

  1. The add-ons are amazing. Mozilla as a platform for new ideas simply rules ( from a user perspective )

  2. I always liked type-ahead find, an emacs thing that I think should be everywhere

  3. The render time isn’t notably better on Safari anymore

  4. Safari keeps barfing on the JavaScript on my netflix queue. I visit that thing often enough that barfing on the site and taking out my browser state is a major problem.

  5. The issue that ruins my Firefox experience when i’m forced to use a PC experience, memory leaks, doesn’t seem to be a problem on OSX.

Safari -> General -> Default Browser

Lone Star Ruby Conference

Wednesday, July 9th, 2008

Wow, has Austinite Jim Freeze et. al. really outdone themselves this year. They have organized the second Lone Star Ruby Conference. This year none other than Matsumoto-san, creator of Ruby itself, will be presenting! Talk about a coup!

The presentation will even be at the terribly-convenient intersection of Anderson and Burnet but a mere 4 miles from my home. I hope opportunity shall be found to introduce the intrepid father of Ruby for a Hunger Buster at the DQ up the street.

This also means that the closest and best bar in the area will be Ginny’s Little Longhorn. I can totally see Dale Watson and Matz rocking a “Heartbreak Hotel” cover.

You can also take an chock-full day long training session for a mere 125 on top of the incredibly reasonable 250. My ticket, all told was less than 500 dollars. Hotel costs at most conferences are more than that.

If you’re doing Ruby, come on down to Austin in September and say hello. Being September it may be a pleasantly cool fall or the final month of the boil-‘em-‘til-they-say-uncle crucible. No promises on that one.

New Internet Jargon: Banality Inertia

Wednesday, July 2nd, 2008

It’s a familiar way of structuring an idea on the internet, especially as presented in blogs:

The world seems to have some condition

Now, portion the first are pro-SKUB, but portion the second people are anti-SKUB.

pro-SKUB arguments are lain anti-SKUB arguments are lain

Now a commenter comes along and, being a fair-minded type, can only come to the conclusion that surely some Hegellian synthesis of the two camps is sensible.

He begins typing this out and then thinks: “By Odin’s Raven, this is clearly the most banal thing I’ve ever written: everyone knows that pro-SKUB is sensible in some ways and anti-SKUB carries the day in others”.

And then you just hit the cancel button.

Macbook Keyboard + Vim

Thursday, June 12th, 2008

I’ve been away a while because I’ve been working very hard on migrating my legacy application. After hours and hours of punching a way in Vim, Perl, M4(!), and making screencasts the last thing I wanted to do was come home and type some more.

The interesting thing is that some of the work that I have done is able to be discussed in a public forum, so I’ll actually be able to show not just tell.

In all this typing of late, I’ve been using the vim editor for many, many hours. Given that the MacBook Pro seems to be the de rigeur tool for the modern hacker, has anyone come up with a solution on how to avoid this problem:

When using vim I always hit F1 when I move to strike the Escape key. After a few hours of typing it dawns on me “Hey, why is my screen so dark?”.

Macbook Pro keyboard

Sorry, that poorly-rendered text says “Danger Zone between ESC and Screen Dim