This was worth 6 minutes of my life

I enjoyed this video.

I find Destin’s reasoning a little suspect.  Not a lot, just a little.  He talks about how knowledge isn’t understanding: I agree.  He talks about having to unlearn a skill to re-learn a related but opposite skill: I mostly agree.  I think he forgets how long it took him as a child to learn to ride a bicycle in the first place, and makes some assumptions about learning that aren’t completely supported by his experiment.

Long ago, I read (I think in Godel, Escher, Bach, but maybe not) about an experiment where people were given glasses that inverted the world.  After a while (I forget how long, a few hours or a few days), their brain adjusted, and flipped the inputs, and the world then looked right-side-up.  But only while they still wore the glasses.  If they took the glasses off, then suddenly the world was upside down again, and it took them another while to re-adjust.  So that was one neat thing.  The other was, their brain only adjusted if they were free to interact with the world.  If they were motionless in a chair, the world was upside down forever.

I think this experiment with a backwards bicycle is very much like that.  You don’t learn an algorithm to ride a bike.  You train a neural network.  Those are two very different things.

So it was definitely a neat video, and it definitely highlighted some interesting cognitive problems (e.g. bias), but I don’t know that I’d agree that the experiment in question actually supported all of the conclusions being drawn.

On the other hand, of course, what the hell, I’m not a cognitive scientist, I could be wrong.  Just my two cents.  🙂

On creativity and discouragement

In other news, S. E. Hinton wrote The Outsiders her junior year in high school.

Printing Kindle cookbook content

Say you have a cookbook on your Kindle app and want to print a recipe. The Kindle app itself won’t let you print, and cut-and-paste out of a Kindle app kind of sucks. A quick search finds several methods (up to and including photocopying your Kindle Paper device, haha) all of which sound like they’d also kind of suck.

This worked for me: Log into the Kindle Cloud Reader (https://read.amazon.com). Open the cookbook to the recipe in question. Tweak the display (margins, font size, number of columns, etc) so that as much of the recipe fits on one page as possible. Tell your browser to print the page (Cmd-P on Chrome on Mac, or just File -> Print).

It only prints one page at a time, but for a recipe, that might well be enough.

Edited to add: This was the cookbook.  Highly recommended.  Bacon & Butter: The Ultimate Ketogenic Diet Cookbook, by Celby Richoux.

chrome://about/

There’s all kinds of cool stuff in chrome://about/, I must say.

If you want to see it, you’ll have to type it into your browser yourself. Chrome won’t let me link it. Or rather, I can link it, but Chrome will only go to chrome://blank, as (I guess) a security precaution. Or possibly so that random people like me can’t “rickroll” random people like you into thinking that I’m reading their Chrome settings. 🙂

Lots of work in the past few days here and at huckridge.com

As mentioned previously, I switched from Movable Type to WordPress.  Wordpress is pretty neat.  I liked it so much I cancelled the somewhat rudimentary and comparatively expensive hosting at GoDaddy I had and installed WordPress for huckridge.com too.  My two apps, ntla and Panopticon, are getting closer to ready for use.  Actually, I think Panopticon is ready for use, as of yesterday.

Random thoughts after switching to WordPress

Yup, switched to WordPress.  I’m not sure I’m going to keep this theme (“Twenty Fifteen”).  It seems kind of, I dunno, diffuse or something.  The font is fairly large.  I can probably tweak that — it seems like you can tweak everything else! — but I haven’t figured out how yet.

I also have several other sites I might like to use it for, and I’m a little leery of having to reinstall or reconfigure everything I’ve done here at theclapp.org.  Maybe there’s a good way around that, I dunno.  I’m fairly certain that the various WP hosting sites have figured it out!  🙂

QFTD, 5/12/14

Until then, just assume that in the absence of new information, everything is going along perfectly. I thank you in advance for agreeing to this comfortable delusion.” — John Scalzi

Hahahaha.

My Go bio

The GopherCon organizers recently invited me to their new channel on Slack.  (I’m not sure if it’s supposed to be public, or I’d link to it.)  (Edit: It went public shortly thereafter, here.)

Slack.com has a tiny one-line text field to talk about yourself.  That seems insufficient.  So I thought I’d ramble for a bit about my background, both Go-related and in general.

I started program in 1983 when I was 15.  My learning path was, broadly speaking, BASIC, Turbo Pascal, Turbo C, Lisp, Perl, C++, Java.  I’ve programmed professionally mostly in C, Java, and rather a lot of Perl.  The vast majority of my experience has been on the back end, with servers and whatnot.  For several years I’ve been the Linux team lead for Wedo North America (nee Connectiv Solutions), where we process 1-2 billion call detail records (CDRs) a day.

After Go 1.0 was released, a friend “mentioned” me on Facebook with a link to golang.org.  I took the tour and liked it (Go) a lot.  I found Ivo Balbaert’s The Way To Go and read all of it.  I’ve dabbled in it since then, but only recently started working on a project of any size.

Basically, it started to seem really dumb to me that I still interact with my Linux systems using a tty that hasn’t changed all that much since 1970.  It seems to me that the usual Linux shell conflates “model” with “view”.  Just for example: I should be able to get a list of files in a directory, and my shell should be able to sort them by name, size, or whatever, without having to go back and run “ls” again.  And I should be able to say “show all the executable files in green” using just a little CSS.

Ah, but I’ve tipped my hand, so here it is: I’m working on what you might call a browser-based shell.  HTML & Javascript (using AngularJS) on the front end talk to a Go server on the back end.

What is a shell, after all, at its core?  You give it commands and it parses them and runs them.  The root of it is basically “split on spaces, and fork and exec”.  Gosh, Go can do that.  Oh, and “show me the output”.  Browsers kind of excel at that.

Shells also have a programming language.  Which can be very complete, but I’d still rather use Go.  Failing that, I’d rather use Javascript.  Which isn’t perfect, but it’s more of a language than bash, or even zsh.  (I use the latter, if I can.)  Every so often I’m writing something on the command line and I think “Right about here is where a closure would be handy”, and I can’t do it.

Also, I did some statistics on my shell history, and the vast majority of commands I run are some version of “ls” or “cd”.  So my shell should have a built-in file browser.

It also seems strange and annoying that Linux programs talk to each other all to often via poorly formatted text.  “tail -f foo | grep bar”.  It seems like output should be via typed streams.  Or even, channels.  And you should be able to edit a pipeline on the fly, so that “tail -f foo” becomes “tail -f foo | grep bar” becomes “tail -f foo | grep bar > baz”, without having to run three separate commands.

My dream is to have a comparatively seamless interface where I can run commands, and format & manipulate their output, in Javascript, Go, and CSS, more or less on the same command line.  I don’t have a syntax worked out yet, but something vaguely like

js{ run(“ls”).asJson().sort(“name”).style(“+x”).color(“green”) }

where “ls” is actually a Go program that emits “stat” records on a channel down a websocket.

Or something like that.  🙂

I’ve probably rambled enough.  Thanks for reading.