Saturday, September 27, 2014

raspberry-pi remote ARM compiles via VNC viewer

Running raspberry-pi at home, logging in remotely via vncviewer.  A friend had set up a DNS service which my home PC pings, so I can get to the r-pi from anywhere.  Originally I was doing this to use r-pi as my git repository, but now I can use it as a remote ARM compiler from my laptop.





The only snag I ran into was that after installing vncserver on the r-pi: it wasn't obvious that the port the vncserver serves you have to add 5900 (mines running on :1, so log in via 5901).  Set up port forwarding on the router and an ssh connection.  I'm running from OSX and using the Java (jar) vncclient (tightvnc).

This is NOT secure (well allegedly the passwords are encrypted) - I couldn't get the SSH tunneling to work (even though I can establish an ssh connection in a shell), so ideally this should be on some account that can be wide open.  There are also claims you can avoid vnc programs and just use OSX screen sharing.


No VNC Just SSH Commands
Avoiding the vnc and just running commands over ssh requires entering a password every time (so I'd have to password for scp to the server, ssh command and scp results back).  Pretty tedious.  In OSX that approach also isn't helped by setting the .ssh/config to have:

home *
   ControlMaster = auto
   ControlPath = ~/.ssh/master_%r@%h:%p

That's supposed to use an already existing ssh connection for all subsequent connections.  But it wouldn't make an ssh connection at all on OSX.  On PC it did log in, but it didn't help (with the added adventure of generating an AVG warning when it tries to make the connection - but only if you've set up ControlMaster=auto in the ssh/config)!  Ugh!  On PC trying to run an scp after an ssh was already open still asked for another password.  Debian Linux on rpi apparently doesn't support ControlMaster.


TightVNC on PC
When I ran tightvnc on a PC (Windows Vista running from home), it required me to set up a connection via ssh first (I used cygwin).  I'm not sure why the OSX version of tightvnc (via Java) doesn't use the ssh connection, but the compiled PC version looks like it does.


Friday, September 26, 2014

Genetic Algorithms Used to Search Solution Space

I keep losing this article:

http://cacm.acm.org/magazines/2009/11/48443-deep-data-dives-discover-natural-laws/fulltext

Years ago when it was first published, I went through the references and tried to understand how to reproduce the experiment, but got overwhelmed by some of the work.

The idea is that you provide a what I'll call a "vocabulary" - a list of operations - which are then randomly arranged, and that arrangement is scored according to how closely it duplicates a dataset.  Call a single operation a gene, and for a large population of random solutions, propagate genes to next generations to converge on higher scoring solutions.

The difficult work is in optimizing convergence.  Their work is very impressive, and looks like it's completely free for anyone interested in applying it.

http://www.sciencemag.org/content/suppl/2009/04/02/324.5923.81.DC1/1165893s1.mpg

Are you really sure your architecture is optimized?  This is the tool for answering that question.

continued...

Tuesday, September 23, 2014

The Ant Model of Career Building

I recently have gained great interest in the Dunning-Kruger effect.  The oldest reference to this effect might be the story of The Emperor's New Clothes.  The emperor is vain, listens to his advisors too much without doing any work himself, and parades himself naked in front of the whole city while children exclaim "he's not wearing anything!"

The Dunning-Kruger effect is the phenomenon where people assess themselves as being more competent in a given field than they actually are.  They continue to have this high self-assessment even after repeated failures.  They've taken a test, scored low, and even after seeing the test results continue to have a high self-assessment.  The only remedy is when what they should have done is explained to them and they finally admit "I'm not really good at this at all" even though actually, now that it's been explained, they understand the process better than they had before.

This is going to happen at all levels.  I've read a PhD in chemistry's serious paper about biomorphs in nanoparticles - without it ever being mentioned: this work has no practical application.  [She was my last girlfriend.]

So of course I have to sometimes wonder - just how much of an emperor with no clothes am I?  Just how big are my blind spots?  It can be a worrisome question.  And this model is reinforced by almost every corporate culture I've been in to varying degrees.  The worst were psychopathic - where under-performers were harassed into leaving.  I really don't have any answer to this from a top-down perspective.  There will always be psychopaths.  There will always be high performers and low performers.

The only useful model I have to work with right now is what I'll call "The Ant" model.  That means just do the work that's in front of you, without worrying about what other people think, or even making comparisons.  All that little ant has to go by is some little pheromone trail he needs to follow.  It's all very clear and simple.  And life goes by very quickly.

Beside all the worry and internal concerns, the work that is done by any single person is no different than the work done by an ant.  Their lives are really not so different.  I like this model mostly because it's selfless, and liberating.  A happy, liberated ant, is a productive ant.