A Nanosecond Per Foot

It takes light takes about a nanosecond to travel a foot. So if you’re sitting four feet away from me, I’m seeing you as you were 4 billionths of a second ago. Meanwhile, Earth light takes four years to get to Alpha Centauri. So for anyone on a planet in Alpha Centauri watching Earth TV, it would appear that we still have an adult president in office.

Marvin Pontiac: The Asylum Tapes

“I thought people would be up in arms about pretending to be a black person,” Lurie said in a 2008 interview, “but people were more upset that I pretended to be an insane person.” –2013 John Lurie interview at eMusic

Something seemed fishy about the amazing 1998 The Legendary Marvin Pontiac ‎– Greatest Hits release, on Strange & Beautiful Music. Who was this madman with the lyrical genius of Dylan meets Robyn Hitchcock meets crazy-guy-on-the-corner-by-the-bodega, and where did he come from? How did such an incredible record emerge whole cloth from an artist none of us had ever heard of? Then his biography turned up online, claiming that Pontiac had been:

The son of an African father from Mali and a white Jewish mother from New Rochelle, New York. The father’s original last name was Toure but he changed it to Pontiac when the family moved to Detroit, believing it to be a conventional American name … When his mother was institutionalized in 1936, the father returned and brought the young boy to Bamako, Mali where Marvin was raised until he was fifteen. The music that he heard there would influence him forever.

Plausible? Almost sorta kinda. But why did Pontiac’s voice sound like a more blues-drenched version of New York jazz musician/painter/actor John Lurie (Lounge Lizards)? Oh… because Pontiac was Lurie! Realizing that the whole Pontiac thing was a ruse didn’t diminish the magnetism of that record for me though – it amplified it if anything. Went looking for more, but that was it — just the one audio scrapbook.

Until now. Pontiac (who was supposed to have been killed by a bus in 1977!) just dropped a follow-up recording, The Asylum Tapes, allegedly recorded on a donated 4-track deck while he was confined in the Esmerelda State Mental Institution. This time it’s Lurie solo (the first collection was recorded with John Medeski, Billy Martin, G. Calvin Weston, Marc Ribot), but it’s raw, weird, soulful and full of demented wonder.

New Yorker: So what’s Lurie up to with this project? I suppose it’s no more mischievous, really, than an actor singing in character, and many of our most prized artworks goof around with form, testing the permeable membrane between fact and fiction, between art and something else. … Our hunger for the authentic or the unmediated has mostly begotten us a cavalcade of deeply unreliable things, such as Donald Trump, laminate flooring, fake-fake news, artisanal moonshine, and reality television.

Then again:

Reportedly Marvin’s music was the only music that Jackson Pollack would ever listen to while he painted. This respect was not reciprocated.

Not sure The Asylum Tapes will get us any closer to answering hard questions about how Pontiac ended up in the bughouse, but it’s deep, beautiful, soulful, sort of funny, and totally worth your time. Available for streaming on iTunes, Spotify, etc.

Google SheepView

Cool story: The Faroe Islands are so remote, and have such a small population, that Google hadn’t gotten around to doing StreetView there. So citizens took it upon themselves to strap solar-powered cameras to their sizable sheep population, and uploaded the resulting images to Google themselves. Soon after, Google took notice and sent actual StreetView cars and hikers to do the mapping for real.

A Nation-Sized Battery

If you want to power your home entirely on renewables, the general recommendation is to include enough battery storage to keep things running for 3-4 days without any input (no sun, no wind). This fascinating blog post looks at a hypothetical scenario where we wanted to scale this pattern up to supply the entire United States with enough battery to back up a 100% renewable grid.

He does the math, and comes up with a battery size of approximately one cubic mile. Size is not a problem (it would be distributed), but the cost would be around $25 trillion – more than the annual U.S. GDP. And we know of no source in the world capable of supplying enough lead (he uses lead batteries in the though experiment because they’re 85% efficient and are the cheapest form of battery). So there’s some problem solving to do there, and there are problems with the hypothetical – for example the whole nation would never experience a lack of sun or wind for four days, and we could share extra juice around on a well-distributed grid, eliminating the need for this much battery storage. Or we could come to a fantastic battery breakthrough that changes everything. Or … Good read.

A Nation-Sized Battery

Testing Reusable Django Apps with Pytest

Django project dependencies are normally installed with a simple

pip install myapp

But if you want to be a code contributor to a dependency such as a reusable Django app (or if you are writing one), the usual pattern is to:

  1. git clone that app to another directory, outside of your project
  2. From within your project dir, use
    pip install -e /path/to/the/clone

This creates a foo.pth link and/or a foo.egg-link in your project’s virtualenv, rather than copying the code into the project itself, so you can work on the separate repo and have changes reflected in your project in real time.

That’s all well and good, but if you use pytest and need to run tests in the dependency, just running pytest from your project dir won’t find tests that live in the dependency. So can’t you just run pytest from within the dependency’s directory? Not quite – since it’s a Django app, it’s going to assume access to Django itself, and likely to other apps installed in the Django project, such as users. It would be redundant and cumbersome to install Django in the dependency’s directory, and that still wouldn’t solve the problem of access to users etc.

I can’t seem to find mention anywhere of a “best-practice” solution to this dilemma, but after much futzing around and feeling like I must be missing something obvious I tried what should have been plain from the outset:

  1. From the project dir, pip uninstall myapp
  2. From the project dir, create a symlink:
    ln -s /path/to/the/clone myapp
  3. Add myapp to your .gitignore

Now the separate reusable app appears to Django and to pytest like it’s present in the project, while maintaining physical separation between the project and the dependency. Tests run, and there’s no confusion. Just be sure to .gitignore the symlink.

There’s a gotcha to look out for here: Typically, a reusable app called “myapp” will live in a parent folder that’s also called “myapp”. If you make your symlink to the top-level folder, the imports inside it will not work. You’ll want to create your symlink to the inner folder, e.g.:

ln -s /Users/yourname/dev/myapp/myapp .

Unless I’m mistaken about something, a simple symlink (rather than pip install -e appears to be the easiest way to organize the relationship.

Raising a nerd

“Dad, there’s a mistake in Stranger Things. It’s supposed to be set in 1984, but that periodic table in the background shows an element that wasn’t discovered until a decade later.” (Turned out to be Oganesson 118). Kid has a memory like a steel trap – makes me so jealous sometimes.

How To Screw Up a Good Backup System

I back up our family computers like crazy, using a combination of Time Machine and cloud backup via Backblaze. But I did something dumb and almost lost our family’s entire history of home videos. Facing estimates of $500 – $1500 for professional data recovery, I stumbled on an awesome hack that saved the day.

Background

All of our computers’ internal hard drives get a dedicated external Time Machine, and we use Backblaze for extra insurance, so our data is safe in the cloud in case of fire, theft or flood. But we also have a few external hard drives that store things like large music collections and our home videos. The external drives back up to Backblaze only (no Time Machine).

All of that has been working hunky dory for years, and I felt confident we were safe. Then, a week ago, I realized that the drive that stores our family videos (“Gorgonzola”) would no longer mount, with any cable, on any of our machines. Yikes! So I turned to Backblaze for a restore, only to find it wasn’t showing up there either! Double yikes, freakout.

What Happened

At some point in the distant past, I did something dumb, though I didn’t realize it was dumb at the time – I realized I had lots of extra space on Gorgonzola and decided to let that drive do double-duty, as a Time Machine drive for a laptop. What I didn’t take into account was the fact that Backblaze has a reasonable rule – they don’t back up your backups. So when Backblaze detected that Gorgonzola was now a Time Machine drive, it dropped it from the manifest. I never noticed it had been dropped.

So now I’d realized that I had NO backup available anywhere for this precious, unreplaceable data. So I called some data recovery services, and got estimates ranging from $500 – $1500. The data was important enough to me that I’d pay that ransom, if it came to it. But of course I didn’t want to.

So Crazy It Just Might Work

The next day, I stumbled on a brilliant suggestion: Often, when a drive won’t mount, it’s because the USB controller circuit board inside the drive case has gone south, and that the drive itself is fine. Solution: Purchase an identical drive, take them both apart, and swap the controller chips. Brilliant! Found an identical drive on Amazon for $100 (Seagate Backup Plus Slim), and went for it.

Prying the case open and removing the drives turned out to be easier than expected (YouTube video), and the controller chips slipped off easily. Quick swaperoo, and lo and behold, it worked! Gorgonzola showed up as normal, and I’m rescuing my data right now. Of course, both drives were destroyed in the process, but at this point, I don’t care.

Yay, internet.