Calazan.com
Share the Knowledge-
Getting work done in Chiang Mai, Thailand
Posted on May 20th, 2013 No commentsI spent 2 months in Chiang Mai this year, making this city the most I’ve ever spent time in during my round-the-world trip. I wanted to stay put in one place for a while and get some work done and Chiang Mai seemed like a great place to do it.
It’s a very popular place for digital nomads working on projects for the following reasons:
- low cost of living
- more relaxed atmosphere compared to Bangkok (less distractions)
- tons of cafes to work in with free Wi-Fi (a few have a 20Mpbs download speed)
- great food and plenty of options
- cooler climate (except March-April when it gets very hot during the day, but usually much cooler at night)
I usually only work about 3-4 hours a day, 5-6 days a week. What I consider work is producing something: whether updating my website, writing, or coding.
Typical Day
1. Wake up between 12-2pm (yes, I know it’s very late but it’s what works best for me).
2. Take a shower and have a quick breakfast/lunch at 7-Eleven, I usually just get a sandwich.
3. Go to one of the many cafes and work for 3-4 hours.
4. Head back to my apartment, read the news on my computer or anything that I find interesting.
5. Go to the market across the street and buy some cheap food from the food stalls and go back to my apartment again to eat.
6. Take a walk as it’s much cooler at night. On Fridays I usually go to a CouchSurfing event to meet other travelers and have a few drinks. Might go to a club afterwards.
7. If I go out I usually come back very late, like 3 or 4am. If not, I may watch some TV or do some more reading on the computer.
8. Sleep for 8-10 hours.
Getting Connected
For most digital nomads, a decent Internet connection is a must as many of us rely on it to do our work. Wi-Fi can be found in many places but it’s also nice to get a 3G/EDGE data connection for your mobile device as a backup (no extra charge to use tethering).
For me, I subscribed to AIS unlimited Wi-Fi for 100 baht/month. This allows me to use 3BB and AIS Wi-Fi hotspots which can be picked up in many places. I was able to pick up the signal from my apartment, so it saved me the extra 500 baht/month Wi-Fi fee that my apartment offers.
I subscribed for 100 hours of 3G/EDGE data for 300 baht/month (which I later reduced to just 20 hours for 100 baht).
Where to Work
Coworking Space
When I arrived in Chiang Mai in March, there was a co-working space about 15-20 minute walk from my apartment called PunSpace that just opened up. It’s owned by a nice Thai couple and it was free for the entire month. I would normally go there 2-3 times a week as they have a really nice, modern setup. They have a 20Mbps connection, free water, microwave, toilet with showers, lockers, and a coffee machine. They also have offices and a meeting room and I believe if you subscribe monthly you can get 24/7 access to the facility.
It’s a good place to meet other digital nomads as well, mostly westerners. Tech meetups are also sometimes held here.
I stopped going, however, after the free month. The main reason was the price, which at the time was around 180 baht ($6). To me it’s worth the price if I work there all day, but since I only work 3-4 hours a day working at a café was the better option for me. A coffee/tea would normally run between 50-70 baht and sometimes I would go to 2 cafes and it still turns out to be cheaper.
Cafes
I stayed near the Nimman area where a lot of different coffee shops can be found. My favorite ones were Marble Arch (very fast Internet, around 20Mbps downstream, popular with university students), Wawee Coffee at the Nimman Promenade (only 1-hour free Wi-Fi for every drink purchased but since I can pick up a 3BB Wi-Fi signal here I didn’t have to keep buying a drink every hour), and Doi Tung III (much smaller but comfy seats and friendly staff). I usually try to avoid Starbucks as their prices are much higher and they don’t offer free Wi-Fi, but the one in the Nimman area has a nice setup and I’ve worked there a few times.
Most of the cafes also play some nice, relaxing music in the background which I really liked.
In My Apartment
During my apartment search, one of my criteria is an apartment that I could work in. I sometimes do some extra work at night before I go to bed, so I made sure the apartment I picked at least has a chair and a work desk.
I actually got quite a bit done during those 2 months. I really got back into programming mode, helping a friend of mine with a web application. It actually felt great building stuff again.
Lots of construction going on when I was there, mostly condominiums/apartments, so it looks like a lot of people are moving here. Hopefully, the cost of living doesn’t go up too much because of this as I plan to return here in the future to do some more work.
-
Celebrating Songkran 2013 in Chiang Mai, Thailand
Posted on April 19th, 2013 No commentsI came to Chiang Mai without even knowing about this festival called “Songkran.” Songkran is basically Thailand’s New Year’s Day celebration (except it’s 3 days long), and probably the biggest and most famous festival in the country.
It’s officially celebrated on April 13-15, but you can see people celebrating it a day early. You celebrate this festival by throwing water at each other while drinking and partying. From what I’ve heard, Chiang Mai is the place to be in Thailand for Songkran. People from all over Thailand come here to celebrate Songkran every year.
April is also the hottest time of the year in Thailand, making it a perfect time for water fights. Chiang Mai has a moat surrounding the downtown area, making that section of the city an ideal place for celebration as water is easily accessible (it looks dirty but it’s actually not bad).I met up with a few CouchSurfers at 11am the first day of celebration and walked around the city together, having water fights with anyone we could find along the way. Most Thais were actually very polite with the water splashing, except for the kids of course. Most don’t aim for the face and they don’t throw the water too hard. Some would actually just come up close to you to pour water.
-
How to submit a form in a POST request using JavaScript
Posted on April 16th, 2013 No commentsI was working on a Django project a couple of days ago where I needed to use JavaScript to submit a form in a POST request. The response of this request is a PDF file generated with ReportLab. I wanted the browser to prompt the user to download the file or open it in the browser in another window.
I was trying to do this with AJAX at first, but apparently you’re not really supposed to do downloads within an AJAX call (I’m a complete JavaScript newbie). It would return the actual content of the file as if you opened it with a text editor. I’ve found ‘tricks’ online to make the browser open the file in the proper format, like this example below:
generateReportPdf: function(url) { var exportForm = $('form#export-form'); $.ajax({ url: url, type: 'POST', data: exportForm.serialize(), success: function(data) { window.open('data:application/pdf,' + escape(data)); } }); }But this won’t work with all browsers. It works with Firefox but probably won’t work with Internet Explorer, so this is not really a good solution.
I ended up just having to do a regular form submission instead. I found this example below on StackOverflow and works quite well:
function post_to_url(path, params, method) { method = method || 'POST'; var form = document.createElement('form'); // Move the submit function to another variable // so that it doesn't get overwritten. form._submit_function_ = form.submit; form.setAttribute('method', method); form.setAttribute('action', path); form.setAttribute('target', '_blank'); for(var key in params) { var hiddenField = document.createElement('input'); hiddenField.setAttribute('type', 'hidden'); hiddenField.setAttribute('name', key); hiddenField.setAttribute('value', params[key]); form.appendChild(hiddenField); } document.body.appendChild(form); form._submit_function_(); // Call the renamed function. }



Recent Comments