Oh lazy weekend

Alas, I’ve done none of what I had planned to do this weekend… But it was a good one 🙂

I did complete a Product Owner training class last week, which was more interesting and informative than anticipated. That said, I’ll attribute the doing of nothingness this weekend as needed recuperation for the 2 1/2 hours it took to drive 45 miles back to the city Friday evening.

Saw Zero Dark Thirty with Rolf and Karthik. It was really awesome. And this is coming from someone who can’t stomach violence in movies.

Remember, tomorrow is another day.

Checking in on Cordova

I’ve made a little progress on Cordova.

I’m also hanging out with Rolf and Roger at Imagechef, and working to add some chat features to the mobile web version of TuneTug, http://tunetug.com. I will post more when we are able to push to production. And then there’s that class I want to take Thursday/Friday, but it’s in Santa Clara, and I don’t want to drive down there.

Gee, life is sure tough being unemployed.

Well, I’m anxious to get back to Cordova. I’d like to finish the happy path for user, and test with client-side AJAX requests to a live Google API feed. I think this weekend may be ambitious, so will aim for mid-next week. Afterwards, will need to work on server-side response and connect it all together. Then make it bidirectional. Should be fun… Will put you on hold for now, Cordova.

Eating my words

I should know better than to claim that anything is easy, let alone super-easy.

But it was easy to get Cordova up and running. Cut/paste the full example from the camera API, and voila! You have ios and android native camera apps in 10 minutes flat.

So the real work begins, and I’m trying to create pages each invoking separate device features. For my dev environment, I’d like to bypass IDEs in favor of using an editor and command line. If Eclipse is needed in order to debug android code, Cordova loses 90% of its value. Then I’d need to hire someone who has some understanding of Android programming to do this stuff. The idea was for anyone with HTML and javascript knowledge be able to design native phone apps, and the best way to debug HTML and js is through a browser.

Well, I was trying to do just that with the Cordova serve android command, but it turns out I’ve had to fire up Eclipse anyways. Now I’m scratching my head wondering why Activity classes aren’t used, and if they’re not used, how does Cordova do it? I think I need to revert back to the helloworld example…

Anyways, Cordova is not trivial.

Cordova is super easy

From here on out, I’m referring to PhoneGap as Cordova, which I’m using to build my idea.

Firstly, ignore the documentation out there, which I’ve found either outdated or misleading… At least the setup for Cordova 2.2.0 and some of the development process deficiencies I blogged about before have already been addressed.

If you are using OS X, just follow these simple commands which installs Cordova, and creates project directories for ios and android, builds all, and launches both ios simulator and android vdm.

# Download the Android SDK https://developer.android.com/sdk/index.html 
# Unpack and place into ~/.devlib

# Install Node
brew install node
brew install ios-sim

# Install cordova
npm -g install cordova

# Set Path in .bash_profile
export PATH=${PATH}:~/.devlib/adt-bundle-mac-x86_64/sdk/platform-tools:~/.devlib/adt-bundle-mac-x86_64/sdk/tools
export PATH=${PATH}:/usr/local/share/npm/bin

# Create a project
cordova create <projectname> <projectname>
cd <projectname>
cordova platform add iOS android

# Check it in
git init .

# Build the package and run the simulators
cordova build
cordova emulate

Thanks to my dear brother, Dave, for setting me straight 🙂

From here, you can look at the Cordova API docs to install device features. I’ll blog more on how this is going for me.

Sencha, PhoneGap, or TriggerIO

There’s a lot of content out there, and another framework at every turn. I feel constantly directed toward different products… use jQuery Mobile instead of Sencha, Trigger.io instead of PhoneGap… (not to mention server side) node instead of ruby. And then there’s express, meteor, firebase, and derby.

Needless to say, my attention is a little scattered. So rather than diving in and building a demo today, I read up on various cross-platform mobile frameworks and what advantages one has over the other. And honestly, they all look pretty good.

Found this article which gives an awesome summary of various development technologies and approaches. http://trigger.io/cross-platform-application-development-blog/2012/05/21/making-sense-of-mobile-development-platforms

It is a little biased.

The article addresses all those issues I had with installing PhoneGap yesterday, and explains how certain hybrid frameworks combines HTML5 and native environments, but complicates the development process. Put simply:

Sencha Touch – Pros/Cons
1) Super easy to build cross-platform.
2) It’s geared more toward mobile web look & feel.
3) Limited native device capabilities.
4) It’s free.
5) Lot’s of docs.

PhoneGap (with jQuery Mobile for UI) – Pros/Cons
1) Awesome native api’s – for accelerometers, location, calendar…
2) Different code base for each device – This becomes a problem not just in development time, but isolation of bugs and testing.
3) Builds for each native app separately – This means a lot of manual processes.
4) It’s free.

Adobe addresses and monetizes the two PhoneGap shortcomings with a their PhoneGap Build product. Developers upload source code into the cloud to generate native apps.

Trigger triumphs Adobe by providing 4 simple commands to create app, build native, launch simulator, and package the mobile web app. They also offer a stand-alone build, which I like. Their pricing model does seem a bit scary, if you’re a small shop who’s making a lot of updates and scaling quickly.

Honestly, I’d like to try Trigger for this project I’m thinking of, but don’t want to pay money to generate a proof of concept. As a disclaimer, I’m not affiliated with Trigger in any way. It’s only a gut feeling that if I were a developer (which I’m not BTW), based solely on ease of process, and not looking into performance, pricing, or extensibility, I would be inclined to use their toolkit for cross-platform mobile development.

Tomorrow, I’ll try to make a decision on which technology to use client-side for my little POC.

Memoirs (Southeast Asia)

’tis a shame that I did not make the effort of keeping a journal on my trip to Asia. I salvaged a few pieces of email which were somehow not lost, and look back in utter joy and amusement at that time of adventure and uncertainty. Here are just a few articles to share, piecemealed from letters to family and loved ones.

3/28/2002 – Bangkok
immediately leaving the states in a state of relief and exhaustion, arrived at bangkok, and went directly to Khao San road area as outline in the guidebook. little did i realize the area was utter western chaos, full of tourists and travellers alike. bars, loud music, volleyball in the streets.. it was akin to going to palm beach for spring break. thank goodness to have received an email from Aw, a friend of Bryan, whom i just barely met before leaving the states. the next day, Aw showed me around town to all the places locals would go (climbing gym, local market, river ferry, local bus routes). we went climbing the day after about two hours south of bangkok. met Thomas and Michael, very strong climbers and good people. the Thai people are so warm and generous, i can’t imagine anyone doing so much for a complete stranger. must remember to take them out to a nice dinner before leaving bangkok.

4/01/2002 – 4/05/2002 – Ankor Wat
arrived in siem reap nearly 9pm, Cambodia after a gruelling shuttle ride on the bumpiest dirt roads you’ve ever seen. of course, it would have been sooner, if we did not stop five times on the way over at an hour each stop.. but that was part of the scam for us to stay in their guesthouse about 1km outside of siem reap itself. we (Rebecca and Grant, austrialian couple from Melbourne, and myself) left the guest house after much commotion and stayed at the Ivy, a laid back place run by an english guy.

two days of ankor wat was enough, the second day was much more magical. sunrise at ankor at 6:30 in the morning. smaller but more beautiful, and definitely less touristed temples were key. it didn’t stop us from being lynched by the swam of beggers (amputees without legs, arms, hands, burn victims), and kids and adults alike, trying to make a buck. you could not be alone for more than 3 seconds, before being pounced by what seemed like vultures. did have fun with a group of kids, after they stopped trying to sell things to me, they just wanted to play and have fun. they braided my hair and placed baby powder all over my face, neck, and arms (in celebration of the new years, mid April). there were maybe about twenty kids in total, and they seem so needful of affection, they were hugging me and climbing into my lap. at one point, they place a naked baby in my lap. at first he was facing away from me, but when he turned around, one would believe that he saw a ghost. his eyes went wide open, his mouth opened as if he was about to scream.. although no noise came out. poor kid. eventually, he settled down, but did feel quite bad for him.

left siem reap after four nights, three full days. Rebecca and Grant headed back to bangkok to catch a trip into Laos. i continued onward to Phnom Penh by ferry.

4/06/2002 – 4/09/2002 – Phnom Pehn
arrived in Phnom Penh via ferry with two French travellers, Gilles and Sokora (native Cambodia getting in touch with her roots). spent one night with them and then hooked up with two hillariously wonderful people i ran into at a temple at Siem Reap, funny that we keep running into the same people, Donnie and Milfred. Donnie is an Irish born Austrialian (lots of Austrialians in Cambodia)… very smart, inquistive and open-minded, always questioning issues… who works as a miner and also carpenter. Milfred is a crazy, and i mean crazy, German guy who’s making it big in the gem smuggling business. he’s been everywhere (to India seven times, and always has a unique and hillarious story to tell. one of his stories goes as such… Milfred was travelling throughout india on business a while back, flying india airlines. well, in india people drive cars and motos only looking ahead, never behind. so if you have to make a right, you go right. everyone behind you have to go around appropriately. sounds crazy but it works. while Milfred is walking toward the plane, the pilot starts his turbines without looking behind him. Milfred is now flying through the air, and hits the wheels of the plane. some guy, hanging onto the wheel, grabs Milfred, and they are both flying horizontal, trying not to get blown away like the others. afterwards, he wakes up, is given some pain killers, an apology… sorry for the inconvience.. and a free voucher to fly anywhere in India for the month. needless to say, nothing was broken, but his entire right was black and blue, and he spent three days in the hospital back in Germany). together, it was great travelling with this dynamic dual, aside from the constant US bashing, but who else deserves to be bashed?
in Phnom Penh, saw the grand palace, the killing fields, and the tuol sleng war memorial… i don’t think any image could be more grim and terrifying. it makes the anne frank house look like a fun park.

left for sihoukville with my fellow travellers.

4/09/2002 – 4/12/2002 – Sihoukville
we arrived at the not so charming beachside resort town of Sihoukville, overall it was stereotypical cambodia. the white sandy beachs were gorgeous, but i suppose what bothered me about this place were the number of old, crustly white guys (predominately americans) who were accompanied by beautiful cambodian women. i don’t think any one of them were over the age of 20. it was disheartening to see.

still had the best time renting a moto bike and taking it off road. met up with an israeli and two british guys whom i can’t remember, but they were extremely good company. took the bike around some of the most difficult terrain and over startiling shaky bridges to a fishing town about 1 1/2 hours north of Sihoukville. everyone was really friendly, saying hi and not trying the usual selling of tourist items.

funny incidences with the beggars. we had one who we gave money to the first night, and we ran into him at various restuarants, at the beach across town several times and perhaps other places. each time we point out that we gave him money before, and his reply was ‘oh, thank you’ and leaves. it was becoming quite a joke, and i believe he thought it was funny as well..

we left Cambodia through the ferry to koh khong, where there’s a bridge into Thailand.

4/12/2002 – Koh Chang, Trat
worth noting so that i can bug him about this later… so while travelling through Cambodia, i ended up sharing a room with Donnie to save costs. thankfully there was no inkling of attraction from either of us, otherwise we wouldn’t have done it… it was interesting conversations before retiring to bed. in Trat, we had to share a common bed, which i don’t think either of us were entirely happy, but what choice do you have if there’s only one bed left. it was just one night… so we went to sleep. in the middle of the night, i feel a kick on my back. then another one. okay, okay. i turn around, and Donnie is kicking into the air as if he’s being attacked. his body is crunched up and his feet are near my shoulders. i think i scared him. but boy am i glad i felt a kick as opposed to a grope. good guy, that Donnie.

we (Milfred, Donnie and myself) went to Koh Chang the next morning. beautiful beaches (a bit pricey and over touristed). i stayed an extra day to scuba dive, but the others parted and it was a sweet but sad end of our travels together.

4/13/2002 – 4/18/2002 – Krabi, Tong Sai beach
met Aw in bangkok, and we took the overnight VIP bus down to Krabi (wonderful asian market there) for the new years (songkram) celebration. from there we met Ong, a wonderful guy. he’s the same age as Dave, and very well adjusted and quite mature for his age. i liked him immediately… together we journeyed to Tong Sai beach for some super rock climbing. it was a climber’s paradise… the rock is gorgeous and filled with definition nice large pockets, and strangely elegant stalagmite (still under formation). felt like a baby in a candy store. there’s was so much to try and to learn.

so, met with Aw’s friends… Thomas (from the second day at bangkok), Chai (42yr old ladies’ man), someone else (quiet guy), and Simon (british guy who’s been teaching in bangkok for the past five years). i felt attraction for Simon the instant i saw him, and then found him to be a hilariously funny, super nice, very generous guy… so i’ve really fallen for him. i think i’ll stop on this note.

4/21/2002 – Sipsongpanna, Pai
upon Simon’s recommendation, stayed at Sipsongpanna [12,000 rice paddies], a wonderful guest house in the country side about 2km north of Pai town center. slept in a beautiful bamboo bungalow adjacent to a small stream frequently traversed by herders sheparding their water buffalo, overlooking field after field of budding rice paddies.

on the second day at Pai, went into town and rented a bicycle, and just as i was signing the rental agreement, a group of guys rode by and i ended up riding with them outside of town. they were good company. had great time hanging out, and having dinner and playing cards. the next thing you know, it’s 2:00 in the morning. i left their guesthouse at town center shortly after 2, and this is when things started going downhill. got as far as block before getting a flat, and so was pedalling hard but not very quickly. that was when dogs began gathering in the street… the thing about dogs in asia, while they’re well behaved angels during the day, they transform to mean, vicious vixens at night,.. getting quite nervous now. about 1km along, two of them came after me. one of them pounced and hit the bike. i was going to get lynched,… don’t think i’ve ever booked so hard in my life. well, somehow i lost those two, but could not ride any further. i pushed the bike past two more growling dogs and realized that there was another group in front, as well as behind… just couldn’t bring myself to continue.

by now, it’s 2:30. i’m sitting by the side of the road, flagging for cars to stop and hopefully give me a ride. 3:00am… a truck stops, there’s two guys inside and they seem okay with giving me a ride. i’m estatic to be saved. so i ditch the bike and get into the truck, sitting right between the driver and his partner, and the next thing you know, the driver’s hand is in my lap, and we’re leaving Pai. i keep motioning go back, go back. sobbing now. the truck stops. there are barking dogs outside, rabid dogs… hmm, the better alternative. i jump out of the truck. now we’re a good 3km outside of town.

surprisingly, they’re concerned for my safety. the passenger walks outside with me and the truck follows. we get back to where the bicycle is stored by the side of the road. i thank the driver. he points to his lips and puckers up, and making smooching noises. immediately, i pull out my wallet and offer to pay him, but he rejects the money, good man? his partner gestures he’ll walk me back to the guest house. during the whole trip back, he motions to me and then to himself and implying that he’ll sleep with me in my room when we get back. 4:00 finally we make it to Sipsongpanna, and i tell him to sleep elsewhere, offered him all the money in my wallet of which he only accepted 100 baht and left. i pushed my bike in front of another bunglow, and hid in the common bathroom till nearly sunrise.

travel learnings 101,… don’t venture out after dusk. and don’t climb into a truck with strange men.

About this time, I had a little summer romance, and stopped keeping a journal, so the only records I have are in letters written to my lover whilst I was travelling alone throughout Asia. More travel stories to come.