Palenque, Mayan Ruins

Palenque town itself is a rather drab place, but the ruins, deep in jungle, are as spectacular as you might expect. It’s also the perfect place to feel like Indiana Jones for a day…

img_0175-largePalenque town itself is a rather drab place, but the ruins, deep in jungle, are as spectacular as you might expect. It’s something of a metropolis, with several enormous pyramids cited in lush green surroundings. Other buildings that were generally habitations were tucked away within the forest itself.

Exploring all this you do have a sense of being on an Indiana Jones set. Vines swinging down, trees erupting through ancient stairways, waterfalls, pools and dark, small houses to explore. Having said that, at no point did a giant boulder swing our way, nor did stones suddenly move in order to release a flurry of arrows or crush us under a massive slab of stone.

What I will say, quite definitely, is that the Mayans had a real sense of civic architecture. They knew how to make a place look good. Interior design is harder to assess, as most is damaged – but the rooms generally felt small and dark. They’d not be popular with the Scandinavian school of design, for sure.

For the moment this is just an introductory post to show where we’ve been. I’ll try and write more detail in at some point soon.

San Cristobal de las Casas to Pelenque

I’m never sure if it’s a great idea to save money on hotels by using overnight buses. It is, however, a very effective use of time. Just so long as you can get some sleep. The bus to San Cristobal was certainly as comfortable as was needed – we could only get seats on the UNO service, a first class service, with lounges (not wildly comfortable, but secure enough that you don’t have to watch your luggage too carefully) and extremely comfortable fully reclining seats. You can, basically, curl up and get a good night’s sleep.

San Cristobal itself is a pretty, colonial town, made up of low rise houses and, in the centre at least, a merciful lack of poorly assembled concrete. It’s one of the prettiest places in Mexico and well worth a visit.

From there we took a horse ride up to the village of Chamula, where a festival was in full swing. This mostly appeared to be made up of lots of men walking around wearing something resembling furry tank tops and wide brimmed cowboy hats. No pictures, sadly, as the locals here believe photographs steal their soul – which means asking and, often, paying a small fee. Yes, you can have a little bit of Mexican soul in your camera for just a pound or so. Bargain. However, not feeling comfortable with the responsibility of soul ownership I decided to not bother too much.

What you can’t photograph, for any amount of money, is the church. It’s not unknown for locals to become quite violent if you try. In a way it’s a shame because visually the interior proved to be one of the most beautiful of the whole trip. You pay twenty pesos (£1) for entry and as you pass through expecting JAC (Just Another Church) you find yourself faced with thousands of candles. On tables, in front of the altar and, most incredibly, all over the floor. Given that the floor is also covered in pine needles it’s probably a good idea to tread carefully, lest you accidentally knock a candle over and start a major inferno. There are no pews either – they’d probably just get in the way of the candles or, perhaps, simply add to the fire risk. Well worth a visit, but like I say – this is a place where tourists are tolerated and grudgingly accepted, as opposed to being seen as a good thing – so be sensitive if you go.

Unfortunately, the 1.5hr horse-ride back started in a fair amount of pain. The ride up had been pleasant, if somewhat exciting thanks to the rocks and steep hills you need to negotiate, but ultimately horse riding involves your backside getting a damn good pummelling. Mine isn’t well padded, and I suffered on the cheap, mostly wooden saddle my horse had. When we returned and climbed off we all staggered around a little, with crooked knees.

At this point it’s worth giving an honourable mention to Gosia – this was her first ever horse-ride. And these weren’t the skinny and slow meta-donkeys you find in many places. They would trot without too much encouragement and could even be encouraged into the odd gallop. She was terrified, and the only instructions she had were from me and along the lines of “pull left to go left, right for right, and both of them to stop.” Not exactly a comprehensive horsey education, but it seems it helped a little.

The next phase of the trip was taking a minibus with another of Fangio’s long lost loquacious relatives. He clearly believed that a tour had to be run as quickly as possible. This wasn’t actually a bad thing, once you dealt with the fear of imminent death – he got us to the breakfast stop and to the main sites before all the tourists arrived. One, however, had to be skipped. It seems that the locals had decided that they were fed up of tourists traipsing around and often spending very little money, so they’d decided to set up a road block and insist on a payment for the visit. The details, unfortunately, evaded us until we’d read their handout and by then the driver had set off in keen pursuit of Palenque.

Before Palenque we stopped at a water falls called Agua Azul which at first looked…well, not as impressive as the book sad. And it wasn’t so much Agua Azul as Agua Brown. Still, once we actually looked around we realised it was an impressive and complex series of waterfalls. And we saw our first hummingbird which is one of those birds that should be shown to depressives – they cheer everyone up. Rather like anybody beating Manchester United cheers up Scousers, I suppose.

I’ll blog separately about Palenque, and try to actually do some research first so it makes sense – it’s a historic and stunning site. One pic is included the following gallery:

Planes, Trains and Taxis to Mexico

It felt like we’d been travelling for 36hrs… and we had. Tired, dehydrated and crabby, reaching Oaxaca and actually getting a proper meal and a comfy bed was actually something of a highlight…

That was… looong.  I mean, I know we’re technically travelling and so the journeys are part of the fun, but since leaving we’ve done Manchester>Atlanta>Mexico City>Puebla>Oaxaca.  That’s 18hrs of travelling.

Gate at Manchester Airport
Gate at Manchester Airport

However, we only felt like we’d reached a comfy stop some 32hrs after leaving.  We had a brief three hour stop in Atlanta, where we guzzled free gin and tonic and nibbles in the rather excellent lounge.  That was the only bit of luxury for us, however.  But those moments make membership of a suitable priviledge or frequently flyer scheme worthwhile.  They give a nice break where you’re taking multiple flights.  And Atlanta airport is surprisingly pleasant.  On the inside at least.  I’m sure that an architect would be dismayed at the lack of enormous concrete swoops and dramatic exterior, but the inside was well decorate with lots of artworks and almost no advertising.

The flight to Mexico City was as unremarkable as all flights should be.  But we were late, and we wanted to leave immediately for Oaxaca where friends were waiting.

Give money or he'll continue to look mournful
Give money or he’ll continue to look mournful

However, with the next Oaxaca bus from the city being at 7am, we decided to try, instead, to take a bus to Puebla where we were assured there’d be a reasonable onward connection.

They were, of course, lying.  Still, it meant a chance to stay in Puebla for the night, albeit during a holiday season where every single hotel was fully booked.  Oops.  Consequently we managed to find a hotel that was both grotty and expensive.

And now here we are in Oaxaca – a relatively touristic city.  It’s popular with both Mexican and foreign tourists so food and accommodation can be a little expensive by Mexican standards, and quality doesn’t seem to be amazing.  We’re now setting ourselves up to go and visit some old ruins.  Mayan, I believe, but I’ll admit I’ve not being paying attention.  I was simply happy to arrive somewhere and get thoroughly fed and watered, along with a comfy bed for the night.

In terms of hotels, we can heartily recommend the Posada Don Matias in Oaxaca.  Clean, tastefully decorated and friendly.  And free Wi-Fi if you have the kit with you.  You can guess how I’m managing to blog this :-)

Tim Ferriss and why I don’t like his emotional blackmail

I appreciate, right away, that by writing about Tim Ferriss I’m going to give him the oxygen of publicity. And what follows may just be a small-minded rant. I don’t know – feel free to tell me if I’m wrong by commenting….

Four minute workweek would be too much for some... (picture of Vicky Pollard from Little Britain courtesy of the BBC)
Four minute workweek would be too much for some... (picture of Vicky Pollard from Little Britain courtesy of the BBC)

If this is actually just a small-minded rant, feel free to tell me in the comments.  I need to know if I’m just an idiot who hates somebody doing well and raising money for charity….

I appreciate, right away, that by writing about Tim Ferriss I’m going to give him the oxygen of publicity.  That in discussing him we all encourage him to continue to use attention seeking devices to increase his influence and marketability.

And boy, does he know how to market.

Here’s a guy who’s written a book with an interesting concept.  It’s titled The 4-Hour Workweek.  Very interesting it may be.  But I haven’t read it.  Nor will I.

Because to read it would mean giving money to someone I find incredibly irritating.  I mean, the guy gets everywhere.  But he’s a fascinating study in popularity.  Just like the most popular kids at your school probably weren’t the most capable or interesting, neither is he.  Let’s go through some things:

1. Use of emotional blackmail to increase influence

Basically, the more people who follow your tweets on twitter, and the more people who follow your blog, the more influence you carry.  Tell 100,000 people what you think about something, and you’ll influence them.  Some will blindly take on-board your opinions, while others will be a little more cautious.  But 100,000 people who treat you almost like a God?  That’s power, that is.

Anyway, his latest way to build followers is to use a not-so-subtle form of emotional blackmail.  He will raise for charity $3 for everyone who follows him on Twitter with a limit of 50,000. Now, you’d have to be pretty mean-spirited not to click that Follow button.  That’s all you have to do to raise $3 dollars to help educate some US children.  I mean, if you hear about this initiative and don’t click then you must be a truly horrible person.  For five seconds work you can raise $3 dollars.  That’s, like making $2160 an hour for charity!  Wow!

I believe this guy is using the tricks religions use to gain followers.  The upside of following their instructions may not be massive, but the downside could be huge.  And he uses this approach All The Time.  It’s horrible to see.  See, in religion you can say things like “follow the guidelines in this book in order to receive eternal salvation” and “if you don’t follow us you could be cast into eternal damnation.”  It’s like Pascal’s wager – if the religion is correct, then a small amount of investment of time and effort leads to a massive pay off (ie. eternity in heaven) but if you’re wrong and death is just death… well, you haven’t lost much, have you?  Ratio of cost to potential gain is ridiculous.

2. Four hour workweeks don’t appeal to me

I mean, I enjoy my work.  Simple as that.

3. But perhaps one of the things that turns me off is the overbearing air of smugness

Look at the guy’s header pictures.  You can tell he isn’t English.  You couldn’t go into an English pub and face your mates if you had a picture of yourself striking a sort of zen-style karate pose on your website’s header (carefully revealing your muscles, of course) unless perhaps all your friends were just like you.

4. In the end though, it’s the emotional trickery

The promises are high.  The headlines beguiling.  And you know, to someone working a dreary job or with difficult people what he discusses sound attractive.  But a lot of it reminds me of me when I’d discovered I could make lots of money as a PeopleSoft developer.  I really had it all – I could work moderately hard for short periods, taking plenty of breaks between contracts, travelling, fast cars, and sleeping with beautiful models.  Ok, forget the bit about models, but really, life looked good.

And boy was I happy to let people know this.  But when I thought about it, I got into corporate systems because at 18 I wanted to get a job coding and the only suitable job I could find around here was at a corporate.  I trained up and, one day, took my skills out onto the open market.  But the truth is, I was just lucky.  How was I to know, in 1987, that ERP developers would be highly sought after in highly paid roles that the universities were failing to train for?  I’d much rather have been a games developer – but truth be told, I wasn’t that good… Good for my wallet and lifestyle, because game coders typically earn less than ERP coders, but this was all pure chance.

In summary, Tim Ferriss is probably little further ahead of the curve than a lottery winner releasing a book called “How To Choose Lottery Numbers and Become Super-Rich Like Me.”  That would be patent nonsense, but no more or less manipulative than his own lifestyle guruness.

So when this rich young man tries to pressure me into trying to find more people who can learn about him and adore him by tweeting about his new scheme, I find myself feeling ever so slightly sick.  The idea sounds, initially, excellent.  But why doesn’t he just give the money directly to charity?  Why does he make it into conditional love?  Why does he make it feel like a psycho girlfriend or boyfriend who says “if you loved me you’d do it.”

Maybe I’m Wrong

In a way I’d like to be.  But I always want to look at the motives behind people.  Maybe I’m just an idealist.  But if I’m right, it might just dissuade people from posting some of the self-promoting junk that clutters up Twitter, forums and blogs.  Not just his junk, but other people’s.  There’s a growing tide of the stuff.  It’s annoying.

Anyway, just a final call to action – you can follow me on twitter too if you like.  I just won’t pay anybody anything.  I also promise to try not to sell you anything, or retweet marketing gumph, competition announcements and so on.  I may however, complain vehemently about whatever random irritation that cropped into my head that day.

Edited to add a link above to the Tim Ferriss’s blog post on the matter.  And tags.

PHP Serialization Fix for WordPress Migrations (& other applications like Expression Engine)

Serialization of data loaded into an SQL table is a dreadful thing and makes WordPress migrations harder than they should be, but it happens and so we must deal with it. I’ve knocked up a rough and ready bit of code which does its best to resolve the problem.

When you move a WordPress blog from one folder to another, or from one site to another, you normally use the export/import functionality.

This is fine for normal blogs, but say you’ve developed a new website and set it up on your local machine – the URL for the site may be something like http://localhost/devsite and the live URL will be something like https://davidcoveney.com – you won’t want to set up all the theme options, site options, plugin options and so on all over again.

A different kind of migration - public domain from Wikipedia Commons
A different kind of migration – public domain from Wikipedia Commons

Instead, a theoretically simple approach is to do a database dump, a search and replace for all references to server paths and URLs, and then reimport that data in the new location.

Should work, but it often falls apart.

What happens is that in WordPress, its themes and its plugins, a lot of data is stored using a method known as serialization.  Now, in my opinion this breaks all known good practice around data – it’s language specific, it’s not relational even though it often could be, and it’s hard to edit by hand.

One particular problem is that if you change the length of the data in a serialised string you have to change the length declared in the generated string.

That’s very painful when you have hundreds of the fields.

So, because I’d found this painful I decided to knock together a quick application to at least reduce the amount of editing I had to do.  You just do your search and replace, forget about the serialized string lengths, upload your data to the new database, and run this script.

Warning: I haven’t got it to work for widgets and cForms II yet, but the latter has some export functionality anyway, which takes that particular pain away if you plan ahead.  In the meantime, feel free to play with the attached file.  You use it at your own risk, of course.

To use it, download the file linked in this post, extract it, open the file, edit the connection settings, tell it the table you want to scan through, the column, and the unique key field.  If you somehow manage to have more than one unique key to deal with (you shouldn’t, but then it surprises me what people manage to code up), then you’ll have to modify the code accordingly.  Once done, make sure you have a backup of that table, and execute the php – either at the command line or through the browser. License is WTFPL, and if you’d like to improve the code, please do and I’ll host the new version.

Serialization-fixer.zip download.
download file

Serialization-fixer.zip download

BIG WARNING: I take no responsibility for what this code does to your data. Use it at your own risk. Test it. Be careful. OK? Here in the North we might describe the code as being as “Rough as a badger’s arse.” Never felt a badger’s arse, but I’ll take their word for it.

Wordcamp UK 2009 to be in Cardiff

20090224-mp54k2h4uu7ada1jtkycce81qiIf you’re following the various WordCamp lists, you’ll already know about this event.  But many won’t.

If you use WordPress professionally, or with a great deal of enthusiasm, WordCamps are a great way to meet with other users, developers and designers who really understand the system.  There are useful presentations, social events and activities based around the event.

I was there last year at the Birmingham WordCamp, with James, and our company Interconnect IT was one of the sponsors.  This year we’re waiting to see how finances work out before throwing in sponsorship money, but I’ll definitely be there again and I’m likely to be presenting on the issues surrounding bringing WordPress to the enterprise space.  Because corporates love WordPress too…

This year’s event will take place on the 18th to the 19th of July at the Future Inn Cardiff Bay, Cardiff, Wales.

For more information, you can visit the official WordCamp UK Site.