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-2015 Andrew Cooke (site) / post authors (content).

[Link] Neat Python Exceptions

From: andrew cooke <andrew@...>

Date: Wed, 22 Mar 2017 08:31:45 -0300


Permalink | Comment on this post

Previous Entries

For comments, see relevant pages (permalinks).

[Link] Fix for Windows 10 to Avoid Ads

From: andrew cooke <andrew@...>

Date: Sat, 18 Mar 2017 14:22:57 -0300



[Link] Attacks on ZRTP

From: andrew cooke <andrew@...>

Date: Sat, 18 Mar 2017 10:53:14 -0300



[Link] UK Jazz Invasion

From: andrew cooke <andrew@...>

Date: Thu, 16 Mar 2017 06:43:49 -0300



[Review] Cuba

From: andrew cooke <andrew@...>

Date: Fri, 10 Mar 2017 20:37:00 -0300

[Not sure you can "review" a country, but also not sure what other tag
to use.]

Paulina, me, and my parents spent last week in Cuba.  We rented a
couple of rooms in Havana, very near the coast, to the West of the
city centre.  Most days we walked to the old town and did some typical
tourist thing like visiting a cigar factory.

At first sight, what made Havana unusual was that it was clearly more
wealthy before - it was not the people (generally not well off, but
not shockingly poor) that surprised, but the contrast with the

The next surprise was the money.  First, there were two currencies in
use (with an apparently fixed rate of conversion from one to the
other): CUCs and Pesos.  It seems that, as a tourist, you should use
CUCs, which is what a cash machine gave us on withdrawl.  A CUC has
the same nominal value as a US dollar (which you cannot use), but
buying CUCs costs an additional 3% in commission.  And if you actually
have US dollars (cash) then you pay an extra 10%.

I don't understand why these currencies and rules exist.  I suspect
it's somehow related to trying to control the conversion of local
value to US dollars, or to suppress the use of US dollars on the black

Once we had money it was difficult to find much to buy.  I guess we
didn't look terribly hard, but we couldn't find much in the way of
basics: bread, meat, cheese, etc.  So we ate out for every meal
(actually, we had a late, large breakfast and then an early dinner,
and lost a little weight).

The food we ate out was good.  Sometimes not everything on a menu was
available, but the lower priced places had decent, local dishes, while
more expensive places offered more variety.  One night I had very good

There was a "supermarket" near us that stocked several varieties of
beer, frozen chicken quarters, one kind of biscuit, bottled water,
baby food, and a few other items.  There were often queues, with
people buying fairly large quantities of whatever was available.
Perhaps they stock up, and over time the supplies even out (maybe
another week there is pasta, say)?

I don't know if locals have to get food through informal contacts, or
if there were extra shops hidden away that we didn't see.

With the lack of stuff to buy, and the buildings that have seen better
days, came a weird emphasis on money.  Tour guides explained how
little people earn, and we were constantly being asked if we wanted a
taxi (where a typical ride costs, apparently half a month's wage).
Things started to lose sense.  Were taxi drivers hugely wealthy?  Why
didn't they look it?  Were they massively taxed?  If so, on what
basis?  We didn't get one receipt all week (or see one taxi meter
actually running).

Several of the places we visited didn't seem worth the money.  After a
disappointing Museum of Rum and a lacklustre tour of a Cigar Factory
(after a particularly apressive walk down a street with people
insisting we discuss whatever they were offering to sell) I was less
than keen on the "Museum of Chocolate" - that turned out to have no
tour at all but redeemed itself with surprisingly good hot chocolate
at a reasonable price.

Discomfort with money (or value?) came to a head on our final night
when we went to the best restaurant we could find (Attelier).  They
seemed to have lost our booking, but found space for us outside (along
with many more people, who also seemed unexpected - they were sitting
in the dark for some time until lighting was connected up).  Service
was haphazard, but friendly.  Some items on the menu were missing, but
what we finally ordered was decent - it combined fancy main course
"plates" with generous side dishes of veg, rice, and black beans.  So
you got both the "fancy food" and the local staples, and you couldn't
complain about being hungry afterwards.  The final price, for two
starters, four main courses, one of the cheapest bottles of wine (and
an extra glass) was 100 CUC (before tip).  By American standards
that's crazy cheap and any complaint seems unfair.  By Chilean
standards it was good food, but you'd expect better service.  Anyway,
luckily, we left just before it started to rain - I wonder how they
handled that.

Per person, then, the meal was a Cuban month's wage.  Did that make us
the crazily deluded rich, obscenely splurging money?  Did it make the
owners the local equivalent of millionaires?  Why couldn't they afford
to pay better waiters?

Why was it so busy?  Was everyone a tourist?

Or are people actually richer than we were told?  Were we being lied
to about typical wages?  Or did we see the middle class, and the poor
are hidden away somewhere else?

I have no idea.

I guess you should just relax and enjoy the ride.  But when the
economic web that connects you to your fellow men seems contrived and
inconsistent it's hard to let go.  I never realised I would miss the
simplicity of capitalism.



[Link] Aricle on Gender Reversal of US Presidential Debate

From: andrew cooke <andrew@...>

Date: Tue, 7 Mar 2017 12:45:01 -0300



{OpenSuse] Fix for Network Offline in Updater Applet

From: andrew cooke <andrew@...>

Date: Sat, 4 Mar 2017 20:46:42 -0300

Run "pkcon" at the command line as root.  It will print help (and look
like it's donenothing), but the applet will work again.



[Link] Parkinson's Related to Gut Flora

From: andrew cooke <andrew@...>

Date: Sat, 4 Mar 2017 20:23:15 -0300



[Meta] Tags

From: andrew cooke <andrew@...>

Date: Sun, 26 Feb 2017 17:04:57 -0300

I'm going to try adding tags to post titles.  Probably just Meta, Link,
and Review at first.



Schwalbe Thunder Burt 2.1 v Continental X-King 2.4

From: andrew cooke <andrew@...>

Date: Tue, 14 Feb 2017 13:42:50 -0300

I've been riding some Thunder Burts (TBs) for the last 1,800km (since
I first built my Cotic Soul).  They are the Snakeskin Evo model, which
I think is the top version - - and
they cost $45 each from CRC (650b, folding bead).

They've been great - very fast rolling, light - and seem durable with
a lot of life still left.  But while they are well-suited to the
riding I do much of the time (gravel trails, cycle paths, roads), I
felt like I was missing some grip when riding in Durazno Bike Park, or
out to the East, near Panul (for some context, see - trails where the surface is
sandy and loose.

So I ordered some X-Kings (XKs) (2.4" ProTection, Black Chili - again,
the top model, at $44 each), which in the wider size (Continental
recommend 2.2" for XC and 2.4" for Trail) tend towards the opposite
end of the spectrum to the TBs - they're still intended to be
fast-rolling, but for an XC tyre they're fairly meaty.

The new tyres arrived yesterday.  I put them on the bike last night
and this morning went out to Durazno.  What follows, then, are my
first impressions of the XKs, largely in comparison to the TBs.

First impressions off the bike were of a bigger, fatter, blacker tyre.
I forgot to measure the TBs, but the XKs are 2 1/4" across when
mounted on my 27mm internal Arc rims.  Honestly, they look cooler than
the TBs, which always seemed a little small and, well, grey.  In
comparison, the XKs are not exactly plus-sized, but certainly big

I used the same pressure (25psi) that I use in the TBs, with latex
tubes (which "feel" a lot more supple than normal tubes - I suspect
they are close to the the feel of tubeless, although obviously I am
going with a higher pressure than people might run tubeless).  As I
write this, after the ride, I am thinking that a slightly lower
pressure might address some of the harshness I will discuss below.

On the bike, my first reaction was surprise at how heavy they felt.
CRC list the XKs at 690g, while the TBs are 480g.  That's over 40%
more and, at first, they felt like tanks.  However, that impression
did go away over the course of the ride - by the time I was back home
I guess I was used to them and they really didn't feel that unusual.

Despite the weight, I couldn't detect much difference in rolling
resistance.  It seemed like they took more effort to spin up, but once
I was rolling, they didn't need any more work than the TBs.  The XKs
were very slightly louder, but only at speed, when you could start to
hear the whine of the individual blocks on the road.

One difference that is difficult to describe is that the XKs felt
"harsher" on the easy, hardpack trail along by the river - a little
like my suspension wasn't dialled in correctly.  I tried changing the
rebound setting, but couldn't improve things completely (the XKs seem
to need slightly more rebound damping - perhaps because they are

Comparing my Strava sections for the ride I just completed (on XKs),
with a similar ride on TBs, the roads sections are slightly slower,
but not by a huge amount - it could just be that I was having a
slightly off day (my legs have been pretty tired recently and I'm
looking forwards to next week off, on vacation).

Arriving at the bike park I hoped that the XKs would improve my
climbing.  There are two places where, on my last ride there, I
stalled out on the TBs: once in sand and once in a more technical,
steeper section.  My hope was that in both places I could make it
through with the XKs.

At the start of the ride, I did feel that the XKs were more secure.
Riding on the side of a water-damage V shaped gully, I felt more
confident - less worried that the rear was going to slip down.

But at both critical points - the places I was hoping the tyres would
make a real difference - I repeated my old mistakes.  Bummer.  In both
cases, I am sure I can improve.  A better line could avoid the sand,
or with a bit more strength I could power through, and the technical
part needs just a little more commitment and energy.

So while the XKs seemed be an overall improvement on the dirt - I felt
more confident of the rear, in particular - they weren't the game
changers I had hoped for.

On the way back home, hopping over speed bumps, I noticed that for
some weird reason I was doing better on the XKs.  At first this seemed
dumb - how could it make a difference? - but after thinking some I
found a couple of possible explanations.  First, perhaps the fatter
tyres have more bounce, so give extra lift.  And second, I think they
cushion the landing better, making things feel smoother.

On Strava, after the ride, studying section times (it didn't help that
I stopped to eat a sandwich in the middle of the climb :) it seems
like the XKs on the road are slightly slower, but my off-road climbing
times are slightly faster.  Which makes sense.  Unfortunately I don't
have any off-road descents in common to the two rides (and I suck at
descending anyway), but I'd expect an advantage to the XKs again

Conclusions, then, are what you'd expect.  Heavier tyres take more
effort.  Better grip seems to help, but really isn't a replacement for
skill.  If I want to get faster I need to work on fitness and control,
with either tyre.



Mountain Biking in Santiago

From: andrew cooke <andrew@...>

Date: Fri, 3 Feb 2017 10:39:08 -0300

[Conditions and people change, so please don't take this information as
gospel - particularly if it is old when you read it.  I may add
updates further down the page.]

Land Access

I moved to Chile some 15 years ago and have had to make my own call on
what is, and is not, allowed when it comes to land access.  Often I
check Strava's heatmap (you can see this by going to Dashboard / My
Routes / New Route and then enabling the heat map from the tools menu)
as a guide - if a lot of people are doing it then I assume it's OK.

In the countryside you can often get a feel for whether or not you
will be welcome: a worn trail, with gates (or "concertinas" of barbed
wire and sticks) that can be easily opened are good news; large fences
and warning signs are bad news.  I you know who owns the land that
can also help - land owned by U Chile, for example, usually has easy

Note that some access may vary with date.  El Arrayán, for example,
appears to be locked outside "business hours" in summer, but open 24
hours in the winter.  And the beautiful singletrack descent North of
Quebrada de Plata was blocked just a few months ago.


The traditional area for bike shops is San Diego, south of Alameda, in
the area just before Matta.  This is still best for tools, but for
fancier components (or entire bikes) you may want to visit Padre
Hurtado, between Kennedy and Vitacura.  The Oxford chain is reliable,
has good stock, and is somewhere between these two poles.  Finally,
evobikes, on Florida to the South, is also worth a visit, particularly
for XC.


Strava heat map (described above) is great. 

Open Street Map can show cycle lanes 

As can

And don't forget Google maps - both the satellite view and street view
(the latter is particularly useful for checking if a track / road can
be accessed - it certainly can if Google's car got there, otherwise
look to see what stopped it).

Weather / Conditions / Equipment

In summer Santiago can be hot and dry.  You should understand heat
exhaustion, heatstroke, and salt depletion.  Remember that
acclimatisation takes around 2 weeks.  I carry food, a 2l hydration
pack (in a backpack) and a bottle of water on the frame.  If I finish
the water in the pack then the rule is that I immediately head home,
drinking from the frame bottle on the way.

On longer rides I carry sunscreen and insect repellant (deet-based).

Incidentally, is an excellent
book that includes advice on exercising in the heat.

A phone is useful, but some routes are outside coverage.  I have
consider carrying an emergency beacon - after asking local hikers,
InReach seems like it could be the best option.  The more organised
parks (Durazno, Quebrada de Macul, San Cristóbal) have signs with
emergency numbers listed.  Otherwise, carabineros are on 133 and
ambulance on 131.

Trails are generally hardpack with rock and gravel.  Durazno is
particularly sandy in places.  Because I spend much time riding on the
roads (to access the different areas described below) I favour fast
rolling XC / road tyres like Thunder Burt or RaceKing.  These are OK
for many of the routes, but sometimes have a (worrying) lack of grip -
I am looking at getting something more aggressive for the more
demanding trails.  Obviously people riding downhill use much grippier

Thorns and/or cactus spikes can be a problem if you leave well-used
paths.  I use latex tubes which, if I leave the thorn in the tyre, can
generally get me home without needing a patch.  I also carry a pump,
spare tube, patch kit and multitool (under the saddle using a
BackCountry Research strap).  It sometimes feels like no-one else
carries anything - I have been waved down for my pump several times...

In winter heat is much less of a problem and I can do longer rides
without the hydration pack.  Then it's useful to have either large
pockets or a running buddy or similar to carry phone, keys, etc.

If trails get wet (it does rain sometimes!) they can become very
sticky mud and are generally not worth riding - tyres get absolutely
clogged and you rip up the surface.  For a long loop on gravel,
cyclepaths, and some road see

Main Riding Areas

Below is a summary of all the riding areas I know around Santiago.  I
start with Durazno to the NE and work clockwise around the city.

Durazno Bike Park

This is located in La Dehesa, to the NE.  It has maintained,
signposted trails - you climb up the route to the left and then pick
your return through the park back to the start.  Because of this, the
trails are generally "one way", so you may feel safe enough to hammer
fast descents with a suitable bike.  It is the closest I know to the
kind of bike parks I see in videos from the USA.

Note that access seems to have changed from what is described on the
site and Strava's (current) heat map - enter at,-70.5149677

I have not used this park much, but had to walk a few small parts of
the climb (largely in sandier areas where I had traction issues with
Thunder Burt tyres), which is fairly steep (I mean, it's on the side
of a mountain).  And I had to walk some small sections of the "medium"
trails that I have used.  So I guess it could be a little intimidating
for very new riders, or a little boring if you're a good, strong,
experienced rider - guess that's why the trails are rated "medium".

I don't know of any drops / jumps on the trails themselves, but there
are earth ramps near the entrance - my guess is that at weekends
people are dirt jumping there.

[edit: Adding this after trying the "easy" Manzano and Papaya trails.
Personally, I would not call the upper part of Manzano easy!]

El Arrayán

A park at the end of Camino el Cajón in Lo Barnechea.  In summer (when
they charge to enter, and the entrance is locked outside hours) I
expect the river area will be packed with people having barbecues and
swimming, but that the trail will still be fairly empty.  In winter
(at least during the week) access seems to be uncontrolled and free,
and I rarely see anyone.

The main route here is a dirt road that curls up into the mountains to
the East.  You can connect across from Durazno - see for example

This is an easier ride than Durazno - just a dirt road that goes on
and on - but it's still fairly steep so you need to be in decent
shape.  Also, it's a little tricky to find the route up from where the
cars park - basically, you want to go up the road that is closed with
a black and white striped pole.

Camino a Farallones

Continuing in a clockwise arc around the city, the road out to the
Farallones ski resort is a popular ride for roadies that might also be
of interest to masochistic MTB riders.  On any Sunday morning join a
train and feel the pain...

There is at least one place on the route, fairly near to Santiago,
that gives access to San Carlos de Apoquindo (see below), but I have
not ridden there.

Parque San Carlos de Apoquindo

There appear to be a bunch of trails here that I have not yet
explored.  Recently two students died in this park, so access may
become more controlled, but last I knew you could enter at,+Las+Condes

Parque Aguas de Ramón

YouTube has some videos of this area, but as far as I can see it is
explicitly closed to bikes (I once cycled to the entrance and was
turned away).

Parque Mahuida

I have not ridden here for some time.  From what I remember, there is
a small entry fee (500 pesos?) and at least one fairly easy trail
(although with a tiring initial climb).

Universidad Adolfo Ibáñez / Quebrada de Macúl / Panul

This is a broad sweep of land to the East / SE of the city that has
inter-connected trails.  See for examples and

Access may be restricted at various points (for example, at the main
entrance to the park Quebrada de Macúl, where you are expected to
leave contact details), but because the trails join at various places
you can always find a way in (I say this not to encourage avoiding the
main entrances, but because in summer, to avoid the heat, you may want
to enter very early).  One Northern access point is on Diagonal Las
Torres midway between the entrance to the park Quebrada de Macúl and
the corner with Los Presidentes - see the Strava heat map to connect
that up.  Further South there are more permanently-open entrances (see

Another Northern entrance is at the very top of Av Quilín.  Past a
pole that controls the entrance you'll find a small gap to one side
of a gate.  If I remember correctly, it's under power lines (which is
significant - see below).  If you ask the guard at the pole nicely, he
may point it out...

Heading South, you can cross the creek (quebrada) at various points.
One is traversing the man-made flood control(?) at the level of the
Quiín entrance.  Others ford across from the Quebrada de Macúl trail a
little higher up.

I don't know who owns the area of land directly to the South of the
Quebrada, but it can be accessed from the top of Nueva María Angelica
(which is conveniently close to the end of Las Perdices cycle path).

The main route South across this area runs under, or close to,
electricity pylons - it seems to be the trail used in their
construction.  And this provides a path through a residential area
between Longitudinal Norte and Sur which connects the area described
above with the Panul park further South.  Note that there are some
alternative routes close to the pylons (see Strava heat map) that are
a little less steep in places.

Panul park is a recognised bike park, but is not as organised as
Durazno.  There are no signs and no direction control.  Access (always
open) is from the top of Las Tinajas.  On a Sunday morning that road
is partially closed to traffic.  Various paths connect the entrance to
the trail under the pylons, which runs across the top of the park
(although some paths do go further north).

At the SE corner of Panul the pylon trail leaves the park (a locked
gate, but with a stile to the right that the bike can pass through).
I don't understand what this land is, but it contains - quite hidden
away! - some marked downhill trails, graded in the USA style, with at
least one man-made road crossing (jump) (I think these may be remnants
from some competition?)

Continuing South it is possible to connect up with Peral (see one of
the Strava links above).

In general, the trails in this area have a little more variety than I
have seen in Durazno - in particular, there are some easier trails.
So although everything is less formal (Durazno is in a much more
wealthy area of town) the riding may be less intimidating to a

Cajón del Maipo

I haven't ridden in this area, but it seems to be fairly popular on

Puente Alto

Towards the South of Santiago you have to travel further to get to the
mountainous areas.  I haven't explored here, but there are a couple of
routes near the Maipo river that are worth mentioning.  First, there's
a little known track that usefully connects the cycle path on Accesso
Sur to Padre Hurtado.  Second, there's a fairly long gravel road along
the side of the river, if that's your thing.  See for both.

Gap Here

As I live in NE Santiago my knowledge of the SW of the city is
somewhat limited.  Sorry.

Lo Prado

To the West of Santiago, one of the main roads to the coast (Ruta 68)
goes through a tunnel (Lo Prado).  The original road, which goes over
the mountains (hills?), still exists, and connects to trails both
North and South.

To the South you can descend into Quebrada de Plata.  This is a public
park that is so remote only MTBs tend to use it.  There is a route
(visible on Strava) from here to U Chile property at Rinconada de
Maipú.  See The riding is
pretty easy, although steep in places.

There is also a beautiful singletrack slightly to the North of
Quebrada de la Plata - -
but unfortunately this is now blocked by a large fence at the bottom
of the descent, so should not be used.

To the North of the pass is a separate trail that loops round and then
descends down towards the nuclear plant(!), but I have not had time to
explore this yet.

Laguna Karen

To the North of Ruta 68 is an area of land called Laguna Karen that
belongs to U Chile.  It is flat, has several unmarked, little-used
paths, and can be accessed from Ruta 68 (you may need to pay a fee) or
from the North. shows a
route through this area (and a possible alternative connection).
Beware of thorns.

Gap Here

As can be seen from the Strava route above, trails to the NW are
complicated by the airport (and the lack of hills).

Juan Pablo II

Similar to Camino a Farellones, another popular (but much shorter)
road ride goes North from La Dehesa.  See (on a Sunday morning
cycles dominate the motorway to the NW - I can't imagine that is a fun
ride during the week).

Parque Metropolitano (San Cristóbal)

More central than the other options above, this is good for practice
and training.

The NE hills are covered in (largely unsigned and uncontrolled) short
trails with a variety of surfaces and difficulty (including a little
bare rock) so it's an excellent place for an inexperienced rider to
experiment and gain confidence.  The main problem is that it is very
popular, so packed with bikes at the weekend, and suffering from
erosion (braking washboards on the descents) - best to visit early
in the morning on weekdays.

Various roads through the park are (largely) car-free, with gentle and
steep slopes, so are popular with roadies and MTBs doing interval
training etc.


Books on Ethics

From: andrew cooke <andrew@...>

Date: Wed, 1 Feb 2017 17:35:15 -0300