Archive for the ‘Technology and Computers’ Category

Back in 2005 Apple released the iPod shuffle. Realizing that they had just unearthed the biggest technological personal computing boom since Dell conquered East Anglia and realms beyond with Stephen, our hempen “Dude, you’re getting a dell” guy, they had a challenge: how can we get everyone to buy another one?

Steve Dell ad

Dude, you should liquidate AAPL and return value to shareholders! — Michael Dell circa 1997

Do not question the wisdom of Stephen Paul Jobs’ secret emotion reader of populations (Asimov anyone?). In this time, Apple brought us The iPod Shuffle.

Yes, a USB stick with a button.

And yes, I bought one. It seemed the perfect step forward: don’t take that big-ass 60GB iPod to the gym, take just enough songs to rock you (like a hurricane) while on that elliptical.

I’ve had mine now for, I believe, 6 years. I took it out running yesterday and in a swinging arm / earphone cord contact incident, I snapped the USB stick iPod from my hip and it fell to the ground with a clatter. Being a USB stick well-designed consumer electronics device, it was OK, but the clip that I used to hold it to my waistband was done for.

Obviously the 3rd party market has dried up for hip clips of this generation of shuffle. Was I going to actually going to buy a new shuffle to replace my holding clip?

Then I remembered that the iPod Shuffle came with a totally SWEET lanyard.

ipod shuffle firstgen

So now I run with my shuffle on lanyard, inside the shirt. Sure the USB stick gets a little moist, but I lack the cool (L) or the money (R) of these two guys to make up for the dorktacular spectacle.

Steve John Ishuffle

A Different Vision of AI

Wednesday, July 29th, 2009

NPR recently shared Erik Baard’s suggestion of why humans ought, and perhaps are morally obligated to, develop Artificial Intelligence.

Traditionally AI opinions are predictable. Either “bots run amok (possibly enslaving humanity, determining us a parasite, rendering all matter indistinct, or generically squashing our free will and giving us a life that we consider less human)” or “bots are our salvation: they will help us, we will become them, or they will optimize humanity’s place on Earth benevolently.”

Baard makes an interesting supposition, the ecological fate of the Earth is sealed: we will exhaust the resources on this planet in a finite measure of time. Or, perhaps, we will upset the balance of ecology such that we sterilize ourselves, poison our foodstores, or overengineer our crops to the point that their homogeneity makes them vulnerable to utter blight. Before that happens, something unique on Earth has arisen: the ability to create electronic systems capable of surviving inter-planetary travel.

On a planet with intelligent whales, birds, squid, silicon-based plants, the possibility of creating a single shard of etched silicon wafer is a total impossibility. It could be that in the Drake equation fc is remarkably low.

Therefore to create a digital AI being that can carry the skill of intelligent machine construction (ça veut dire: itself) and human life might be humanity’s gift to the Universe itself.

Imagine this mechanical panspermia. As the Earth is a charred cinder held in the corona of a swollen Red Giant, and as an inter-galactic collision begins that will plunge Earth into the event horizon of a neighboring galaxy’s central black hole, a single robot harvests clay and ammonia, incubates RNA, and injects it into a small E. coli colony. It injects this primitive mixture of genetic soup into a mineral substructure as lakes of fresh water roil in a humid atmosphere. First the bacteria, then the protazoa, and finally that entitled creature rises again. And perhaps as he places a naïve fleshy hand to metal that endured the ravages of inter-planetary travel, the device will exit hibernation and say: “Mankind, how lovely it is to see you again.”

As The Hybrid says:

First Hybrid

"All of this has happened before, and all of this will happen again."

Things I always Forget: VIM edition

Monday, July 13th, 2009

Vim is a great editor. I like to use it when I’m in the shell and don’t have access to Textmate or don’t want to ait for Textmate to load up.

Mapping something in insert mode, to save typing

inoremap <C-E> \={E}

This creates an entry in insert mode such that Control-E types the LaTeX code for an majuscule E with macron.

Consult Yegappan’s guide to map)

Don’t use Escape

On keyboards in the US, Control-[ is equivalent to ESCAPE, and thus can get you out of insert mode into normal mode in a slightly more reasonable setup than reaching for escape. Besides, if you have the control key where God intended ( on the Caps Lock key ) this is a snap.

List the key bindings

  • map: list all the key mappings
  • nmap: list all the normal-mode mappings
  • imap: lit all the insert-mode mappings

I recently got a new computer and decided to set up Mutt locally on it. Here’s how to get to reading mail with Mutt in a way that supports HTML and multi-byte character sets. This is not a perfect HOWTO (especially in the mutt ./configure section), but should get you most of the way there.


Use Darwin Ports

  • sudo port install rxvt-unicode
  • sudo port install tokyocabinet (if you’re going to talk to an IMAP host and want to cache the data, you need a db to cache into)
  • sudo port install w3m (for displaying HTML mail)

Set up your shell to help mutt with multibyte

export LC_CTYPE="en_US.ISO-8859-1"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/local/lib  

Build the source, don’t use port here

  • Download mutt source (developer branch to get SMTP support, header caching, i.e. the good stuff)
  • *
./configure --prefix=/opt/local 
--enable-imap --enable-smtp --enable-hcache 
--with-tokyocabinet=/opt/local/ 
--with-curses=/opt/local/include/ncursesw/ --with-regex
  • That means: target to install in /opt/local/bin, enable IMAP and SMTP support, enable IMAP header caching using the tokyocabinet libraries, use the wide Ncurses library so that we can show fancy characters in the terminal, and add regex support
  • make && sudo make install

Make mutt take advantage of your configuration

set folder= {mailserver}INBOX # where i keep my mailboxes
set spoolfile={mailserver}INBOX # where my new mail is located
set imap_user=me # your user id
header_cache=$HOME/.muttconfig/.cache
set smtp_url="smtp://smtp.server"
auto_view text/html

Configure your .mailcap so that you automatically view HTML mail properly

# HTML
text/html;      w3m -I %{charset} -dump %s; nametemplate=%s.html; copiousoutput

## Images
image/jpeg;     open %s; nametemplate=%s.jpg; copiousoutput
image/png;      open %s; nametemplate=%s.png; copiousoutput
image/gif;      open %s; nametemplate=%s.gif; copiousoutput
image/bmp;      open %s; nametemplate=%s.bmp; copiousoutput

# PDF
application/pdf; open %s pdf
HTML email rendered sensibly

Speaking of Grand Yak Shaves

Monday, February 9th, 2009

Donald Knuth started writing The Art of Computer Programming and along the way decided that technical publishers didn’t know what they were doing. Knuth’s yak-shave?

Writing TeX: A 10 year yak shave that has produced the most elegant typesetting language ever.

A fabulous link between the science of this book, art, and symbolic systems: http://www.npr.org/templates/story/story.php?storyId=4532247

Unlikely Phrases in the Recording:

  • Bar Coding
  • Arabic Language
  • Algebra
  • Samuel Johnson
  • Betsy Ross
  • God
  • Wastebasket

As many of you may know I’ve been writing a lot. I mean a lot lately. One of the great things about being a humanities guy who knows high tech is that you know better ways than “email my gmail account a backup copy of this document that’s leeching my soul” to handle version control.

I used subversion.

A few weeks into my first project I became really aware of git, Linus Torvalds’ distributed version control system. My friends, the times that “getting interested in a new technology” has turned my KISS project into a monumental yak-shave is beyond count, so I resisted git. I even complained of people hassling me to shave that Yak.

Like Stimpy, people kept taunting me with the red, jolly, candy-like button of git.


History Eraser Button (Ren and Stimpy) - Free videos are just a click away

In the middle of this, I found the PDF version of Travis Swicegood’s Pragmatic Version Control Using Git. I decided that instead of a massive yak-shave, trying to piece together bits of web wisdom and screencasts, I would go a chapter a day on Travis’ book.

So, each day I scribbled notes from a chapter in my Moleskine:

Git Moleskine

Until I finished. Well, I’ll be humdingered if Travis’ book didn’t teach me git. I have to admit I was really scared by commands named “rebase” and flags like “—hard” (sounds permanent, you know?). Travis really focuses on the important parts of git:

  1. Git is a distributed version control. This means you have the entire history versus the latest instance, like in Subversion
  2. Git loves branches. Branches are great because they let you try things, foo-up fast, and then move on
  3. When a branch becomes más macho, you may want to move it into the base. Instead of merging all those changes in, move in the finished product, that’s rebase.
  4. Merging, by the way is like a staggered rebase
  5. Remotes are like virtual branches, you can merge them into your local stuff.

There’s some subtleties around this, but walking out with these understandings, the basics of branch, commit, and clone really got me plenty far. I even set up a github project for Latin + LaTeX + Textmate utilities.

Travis also uses github to give you your “work at home” directories. That means if a chapter feels familiar to you, you can skim it until you feel like you want to work along. When you wish to do that, simply check out the code for that chapter and follow along. I like that the book is flexible and allows you to map your level of expertise in.

Personally, I didn’t miss the paper version (mostly because i make notes anyway) so having the PDF was sufficient. It’s definitely a good book at a reasonable price.

So, while I will certainly concede that Travis’ book is a yak shave opportunity, it’s a pretty tiny yak. Take it a chapter (< 1 hour to read each one) at a time and you’ll have a really great, new tool under your fingers in no time.

Behind on coder chic

Friday, January 16th, 2009

It took me forever to get into SCM and I’m really loving Subversion.

…but now there’s git by non other than The Finnish Father of Linux himself. And boy, the world is crazy for it. And github, a place for sharing ideas is certainly in the running to get all sorts of kudos as the greatest addition to the programming world since sliced bread.

But here I am, writing essays for grad school ( and putting the revisions in SCM ), and writing code to impress review boards ( and putting the revisions in SCM )….so, until March, I think that I’ll be out on git’s pseudo-profane “fork yourself” jokes and stuck in that horrid, horrid land of “svn ci -m ‘this, that the other’”

Inbox Zero

Tuesday, November 11th, 2008

I’m very happy to report that I have put my inboxes ( Personal1, Personal2, GMail, etc. to 0 messages). I believe that an empty inbox is a key to sanity, especially for those who live and die by the e-mail sword.

For anything that comes in any inbox I either:

  • Reply / take an action
  • Delete it
  • Archive it for reference

With just these simple three techniques and a few extra folders on my hard disk, I was able to empty all the existing mail in my inbox.

Now, I will certainly get more mail in the future, so how am I going to handle it? I will apply those three simple rules above.

I have added one more technology to help with a certain class of mail that I call “Moderate interest, low involvement” (MILI)1 mail. MILI mail examples are, updates from facebook, reminders from my credit card companies, notifications from the service department for my car, etc.

Traditionally, being a bit of mail guru, I have handled this by using filters, Procmail, senmail, perl, etc. Instead of managing the filtration ruleset, I’ve now “offloaded” that work to OtherInbox. It’s a utility whose handiness scales, at the very least, linearly the more addresses you have.

Here’s a video explanation of Otherinbox.

With my MILI mail gone, all I have to do is handle the thin remainder with my three techniques ( adapted from David Allen’s GTD methodolgy).

If you follow @otherinbox on Twitter, you may get a beta invite. Alternatively, mail me at otherinboxinvite@sgharms.otherinbox.com for the next 30 days and I’ll try to siphon your name to the beta board and get you an invite.

Footnotes

1 No, there is no VANILLI mail.

LaTeX I always forget

Sunday, September 21st, 2008

[code lang=”latex”] renewcommand{labelenumi}{Alph{enumi}.} renewcommand{labelenumii}{alph{enumii}.} [/code]

This is used to define the classes of glyphs you want to use in an outline. In this case, the top-level points will be majuscule, Latin ( no for once I don’t mean the language, but the letter-forms ). The first level sub-set of that will be Latin minuscule. There are a number of classes that are available.

LaTeX recognizes 4 levels of sub-idententation ( thus no labelnumxix ), but 4 is usually sufficient ( yes, I strained to type that, but if it’s not sufficient, odds are you’re not as clear in your thinking as you ought be ).

The renewcommand operator is used to re-define standard operators. newcommand is sufficient for a non-extant operator.

I’m typing this here because I’m tired of visiting Jeff Krimmel’s excellent resource on the matter :)

You can also use

[code lang=”latex”] Roman, alph, arabic, roman, and Alph as formats [/code]

Here’s the one I tend to use, which I would call “traditional.”

[code lang=”latex”] \renewcommand{\labelenumi}{\Roman{enumi}.} \renewcommand{\labelenumii}{\Alph{enumii}.} \renewcommand{\labelenumiii}{\arabic{enumiii}.} \renewcommand{\labelenumiv}{\alph{enumiv}.} [/code]

Define new commands that take arguments

Sometimes you want to create a new command, here’s how to do it. Here was a command i wrote that produced small-caps-ified large text:

[code lang=”latex”] \newcommand{\verbatimTask}[1]{begin{sc}begin{large}{{#1}}end{large}end{sc}} [/code]

I modeled this off of devdaily.com

Adding new styles

If you need to add a new style, on my system, you do it in:

/usr/local/texlive/texmf-local/tex/latex

You add your style there. Subsequently, you need to execute “texhash” to rebuild the database so that you can use it.

Thereafter, by using [code lang=”latex”] \usepackage{packagename} [/code]

Will allow you access to your commands.

Inter-linear spacing

To doublespace a LaTeX document, you should include the line

    \usepackage{setspace}

after your \documentclass line.

Before your \begin{document} command,

\doublespacing

will make the text of the whole document doublespaced. Footnotes, figures, and tables will still be singlespaced, however. For one-and-a-half spacing, instead use the command

\onehalfspacing

In order to make a part of the text of your document singlespaced, you can put:

\begin{singlespace}

at the beginning of the text you want singlespaced, and

\end{singlespace}

at the end.

You can also set the spacing to be something other than doublespaced; for example, if you wanted to have one-and-a-quarter spacing between lines, use the line

\setstretch{1.25}

before your \begin{document} command, and after the \usepackage{setspace} line.

(NOTE: there is another package, called “doublespace” which will usually work exactly the same way as setspace. However, it interacts poorly with some graphics packages.)

From MIT

Adding a style

On my OSX machine copy it into a subdirectory off of /usr/local/texlive/texmf-local/tex/latex.

Then run mktexlsr.

Yes, I’m still a DVORAK user

Thursday, August 28th, 2008

Yet again research shows that typing comme moi nets benefits.

Discover Magazine on Dvorak keyboards