12

bad interpreter: No such file or directory

96px-Shebang

Earlier today I was trying to run a Python script that I downloaded from the internet. Bash (or the kernel, to be exact) refused to run the script, insisting that python didn’t exist:

$ mem.py
-bash: /home/natan/bin/mem.py: /usr/local/bin/python2.5^M: bad interpreter: No such file or directory

The script agreed to run indirectly with python ~/bin/mem.py
I googled and discovered that the file was encoded in DOS format with improper line endings.

To fix the problem, I copied the contents of the file and pasted them into a new file. Voilà. The shebang became magical again.

Then again, you can also fix the problem permanently. (Don’t.)

ln -s sh "sh$(printf "\r")"

photo credit: Sven & Lirion

0

Snowy Database Schema

Django - The Web framework for perfectionists with deadlines

For GCI (Google Code In) I’m working on Snowy, the Django-based application to view and synchronize Tomboy notes online. My task is to add support for multiple OpenID accounts.

To get started, I used django_extensions to generate a graph of the database schema.

… Continue Reading

2

Lessons Learned from Writing a One-Month Novel

This is My Life as Writer

I’m trying to write a novel this month. It has been a wild experience. The things I’ve had to research, would make even the FBI gasp at my search history. Here are a few things I’ve learned along the way:

Typos Are God’s Gift to Writers

A few nights ago, I was writing about an ant colony and accidentally wrote the following:

The aunts were furious. Inside the aunt colony…

I noticed my mistake and was about to correct the sentence. Then I stopped myself. What if there really was an auntcolony? I thought. I kept on writing, and soon the following was born:

In the aunthole, three egg timers all chimed at once. It was nursing time. The aunts climbed off their sofas and waddled over to three different holes, set around the room. They peeked down into the lower chamber. It was a huge cavern, larger than a football stadium. Lamps lit the edges, casting a golden glow on the center of the cavern. The cavern was filled with rows upon rows of pink baby cradles. Inside each cradle, a baby aunt slept. The day was coming. Soon the baby aunts would be ready to leave their cradles, put on their pink dresses, and lay upon their sofas.

… Continue Reading

0

Living in the Clouds

Dropbox Logo

Yesterday, my Macbook Pro’s hard drive died. I had no warning, but thanks to Dropbox, LastPass, and Delicious, it took only 5 minutes to switch to a new computer and continue working.

Actually, I did lose my formerly-open Chromium tabs. That’s all.

5

Mars: I Don’t Care If I Never Get Back…

The Red Planet (NASA)

When I saw Cosmic Log’s article on a one-way trip to Mars, a song came to mind:

Just take me out of Earth’s Orbit,
Take me out in a ship,
Give me some robots and preservable snacks,
I don’t care if I never get back,
Lets fly, fly, fly into the heavens,
If we crash-land it’s a shame,
For it’s one, two, three, asteroids, we’re out,
Of the old Earth game.

(Poem released under CC-by – just credit this blog :) )

… Continue Reading

Pages ... 1 2