Static variables and Drupal install profiles

2 comments

I believe that this is not an issue with Drupal 7 as it handles variables differently than D5/D6. However, if you want to make an install profiles for anything earlier than D7 static variables can pose a huge problem. Static varibles are used for caching within a function in PHP. Generally the first time the function is called during a page load the static will be set. The second time it's called there's no need to execute most of the code and the value stored in the static will be returned.

While statics can be convenient and help improve performance, they become a huge problem when the relevant data has been altered partway through a page load and you need to reset the cache. Since the install profile is executed in what's effectively a single page load, static variables become problematic.

Creating nodes in Drupal install profiles

5 comments

One of the toughest things for me personally is coming up content for a new website. Specifically things that resemble an "about" page. I find it significantly easier if I'm given a starting point and something to work from. Once I get started I have no problem writing some decent content.

To make things a bit simpler for couples using Wedful wedding websites we decided to create default nodes with example content. This way users aren't given a blank slate when starting out. We've set up eight default pages to give them a bit of a starting point with the content on their site. Each page contains some example text or questions to give the users an idea of what to write.

An overview of site building in Wedful (Drupal install profiles, Aegir, and features)

7 comments

This post is just to give an overview of some of the techniques we use to build our Wedful websites product. I'll be discussing most of the things listed here in more detail in later posts as well, but thought this would make a good starting point.

Every single wedding website is a complete Drupal site, they don't share users or any data with any other wedding sites. We wanted to go this route so that each site had complete control over it's theme and domain name among other things. It also allows us to balance our server load by moving very active sites to servers with more resources.

Adding a simple twitter feed to your Drupal site

10 comments

I just added a simple twitter feed to one of my sites and thought I'd share what I did. The only other post I could find about was this one http://drupal.org/node/151185 and I didn't really think it should be necessary to write any code (and especially not any db queries) views could do all the display stuff I needed.

Launching Wedful.com

no comments

As I think anyone who reads my blog knows, over the past year I've been working on a startup idea with Sam. It's basically a wedding website builder.

Wedful Logo

I left my job at NowPublic almost exactly a year ago to focus more on travel and working on my own things, and I've been quite successful in doing just that :). Thinking back, my time has been split almost exactly between travel and work and it's been a really awesome time and enjoyable balance.

Today we're /finally/ launching the private beta of Wedful and if you're interested in checking it out just let me know (or better yet, signup for a beta code on wedful.com). Also, if you know anyone who has a wedding coming up in the next while and might be interested we'd be happy to hook them up and possibly even get a custom theme done for them.

We're starting a new wedding blog that will mostly focus on Wedful specific things, online wedding planning topics, and other things we think are cool (related to weddings, of course).

On /this/ blog, I'm going to start posting a lot more technical entries to explain how things were done on Wedful. Primarily Drupal things but also a few other types of hurdles that we needed to get over to build a product with Drupal as the foundation.

It's been super fun building this project and so far a really an awesome experience. Over the next few months I'll be able to start working on a bit more innovative features and getting into a realm that I have pretty much no experience in, marketing :).

My favorite cape town wineries

4 comments

Not only is the area in and around Cape Town one of the most beautiful places I've ever been it's also full of awesome wineries! It's been about two months since I was last there, but I've been wine tasting in the area four times now and I think I'm starting to get an idea of what I like here. I love South African wines, not just cause they've got a lot of great ones (and that I'm forced to drink it because of the sheer lack of quality beer in the country ;-) ), but also because of the price. For the same quality of wine I would pay at least twice to three times the cost in Canada.

The selection is also massive. If you've ever been to Argentina the price and quality is about the same, but I think the selection in South Africa is a bit broader. South Africa's signature grape is the Pinotage and it seems that almost every winery here carries one.

There are several wine regions within easy driving distance from Cape Town, I've only really spent any time in two of them, Stellenbosch and Franschhoek Valley. Stellenbosch is a comfortable distance from Cape Town for making short day trips to. When Scott Mac was here we decided to spent two nights in Franschhoek and it worked out great for getting to taste at a ton of wineries.

My favorite winery that I've probably ever been to was Vrede en Lust (Franschhoek). The wines had some very unique flavours and I'd especially recommend the Viognier (and I don't even really like whites!) and the Mocholate (a Malbec). The main downside to this winery is that they don't sell to bottle stores and you'll need to either live close to them or join their wine club to get wines from them on any kind of a regular basis.

The restaurant / shop at Vrede en Lust also does olive oil tasting (mmmm!). I don't think they do olive oil themselves, but they had probably a dozen olive oils from South Africa and Italy. My favorite was the Waterfall River (Franschhoek), which was a bit stronger in flavour than most of the olive oils produced in this country (that I've tasted).

I think my two runner-ups for favorite winery are Tokara (Stellenbosch) and Fairview (Paarl). I love Tokara, not just for their wines, but also the view and atmosphere. Such a beautiful winery looking down over the valley. They also do their own olive oil and have tastings. They're a bit milder than I prefer, but still have some nice ones. The wine at Tokara is pretty nice too ;-). I can't think of any that really stood out to me though, but absolutely worth a visit.

Fairview winery is more of a tourist attraction than winery, but a great place to spend a couple hours to do wine tastings as well as eat at the restaurant or have a picnic. Fairview is HUGE, not only do they have a few brands of wine under them (I believe Goats do Roam and La Capra to name two), they also produce several (super nice) cheeses! And they do cheese tastings right alongside the wine tastings!!! There's a small fee for tastings at Fairview, but well worth it. After we finished doing tastings we bought a bunch of cheese, bread, and a couple wines and had a picnic outside and watched the goats. We didn't get a chance to try the restaurant as there was a two hour wait to get a table. The one wine that really stood out to me from Fairview was their Tannat. It's not easy to find this one outside of their winery either, and apparently there's only two wineries in SA that actually make a Tannat.

Boschendal (Franschhoek) is another winery I've really enjoyed visiting, not specifically because I enjoyed their wines (though I did :) ), but because of the atmosphere. The wine tasting at Boschendal is done sitting at picnic tables under a giant oak tree. Again, this one isn't free, but the cost to do the tasting is quite cheap at about R20 or R25 (can't recall exactly). Last time we were there we also bought a plate of nice cheese to go with it.

Spier (Stellenbosch) is one of the closest large wineries to Cape Town. I think Spier must be one of the biggest wineries in SA, and although none of their wines have really appealed to me they're quite affordable for the quality. Spier is really a huge tourist attraction, in addition to wine tastings there's also a Moyo (had terrible service and not much food selection when I was last there though), a huge gift shop, and bird and cheetah watching. I think there's even a hotel there.

South Africa also has some great sparkling wines (known as Cap Classique). One winery that we particularly enjoyed these at was Haute Cabriere. They also make brandy there, which led to us getting sufficiently buzzed for 10:30am :). The restaurant / tasting room is essentially built into the side of a mountain. It was quite an amazing building with great views over the Franschhoek valley.

There's plenty of places I enjoyed that I'm leaving out here. And of course we've hit a few duds as well, but I've tried to put those out of my mind ;-). If you get a chance to visit Cape Town for a few days (maybe for FIFA World Cup), be sure to take at least a day trip out into the nearby wine lands. Not something to be missed.

Kruger National Park

5 comments

We finished the first leg of our road trip Wednesday which was a quick three nights through Kruger park. Though Kruger park is one of the largest game reserves in the world a lot of people had mentioned that Kruger isn't really one of the best places for animal watching as it's just so huge and at this time of year (going into fall) the brush is relatively overgrown. In the end I was blown away by everything we saw. It was my first time seeing so many animals in the wild. We saw everything from elephants to warthogs to crocodile.. and dang, african elephants are HUGE! I think if one had the time five days in the park would be ideal. We didn't spot any cats or rhino, but hey.. now there's reason to go back ;-)

Phone calls anywhere

no comments

Since I started traveling about a year and a half ago staying in contact with people has been one of the most difficult things for me (the bizarre local calling systems don't help either :)). This is especially true with people who can't get online, like my Grandma. Figuring out a decent phone system has been really tough and I even recently had to change my "permanent" number which I've already written about here and here.

I think I've finally got a great system worked out. Something that will work for anyone who travels internationally a lot. It will get a lot simpler and cheaper when Google Voice goes international or Skype gets SkypeIn numbers in Canada.

The problems:

  1. Over the past 1.5 years I've "lived" in 6 countries and had a local cellphone number in 4 of them.
  2. Roaming for me to call out is prohibitively expensive.
  3. My family never has any idea of how to get a hold of me. All of my friends that I maintain decent relationships with are online so that's not so much of a problem.
  4. In emergencies I need to be contactable.
  5. I don't want my family and friends to pay a fortune just to call me.

The solution:

  1. A local (Vancouver) VoIP number that never changes (ideally)
  2. A US SkypeIn number and SkypeOut subscription
  3. A local cellphone number

I switched to Voice Network in September for my VoIP service and so far have been happy with them. I pay $4.50/month for my Vancouver phone number and 1c/min to anywhere in Canada, 1.5c/min for US.

Skype is really a lifesaver. Without it I don't believe my life would be nearly as comfortable. I have a subscription to Skype "Unlimited US & Canada" which gives me virtually unlimited North American calling for $2.80/month. I recently picked up a US SkypeIn that costs me $4.46/month.

I also make a habit of getting a local phone number for my cellphone in any country I'm in for a decent amount of time just to make my life easier. (A SIM card in South Africa cost me 14c CAD compared to $40CAD in Vancouver :-/ so really most places the local number is virtually free to get and then just pay per use).

My setup:
1. For people who want to contact me... either call me on Skype or call my Vancouver VoIP number listed on the left hand side of my blog. I forward my VoIP number to my SkypeIn number and then either answer the Skype call on my computer, go to voicemail or forward it to my local cellphone number (in SA it's ~30c/min, so I don't do that unless I'm expecting a call).

2. For me to call out has never been a problem, and I just use Skype for that.

The total cost to me is about $12/month which is well worth it for a permanent local phone number wherever I am in the world. (In addition to these services, I also use a Logitech ClearChat Wireless Headset which I use for all my phone calls).

I'm only a bit embarrassed that it took me this long to get going with the SkypeIn number... it really does simplify everything and makes things run so much smoother.

The political situation in Thailand

2 comments

Thailand is the first country I've visited that has a fairly heightened level of political unrest (perhaps with the exception of South Africa). Almost exactly one year ago Thai protesters occupied their international airport for one week and had numerous violent protests in the streets of Bangkok, all for reasons that I had no clue about. Before arriving in the country I kept a close eye on the political climate but still didn't fully understand the situation. I tried to learn more about it while I was there both just for safety reasons and also because I found it really quite interesting.

I'm a Scuba Diver for Halloween!

no comments

Today I successfully passed all the requirements for my PADI Open Water Diving certification. w00t! Unfortunately they don't really celebrate Halloween in Thailand, so this is as good as I could do:

I suppose the alternative would have been to dress up like a woman and pretended to belong to one of their many transvestite cabaret shows...

p.s. There are a few options for companies to use for diving in Phuket, I went with Marina Divers, initially because they were slightly cheaper than everyone else, but they also ended up being really great too :).

Fish Massage

4 comments

All over Khaosan Road there are people trying to push things on you and get you to buy things; tuk tuk rides, suits, thai massage, little wooden frogs, clothes, random gadgets, fish massage, etc. We got suckered into all of them at one point or another, the last being the "fish massage".

We'd seen other people doing it, and really, it just looked too bizarre to not try. It works by dipping your feet into a fish tank full of Garra Rufa (??), also known as doctor fish, at which point the fish flock to you and nibble the dead skin off your feet.

Losing Sam's Mom, and a monsoon, at the biggest market in the world

2 comments

Having been to the worlds biggest fish market just a week or so ago, I thought it only natural to visit the world's biggest market when I found out that it was in Bangkok.

So the other day (after getting mislead by a conniving Tuk Tuk) we caught a cab and headed for Chatuchak weekend market. This market is 35 acres in size, more than 5000 booths and apparently has 200,000-300,000 visitors EVERY SINGLE DAY (that it's open, since it's only a weekend market). Here's the google map of the place.

Hi from Thailand

no comments

We arrived in Bangkok on Tuesday afternoon and so far have just been mostly relaxing and enjoying the food. I have a Thai friend in Bangkok that I use to work with so we've gone out with him a couple times and had amazing food (I just let him choose the food :) ). It's been quite humid, but fairly moderate temperatures in the mid-20's so quite bearable. Sam's mom arrives today, so we should finally start doing some sightseeing today or tomorrow. We're staying near Khoasan Road in Bangkok until Tuesday and then heading out to the islands.

The Tsukiji Fish Market

no comments

The other day I pulled myself out of bed at 5am to go see the action at Tokyo's infamous Tsukiji fish market. This is a massive hub in the city, the arrival/distribution point for almost all of Tokyo's fish. With 32+ million people who love their fish, it's hard to imagine just how much seafood must flow through there on a daily basis.

To give an idea of the size of this market... from wikipedia:

Tsukiji alone handles over 2000 metric tons of seafood per day. The number of registered employees varies from 60,000 to 65,000...

Fifty Five Square Foot Room

2 comments

Due to a lack of planning, Sam and I stayed in Tokyo this weekend. We'd originally planned to head out to Mt. Fuji, but unfortunately was prohibitively expensive with last minute planning (all we could find was roughly $300CAD / night). So we had to move out of our previous luxurious 215 sqft apartment into a hostel for last night and tonight. Tomorrow we're staying at a hotel near the airport since our flight out is quite early in the morning.

Anyway, our current place is a whopping 55 square feet! (about 5 square meters). Let me tell you, it's been fun :).

I'm pretty sure we could squeeze another person (with luggage) in here.