Saturday, June 4, 2011

if (have_pool())...

It has been a while since my last post. Instead of blogging, for the past few weeks, many hours disappeared into my latest course at the local college. The objective has been to learn a new language. Not Spanish, but PHP, a computer language for building websites.

Two nights a week, after work, I sat in a classroom trying to get my head around strings like this:
if(isset($_POST['submit'])) {
    $sql = "INSERT INTO entries (cat_id, dateposted, subject, body) VALUES (" . $_POST['cat'] . ", NOW(), '" . $_POST['subject'] . "', '" . $_POST['body'] . "');";
    mysql_query($sql);
    header("LOCATION: " . $config_basedir);
} else {
    require("header.php");

Can't say I understand it yet, even now that the course is finished. 

I now know what a statement like the one above is supposed to do, but I couldn't tell you if there's punctuation out of place or why it's arranged the way it is. If you took away my textbook and asked me to write something like that from scratch, I would probably put my head down on the desk in defeat.

The reason I took the course is I've realized I need to understand PHP  to do what I want to do with websites. It can also make it practical to hand the site over to people who are even less technical than me, so they can add and update stuff easily.

Spanish is much easier and more fun to learn. But learning to work with PHP is part of the long-term plan.

The plan is to get to spend lots of time in Merida before we're too decrepit to enjoy it much. I love the idea of being able to work wherever we are. This is not so easy to arrange with my day job. I sort of have to be there. The boss would notice if I stopped showing up at the morning story meetings.

Back when I started meeting people in Merida and the nearby beach towns, it became clear that a lot of Canadians and Americans work online for employers located north of the border. Some are web designers or programmers or other types of technical people. Some are more the writer/editor types who handle online content. These include the people who provide comment-monitoring services for my own employer, which publishes the top news website in Canada, among other media things.  I realized these smart people in the Yucatan have it figured out: They can sit by the beach or the pool and get paid for their work, while suckers like me toil in the cold and damp, thousands of kilometres away.

So this is what I hope to do:
1. Keep practicing PHP until it starts to make sense.
2. Get a pool.
3. Sit by pool working on web stuff that might include complicated strings of PHP.


Quite possibly none of these things will come to pass, although I'd guess the pool is going to happen sooner or later. No matter, it's interesting to try and pleasant to daydream.

The great writer Malcolm Gladwell, in The Outliers, calculates that it takes 10 years or 10,000 hours of experience for a person to master a complex skill. That sounds okay. There's no hurry. I'm not quitting my day job.