Why you should probably get rid of the clutter around56.

Here’s some science that supports getting rid of clutter to free your brain for the task at hand (literally).

“The brain constantly keeps track of whether objects are within reach [56], and simulates movements that are feasible to manipulate the immediate environment, even in the absence of any intention or explicit goals [22,57–59]. “

The Fox and the Grapes—How Physical Constraints Affect Value Based Decision Making, by Jörg Gross, Eva Woelbert, Martin Strobel. June 10, 2015. DOI: 10.1371/journal.pone.0127619. The references are below:

22. Cisek P. Cortical mechanisms of action selection: the affordance competition hypothesis. Philos Trans R Soc Lond B Biol Sci. 2007;362:1585–1599. doi: 10.1098/rstb.2007.2054. pmid:17428779

56. Gallivan JP, Cavina-Pratesi C, Culham JC. Is that within reach? fMRI reveals that the human superior parieto-occipital cortex encodes objects reachable by the hand. J Neurosci. 2009;29:4381–4891. doi: 10.1523/JNEUROSCI.0377-09.2009. pmid:19357266

57. Cisek P, Kalaska JF. Neural correlates of reaching decisions in dorsal premotor cortex: specification of multiple direction choices and final selection of action. Neuron. 2005;45:801–814. doi: 10.1016/j.neuron.2005.01.027. pmid:15748854

58. Baumann MA, Fluet M-C, Scherberger H. Context-specific grasp movement representation in the macaque anterior intraparietal area. J Neurosci. 2009;29:6436–6448. doi: 10.1523/JNEUROSCI.5479-08.2009. pmid:19458215

59. Tucker M, Ellis R. On the relations between seen objects and components of potential actions. J Exp Psychol Hum Percept Perform. 1998;24:830–846. pmid:9627419 doi: 10.1037//0096-1523.24.3.830

Perl script and calling ffmpeg from the command line

Please note: I blog on whatever’s going on with me, cooking, writing, filmmaking, and so on. This post is about making thumbnails of video clips, using ffmpeg from command line programming and from CGI scripts.

So, I have thousands of video clips and want to make a “lookbook”of JPEG thumbnails every 2-3 seconds so I easily scroll through. (I put them all together via CGI scripting, crawling through directories of JPEGs. Each directory is named after the clip number.) Each thumbnail is watermarked with the clip’s name and timecode of the frame. If a folder already exists, the script adds “_dup” to prevent possible overwriting.

2014-11-08 at 1.33.04 PM

While it was working fine in Perl from the command line, I wanted to make a web interface so I could have some reminders of how to input filepaths (with trailing slashes, etc.).

System commands were working fine (like mkdir $clip_name) but my ffmpeg wasn’t working at all from the CGI script:

my $cmd = "ffmpeg -ss 2  -i $volume_path$quicktime_movie_name  -r .35 -bt 30M -s 480x270....."

I read about a PHP programmer’s problem where he said that his ffmpeg install had an external dependency on an mpeg3 encoder. That got me thinking that maybe my problem was a shell/path/lib problem. (Also, CPAN wouldn’t install the FFMPEG module…and all this is just to get some convenient thumbnails…)

So I tried changing the system call to include the absolute path to ffmpeg, and it worked!

my $cmd = "/usr/local/Cellar/ffmpeg/2.1.3/bin/ffmpeg -ss 2 -i $volume_path$quicktime_movie_name  -r .35 -bt 30M -s 480x270....."


Hope this helps someone else, but probably Perl programmers have become extinct.

Analogize, Sloganize, Alliterize, whenever possible.

“The New York Times described Edward Tufte as the ‘Leonardo da Vinci of Data.’ and Business Week as the ‘Galileo of Graphics.'”

or “She’s been called the Martin Scorcese of Beijing.”
Famous Person, Alliterative Noun. 
Why, oh why, must everyone have a tagline that references somebody greater?

Wow, what people say about their friends.

I really find Steve Pavlina’s blog useful, but this seemed unfriendly of him: 

One of my friends tried to get me to invest in a $5000 Omega watch. He has one and seems to like it. To him it’s a symbol of luxury and success. To me, quite honestly, a watch like that is a symbol of stupidity, inefficiency, and low IQ.


Stupid, inefficient AND a low IQ. Ouch.

Snobbery in the Tri-State Area

“Living in Indiana where we get weather that often knock’s out our power…”

Check security

I haven’t bought checks since the cheapest style was about $15/box, back when Hector was a pup. Hair was very big, neckties were very thin.

I have a few complaints. Deluxe sells these by the box. Doesn’t say anywhere how many checks are in a box. Then we might do the math and figure out that they cost the princely sum of around 8 cents each. I can’t remember how many were in the last box I got, but it felt like 40 per block, maybe 8 blocks.

Shipping is a whopping $11.

Called the bank to see if I could get a better deal by dealing with humans. I cannot.

It’s a small comfort that I’m paying for security measures like this Padlock Icon in a graphic from the Deluxe website. Yes, forgers always think, “Uh oh! An icon! I’d better steal other checks!”


Movie Review: Schlussmacher (2013)

In Schlussmacher , which translates to “Endmaker” but I’d phrase it “Breakup Master,”  Paul  (Matthias Schweighöfer) is a proxy break-up messenger. Like someone delivering a court summons, Paul broadsides unsuspecting romantic partners with “Jenni says it’s over.”  One breakee freaks out, and threatens suicide. Needing somebody with a valid driver’s license to cart him to next breakup, Paul promises the breakee they can spend the next day together. Mayhem ensues.

The film has surprises, which I like, and constant pop music, which I do not. The Euro-style soft focus, bleached colors, and cheesy soundtrack make it feel like a 2-hour-long Mentos commercial. Speaking of long, it’s too long. And Paul’s girlfriend looks too much like Paul, more like brother and sister. They should have swapped her character with the actor who plays his sister. (But “they” is Matthias Schweighöfer — both director and lead.) The virtuoso crane shots of Frankfurt am Main, Berlin, and Dresden are pretty, but a little dizzying. German cinematographers have been doing some wonderful work lately, with terrific technical innovations. (I’m thinking specifically of nature documentaries with multi-hour, super-slo-mo tracking shots.)

For all my criticisms, Schlussmacher is fine dinnertime accompaniment when you want to watch something light after work.

Battlestar Galactica

Yes, it’s all about the vast beauties of outerspace…


OCR: comparing text-recognition engines

I’m a fast typist but that doesn’t mean I like doing it.

I thought I’d try book scanning and OCR-ing the results. Then I got curious whether Google’s OCR was better or worse that Adobe Acrobat.

The Google results are “better,” meaning there are fewer misspelled words. However, it isn’t significantly better than Adobe Acrobat, and so neither is good enough for me to use them. I will just deal with the PDF scans until the technology evolves. Too bad.

Anyway, for your comparison, here’s the original PDF scan. It’s from a book scanner, not from a flatbed scanner. I think it would be sharper if I had used a flatbed, but of course much slower to capture the image(s).


Here are the comparisons, left page is Google Docs and right page is Adobe Acrobat. Neither satisfies me. Why is this so hard? I feel like algorithms should know to check the dictionary, rather than just insert tildes (~) all over the place.


TV Review: “Miss Fisher’s Murder Mysteries”

While the acting and historical feeling are fine, the stories are too limited to Miss Fisher’s acquaintances. Why did she bother to print business cards? Pretty much everyone who disappears or dies, and their families, already knew her: current employees, former socialites, distant relatives, ex-lovers…you get the idea.

But after about ten episodes, I can only think of one time when a stranger hired her to find somebody or something. It feels quite different from Poirot or Holmes, for that reason alone. Is this a hobby or her livelihood? Functionally, it makes things easier for our protagonist, because she doesn’t have to try so hard to solve the crime. So it’s probably a negative direction.

It’s clear they can’t show sweeping views of Melbourne of the 1920s, so I forgive that. Her wardrobe is stunning and suits her character’s personality, but maybe too dazzling, like Catherine Zeta-Jones’ outfits in Intolerable Cruelty.

Lastly, the first episode emphasized a convict soon to be released, who Miss Fisher believes murdered her sister. But poof! two episodes later, sister? What sister? Perhaps her Significant Narrative Ghost will reappear soon.

Overall, watchable but not a classic.

Create a free website or blog at WordPress.com.