Why Program?

Hopefully this will be the first of several articles I’ll be writing for
Cache. I’ve been writing software since around 1983 and started writing
professionally since around 1989. I’ve written in at least 10 different
languages including binary code (writing 8bit Z80 machine instructions without
an assembler), 8,16 & 32bit assembler, popular languages such as C/C++, BASIC
and Java, scripting languages such as ruby and the various UNIX scripting
languages, “teaching” languages such as Pascal as well as more exotic
languages such as lisp and occam (a language for writing parallel programs).
Along the way I’ve learned a lot (I have made enough mistakes to give me
plenty of learning experiences!) and with any luck some of what I’ve got say
will help you too. I will try not to get too technical but stay technical
enough to actually say something more than vague generalities.

In this first article though, I would like to ask a question which may seem to
have an obvious answer. Why program? Or rather, why should you program? Now,
obviously someone needs to write software or we’d be deprived of such
uplifting experiences as watching MS Word crash before we’ve saved our work or
enjoying the visitations of the Windows Blue Screen Of Death (BSOD). Also a
fair number of people, myself included, think writing software is an excellent
way to earn money. However, I’m going to argue that almost anyone who uses a
computer could benefit from having at least some programming skills. I’m going
to try a simple analogy to illustrate why.

Yoda provides an incentive to program

Let’s suppose that you’d like an action figure of Yoda from Star Wars (don’t
worry you don’t have to tell me why you’d want such a thing). If you can’t
program it’s like arriving at the store and find you can have any action
figure you want as long as its Darth Vader, Luke Skywalker or Obi wan Kenobi.

But never mind programming, there’s a lot of “no programming required” tools
out there right? Well, most of these are template based and that’s like
settling for a mold of Darth Vader. Armed with your mold you can make lots of
plaster copies of Darth Vader and you can even choose what colours to paint
them but once you’ve made and painted your figure it’s hard to change and even
though you can buy Luke Skywalker and Obi wan Kenobi molds a Yoda one is still
not available.

Now let’s say you want that Yoda figure enough to be willing to put in a bit
of effort. You buy a kit of “super Lego” - this is really cool because not
only does it come with lots of pieces that are ideal for making a Yoda figure
but with a bit of effort you can even make new pieces. You end up with a Yoda
figure than can not only stand up on its own but can even bash the Darth Vader
plaster cast on the head with a light sabre. OK, making Yoda this way took a
lot longer than buying one and your Yoda figure looks a little rough around
the edges compared something mass produced but even if you’d been able to buy
a Yoda figure that could do all yours can it would cost you a lot more than
what you’d paid for your “super Lego.”

In fact a modern programming environment is a lot like our mythical “super
Lego” - the pieces are like the libraries that come with languages such as
Java, python, ruby, C++ etc and the language itself allows you to make new
“pieces” which are indistinguishable from the libraries that came with the
language.

If you knew that you could get a kit of “super Lego” for free would you be
tempted to give up your Darth Vader plaster casts and spend a little time
learning how to use it?

A real life program

Let’s leave Yoda alone for the moment and move on to something a little more
like programming. Even if you don’t want or need to program “in the large”
(write a reasonable complex game, an alternative to MS Word or a web app to
compete with Amazon.com) I find that there are plenty of times when it’s good
to know how to program “in the small.” It’s not glamorous, it (probably) won’t
earn you mountains of cash but it will let you get your computer to do a bunch
of tasks that you’d have to do manually or otherwise not be able to do at all.

You want examples? Just before writing this article I was putting together a
set of images to test some software I’ve been working on. However, they all
had names like “dave picking his nose.jpg” and “george bush cartoon.gif” and
being the neatness freak that I am I wanted them to have nice convenient names
like “test1.jpg” “test2.gif” etc. So, I have a choice:

  1. I can rename all the files manually, if there were 10 maybe I’d do it but there are several hundred. I don’t care that much. If I didn’t know how to program the file renaming probably wouldn’t get done right?
  2. I write a little script that gets my computer to do all the work.

Here’s the script (I’ll explain what it does in a moment):

fogey% ls -1 *.jpg | grep -v method_ | awk 'BEGIN { count=1 } { printf("mv %s test%d.jpg\n", $0, count++); }' > jpgfiles.sh
fogey% bash jpgfiles.sh

Time to write it: about 30 seconds. Time taken to run it: < 1 second. Is it
pretty? Not really? Is there a more elegant way I could have done it?
Probably. However, my goal is not to show you the most elegant solution
(assuming one exists) but to show you what small, “throw away” programs are
like. You don’t care if they’re elegant because you might only use them once.
You do care about writing it quickly and getting the job done; after all if I
wanted to spend hours renaming files I might just as well do it manually.

So, when programming “in the small” like this I’d argue the rules are
different from what you might have been taught. If you are writing pieces of
software that you want to keep or are more than a few 10s of lines long your
goals should be:

  1. Make the program correct.
  2. Make the program maintainable.
  3. Make the program efficient enough to be useful. Note that efficiency came third on a list of three items. Firstly, for the program to be useful it has to be correct - I won’t care if it runs fast if it doesn’t do what I want. Secondly, you are likely to spend more time modifying and adapting any program that you keep for a while than you did writing it in the first place so it’s important that the structure is clear enough for you to be able to understand it and change it six months after you wrote it. Many inexperienced programmers worry both too much and too little about efficiency. Too much, because they worry about speed before correctness. Too little, because they make poor choices of data structure and algorithm that mean that efficiency is doomed from the start.

When you’re programming “in the small” the rules are different:

  1. Make the program correct.
  2. Write it quickly Even small programs have to be correct in order to be useful. However, the goal when writing tiny scripts like the one above is not to produce a work of art that you’ll treasure for the rest of your life but to get the computer to save you time so you can get back to doing the thing you actually want to do (which may or may not involve programming).

Summary

So, to summarize I think knowing how to program in the small is very useful
for a number of reasons: It can save you a lot of time even if you don’t care
about writing large programs It’s a great way of experimenting and trying
things that will help you learn how to write larger programs. The programs are
small and quick to write so easy to understand and you get (almost) instant
feedback - you don’t have to invest hours of work before you know if you’re on
the right track or not.

There are some excellent free tools available for small and large programming
on Windows, MacOS and Linux so you don’t even have to spent any money - the
only thing you have to spend is a bit of your time.

Assuming, you want to hear more; next time I’ll talk a bit about some of the
free tools I mentioned above and show you how to use them to do useful stuff.
In the meantime if you have any comments and questions I’d be happy to hear
them at mailbag@emptiness.org If you have any
examples of small tasks that you’d like to know how to automate send me an
email and let me know what platform (Windows, Mac or Linux) you’re using and
if I have time I’ll discuss them in subsequent articles.

The script decoded

Oh yes, the script. I hadn’t forgotten. Now the first thing to realise is that
the “script” as I showed it is actually not a single program but a series of
commands that generate a script and place it in the file jpgfiles.sh and then
a command to run it. fogey% is the command prompt of my terminal showing that
it’s waiting for input (fogey is the name of the machine) - since you see the
prompt twice this is a dead giveaway that I’m actually entering two commands.
Now since the first line generates a script in jpgfiles.sh I could always open
that file in an editor to check it is right before I run in - so I have a
built in safety mechanism. The first line is actually three commands “piped”
together using “|” which takes the output of one command and sends it to the
input of another so we can break this down into four parts:

  1. ls -1 *.jpg : gives a list of all files ending in .jpg one per line
  2. grep -v method__ : removes all files with “method“ in their names from the list
  3. _awk ‘BEGIN count=1 printf(“mv %s test%d.jpg\n”, $0, count++); ‘ > jpgfiles.sh_ : uses a simple language called “awk” to take each line and change it from something like “filename.jpg” to “mv filename.jpg test1.jpg”. “mv” is the UNIX command to rename a file so the generated script has one line for each file which uses the mv (rename) command to change the name of that file. The “> jpgfiles.sh” means “take the output of the command and put it in the file jpgfiles.sh”. I won’t go into more detail on awk here, since I’m running out of space but I might say more in another article.
  4. bash jpgfiles.sh : bash is one of many UNIX command interpreters. I use bash to run all the rename commands in the jpgfiles.sh

The above illustrates another feature of programming “in the small” - rather
than having a single program in a single language it’s common to use a bunch
of small commands and maybe even different “small” languages and join them
together to get the job done. This is often much quicker (to write) than
trying to do everything using a single command or language.

If you’re using Linux or MacOS X then you having everything you need to try
this script already. If you’re running Windows install
Cygwin and you’ll be able to run these UNIX commands
too.

If you’re impatient to understand awk take a look at
http://www.vectorsite.net/tsawk.html

Old Projects

Large screen user interfaces

cw.jpg



As part of the European funded project Campiello, I worked for Xerox Research Centre Europe investigating the use of large screen displays as a means to support serendipitous information discovery and to support awareness between the members of a community or workgroup.The resulting display is designed to look visually appealing and avoid the standard rectangular grid-style layout found on most computer user interfaces.

Networking devices using people instead of wires

pollen.gif



In the course of their workday, people move about visiting different locations, seeing different people and using several different artefacts. This movement in part of their everyday work. In a similar fashion bees move from flower to flower in a field, in search of nectar. However, a bee also inevitably collects pollen on its body when it visits a flower and, when it moves to a different flower, some of this pollen rubs off.

The Pollen network (at Xerox Research Centre Europe) exploited this movement of people to provide a means of transmitting information between people and devices without depending on a fixed (wired or wireless infrastructure). In a Pollen network, people carry an electronic form of pollen with them, not on their bodies, but inside their personal digital assistants (PDAs, such as the Palm or the Psion, etc.) or inside other mobile devices, such as cellular telephones. When two devices come in contact they exchange Pollen messages, thereby providing an indirect means of information transfer. The movement of people is thereby harnessed to create a new kind of computer network.

Collaborative Virtual Performances

now96.jpg



Collaborative virtual environments provide many opportunities for new forms of artistic expression. In one event in Nottingham in November 1996 we (the Communications Research Group at Nottingham University, UK) created an event in which hip-hop poets were able to perform simultaneously to both live and virtual audiences.The virtual audience was able to see, hear and interact with the poets in an environment designed by a UK graphic designer. In addition the virtual world allowed the audience members to see, and communicate with each other, as well as providing other examples of the poets work for them to explore. Meanwhile the audience in the real world as well as being able to enjoy the real performance were able to see the activities taking place in the virtual environment by means of public projected displays.

In 1997 we staged worked with a local artist in which up to five people at once could explore a virtual art installation populated with autonomous agents. The users were able to see and hear each other

Visualising Information

infovis.jpg



Not only is the amount of information that we have access to increasing in volume, it is also increasing in complexity. Trying to understand complex structures, such as software, the relationships of documents in a collection to one another or hypermedia databases is not a trivial matter.To make matters worse, information of this kind has no natural physical representation. Unlike measurements of wind speed around a component in a wind tunnel there are no physical artefacts to relate such data to. A long standing interest of mine has been to “make the intangible tangible” by trying to find appropriate techniques for representing such data.In addition it is important to realise that people do not work in isolation and so these visualisation are not just single-user environments but actively support multiple users and allow them to be aware of the actions of others which might indirectly affect their own work.

The images above show the WWW3D 3D web browser (left) and the VR-VIBE system for interactive searching of document collections (right).

Web programming == No Fun

When I say web programming here, I’m thinking of mid-to-large scale
application development in a language like Java, not relatively small-scale
applications in PHP - which personally I find more fun probably because the
size of the applications I would use PHP for means that it’s easier to keep
the whole project in mind and also because PHP scripting has a shorter write-
test-debug cycle than Java.

Last year I spent a lot of time working on a Java-based web application using
the Spring Framework, Hibernate and Jakarta
Struts
. What a lot of no fun that was. Spring
and Hibernate are quite straightforward - my problem is with writing the user
interface for web applications - it just seems so much harder than it should
be for relatively little in return. I spent weeks building a user interface
that I think is inferior to something I could have built in a day or two using
Swing, and a half-decent Swing GUI editor.

Now don’t get me wrong Struts is much better than writing servlets by hand
and the Nitrox plug-in for eclipse makes things easier still. However, the
whole experience is still laborious compared to building a Swing application
and still results in an inferior user experience. One issue is simply the
amount of classes and XML configuration glue required to perform relatively
simply actions. Then there is the conversion between the application’s
internal classes and the Struts ActionForms (although
BeanUtils can make this a
whole lot easier). Even after all this work the user has to wait for page
refreshes after performing most actions.

Now, we have AJAX which should improve
the user experience if done well (check out Google
Maps
for an example how AJAX can help create a great
user experience) but probably does not lighten the programmer’s load (I plan
to build a couple of sites using AJAX to get a feel for this).

Now web applications have a lot of advantages (no install, no upgrade, can
work anywhere if does not rely on proprietary extensions) and for some
applications are definitely the way to go but I can’t help feeling that web
application development environments lag far behind the desktop and that what
we need is a merging of desktop and web programming. Maybe Microsoft’s
XAML and Mozilla’s
XUL are the way forward.

View the discussion
thread.

Dazed wandering into blogging

Well, I finally got around to updating this site to add a blog. After months of thinking I would write my own blogging software I finally decided that I could spend my time more fruitfully than writing yet another PHP blog and so installed WordPress.

Review: Perdido Street Station by China Mieville

\(JPG\) This a
dark book, an excellent read, but a dark book all the same. If this was a
western instead of the hero riding proudly out towards the sunset, he’d be
battered, bruised and crawling out of town at 2am with a few locals throwing
rocks at him for good measure.

The story takes place in the city of New Crobuzon in a world in which magic
coexists with technology - thus we have both steam-driven computing engines
and thaumaturgists able to create bizarre human-animal-machine combinations -
the remade - as punishment. To make things even stranger (China Mieville
refers to his style of writing as “The new weird” by the way) there are a
variety of non-human races such as the Khepri and Cactacai.

New Crobuzon is like a vast dirty Victorian city in which steam power is high
technology into which various extras from horror B movies have escaped. It is
a totalitarian police state and ruled over by politicians who practically
define corruption. The city is vast and ancient and the descriptions of it are
rich and absorbing. The city feels like a place in which violence and fear (of
the secretive militia) are normal. This state of low-level fear degenerates
into outright terror as the events described in the book unfold.

Some of the characters and races in the book are more convincing than others.
The cactacai come across like humans wearing humanoid cactus suits. The Khepri
have the form of human women with giant scarab beetles for heads (Khepri males
are dumb giant beetles). The Cactacai and Khepri are supposed to be races that
evolved independently from humans but this does not really convince. However,
the Khepri culture is interesting to give some substance to the race.

However, while I might complain about some of the alien races being like
humans in rubber suits this is just quibbling in the face of the magnificent
ediface that is the story itself. What makes the book so excellent is the
richness of description, the realisticly complex main characters and the plot
itself.

Isaac Dan der Grimmebulin is a freelance scientist with a Khepri lover, Lin.
He receives a strange visitor at his lab - Yagharek, a Guruda (a race of giant
bird-men). Yagharek has lost his wings as punsihment for the crime of “choice
theft to the second degree with utter disrespect” and has left his band
travelling a great distance to find someone who can give him back the ability
to fly. Isaac, not knowing the nature of Yagharek’s crime but needing the gold
Yagharek offers accepts the commission. In the meantime Lin, an artist,
receives a commission from the monstrous Motley, a drug baron and one of the
most powerful crimelords in the city. Lin is to create a sculpture of Motley
using coloured Khepri spit - a traditional Khepri artform.

While researching flight Isaac accidentally unleashes a monster so terrifying
that even the legions of hell fear it. The city’s response to the threat fails
utterly and finally it falls to Isaac and a small band of companions to
attempt to rescue the city.

I won’t say more about the story lest I give too much away. Suffice it to say
this book definitely deserves to be read. Be warned though, it’s 867 pages
long (at least the Pan edition is) and so you risk spending a lot of time (as
I did) letting other things slide while you rest utterley absorbed in a
bizarre rusty smelly and well, weird, world.

Links

View the discussion
thread.

Review: Oryx and Crake by Margaret Atwood

\(JPG\) Few novels pack
the same emotional punch as Oryz and Crake. I finished the book feeling
empathising with the pain of he main character Snowman AKA Jimmy.

Snowman lives in a tree, starving, lonely and grieving. He might be the last
normal left in the world. He acts as as sort of father figure to a group of
genetically engineered almost-humans called Crakers after Crake their creator.
The Crakers psychology iand knowledge of their environment are sufficiently
different from homo sapiens that Snowman can never truly be himself with them.
This and his revered status means that even with the Crakers nearby he is as
alone as anyone can be. The Crakers can survive on greens and roots but
Snowman is slowly starving as his food supply dwindles. He has lost all hope
but struggles on anyway partly from a blind desire to survive in spite of
everything and partly to fulfill a promise to Oryx, the one woman he feels he
truly loved, to protect the Crakers.

The story is told as two narratives one set in Snowman’s present, the other a
series of flashbacks. In this way we learn both what Snowman is doing now and
how the world came to be in its present post-apocalyptic state. Atwood handles
this brilliantly and I found myself turning pages wanting to find out what
happened in both time lines. The use of a dual narrative is not gratuitous -
the novel would not have worked without it. If the events had simply been
described in chronological order the second half of the story would have
seemed a let down.

The Crakers are described and used to as a contrast to the behaviour of normal
humans in a world gone awry but as characters they don’t really exist. The
story is really about Jimmy (who became Snowman), Crake and Oryx.

Jimmy grew up in a corporate Compound isolated from the decaying and dangerous
outside world. He is funny, smart and good with words but has difficultly
forming meaningful relationships. As an adult he has lover after lover but
never manages to let any of them get close.

Crake is a genius somewhat aloof from the world. His father died some time
before he meets Jimmy and it’s clear he believes it was murder although it
seems a case of accidental death. At the age of fourteen Crake and Jimmy
become friends and spend their time browsing the man channels available via
the net from scenes of public executions to child porn. Through their viewing
Atwood paints a picture of a world in which society is disintergrating rapidly
and the corporations control everything.

Oryx is an enigmatic woman who may be the same person as the eight year-old
child Jimmy and Crake once saw on a child porn channel after having been sold
by her mother. Of the main characters Oryx is probably the most interesting
although we only ever see her through Jimmy’s eyes.

We never really get into the head of Crake to find out why he acted as he did
(I won’t give details hear it would give away too much of the plot) but
nevertheless all the characters are masterfully described and Atwood does an
excellent job of making the reader think of them as real people.

The novel is a “what if” story of what might happen if science, in particular
genetic engineering gets out of control.

ISBN: 1844080285

Links

View the discussion
thread.

Review: Wild Swans by Jung Chang

wild_swans_cover.jpg

Jung Chang is supposedly one of the most successful Chinese authors; yet her work is banned in her native country and she now lives in London, England. I first heard about “Wild Swans” several years ago but never got around until reading it until now. Now I’ve read it I’m sorry that I waited so long.

A quote on the cover says

It is impossible to exaggerate the importance of this book.

I thought to myself that this must be exaggeration. I expected the book to be interesting; I wanted to find out more about China’s recent history and I was sure it would be interesting to read what it was like to live through the cultural revolution, but I didn’t think its importance would be more than a bit of human interest. I was wrong: the quote is right on the money. This book is important especially if you’re like me and thought that you understood enough about China. I thought that I knew what the cultural revolution was about. I thought it was just some craziness in which doctors, administrators and other professionals were sent to work in the fields. What I had no idea about was what it was really like for the people involved. I had also thought that the Chinese government was uniformly bad, responsible as it has been for the invasion of Tibet and gross human rights violations. While that is true, it seems that, like many things, the truth is more complex than it first appears.

But this book is more than just dry historical fact - it packs an emotional punch that is hard to overstate. Not only is great suffering described but also great courage and bravery. I often found myself wondering how I would have acted if I found myself in similar situations to the author’s parents and whether I would have the courage to act as they did.

The book opens in 1909 with the birth of the author’s grandmother Chang Yu-fang. Life in China at that time was hard. The country was controlled by warring warlords, there was no legal system and unless you were rich or an official you had very little security. There were extremes of wealth and poverty. For women, who were treated more as possessions than people, life was harder still. Marriages were arranged and contact between young men and women strictly regulated by society. It was considered shameful for two young people to marry because of love because they weren’t supposed to have been able to have enough contact to enable them to fall in love. Yu-fang is born to a man, Yang Ru-shan, who’s ambition is to become a police official and thereby obtain a live of relative security and luxury. His parents have sacrificed almost everything to give him an education and they arrange his marriage to a woman (Er-ya-tou: literally “number two daughter”) six years his senior so that she can teach him about life. Yu-fang is born a year or so after the marriage. In keeping with Chinese custom at that time her feet are bound at the age of two so for the rest of her life walking is painful for her. As Yu-fang grows up as a beautiful intelligent young woman her father sees her as his chance for the good life. When a powerful warlord, General Xue, visits town, Yu-fang’s father, by this time a minor official, arranges for him to meet his daughter as if by accident. The warlord, already married, asks to take Yu-fang as a concubine. Ru-shan eagerly agrees and uses the money and influence he obtains in this way to become a senior police official and obtain two concubines of his own. He despises his wife and, though he later has another daughter and a son by her, he treats her harshly and earns the hatred of his own children.

Meanwhile Yu-fang has a lonely life. After just seven days with her new husband she is left in a house by herself and forbidden to leave even to visit her own family. It is years before the warlord returns and she conceives a child, De-hong, the author’s mother who is born in 1931. Although he has been married for years this is General Xue’s first child and when the baby girl is a year old he orders Yu-fang to move to his main house where he lives with his wives. On arriving with her sister, Yu-fang finds that Xue’s first wife intends to take her child and claim her as her own. Yu-fang is victimised by the other wives and General Xue’s health deteriorates. No able to take any more abuse and not allowed to see her own daughter Yu-fang is driven to steal her daughter back, together with her sister and child she escapes back to her home town and goes into hiding in the home of an old school friend.

After General Xue dies, Yu-fang marries Dr. Xia, the head of the household where she was in hiding, a wealthy and successful doctor and a man thirty-nine years older than her. Dr Xia’s children not wanting to kowtow to a woman younger than them protest vociferously. Matters deteriorate until Dr Xia’s eldest son shoots himself in protest. Finally, Dr Xia abandons his home to his children and him, Yu-fang and De-hong move to the nearby town of Jinzhou where they live in poverty under the Japanese occupation of Manchuria. Life under the Japanese is harsh and De-hong sees people she knows, including a close friend, executed by them.

After the Japanese are driven out of Manchuria at the end of the second world war the region comes under the control of the Western-backed Kuomintang. At first things seem better, but the Kuomintang are no better than the old warlords and while the common people starve during food shortages the officers and officials enjoyed lavish banquets. After the end of the second world war the truce ends between the communists and the Kuomintang and the civil war that was interrupted by the fight against the Japanese continues. The kuomontang crack down on possible dissidents and spies. It is in this environment of mistrust and insecurity that grows into a young independent woman. She is almost married into the wealthy Liu family but Dr. Xia, though favouring the marriage, allows De-hong to decide for herself - for his time (and age) this was very liberal of him. De-hong chooses to enter a teacher training college and becomes a student activist in response the the repression and brutality around her.

She finds herself drawn to communist propaganda and becomes involved with one of the cells operating in Jinzhou. It is in this way that she meets the author’s father, Wang Shou-yu, a highly educated young man who leads a communist guerilla cell operating near Jinzhou. They meet and fall in love in spite of the disapproval of Yu-fang who favours Liu’s son. The communist capture of Jinzhou greatly impresses the townspeople because it was the first time that a conquering army had treated people respectfully without any rape or pillage. The communists encourage the peasants to sell food to the starving townspeople and generally give the appearance of treating people fairly.

The years that follow, from 1949 to to about 1955, showed me a face of the communists that I hadn’t expected. Food is fairly distributed. Women experience more freedom than before and the government in mostly fair and even handed. Although times are sometimes hard at least there is a fair distribution of resources - this is huge improvement compared to the extremes of poverty and decadence witnessed in previous regimes. Life seems good and seems to confirm the faith of the author’s mother and father in the party and the communist system. Although both Shou-yu and De-hong believe strongly in the government there is a crucial difference between them: De-hong believes that family should come first whereas Shou-yu believes that he, as a highly placed administrator, must be completely even-handed even though it might be contrary to the interests of his wife and family (for example at one time he denies drugs to his wife because he wishes some stock at the hospital to be available for others). This is sometimes a cause for tension between them; although many people are greatly impressed by Shou-yu’s fairness.

However, the good times do not last. Even in the early days there are campaigns to identify “counter revolutionaries” - although relatively mild at the beginning these become more and more intense and culminate in the insanity of the cultural revolution. The various campaigns provide opportunities for people to settle grudges by denouncing their enemies and this is eventually how Shou-yu and De-hong fall from grace.

The author documents cases in which the Mao administration asks for comments and criticism and then punishes anyone who speaks up. The almost constant witch hunts meant that instead of needing a vast secret police network as in the Soviet Union the Mao administration relied on ordinary citizens to inform on one another.

Two of the events that illustrate the madness of the Mao regime are the Great Leap Forward and the Cultural Revolution. The great leap forward occurred during the author’s childhood and she describes how every organisation from schools to offices to hospitals was drafted to help create steel. Each maintained a furnace which had to be kept alight. Iron was scavenged from every possible source (woks, bed springs, iron railings, rusty nails) and millions of people basically stopped their normal jobs in order to search for iron to put in the furnaces and ensure that the furnace temperature didn’t fall. Surgeons would interrupt operations in order to put more fuel in the furnaces such was peoples’ fear of being seen not to be committed to the great leap forward. Even as a six year-old schoolgirl, the author had a quota to fill. Official estimates were that 100 million peasants were pulled off agricultural duty in order to make steel thereby setting the scene for a disastrous famine. People went along with this craziness due to the fervour inspired by the cult of Mao and also fear of being beaten if they were not seen to contribute.

Then came the cultural revolution and, despite being exemplary officials Shou-yu and De-hong were in their turn denounced by people who bore grudges against them. Shou-yu’s books were taken and burnt by student gangs completly ignorant of whether the books were counterrevolutionary or not (in fact since Shou-yu was still a believer in the party the books certainly weren’t counter revolutionary). They had to attend meetings in which they were publicaly humiliated and sometimes beaten. Shou-yu, the author’s father was denounced and forced to work in a labour camp far from his family. De-hong took great risks by visting Beijing to plead his case eventually winning her husband’s release but not before his health was ruined. Meanwhile the author still believes in Mao, even though some acts by the government are obviously wrong she tends to attribute them to others and not to Mao who received godlike adoration. For a while the author works in an agricultural commune, then as a barefoot doctor (for which she receives no medical training) and finally in a factory as an electrician.

Mao and his wife demonstrated a complete contempt for human life as demonstrated in 1976 when an earthquake killed 242 thousand people. Mrs Mao said

There were merely several hundred thousands deaths. So what? Denouncing Deng Xiaoping concerns eight hundred million people.

After the death of Mao when Deng Xiaoping returns to power he liberalises the government and life becomes easier and the government more sane. Many “class enemies” are rehabilitated. All the damming entries in De-hong’s file describing suspected Kuomintang connections were thrown out and burnt. The author regards Deng as a hero and so it is all the more shocking for her when Deng oversees the Tiananmen Square massacre.

The version of the book that I read has 676 pages and so this review has, necessarily, only skimmed the surface of the contents and in doing so does not convey the strong emotional punch of the events the book describes, In summary, this book is very much worth reading because, in spite of the horror and cruelty described, the courage and resilience shown by the author’s family in particular Yu-fang, her grandmother, Shou-yu, her father and De-hong, her mother is uplifting and inspiring. Another important reason for reading this book is it serves as object lesson of what can happen when a totalitarian government gains power and should make us ever more careful of who we allow to govern us and especially wary of political and religious extremists of any kind.

ISBN: 0006374921
Amazon.co.uk,
Amazon.com