| Andrew Cooke | Contents | RSS | Twitter | Previous


Welcome to my blog, which was once a mailing list of the same name and is still generated by mail. Please reply via the "comment" links.

Always interested in offers/projects/new ideas. Eclectic experience in fields like: numerical computing; Python web; Java enterprise; functional languages; GPGPU; SQL databases; etc. Based in Santiago, Chile; telecommute worldwide. CV; email.

© 2006-2013 Andrew Cooke (site) / post authors (content).

Neural Nets Applied to Go

From: andrew cooke <andrew@...>

Date: Sat, 20 Dec 2014 08:23:03 -0300


Apparently there's a database of 160,000 games between experts.  The results
are comparable to search-based approaches.  But it's not clear to me how they
improve further.  Presumably that's exhausted the available databases.  So
what next?  Some kind of hybrid approach?  If so, does the net go above or
below?  Above meaning that you have some kind of feature classification as
input; below meaning some kind of search on top.  Or something else?

Paper http://arxiv.org/abs/1412.3409


Permalink | Comment on this post

Previous Entries

For comments, see relevant pages (permalinks).

Programming, Business, Social Contracts

From: andrew cooke <andrew@...>

Date: Fri, 12 Dec 2014 15:03:41 -0300

I know of two ways to do programming (for money):

 1 - With a spec, a careful contract, and a pile of lawyers.

 2 - With mutual understanding, respect, and flexibility.

(1) doesn't work and / or is very expensive.  It's hard to avoid people doing
the minimum necessary to get the job done, because there's mutual distrust on
both sides.

(2) is, in my experience, much more productive.  Sometimes you can do more,
sometimes less.  But hopefully both sides understand why the outcome is at it
was, and believe that have the best possible product (not a perfect product,
perhaps, but one that has mutual support, was "value for money", and can
server as a base for future development).

The big risk (from "my side" as a developer) with (2) is that it's not how the
larger world works.  So (2) is often implemented as a gentleman's agreement,
behind a contract framed as a "traditional" project (ie 1).  This means that
the client always has the option to be less than a gentleman, and revert to
(1) if it's to their advantage.

Hence the need for trust.

Recently I had a very bad experience.  I did a major piece of work with the
understanding that it was (2).  The expected collaboration was lacking and I
ended up going "the extra mile" to get something I felt reasonable.  In short,
I ended up being not just the programmer, but also doing the work of the
client-side "expert".

Well, that's life.  And I learnt a lot.

So all would have been OK.  Except that TWO YEARS LATER the client complains
that the system has problems that are my fault.  Issues that I should fix for

Not only that, but when it comes to fix these issues the client still doesn't
have the correct answers.  Instead they want to continue with a progressive,
friendly, collaborative approach where we understand the problem together.
But at a fixed price of zero.

Now don't get me wrong.  The technical problems are real.  I am in complete
agreement there.  But this was work done to as good a standard as possible at
the time.  I already went beyond what was reasonable.

Yes, we can continue to work with (2).  If the client has finally got their
technical act together then it would be a pleasure to fix those issues.  But
it is further work and requires further payment.

Either that, or we go back to (1) which is an aggressive, confrontational
approach, where you give me an exact spec, which I implement (and nothing

But not both.  You can't expect me to be your friend, to work extra hours, to
give 110% to cover your deficiencies, and, two years later, claim we should do
things by the rules.  It's just not fair.  Rules or not, it makes you a bad



Distributed Systems for Fun and Profit

From: andrew cooke <andrew@...>

Date: Fri, 5 Dec 2014 20:03:19 -0300


(online intro book).



XML and Scheme

From: andrew cooke <andrew@...>

Date: Wed, 3 Dec 2014 21:19:31 -0300

Oleg has done everything XML in Scheme (and some parts in Haskell too).  That
includes, xpath, xslt, etc.




Internet Radio Stations (Curated List)

From: andrew cooke <andrew@...>

Date: Wed, 3 Dec 2014 20:34:40 -0300


Going to try me some Radio Reverb now...



Solid Data About Placebos

From: andrew cooke <andrew@...>

Date: Sat, 29 Nov 2014 21:52:42 -0300

How they work, when they work, who should take them.




Half of Americans Think Climate Change Is a Sign of the Apocalypse

From: andrew cooke <andrew@...>

Date: Sun, 23 Nov 2014 22:08:56 -0300




Saturday Surf Sessions With Juvenile Delinquents

From: andrew cooke <andrew@...>

Date: Sun, 23 Nov 2014 14:51:56 -0300




Ssh, tty, stdout and stderr

From: andrew cooke <andrew@...>

Date: Wed, 19 Nov 2014 20:32:11 -0300

The following code runs a calibration on a seismometer (this is the system I
developed at ISTI):

   ssi_calconfig -n
   ssi_caladdsignal -w random -D 60 -a 5 -s KIV1 -c SHZ
   ssi_calrunat -n

It starts a new calibration, adds a random waveform (duration 60s, amplitude
5%) and then runs the calibration immediately.

Under the hood, the first two commands add entries to a database that
describes the calibration; the third command starts a scheduler that executes
the commands necessary to trigger the hardware, collect the data, calculate
the results, etc.

Separately, a co-worker developed a GUI for this system.  The GUI can control
calibrations on a remote machine.  When it does so, it executes the commands
above over ssh.

The following script (I've removed connection details) emulates that:

 ssh ... ssi_calconfig -n
 ssh ... ssi_caladdsignal -w random -D 60 -a 5 -s KIV1 -c SHZ
 ssh ... ssi_calrunat -n

Unfortunately, both the script and the GUI have a problem: one program, which
is forked from the scheduler, which is itself forked from the ssi_calrunat
program, crashes.

As far as I could tell, the only thing unusual about this program was that it
called a library that wrote an error message to stdout (this is just crappy
programming - everything else uses a logging system - but for whatever reason
we had to use this library).

After searching the net, I decided this was somehow related to ttys - that
seemed to be the only "real" difference between executing commands locally
(which worked) and remotely (which failed).

My hypothesis was supported by this script, which worked:

 ssh -t ... ssi_calconfig -n
 ssh -t ... ssi_caladdsignal -w random -D 60 -a 5 -s KIV1 -c SHZ
 ssh -t ... nohup ssi_calrunat -n

However, when we modified the GUI to include the changes above, the program
continued to crash!

I finally fixed the issue by replacing "-t" with "-tt".  The man page says:

 Multiple -t options force tty allocation, even if ssh has no local tty.

so I guess there is some difference between a shell script and a Java GUI that
removes the "local tty".


PS I was criticized for wasting time "doing computer science" because I
tracked this down rather than "just removing the print statement" from the
library that was crashing.  I can see the concern, but (1) be honest and say
we don't have time, that an ugly hack will have to do, and (2) just because
you don't understand doesn't mean it's "computer science".


Feathers falling in a vacuum

From: andrew cooke <andrew@...>

Date: Wed, 19 Nov 2014 07:20:09 -0300

You know the answer, but still, seeing them fall makes you grin like an idiot.




Santiago 30m Bike Route

From: andrew cooke <andrew@...>

Date: Mon, 27 Oct 2014 22:58:02 -0300

[Distance may be a little less if you don't get lost!]

A good route for Sundays.  Cuts right across Santiago from E to W then returns
on the South side.  Almost all on ciclovias and pretty flat.

Given the map
I won't give a huge amount of details, but the basic idea is:

* From Europa / Lyon (where I live), go N to the Costanera, and then W into
  town.  On a Sunday the Costanera itself is closed to traffic, otherwise use
  the ciclovia along the riverside.

* Continue past Bellas Artes until the park finishes.  Then turn left (head S)
  into Santiago on Diagonal Cervantes, turning right onto Rosas.

* Head W on Rosas, crossing Ruta 5, until Gral Bulnes.  Then S down Bulnes to
  Alameda (all this, including Rosas, is ciclovia).

* Ride the cicolvia down the centre of Alameda W until it stops (where Ruta 68
  branches right the cyclovia moves to the left side of the road for a time,
  but keeps going) (that is where I got lost).

* Eventually, you're on Los Pajaritos, approaching Vespucio.  The ciclovia
  stops for a time - use the footpath / dirt on the right, but basically keep
  on the same route until it starts again, still on Pajaritos, but now heading

* That ciclovia stops at the town square.  Cross the square and head E on 5 de
  Abril (ciclovia soon starts again).  Follow the same ciclovia, curving NE,
  crossing Vespucio on a footbridge (cool spiral descent!) along Camino A
  Melipilla and Pedro Aguirre Cerda.

* The ciclovia disappears briefly in a few places, but gets you all the way to
  Ramon Subercaseaux / Rodizzoni.  Go E there (on the road) until Parque

* Enter the park at the SE corner and go N, exiting at the metro station, on
  Matta.  You want to go E on Matta, but since there's no ciclovia at first
  it's easier to drop S one block and cycle along Santiaguillo until San

* At San Diego return to Matta and take the central ciclovia E until the
  junction with with Grecia There you jink N and continue in the same
  direction as Matta (ie don't turn on Grecia) on Matte Oeste, then Duble

* The ciclovia on Duble Almeyda is the shittiest I know.  It stops and starts
  so often it's almost useless, but the road is busy.  Continue E until the
  road passes through a small wooded area then turn left (N) onto Juan Moya
  Morales, which soon becomes Montenegro.

* Montenegro eventually reaches Tobalaba, and then it's N to Pucon and back



Mapa de Ciclovias en Santiago

From: andrew cooke <andrew@...>

Date: Sun, 19 Oct 2014 16:44:26 -0300


Most complete I've seen.