Installing libjpeg and PIL on OSX Snow Leopard with Python 2.7

If you found this article through a google search, you've probably already read through tons of articles and forums where people gave advice on how to do this. Here's some examples of what I'm talking about:

It's clearly an annoying problem, and I'm guessing none of those worked for you. While this is clearly an annoying problem and I spent at least a couple hours of head banging myself, I believe most of peoples' issues can be solved by completed a thorough cleanup. If you tried one or more of those approaches above, you probably have libjpeg and PIL folders in all sorts of places on your system that are screwing up stuff. 
To remove the libjpeg files, make sure you remove anything that looks like libjpeg* or jpeglib*. You'll also want to remove all your PIL directories. Some of the most common directories these might be living in are:

/usr/local/include
/usr/local/lib
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
/sw/lib
/sw/include
/opt/local/lib
/opt/local/include

Be sure to do this between trying any different installation methods or you will end up wasting a lot of time. 

For me, once I removed all these files, getting libjpeg and PIL to work was actually quite simple:
  1. Download this combo installer and install it with the default settings.
  2. Run "pip install pil"
I hope this helps someone!

Setting up my Hackintosh on my Toshiba Satellite M55-S329

I'll go through the process of turning my 6 year old Toshiba Satellite into a brand new Hackintosh. So far it's working great! Wifi and all! And best of all, it didn't take much time at all to set up.

First, I have to give credits to the two best sources for this that I found:

Not everything went totally smooth for me, though, so I'll walk through each step in a bit more detail than in those links above.
  1. First, you should download iDeneb 1.4 via torrents. This is an iso image of an OSX installer that works phenomenally. 
  2. Burn this iso image onto a disk. If you're already using OSX like me, use disk utility as explained here.
  3. Partition your harddrive. Since you probably already have windows installed on your Toshiba, you can download the free Partition Wizard which works beautifully. You need to make a fairly large OSX partition. Since you're in windows you won't be able to format this partition as Mac OS Extended Journaled, but you need to create a blank partition and give it a drive name such as "D:\".
  4. Insert the iDeneb disk and restart the computer. Boot from the disk by hitting F12 at startup. 
  5. When you reach the first iDeneb install screen, it asks you to choose which drive you would like to install it on, but doesn't show any drives to choose from. This is because you need to format your blank partition. Simply choose Disk Utility from the utilities drop down, select your blank partition, and erase that partition while choosing Mac OS Extended Journaled. You can then exit the Disk Utility and choose this new partition you created as the place to install osx.
  6. At the screen where it prompts you to install, you need to first click on the "options" or "configuration" button to choose which drivers (kexts) you want installed. Choose exactly the options specified here.
  7. Click install and wait a while. Then just go through the regular startup questionaire.
  8. After it boots up, everything except wifi/ethernet should be working. Download the post-install files from this insanelymac thread using a computer with internet. Also download Intel PRO/Wireless 220BG driver. Place them on a flash drive, and open the folder on your Toshiba.
  9. Install the AppleYukon kext, then the Seatbelt Kext, and finally the Intel Pro/Wireless driver kext that you downloaded from project: camphor. You can use this guide for installing kexts
  10. Reboot and cross your fingers!
The thing to note that I did differently than in those links above is that I used a different method for getting wifi up and working. I didn't use the iwi installer, and instead used the camphor installer.

After using my new hackintosh for a little bit, the biggest shortcoming is that the wifi can connect only to unauthenticated or WEP encrypted networks, not WPA or WPA2. This is a bit inconvenient. Further, since this computer is so old, even though OSX is running smoothly, the hardware limitations make streaming video choppy, and of course the battery life kind of sucks. 

That being said, I now have a fully working hackintosh that I can use for development when I'm away from my desktop. Awesome.

Scheduling Regular Backups on Webfaction

For Leaguevine, we take backing up our information seriously and have deployed a custom backup system for our database. I figured I would share how we back up our databases here. Note that this sort of backup technique is certainly not a replacement for source control or backing up user uploads, but that's a topic for another day.

First, we have to decide on a schedule for what copies of the database we want to keep, and how long we want to keep them for. For Leaguevine, we decided on the following scheme:
  • Hourly backups for the past week
  • Daily backups for the past month
  • Monthly backups indefinitely
After defining a schedule, creating these backups on webfaction is as easy as creating some folders and specifying commands to periodically dump the database information into those folders. Thus, we have directories for each the hourly, daily, and monthly backups. To dump the data into files within these directories and write the success/failure of these dumps to a log, we create new cron jobs. For example, if we open up our list of cron jobs, we can add a single command to do all this. It might look something like:

30 * * * * /usr/local/pgsql/bin/pg_dump -Ft -U db_username db_name > /path-to-backups/leaguevine/hourly/leaguevine-hourly-`date +\%a\%H`.tar 2>> /path-to-backups/leaguevine/hourly/backups.log && echo "Database backup completed successfully on `date`" >> /path-to-backups/leaguevine/hourly/backups.log

There is a lot going on here. First, we notice that this job will run every hour on the half hour due to the way we defined the cron job.

Next, we specify the database name and username for the PostgreSQL database that Leaguevine uses. For this to run without needing to prompt the user for input, we need to set up the .pgpass file which just takes a second. 

The next thing this command does is specify the folder we want to dump the database to, along with the day of the week and the hour of the day. This works for us because the database dumps from previous weeks will get written over by files of the same name after a week passes. 

The command then writes any errors to a file called backups.log, but if there are no errors it writes a success message that has a date stamp on it to that file.

This single command will create all of the hourly backups for a week without needing any manual maintenance. However, this has the shortcoming of residing on the same server as the production database. Thus, if something happened and all of the data on that server were wiped out, all of the data would be lost. Thus, we need to additionally copy these backups to a different computer regularly. To do this, you can just install another cron job on a different machine as so:

40 * * * * . ~/.ssh-agent; scp -o PreferredAuthentications=publickey username@web160.webfaction.com:/path-to-backups/leaguevine/hourly/leaguevine-hourly-`date +\%a\%H`.tar /local-path-to-backups/leaguevine/hourly/ 2>> /local-path-to-backups/leaguevine/hourly/backups.log && echo "Database backup completed successfully on `date`" >> /local-path-to-backups/leaguevine/hourly/backups.log

This cron job is very similar to the previous one in some ways. First, it runs 10 minutes after every supposed backup should have happened. Next, it uses scp to grab the backup and store it on the local disk. And finally, it handles the logs the same way as before.

The trick here is to set up your .ssh-agent so that scp can run without needing a login. This isn't too hard, and webfaction has good docs for how to use ssh keys.

And that's it! With just a few lines in your cron files, you can have customized automated backups of your important data.

Sanya Beaches and Relaxation

After Yangshuo, we took a bus to Guilin where we again stayed at Liu Tao’s youth hostel for a night in preparation for our flight to Sanya. This time we paid for our room at the hostel because we would feel bad abusing his generosity towards Couchsurfers. We walked around the town that night, and enjoyed a beautiful atmosphere. Our guide book said Guilin would be overly crowded with tourists, but the city is big enough to hold a lot of people while giving everyone enough space to really enjoy it’s beauty. There were tons of mood lights all along the slow moving river and there were great paths to walk along it. We sat and watched an amazing violin player for a little while, which is probably why I remember the mood of the town being so serene and peaceful.

The next day we flew down to Haikou, a city in Hainan. Hainan is an Island in the south of China that many equate to being “China’s Hawaii”. We flew into Haikou on the north shore of the Island because it was cheaper, but our destination was Sanya so we took a bullet train (cost about $10 each) that got us there in about 2 hours while going 250 km/hr! So cool.

Once in Sanya, we took a couple of busses to try to get to our tiny little beach house where we booked an inexpensive room right on a beach. However, even though we got off at the right place, we couldn’t find the beach house by ourselves and no one there had ever heard of it. We asked the concierge at a resort where it was, and he helped us by talking to the owner of this beach house and she had us wait at the resort while she walked over to meet us. She walked us back to our rooms, and we were very pleased that we decided to stay there for two nights.

I posted a photo from our awesome room in a previous post andmentioned that unfortunately, the beach we were on was not a swimming beach. On the second day of our stay which happened to be my birthday, we went to visit a couple of swimming beaches. The first, Yulong Bay, had gorgeous views and incredibly fine sand. It was exactly what Americans typically picture when they think of a beach in paradise. We splashed around in the big waves and threw a disc around for a while and there were very few people in the ocean. Unfortunately, the only reason this one was so clean and impeccably nice was that the entire coast line of the bay was owned by “6 and 7 star resorts”. We walked through a couple of resorts and one of them had something like 4 outdoor pools with water slides and the works. While these resorts are great for people who want to spend tons of money, they suck for people who are living in budget rooms like Rachael and I because they don’t let you hang out on their stretch of beach. Rachael and I sat down on the chairs of one of the resorts and read our books for a couple hours, not exactly sure what the policy of the resort was. After a while, someone from the resort came and asked us for our room key and then kicked us out. It’s too bad this beautiful beach is only really friendly towards the people who spend tons of money.

Later that same day, we visited a less pretentious and highly recommended beach called Dadonghai. This one was totally free to the public, and the scenery and sand was just as nice as Yalong bay. However, it had none of the peacefulness that Yalong Bay had because it was jam packed with Chinese tourists. That being said, it was really fun playing in the giant waves with the masses of people who were all in great spirits and laughing all the time. At all times, there was another person within 3 meters of us, but I enjoyed the atmosphere here more than the stuffy one of Yalong Bay.

Img_5155


After our two nights at the Papiluo Bluehouse, we decided to pack up and change our location to a youth hostel where the owner speaks English. As nice as our room was, we felt like we were a bit stuck and had no clue how to do anything except visit beaches. We checked into the Raintree Youth Hostel for a four night stay and this turned out to be a great decision.

Soon after checking in, Rachael got sick and then remained very sick through the following day. The hostel was in an area where we could go downstairs and easily find food, and there was enough to do in the hostel that we could take a full day off and not be too bored. One of the staff helped us move a DVD player into our nice AC room where we proceeded to watch a couple movies and read for most of the day.

Rachael felt better after the full day of rest and we went with Justin, the owner of the hostel, and a group of about 8 out to a remote bay for a day of water activities. The bay we went to had gorgeous, clean beaches and our group and one other were the only ones swimming in the entire bay. We swam, rode on a banana boat, tried standing on body boards being pulled by a speed boat, tried wake boarding, and snorkeled for a long time. Unlike my only other snorkeling experience, this one was actually good! I had very few problems with my facemask and I was able to see a ton of cool stuff under the water. This bay was quite undeveloped so we were able to see coral, sponges, anemones, crabs, hermit crabs, fish, urchins, sea cucumbers, and even several small jellyfish.

Img_5186

On our final full day in Sanya, we went to see the rainforest. It sounded very cool, but turned out to be a frustrating and disappointing experience. The place we went was excessively developed and felt like Disney world. There was no resemblance whatsoever to any U.S. state or national park. The only paths in the rainforest were perfectly well kept walkways. All of these walkways were completely packed with Chinese tourists and all of the sounds of nature were drowned out by the tour guide speakerphones coming from every direction. The largest animal we saw were some small bats hanging on a rock overhang under a nice wooden bridge. Rachael, myself, and one of our friends from the hostel ventured off the trail a couple times which was fun for a few minutes until we ran into another walkway or were scolded by tour guides to stay on the walkways.

Despite the one disappointing day in the “rainforest”, our trip to Sanya was great and I’m glad we planned that into our vacation. We got to see a bunch of beaches, had fun playing in the water, and were able to relax a bunch more before what we knew would be a fast paced week with my family in Beijing and Shanghai.

Img_5236

Looking back on our time in Yangshuo

This final set of blog posts is coming extremely late, but I figure better late than never!

We spent most of our second week (6 nights) in Yangshuo and this may have been our favorite location on our trip. Yangshuo has been different from every other city/town we’ve visited in that it is small, not too busy, and a surprising number of people speak English. There are only about 200,000 residents in the town and thus you can get absolutely anywhere you want on foot. After so many taxi rides during the first week, this was a great relief.

Another huge plus of Yangshuo is that the tourism catered to Western tourists instead of Chinese tourists. The domestic tourism industry is ridiculously huge, and a big part of what they do is to make absolutely everything accessible to anyone. This means trams, cable cars, stone pathways, covered boats, AC busses, and refreshment stands everywhere you can look. The idea behind making the best sites accessible enough so people of any age can enjoy them is cool, but the downside is there are often unimaginable hoards of people crowding around these sites. What makes Chinese tourism less attractive to me (and probably other Western tourists) is that there is exactly one way to see each of the tourist sites and the tourism companies dictate what way that is. Exploring on your own, or getting off the beaten path is very difficult and sometimes impossible at tourists sites aimed at domestic tourism.

Yangshuo was geared almost solely towards Western tourists. You could easily arrange your own outdoor activities such as bike riding, tubing, rafting, hiking, or exploring without having your trip being forced into doing exactly what a tourism company tells you to do.

When we got to Yangshuo, it was late at night and we stopped by the English school we planned to volunteer at since we were told we would have a room there. Sadly, they did not have a room prepared for us so they directed us to an area with a number of youth hostels. On our walk there, an awesome Canadian couple started talking with us and then walked us all the way there even though they were staying somewhere else.

We spent our first night at a wonderful hostel called the Showbiz Inn. It had a clean, comfortable room with AC, TV, Wi-Fi and a really nice rooftop bar with an English speaking staff. It cost less than $20/night for the room and we were all ready to book that room for the remainder of our stay, but we found out the next morning that they had already booked our room for the next night and there were none left, so we moved over to a place 30 meters away called Monkey Jane’s and booked our stay for 5 nights there (just $10/night for the same amenities but dirtier).

Monkey Jane’s was a really unique place with the most lively and fun rooftop bar I’ve ever seen. They had a beer pong table that was always in use, extremely cheap beer, tons of couches, and a gorgeous view of the surrounding Karst pinnacles. It was always full of European tourists, and it felt weird being English speakers for the first time on our trip.

On our first night in Yangshuo, we spent some of the evening in the Monkey Jane rooftop bar playing beer pong and some friends we made that night suggested we go tubing down the river with them the following day. So on our second day, we spent a good 3-4 hours sitting in giant inner tubes floating down the beautiful river. It was a ton of fun, and there were no rapids or anything dangerous. It was just a good relaxing time. A bunch of Chinese tourists on motorized bamboo rafts were passing us, waving, and taking photographs of us which was very entertaining. On the downside, our phone got wet and mostly ruined, and everyone on the rafting trip got terribly sunburned. My skin is still peeling from that trip which was about 4 weeks ago.

That night, we participated in something called the English Corner at an English language school in Yangshuo. This turned out to be incredibly fun and was a great learning experience for both me and Rachael. All we were asked to do was sit in a small classroom of 8-10 students and talk with them for 2 hours in English. Of the 6 days we spent in Yangshuo, only two of those days had English corner scheduled, and we happily attended both of them. Most of our discussions were us learning about the Chinese culture and talking about life in America. We hung out with one of the students named Gunnar and some of his friends after class and we had a great conversation. Turns out he is a computer science guy like me, we’re the same age, and we have the same last name. Unfortunately, we only met him on our last day, because he offered to teach us Chinese which we would have gladly accepted.

The highlight of the second full day was the bike trip I talked about in a previous blog post. The day after, we went exploring on foot because Rachael’s butt hurt from a terrible bike seat and a super long bike ride the day before. We decided we’d hike up to the top of a Karst pinnacle. We didn’t want to do a tour or anything, so we picked a fairly nearby pinnacle that was higher than the rest of them and had a TV tower sitting at the top. It’s safe to assume there is some pathway up to a peak where there is a TV tower. Thus, we started walking toward it and found our path blocked by solid rows of apartments. We kept taking small alleys between these apartments, and backtracked to find new alleys whenever our path ran into a dead end. Some residents also helped point us in the right direction because it was pretty clear where we were trying to go. After a lot of meandering, we found the entry to a very nice stone paved trail that let all the way to the top. The entire trek both up and down we didn’t see a single person, which was incredible. It was even more solitude than a hike in a national/state park in the U.S. The view from the top was a lot of fun, and the day was almost identical to a really fun day in 2008 when Tom and I managed to find our way to the peak of the “mountain” on the Island of Hydra in Greece.

The rest of our stay in Yangshuo was spent relaxing and rejuvenating after an overly hectic and rushed first 10 days or so of our vacation. We bought a couple books at a bookstore, watched a movie, hung out with our Canadian friends Jonathan and Kristen, participated in English corner again, strolled around town, bought some cheap stuff, planned the rest of our trip, drank some beers at night, and ate a lot of fruit. Oh and we went to a cave where we took a mud bath that I talked about in a different blog post!

Being able to relax for a few days was an amazing luxury, and we didn’t feel bad doing it because our vacation was so long. If our vacation were only for a week, we would feel guilty spending any of our time doing things that we could also do in the U.S., but since this was a full 5 week trip, we could really slow down and enjoy ourselves now and then.

First week of China - Beijing, Luoyang, Hua Shan, Xi'an, And Guilin

Blogging has been a bit sporadic over our first three weeks of this trip so I'm going to go back through the fun events of our first week here. I'll get to the stuff from the past 2 weeks soon!

We didn't spend much time in Beijing since we will be doing a lot more of that when my family arrives. Our first impression was really nice, though. We stayed in a gorgeous Marriott room thanks to my dad's connections. That first night, my dad's friend Ying and her daughter Yuan treated us to an excellent meal of peking duck and showed us around a pretty park. In the morning, Rachael and I took a nice walk around, ate some cheap food, and then met up with Ying and Yuan again for a delicious lunch. After that we were off to Luoyang to meet oir friend Kevin.

I believe I already touched on our experience in Luoyan in a previous post so I'll skip it here. The highlights of the two days there were seeing the Longmen grottoes, hanging out with some kids who wanted to practice thir English, meeting an awesome girl named Cassie who helped show us around town, and then having a loud and fun dinner with a guy we met on couhsurfing. From Luoyang we traveled to Hua Shan which is a town based almost solely around tourism for hiking a famous mountain. I wrote a blog post from an Internet cafe there and remember being tired an in a bad mood. The town wasn't a very friendly place since everyone was pushy and trying to get us tourists to buy stuff from them. But the mountain hike was fun.

We started the hike at 6 in the morning, right after the sun came up. From the base to the top was more than 5000 vertical feet so we had to start early. The most common route was to take a cable car up the first 3000 feet and then hike the final stretch but there is also a trail to walk up this stretch and we opted to do that. It wasn't anything like a hike in a US national park. The entire trail on the mountain was paved with stones and phenomenally maintained. In my opinion, it seemed too easy and didn't feel like nature. However, I understand that their goal was to make it super accessible to everyone and indeed plenty of dressed up girls with high heels or flip flops were able to complete the hike. Rachael and I were super over dressed with our hiking boots :P.

Despite the hoards of people, the hike was still fun and was really good exercise. It felt great to get outside for so long. The first part of the hike where we skipped the cable car had very few other hikers which was nice. Although every 50-100 meters all the way up there was a shop selling refreshments. The view was obscured by a dense fog so we didn't get any photos of what would probably have been an incredible mountainous landscape.

After this hike, we took a bus over to Xi'an. Upon arriving it was pouring rain and we had to meet our couchsurfing friend Meng whose place we would stay at. We had a tough time finding each other at the train station but eventually she popped up with a huge smile on her face and led us to a local bus that cost us next to nothing. We took that for 45 minutes, an when w got off she bought some vegetables for dinner. We then took a taxi another 20 minutes to her home on the countryside. We trekked through some slick mud and finally made it into her home. Quite an adventure!

Meng's home was so serene and nice. It had an open courtyard with no roof over it and under an awning her mom prepared us dinner with the vegetables Meng bought. Meng made up our beds and then served us a fantastic dinner with several tasty dishes. Despite how amazing this stay was, it was about 60 minutes from downtown Xi'an and Rachael and Kevin really wanted to spend the next night somewhere closer. I was a bit disappointed, but it worked out ok and Meng found us a room at a cheap but nice Inn that was close to a bunch of stuff.

The next day, we checked into that inn and then went and saw the Terracotta Warriors which is one of China's most popular attractions. It was actually quite impressive and I think it lived up to the hype. After we got back, we went and explored Xi'an's snack street where there was an endless row of restaurants and snack shops. This street was just amazing! It's some of the best night life I've seen of all the places I've been in the world and the food was even better than the atmosphere. It was full of both locals and tourists but mostly just locals. It was loud but not excessively crowded and plenty of groups of happy youngsters had their tables covered with empty beer bottles as they played their Asian drinking games. Because of this street, I wish we had spent more time in Xi'an. Unfortunately, we already had our tickets booked for the following night down to Guilin.

On the following day, we spent a couple hours biking on the old wall around Xi'an. Our guide book had this as one of the best things to do in China and I can see why. The 9km wall surrounded the entire old part of Xi'an and was maintained extremely well. Because there was an entrance fee to go up and bike on it, it was totally empty. We could see the sights of the old town while also seeing the endless line of huge buildings just on the outside of the wall. I couldn't believe how huge this city was and it was truly a sight to see. It felt so much bigger than Chicago.

That night we flew to Guilin. We were just using Guilin as a convenient entry point to get to Yangshuo so our stay there was for less than 24 hours. We met up with a couchsurfer who runs a youth hostel and he gave us a room for no charge. He also spent a good 30-45 minutes talking to us and telling us what there was to do in the area. Liu Tao, this couchsurfer, is an avid rock climber, cyclist and outdoorsman so it was great to hear his advice. After these conversations and a breakfast at a local noodle place that cost $0.60 each, we headed to Yangshuo. We spent a bunch of time in Yangshuo and I only talked about a little of it so I'll write another post about it soon!

First day in Hainan

Today's my birthday and to celebrate, Rachael and I are going to go to a white sand beach and do nothing all day! We're staying at a cheap little place that is off the beaten path that sits right on the beach. I'm posting a photo from bed since I still am laying in it. Although the view is nice, it has AC and WiFi, the beach is not a goof beach for swimming so we'll probably change locations tomorrow. It's the offseason here and one super lavish 5 star place we looked at had it's two cheapest rooms (usually $300 & $450/night) heavily discounted (down to $90 & $115/night). I hope we find some good deals along a better swimming beach!

Photo

Mud cave!

Sorry I still haven't given any updates on last week's adventures and I probably won't for another few days at least, but I wanted to post this photo after a fun afternoon. We took a tour to a mud cave right outside Yangshuo today and it was exactly how it sounded. It was a huge cave that we took a boat into to start. After that, we walked much farther into the cave and wore some cheap helmets because the ceilings were low and we were all constantly bumping our heads. After a while, we arrived at a designated area where we could jump into the super muddy water and splash around for a while!

It was kind of gross and cold at first, but it turned out to be a lot of fun. I really liked floating on the surface because the mud made us so buoyant. Our guide took a photo which we bought and I am attaching a copy of it I took with my iPhone. Fun!

After the mud bath, we bathed in some natural hot springs in the cave which was awesome. The whole adventure was pretty short and lasted less than 3 hours, but was certainly worth the tiny entry fee.

We then came back and had lunch at our favorite restaurant in town for under $2 each. Now we have to figure out a way to get our clothes cleaned up before leaving for Guilin tomorrow! From Guilin, we're catching a flight to Hainan, China's southern island with tons of beaches where we'll spend almost a full week. We're really excited and booked a fairly inexpensive room ($35/night) supposedly on a quiet beach with big windows looking out at the water. Laying around on the fine sand there sounds like a great way to spend my birthday! Rachael and I will probably write more updates after we get settled in and have soaked up the sun for a while. Zaijian!

Photo

The Yangshuo Countryside

It's been many days since I last posted, and have since trekked 6000 feet up Hua Shan mountain, stopped in Xi'an to see the terra-cotta warriors, flew to Guilin where we relaxed a bit, and have spent the last 2.5 days here in Yangshuo. I'll talk about those other places soon, but just wanted to give a brief update on today's awesome journey! I apologize for being brief, but I am typing this from my iPhone (this cheap hostel has wi-fi!).

Today was the first day Rachael and I were able to escape the tourists. We woke up and had a leisurely morning where we dropped off our laundry that really needed to be done and then grabbed breakfast/lunch at a surprisingly not-so-touristy restaurant which is a rarity in this town. We then rented nice mountain bikes for $5 each and started on a long and gorgeous journey.

We biked out of town on the main roads which took us a good 45 minutes. Thankfully, the shoulders here are all very wide and the drivers are incredibly respectful to bicyclists. Drivers often honk their horns just to let you know they're coming and tend to drive as far away from the shoulder as possible, even when there is oncoming traffic.

Once we made it out of town, we veered off onto a smaller one lane road that hugged the less traveled Yulong river. There were still a bunch of tour busses taking travelers to their resorts along the river, so the first 30 minutes weren't that much fun. However, the traffic died down and the scenery became incredible. We were surrounded by mountains on both sides, biking along a slow moving winding river that was surrounded by rice paddies. I really enjoy countrysides and seeing these farming communities, so this was incredible.

We often veered away from the main road to get some more peace and quiet and see the countryside better. The people in the villages were really friendly, and we often had brief exchanges where we'd try to speak Mandarin and they'd try to speak English. At best, we learned each others names and figured how far away we were from things. One of my favorite parts was when Rachael thought we should turn one way when actually it led to a dead end at the river. When we began going that way I could see a Chinese man looking at us with an expression of 'why are those white people going that way?'. After a few minutes we reached a very remote stretch of river where a woman was preparing some vegetables. No one else was within shouting distance. The river was really pretty, so we hung out in the shade for a few minutes and laughed with the other woman who was really happy and trying to tell us stuff we couldn't really understand.

After continuing up the river a long ways, we reached a place where there was a bridge with people jumping off it into the water. A bunch of tourists also made it out here because there was a direct road from town, and everyone was swimming. Rachael and I grabbed some ice cream and put our feet in while watching tons of Chinese men in tighty whiteys jump off the bridge. We then crossed the bridge and followed a much more remote path along the river and through a series of small farming communities. There were no other tourists here, which helped add to it's beauty. It was a tougher bike ride since we were often riding on one food wide dirt paths that were wining between rice paddies, and we had to walk our bikes for a few minutes because I wad afraid of falling off the elevated path and into one of the paddies. When a local 12 year old boy on a giant bike came by riding through this like a pro, we of course hopped back on ours and became a bit braver. We ran into 2 local women going the same way as us and they helped lead us to the dragon bridge (our final destination) and kept us from getting lost. We actually passed the bridge and one of them came flying down the path after us yelling to us that we passed it! The stretch of the bike ride on this side of the river took about an hour, but would have taken much longer if she hadn't helped us!

After this really long ride, we decided to take a direct route back to town. We rode on the shoulder of a highway (again with huge shoulders and courteous drivers) and returned our bikes an hour later.

Today was incredibly fun and refreshing because we were able to escape the hoards of tourists as well as the ever-present crowds and traffic of Chinese cities. The Yangshuo countryside is incredibly beautiful and the karst mountain landscape is just as nice as it looks in the photos.

We're in China!

Rachael and I arrived in China about 3 days ago and the time has flown so far. We've both been really jet lagged, and have probably been trying to pack too many things into too little time to start this trip. However, we've already done some very fun things and have a lot more to look forward to!
 
We started in Beijing for just a day where my dad's friend Ying and her daughter Yuan met us and treated us to a fantastic feast. We had Peking duck that first night, they gave us a driving tour of Beijing, and we walked through a park until Rachael and I were falling asleep. We stayed in a super nice hotel, and then walked around that area the next morning where Rachael and I tried mystery food from a bunch of different street vendors. All of it was delicious, by the way. Ying and Yuan took us out to lunch where we had a fancy meal of authentic Beijing food. The restaurant we went to was famous for its cow stomache, but Rachael was definitely not a fan. Ying and Yuan were extremely gracious hosts, and helped us out with tons of stuff including buying us a sim card and our train tickets to Luoyang.
 
On Thursday we spent 8 hours in the train to Luoyang and enjoyed a nice nap in our sleeper car, further prolonging our jetlag. We then stayed at a hostel that a couchsurfer recommended. That night we went out and ate a bunch more food from street vendors in a lively area that stayed up well into the night. It was really fun to be in Luoyang because it is clearly a city without much tourism.
 
Yesterday we met up with Kevin and went to a place just outside Luoyang called the Longmen grottoes where there a bunch of giant Buddhist statues carved into the rocks. What was really fun about this adventure was that a couple of 10 year old kids came up to us to practice their English. Soon after, a Chinese college student named Cassie also started talking to us, and from that point these three were our English speaking tour guides for the grottoes. Cassie then took us around to neighboring places where we saw a really old temple, ate a nice lunch, and then walked around a park in Luoyang. She then had to go home, but not before recommending Luoyang's most popular restaurant to us for dinner. After she took us there, we met up with our couch surfing friend who goes by the name Lovelush and he was a blast. He read us the entire menu like a story book, explaining every dish and even describing how some of them are cooked. He was extremely enthusiastic about everything and was a ton of fun to be around. After our 3 hours at the restaurant, he took us to a massage parlor that he said he visits every day. We got some inexpensive massages and then called it a day. Lovelush was the first couchsurfer that we met, and so far we're really glad we joined that community!
 
Today we took a train from Luoyang to Hua Shan because we are going to hike up a mountain here. We arrived at about 2pm, but Kevin was pretty exhausted from trying to bargain prices and make sure we did not get ripped off. One taxi driver was clearly breaking our agreement with him to try and squeeze 10 extra yuan out of us and by refusing to pay him that, we wasted at least an hour and added a lot of stress to our journey. Personally, I would rather get ripped off $0.50 each to save that time, energy, and headache, but I can see where Kevin is coming from in terms of principles. Anyway, we arrived here a bit tired and frustrated, and largely because of this we decided to book a room at a hostel and just hike the mountain tomorrow instead of today. So tomorrow we're going to wake up really early, climb to the top for about 6 hours, and then decide if we want to hike back down or just take the cable car down. We'll then move onto Xi'an tomorrow night where we'll meet up with our second couch surfing friend!
 
It's nice to be on this vacation right now, but it feels really weird not working. The week before I left, I was getting 4 hours of sleep a night, finalizing my thesis/research, preparing for & helping run the Wisconsin Swiss Ultimate tournament, finishing up some things with EWB, preparing to move, and preparing for this trip. So now I feel really lazy. I'm sure this will be just like the Kenya trips where it just takes me a few days to get into the mindset of moving slowly and not worrying about anything. Once I get to that point, I know this trip will be very theraputic, and will be a great transition between finishing grad school and starting up a business in August.
 
I'm a bit tired and thus didn't go into many details, but Rachael is currently writing a much longer email to friends & family that I might post to this blog as well. She doesn't feel very comfortable with the world seeing all her thoughts, so it might not happen. Regardless, I'll be sure to write a lot more as the trip progresses.
 
Lastly, I should note that Twitter and Facebook are blocked here, along with a bunch of other services I usually use like Google Docs and Posterous. Thus, these blog posts will likely be my only media outlet over the next month. I can't see posterous right now so I can't tell if comments are enabled. If they are, your comments show up in my email, but if they aren't you'll have to email me to get ahold of me. I hope everything is going well for you all in the U.S.!
 
-Mark