Monday, June 13, 2011

Should young children go to boarding school?

My boy is seven years old. He'll be eight in October, but either way he's still just a young lad. His mum and I have been debating whether we should send him to boarding school.

Most parents would balk at sending their child to live with strangers. I would have too, until I started to look at the benefits for the kids. Now, I'm coming round to the idea.

We've now been living as expats for five years. My boy was born in England and spent most of his first three years living in leafy Surrey, with a regular routine of tramps in the woods, village playgroups, and cuddles from the Waitrose old ladies. I'd given up work to become a thoroughly modern home dad and, apart from not seeing much of his mum during the week, I thought we led a pretty idyllic life.

When I grew up in the 1970s and 80s in a small town in North-West England, people didn't move round much. You studied at the local schools; you worked in a local office or factory; you drank in a local pub; you bought a house down the road from your parents. This was accepted behaviour, and those who moved away, for education or work, were viewed with a slight suspicion when they returned. If you're not familiar with the culture, then Richard Hoggart described it superbly in his 1957 book The Uses of Literacy: Aspects of Working-Class Life. All terribly interesting social history, but I thought it was necessary too, because there is a purpose to this blog post. The purpose is to justify to my Northern family why I believe boarding school might be a rational choice, and that family still retains many of those social norms of my youth.

Anyway, back to Surrey. In the South-East of England, careers are fast-moving and jobs come and go. My wife was made redundant, hired by a competitor, then offered a role with her old firm running an office in Doha, Qatar. The decision to move was easy: it was a career jump and a great adventure. We stayed there for four years, which is just about enough time for anyone to become jaded with the Arabian Peninsula.

Next was Singapore. We thought we'd spend three or four years in the city, before settling down somewhere for the boy's secondary schooling. Unfortunately, there was a bump in the road, which came in the form of job unpredictability. It's the nature of worldwide business that firms restructure whenever a new leadership team is appointed, and predicting when this will happen is impossible. We now realise that making plans for where we'll be living is futile. If we thought that Singapore, Delhi or Brussels were the perfect place to raise a couple of kids, we'd be disappointed: the world of work just isn't built that way. We may spend a year here, a couple of years there.

A year ago, our boy said goodbye to his friends in Doha, and this week he will bid farewell to his Singaporean pals before the summer holidays. It's comforting to believe that children cope well with change, but the fact is that it takes time for children to make friends, and swapping schools at irregular intervals isn't pleasant for them or good for their education. This is why we began to look at boarding preparatory schools.

Reason 1. Stability. Boarding schools offer the stability that is often lacking for children whose parents move a lot. Many boys thrive with consistent routines, set meal times and clearly defined rules and schedules.

There is another way to gain stability, and that would be for us to move back to the UK and reduce our standard of living. This sounds plausible, until you start to weigh up the costs and benefits. The UK economy is flat, and many economists believe there will be a "lost decade" of stagflation and unemployment. State-sector education in England is poor, and is getting worse, and this has lead to the lowest social mobility since the second world war.

In 2006/7 Cambridge took 55% of its home students from state schools and 45% from the private sector. Only around 6.5% of schoolchildren in the UK are educated privately. To be clear: you are seven times more likely to enter Cambridge if your parents paid for your education. If you want your kids to succeed in Britain, you'd better be rich, and the well-paid jobs are disappearing.

Reason 2. Maximising Opportunity. All universities are not equal. Some provide wider opportunities to their graduates than others. English boarding preparatory schools are at the start of a conveyor belt carrying pupils toward the top independent schools and onward to Oxford, Cambridge and Imperial College. It's not fair, but blame the politicians for the system. One of a parent's duties is to maximise their child's chances in life, by whatever method, and boarding schools fit the bill.

Of course, not all boarding schools are equal either, but it's easy enough to check the destinations of their pupils and their results in the Common Entrance Exam. The good schools flaunt this information on their websites, along with any scholarships they've won. The school we've been considering for our boy sent kids last year to Eton, Harrow, Stowe, Winchester, Sherborne, Shrewsbury and Monkton Combe. Out of those, I'd have my own preferences, but they're all great senior schools, which is reassuring.

There are people I know and love for whom the names Oxford, Cambridge, Eton and Harrow would leave a sour taste in the mouth. I'm afraid that's an inverse snobbery I can't begin to understand. A core purpose of education is to free the person who is educated, and those who believe you shouldn't mix with a different social class have built a prison for their children.

Reason 3. Facilities. When I was my son's age, my school had a classroom, a playground, an assembly hall (which doubled as a dining room), and that was it. If we wanted some excitement, we might sneak into the boiler room during breaktime. Recreation was running round in circles. Sport was some balls, beanbags, hoops and cones. Music was the recorder.

Listen, I know that UK primary schools have improved over the past 30 years, and my boy's international school in Singapore has an impressive gymnasium and swimming pool. However, the facilities and range of activities for the kids at boarding school are simply outstanding. At our preferred prep, there are three major sports: soccer, rugby and cricket. Fair enough, but the boys can also choose any activities out of tennis, swimming, squash, Eton fives, golf (on the school's 7-hole course), table tennis, athletics, cross country, basketball, indoor hockey, fencing, judo, air rifle shooting, horse riding, polo, water polo, chess, a model railway, cooking, model making, snooker, board games, clay pigeon shooting and bushcraft survival.

I could also list the music, drama and art facilities, but will instead just say that you can't fault them. The academic staff all have degrees from good universities, and there are fewer than 15 boys in each class. Oh, and the school has a house in Normandy where the boys go to practise their French. Really, it's quite unbelievable.

Reason 4. It DOESN'T damage the kids. If you listen to young boarding-school pupils, they don't come across as damaged misfits, but as confident, well-mannered, and independent. When they talk about their lives, they admit home-sickness and crying for their mummies, but they also say that it is a phase that lasts for a few days at the start of term, and then it is mostly forgotten about. Honestly, if you want to see a well-adjusted eight-year-old who is in touch with his emotions, go and watch some interviews with boarding-school pupils talking about separation from their parents. Of course, these boys could have been coached to give the right replies, or might be protecting their parents from uncomfortable truths, but isn't it more likely that they have adapted to their lives without serious trauma?

All boarding schools are inspected by Ofsted, the UK's national schools inspectorate, and also the ISI (Independent Schools Inspectorate). Again, any decent school will be proud of these inspection reports. Here's a representative snippet from Ofsted about the school we prefer: "Boarders benefit from excellent levels of individual support resulting in exceptional outcomes. This factor, coupled with the strong nurturing relationships that exist between staff and boarders, fosters a real sense of family living."

If I were to engage in cod psychology, many of the parental fears about boarding schools could be explained by a projection of their separation anxieties onto their children. They believe, with no evidence, that their children will be psychologically scarred by the absence of their mother.

Before we started looking into boarding schools, I believed that children spent 10 weeks at the schools without a break. In fact, the schools close for a week at half term. In the middle of each half term, the kids are sent home for a weekend. Living away from your mum and dad for two or three weeks at a time is going to be unusual for a young boy. However, it isn't the 10-week detatchment of popular imagination.

I'm not going to change any minds with a blog post about child-rearing. All I hope to do is justify my belief that boarding school is a rational choice. We haven't yet made a decision about where our boy will be schooled but, for an expat family who can't say where they'll be living next year, the stability of an excellent English boarding school has many advantages.

Monday, September 07, 2009

How to Proxy a Website to HTTPS with nginx, Start to Finish

Setting up a secure website is a trivial task often overlooked by site owners, possibly because they believe it is costly or technically challenging. Anyone who has set up their own HTTP webserver can easily proxy that site to HTTPS using free software. SSL certificates cost around £10 a year, a similar cost to registering a domain name.

I'm going to describe the steps I took to proxy QatarLiving to a secure site at QatarLiving is one of the most popular websites in Qatar, a small Middle Eastern state.

Step 0. Prerequisites

You'll need administrator (root) privileges to your own server to run an HTTPS site on port 443. I'm happy with my virtualized Linux box, hosted by Media Temple. It costs $50 a month, which is not the cheapest deal out there nor is the server particularly powerful, but I'm happy with the company's service and the box is sufficient to host all my websites and twitter feeds. If you sign up with Media Temple, you should install compilers and development tools.

Step 1. Buy your SSL certificate

Purchase an SSL certificate for your secure site. I bought mine from 123-reg. It is possible to run a secure site without buying a certificate, which is known as "self signing"; however, users of your site will be presented with scary warnings by their browser. It's best just to splash out on the SSL certificate: they're cheap.

Step 2. Downloads

If you've never come across nginx (pronounced Engine-X), don't feel too down-heartened. This tiny webserver fits into a niche of specialized webservers (including boa, lighttpd and thttpd) that compete on speed and small memory footprint. Many large sites have chosen nginx as their front-line server, including one of the very largest blogging sites, I chose to use nginx because its small footprint is crucial on my limited-memory server.

Download the latest development release of nginx, currently version 8.1.14 [homepage | nginx-0.8.14.tar.gz]

Step 3. Installation

Unpack the nginx source, compile and install. The following commands work for me, on my fairly standard centos Linux box, but some of the paths may require tweaking on other systems.

$ tar zxvf nginx-0.8.14.tar.gz
$ cd nginx-0.8.14
$ ./configure \
--prefix=/usr \
--sbin-path=/usr/sbin/nginx-ssl \
--conf-path=/etc/nginx-ssl/nginx.conf \
--http-log-path=/var/log/nginx_ssl_access_log \
--error-log-path=/var/log/nginx_ssl_error_log \
--pid-path=/var/run/ \
--http-client-body-temp-path=/var/tmp/nginx_ssl_client \
--http-proxy-temp-path=/var/tmp/nginx_ssl_proxy \
--http-fastcgi-temp-path=/var/tmp/nginx_ssl_fastcgi \
--with-http_ssl_module \
--with-http_stub_status_module \
--without-http_charset_module \
--without-http_gzip_module \
--without-http_userid_module \
--without-http_auth_basic_module \
--without-http_autoindex_module \
--without-http_geo_module \
--without-http_map_module \
--without-http_referer_module \
--without-http_fastcgi_module \
--without-http_limit_zone_module \
--without-http_browser_module \
$ make
$ su
# make install

If any errors appear with the above commands, it probably means you need to install some required library. In most cases, using Google on an error message will provide the fastest solutions. Options may vary slightly between versions. Always check ./configure --help for the current list.

Step 4. Server Configuration

Download your server SSL certificate and private key, rename them to server.crt and server.key, and move them to your nginx config directory (/etc/nginx-ssl/). If you've bought a cheap SSL certificate like I did, the certificating authority probably won't be built into your users' browsers by default. You'll need to find the certificate of your CA and concatinate it with your server's SSL certificate. Your server.crt will then look something like this:

[your certificate here]
[your CA's certificate here]

Now, all that's left is to edit your config file /etc/nginx-ssl/nginx.conf. You'll want to play around with some of these setting, but they provide a good starting point.

# the number of worker processes should be
# equal to the number of processor cores in your server
worker_processes 4;

# disable error logging by uncommenting the next line
# error_log /dev/null crit;

events {
# max connections - 2048 is reasonable
worker_connections 2048;

http {
include mime.types;
default_type application/octet-stream;

# TCP tuning
sendfile on;
tcp_nopush on;
tcp_nodelay off;

# keepalive is highly beneficial for SSL
keepalive_timeout 10;

# disable logging
access_log off;

server {
listen 443;

# change this to your own website hostname

# these SSL options have been chosen to maximize
# throughput on small servers
ssl on;
ssl_certificate server.crt;
ssl_certificate_key server.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;

location / {
proxy_set_header X-Forwarded-For $remote_addr;

# don't proxy static content, redirect instead
location ~* \.(gif|jpg|jpeg|png|ico|js)$ {
rewrite ^/(.*?)$$1 permanent;

Start up your server by running nginx-ssl as root:

$ su
# /usr/sbin/nginx-ssl

Tail the error log (/var/log/nginx_ssl_error_log) if the server fails to start.

Further Reading

Nginx English documentation

Useful changes to default nginx configuration file

O3 Magazine - Open-Source SSL Acceleration

SSL optimization and security

HTTPS performance tuning

Installing an intermediate authority certificate under nginx

Why SSL?

Outstanding issues

Cookies that contain the original site's domain will not be stored by the user's browser. Most websites don't set a domain within the cookie, so this isn't usually a problem. However, if your site is affected, it can be fixed by filtering the headers from the insecure site and removing domains. I'll post a blog entry in a few days about this, as it affects most Drupal sites including QatarLiving.

Navigation within a proxied site will only be successful if most links do not include the original hostname.

Thursday, June 19, 2008

News site rankings

Before I started QatarJournal in April last year, I took a snapshot of the Alexa page views from local news providers. Looking at the changes over the past year, it's obvious that QatarLiving is now serving more pages than any of the other news sites, and Watan's website is declining in relative terms against the other papers. Permalink here. A similar decline can be seen in terms of Watan's market share, with only QL showing a noticeable increase.

When we look at only visitors from Qatar, the ranking of sites providing news becomes clearer:
* Qatar Living
* Al Raya
* Al Jazeera
* Al Sharq
* India Times
* The Rest.

Thursday, June 05, 2008 sold

Today I sold to a local businessman. I probably wouldn't have sold the site in January - I was quite upset about it. Now, it just seems like someone has given me a surprise gift. I'm going to have a good holiday this summer.

Wednesday, March 05, 2008


Qatar Journal is finished, so I'm back blogging here.

At the moment, I'm working on a CGI-IRC gateway, a cleanup of another codebase. It's mostly just a matter of replacing bits of code with CPAN modules, but after it's fairly tidy I'm going to replace the guts of the code with POE::Component::IRC by Chris Williams. That's mainly because I don't trust the IRC code I'm working with, and the POE code looks like it's well maintained.

The idea is that eventually, I'll authenticate web users with OpenID and some sort of NickServ. I haven't quite worked it out yet. Should be a fun bit of work, and very, very web 2.0 ;)

Monday, June 18, 2007

This blog has moved

There's an idiom in the software industry: "eating your own dog-food". If you've built some software, it's not right to ask other people to use if you don't. Hence, I've moved my blog to Qatar Journal.

Every user of Qatar Journal can have a blog on the site, so if you'd like one, you need to visit the signup page, choose a username, enter your email address (twice) and click 'Create Account'. Users can also choose to receive a nightly summary of all the local news headlines.

Sunday, June 17, 2007

Is Qtel a bit simple?

I've been banned from QatarLiving. I'm sure the ban wasn't intentional, but I've been banned nonetheless. This morning, it was obvious that QatarLiving discussions were being attacked by someone with the intent of disruption. There was some speculation about who was responsible. Eventually, someone at the website banned the IP address of the attacker.

Unfortunately, Qtel employs a few Internet filters, and everyone behind a particular filter has the same public IP address. Thus, a system which is meant to make the web safer for Qatar's surfers has rendered one of the most popular discussion sites in Qatar completely inaccessible. This has happened before, of course. At the beginning of the year, Wikipedia saw a fair amount of abuse coming from a single IP address, and blocked the entire country from anonymous posting. It's not as if people don't know a solution to these problems - it's just that no one at Qtel is willing to make the fix.

Setting up a decent filtering proxy should be trivial, but Qtel's implementation masks users' true IP addresses from the sites they visit, and restricts the ability of site operators to punish abusers. How simple is Qtel? I'd say it's plain stupid.

Sunday, May 27, 2007

Best blogs in Qatar

<BLUSH> This blog has been chosen as one of the best blogs in Qatar. I'm choking back the tears, but will still manage to give a 10-minute acceptance speech, given half a chance.

Thursday, May 24, 2007

Qatar Journal - The Online Newspaper for Qatar

At the end of its first week, I'd say the launch of Qatar Journal has been a success. It's taken less than two months from the initial idea through to launching the site. I had hoped to launch a couple of weeks earlier, but I wanted to be in Qatar when it happened.

The response has been good from journalists and PR companies. I'm now getting a steady stream of stories, which is easing the administration of the site.

The technology has had some teething problems, with my server running out of memory on the first night, but it's now settled down. I've got a very long bug-list, which I'll start fixing in a couple of weeks. None of the bugs are serious, just annoying. Ben Figgis has pointed out a bug in the Qatar Journal feed that doesn't seem to be affecting slashdot, so I'll need to investigate. It's nice when people point out a problem, because noticing the bug is the difficult bit. Fixing is usually easy. Thanks Ben.

Thursday, May 10, 2007

Still in the UK

Sorry, I've been away from a PC for the past two weeks. I'm still in the UK because Sara has had surgery. She's OK, and is getting out of hospital today, but we can't return to Doha until at least May 20.