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.

11 comments:

  1. It's nice to have an update.

    You are working on number one, and number two is possible one of these days. I suspect that means that down the line, number three will come to pass.

    The great thing about Mérida is that you don't need the same kind of income as you do up north to live very, very well. That shortens the time line quite a bit.

    I hope to see you back here some day soon.

    ReplyDelete
  2. Thanks Marc, nice to hear from you too.
    I have a feeling # 2 (pool) will come about before I become very good at #1 (PHP), but either way is good. I am definitely missing Merida and looking forward to getting back and seeing what our place is like with most of the little details completed.

    ReplyDelete
  3. Hi Debi,

    I was amazed at how easy building a site could be, without studying any compiler languages at all. I was able to build a site for myself from scratch using iLife on my Mac. It allowed me to put up a weekly halfhour movie, including soundtracks which incorporated music, which I was also able to edit and blend. I did this for about six months before abandoning the project. (Sorry, the movies are no longer visible at me.com, as I let my domain name lapse after dropping the project.)

    Of course, if your employer isn't using Mac, then such an approach doesn't work. But it was fun, and I learned much. Just a thought about broadening your skill base. Maybe some day you will be free lance.

    ~eric.

    ReplyDelete
  4. Hi Eric,
    I haven't been a Mac user for awhile but iLife sounds like a great tool. There are definitely easier ways to do websites. I want to build sites with WordPress, which also does a lot of the heavy lifting on the code side. It's my desire to customize the WordPress templates that is getting me in over my head. It's fun when it works!

    ReplyDelete
  5. The gibberish above $sql=&H@jql, etc. frustrates me. I spent 3 hours the other day trying to embed similar gibberish into my HTML template for a calendar. I kept getting an error message that made absolutely no sense and finally figured that the embed gibberish was flawed. I decided that I didn't need a calendar afterall.

    But I sure admire you for trying to learn 'gibberish'!

    ReplyDelete
  6. I can sympathize with all these comments, Debi. I am still a bit afraid to even begin Wordpress, because of the customization factor. But I plan to do so soon.

    Let me recommend, however a great book--published by SitePoint, it's called BUILD YOUR OWN WEB SITE THE RIGHT WAY, USING HTML & CSS, by Ian Lloyd. He covers both PCs. and Macs.

    I've not yet ordered the third edition, but let me explain how I used it: I built a model, based upon the book's example. Then, when I need to change a page, I go to the model, make a few revisions that match the old one, and wow! It usually works!!

    The author, Ian Lloyd, has a real knack for explaining things in ways that we non-nerds can understand. AND he has a sense of humor!

    My only regret about the book is that their model Blog software is Bloggers, instead of Wordpress. But nothing's perfect.

    ReplyDelete
  7. Thanks alinde, I'm always looking for books that don't immediately launch into advanced tech-speak. So many of them give me that discouraging, completely-over-my-head feeling.
    Now that I've learned a bit more I wish I'd gone with WordPress as a blogging platform, because of its flexibility. But Blogger is mercifully straightforward to use, and I'd be interested in reading about how much more we can do with Blogger.

    John and Alan, I just put a calendar on a blogger page that I haven't launched yet, and it seems to work. I know you posted on this a while ago, but I'd be happy to compare notes. If you still have a hankering for a calendar, that is.

    ReplyDelete
  8. BTW alinde, I like your site! I am looking forward to sharing the link with the local Spanish conversation group this eve.

    ReplyDelete
  9. I will take the heretical approach, and suggest that a pool is not a necessity! I've been here almost a decade, and am glad that I do NOT have a pool. Most of my Mexican neighbors (no, I don't live in Centro) either have no pool, or have empty ones for most of the year.)

    First--there are other options for swimming--some gyms have associated pools. Sure, one can not jump in at a moments notice, but that's not much different than going to the gym. But what one can do, at a moment's notice, is take a cold shower!

    Pools are like another pet, to my mind. I already have three pets, and sure don't need another one. Pools cost money/or energy to maintain, heat (yes, there are many days here which are NOT hot enough to heat a pool's water). Finally, there's the sociability factor--if one is single, there is a real plus in going to a gym or club for such activities.

    Were I just moving here, knowing what I know now, I'd probably select a house without a pool, but with sufficient space for it's addition. That's what I have, and so far, I've chosen not to add one.

    ReplyDelete
  10. So glad you like my site, Debbie. It's a long way from where I had originally intended, but I do keep plodding away. If nothing else, I've learned something about HTML, crossword construction sites, and my own Spanish. (Every time I upload a new puzzle, I try to check it out with an instructor--and it's amazing the ERRORS I've made! Ah well…..)

    ReplyDelete
  11. Alinde, I've been meaning to reply to your thoughts about pools as pets for a while. It does seem like they need a lot of attention, and since we're not there full-time it means someone coming frequently to maintain it. It is definitely one thing that's keeping me from taking the plunge (sorry, bad pun) right away. Tom says people won't want to come visit unless we have one. I wonder if that's the case?

    ReplyDelete