Tuesday, July 17, 2012

RMIT Career Week 2012 - IT & Entrepreneur

Below are the slide and text of the presentation about IT and Entrepreneur I delivered during the Career Week of RMIT 2012. Enjoy.




Who I am and why I am qualified to talk about entrepreneurship.

First and foremost, I am an RMIT alumnus. During the time at RMIT, I founded of the IT Club. Together with my team, we were building a platform to facilitate professional and personal development of our fellow students. I am also among the first organizers of MultiUni, an NPO aiming at turning the community into a university with high quality and free courses. In 2010, I was the first IT student of RMIT Vietnam to have his internship overseas. Being the first had some problems with it, but the experience and knowledge I gained was a blast. Every hardship and difficulties was worth it. Back to Vietnam, at the age of 21, I established Cogini Vietnam, the main R&D center of the company in Asia. I have experienced different working environment, namely Taiwan, Singapore and Dung Quat industrial zone. I have got precious opportunities of working with gifted entrepreneurs from all over the world and contributes an essential part to their successful startups. 

It is quite obvious that my profile is no where as profound as any of the professors you are having and my achievement in the industry is minuscular. But I enjoy what I have been through in the world of entrepreneurship and I believe that "Finding joy in the journey is more important that reaching your destination". I hope my experience will be entertaining.


Who is an entrepreneur?

Now we are here, talking about IT and Entrepreneur, but what does it actually means by "entrepreneurship", how to be classified as an "entrepreneur"? The definitions on the internet are countless.

Some are funny.
"My son is now an 'entrepreneur'. That's what you're called when you don't have a job." - Ted Turner

Some are inspiring.
"The entrepreneur always searches for change, responds to it, and exploits it as an opportunity." - Peter Drucker

And this is my favorite
"Be nice to nerds. Chances are you'll end up working for one." - Bill Gates

Before we proceed, lets try to agree upon what "entrepreneur" we are talking about. Later in life, each of us will develop a different definition of entrepreneur. But only for today, lets try to reach an agreement. Although the word entrepreneur and the meaning it conveys are very motivating and inspiring, I believe it is the most overused and misused word in this century. When I was a kid, I never heard of such word. The closest synonyms that I could possibly find are "businessman", "businesswoman". But nowadays, you have a side project, your are so entrepreneurial; you open a shop, you must be a entrepreneur then. 

There are many creative creators out there. In the tech world, they are usually hackers who create applications with little or no idea how will they make money from that. They don't even need that. They do it just because it is satisfying for them to do so. And there are small business owner, too. There is a high risk in running a business, but that doesn't necessarily require any brilliant ideas nor create any new value for the world. An entrepreneur, in my opinion, is one with great idea and know how to turn that into a business with thorough vision, foresight and understanding of the market. The entrepreneur is a visionary executor. The creator and business people are necessary support, but not required. Based on that definition, further down the talk I will be focusing on realizing the vision, rather than how to create a product or how to run a business.


What does it takes to be an entrepreneur?

Even though market factors can affect the success and the scope of your business, they have little to do with entrepreneurial spirit. Some tend to complain a whole lot about it, that the local users are so conservative, that the lack of infrastructure prevents the business growth or most frequently the market is not ready for this idea. Well, bullshit. Vietname actually has a very strong potential for ICT development. The country is one of the countries with highest number of mobile and Internet users. The population is young and adopt quickly to new products, just look at how they pick up Facebook and groupon. And did you know that Vietnamese users are the most skillful one when it comes to DNS config? And if that is not convincing enough, there is always the rest of the world. I agree that there are a lot to do with the infrastructure of the country, but that should be considered an opportunity, not a barrier. Clickmedix is one of our joint product. Clickmedix is a healthcare service for rural areas. It in fact applies the advantages of technologies to overcome the lack of infrastructure in rural areas all over the world, to bring modern healthcare to more patients. Last week, Clickmedix won the Recommendation Award from World Bank.

Now that we have excluded most negative external factors, what does it take to be an entrepreneur? I think the two most dominants one are an idea and some love.

An idea that is suitable for a startup is one that tackles an existing yet-not-satisfied need of users and provide it elegantly and profitably. 

When I was a kid, everything that I needed was provided, I didn't have to go seeking for it. So I used to think of a good idea as something very rare, hard to perceived, "beyond the reach". But the more I experienced, the more I realized how wrong I was. The needs of human beings turn out to be quite basic: get stuff done, make them laugh, stay connected, fill downtime, etc… 

The initial idea for your business should be big and bold. Be expansive in how you think about its features, the target users, the opportunities to set it apart from the rest. Let crazy ideas roll. Fill the drawing board with your wildest ideas. Don't set any constraint or limit on you, other people will do that for you, there is no point of doing so for yourself.

However, no matter how good an idea is, it cannot be a cow cash. Why? It is just a thought, it is valueless. To realize an idea, you need to build a product. And it is the time you need to kill your darlings, your wild and beloved ideas. I call it "survival of the fittest". You are not just building a product, you need to build a good one that people will know about it, use it and even better, recommend it to others; and build it fast. Hence, there is no room for nice-to-have features. Every feature surviving the slaughter must be a must-have one. 


Eventually that leads you to a bigger picture. You need a business model. Anyone here can tell me what is a business model? In short, a business model defines the way you operate your business. But I have this brilliant idea, it is all in my mind, I don't need this form of "documentation". Documentation sucks, lets just roll it out. That was exactly what did I think whenever I wrote a proposal. But listen, you can't run a business all alone, you need a means of communication that you can share and inspire others. Furthermore, entrepreneurs are typically hopelessly optimistic. They tend to underestimate the complication of little details. There might be a hidden risk some where in the plan, writing it down, think about it while you are writing, is the first round of fail filtering.

I usually refer to "the canvas" from Business Model Generation as a standard form of business model. It is illustrative, detail enough to understand the business yet general enough to leave room for idea to flower. And believe me, many investors love it too.

The second factor that matters on the path of an entrepreneur is love. 

Or to put it more accurately, love, fear and the dots of life. Let me tell you my journey. My adventure started from the day I entered RMIT, became a part of its young and talented students, like all of you down there. Here, right in the campus, I met amazing people, friends of my life. One of them, I can never forget. He is Le Ba Huy. Huy came from Silicon Valley, the heart of the IT world. I was blessed to have Huy be my lecturer in my very first semester. Huy was a very inspiring lecturer, his lectures were filled with excitement and brilliant ideas. He then was my first employer, mentor and friend. 

Under Huy's guidance, I proceeded to teach myself iOS programming. The topic was smoking hot as the app store first came out. Developers were provided a whole new era to explore, the post-PC era. There was not lot of resources back in the day, the sample code from Apple was barely enough for Hello World programs. To improve our competencies, we started to pick up freelance projects and initialize in-house projects. Balancing 4 courses at school and intensive iOS programming was hard. But sweet Jesus, those days were so exciting, inspiring and wild. Pizza & coke in the room, computers on 24/7 and hands moving non-stop on keyboard, we discussed, we hacked, we created products that never existed before, felt like we were having the world in our hands. Those days was incredible.

And I thought that that was it, my hands were full and I couldn't take anything else. But no. In the world on entrepreneurs, good enough is never enough. We decided to share our knowledge, meet more amazing people out there. We organized MultiUni, a innovative form of university, driven by the community. I went panic with all of my group assignments, almost failed an elective course, but screw that, during one year, I had met more awesome people than I ever had in my life.

After the success of MultiUni, I was convinced that there were always room for improvement in conventional education system. The need of IT students to have a more active learning environment besides the classes was undeniable. Therefore we established the IT club, promoting an active student-centered learning environment.

Besides iOS, I had no hope for a practical application in my life from doing these thing. I did them because they were fun. And I love it, I am satisfied just by doing what I love. But gradually, in my life, somehow, all the dots are ultimately connected together. Working in the IT club gave me chances to meet various professors in my program. Fortunately, one of the professors acknowledged my ability and arrange me an internship overseas. That was a amazing.

Back to Vietnam, I established Cogini Vietnam. It was challenging, given that my major has always been software engineering. But the experience and relationship I developed during the time at MultiUni and IT Club was the real deal. Guess what, the first four staff of Cogini Vietnam, including me, were the management board of the IT Club. Running a company has lot of pressure, it is real money and business we are handling there, not assignments. But in the nutshell, I found that it is similar to running the club back there. How fortunate.

None of these I would have achieved if I wasn't given the opportunity to do what I love. How important it is to do what you love? Once you set you footstep in the software industry, you would have recognized that you have to keep learning new thing everyday, at school, at home, after graduation, just to keep on pace with the rest of the world. The moment you stop learning new thing, is the moment you are left behind. To work sustainably, you need to work 40 hours a week and enjoy your life. I think it is the biggest lie among the entrepreneurs that I have ever heard. The entrepreneurs that I work with, they don't sleep. Because if there is anything for those who wait, that must be what left behind by those who hustle. And where is all this energy comes from. Little money, glory, fame, what are you doing, you are doing that for your love itself, for the challenge, for the thrill of discovery.

How to find what do you love? I don't know, I am not you. But if you don't know what you love (except the money and fame) you are probably thinking of entrepreneurship like a fashion trend, not an achievement in your life. But I never found anyone succeed doing entrepreneur half-hearted. You have to put your heart into this. If you haven't got the answer, perhaps it is not the right time for you to start up yet.

Whatever you are doing. Failure is an option, but fear is not. No innovation in life has been achieved without risk, you have to be willingly to take those risks. Many people hesitate to work on something they aren’t familiar with because they are afraid of the unknown. But just do it. Explore new ideas. Experiment with new things. If you are successful, the reward could be huge. Even if you aren’t, you will still come out better than before.


What does it take to execute your ideas. 

It is said that idea is cheap, what is important is the execution. I do not entirely agree with the statement. But it is true that not all entrepreneurs succeed in implementing their ideas. And it is how you operate the business that makes the difference. Any startups have to deal with issues that I found suitable to be grouped into these 4 groups.
  • The Product
  • The Team
  • Financial Issues
  • Legal Issues

I covered pretty much all about the product previously so I won't repeat myself here. But did you know that many startups get acquired or receive invest because of its awesome team rather than the idea? 

I would like to divide a team into two parts: the founders and the members. Founders are one who join the startup from the very first day and own a part of it. Choose a founder as wisely and carefully as choosing your life partner. A good founder is the one who can help you shape up the business and place the product above the relationship with you. That is harsh, but that harshness is necessary for a good product. That's why it is very risky to invite your high-school or college friends to be your co-founders. Do it right, and you gonna have the sweetest time in your life. But do it wrong and you lose a friend for good. Founders in a team also need to possess supportive skills that by working together they bring the harmony to the team. I usually refer to this as the three hats rule: Developer, Designer and Business People. Find your place and look for co-founder that can compensate what you are lack of.

Members are those who got hired to facilitate the business development. There are many sources of talents in Vietnam: universities, enterprise staff that are looking for a new breeze in their career, or right from your competitors. Wherever you are looking for talents, I suggest embracing diversity and welcoming new schools of thought in your team. There was time where 100% staff of Cogini was RMIT. At first, it was fun, we understood and work with each other pretty well. But at some point thing started to get boring because we were too alike. But the situation changed dramatically when we brought in the first non-RMIT member. He was superb. Not only that he fit well in the team, he also compensated what we were lack of, offered us the new school of thought that hadn't been found among RMIT members. Yes, talented team members are great, but how can I find them? It depends on the company's strategy though. Some where in the early state, Cogini looked for its staff with the assistant of mass media. It turned out to be highly unproductive. We received a huge number of CV, spent many hours interviewing but hardly found any outstanding applicants. We then changed the strategy to actively seek for the talent ourselves, with the support of the word of mouth network. It has been quite good so far, the quantity of applicants greatly reduced and the quality hooped up. But Cogini business is software development, we look for genius developers. If you are working on one of those enterprise solution like Java or .Net and need a lot of monkey coders, hand picking might not be efficient.

And a team always requires an environment to develop. And this is crucial, it is the team culture, all its dynamic nature, motivation, inspiration, that sets you apart from others and attract talent. Like a bonsai, team culture need caring from the very first day. I am lucky because I was given the authority to shape up the culture of the company, and from that experiment different methodologies in management. And here is what I have learned: be like water. Like water hitting rock, don't expect immediate effects from your changes or new policy. Embrace what the team is having and slowly yet firmly change it into the direction you want. Once everything is in the right flow, rewarding the team for the good job and maintain the flow, it will help the new comers get into shape quickly. 

A good working environment is also what talented employees are concerned about. Enterprises and well-established companies possess very professional working environment, back up by their strong flow of venue. If you want to provide a better working environment in term of facility, you gonna have a bad time. But that doesn't put you in the disadvantaged position. This is an area where your creativity can shine to make the company unique, unlike enterprises which have multiple layer of policy, regulation and are considerably slow when it comes to changes.

Financial Issue

Every startup needs survives till they receive the first round of investment or make the first sale. In other word, startup founders are on their own till the prototype of the product is formed. 

Unlike many other industries, the financial barrier for hardware and facilities in software development is relatively low. In fact it is too easy to equip a software engineer that almost any coffee shop in this city would do. Founders are not very likely to received salary for the work as they own the business. And with all the amount of adrenaline running in their blood, they can literally live on bread and roses. 

But eventually you need more people to help you accelerate the development speed and soon you will find out that  this entrepreneur game is an expensive one. You need money to pay for these people and pay them generously if you want to keep the good ones. 

Most startups in Vietnam I have been talking to depend on either self-fund or friends and family investment or both at this stage. One more support that is very popular in countries with strong startup screen is Business Incubator program. Typically you will be provided an office with basic infrastructure such as furniture and internet connection. This usually take places in a warehouse or university campus. Besides that, the organizers behind the program are usually high-profile investors who can provide you various help. Last but not least, the chance to work with other hot startups is very compelling on its own already. Soon this model is becoming the next trend in Vietnam startup screen. 

When you finally manage to reach to the next stage, a prototype of the product, you will be able to aim at higher targets: angel investors and venture capitals. It is both a bless and a curse to work with these investors. On one hand, they will be able to help you tremendously, thank to their investment, experience and network. On the other hand, your company might easily become their property. Remember what happened with Steve Jobs in 1985? Got fired from his own company.

Legal Issue

This issue is ignored by a lot of entrepreneurs. Cogini Vietnam had been operating for 8 months by the time it acquired its legal status. I am not the best person around to talk about legal factor in Vietnam economy, but from my point of view, it is only matter when you have grown to a certain size and start to go public. Prior to that, no one even know if you can make it that far or not, so why wasting your time for these paperwork? On the other hand, I acknowledge the importance of a proper legal status, it is just not your duty as a business owner to the government, but also to protect yourself from other competitors.

That's pretty much it. Thank you for the listening. Drop me a line if you find the world of entrepreneurship interesting.

Wednesday, July 4, 2012

HTML5 Video with Safari


I worked with HTML5 video today. Though it was not continuous, I have been working with HTML5 video tag all the way back to 2010. In the heyday, I customized the skin and added more functions to one of the most popular HTML5 video player, videojs for Adonit. I thought I knew HTML5 video, its pros and cons. While the advantages of using the video tag haven't changed much through the years, I probably never fully understand how twisted it is.

I was working with this piece of HTML earlier today, which at the first look, was quite normal.

There was a problem with the video though. It was playing on Chrome and Firefox but not on Safari. That was a little surprise as work on Chrome usually means work on Safari and other webkit-based browsers. Soon after the surprise, an intuitive unpleasant feeling took over my mind. "What the **** went wrong with the encoding again?" was my first thought. But as both Chrome and Firefox were working, it meant my ogg and mp4 sources were fine (and actually after days of bloody testing, I was pretty sure that I got my encoding options for ffmpeg right).

The error might be another wicked behavior of Safari. But that was actually a sad news. First, Safari doesn't have many great developer tools, except the webkit's inspector. Second, when you get your encoding wrong, the video simply refuses to play. No error message is thrown. After exploring a fair amount of ffmpeg options, I never excluded the possibility that Safari requires a different encoding than Chrome.


I thought I was screwed, but wait, Adonit video has always been working, on all kind of browsers. Looking at the old code, besides the hooks for videojs, the only difference I could spot out was


The source tags had the type attribute there, my new one didn't. I was a bit skeptical about that hypothesis due to the fact that type had been quite a useless attribute to me. You are not going to find any type in my script tag, because it is purely useless. And in fact, Chrome and Firefox did not complain about that at all. Anyway, I opened the network tab in the inspector to confirm the hypothesis. Surprisingly, Safari was downloading the .ogg video, not .mp4 as expected! Excited with this behavior of Safari, I extended my experiment by switching the position of source tags.


Hooray, the video was playing! My guess was right, when no type is specified, Safari will grab the first source it finds. Reversed the source tabs to the original position, added the type attribute and the myth of Safari video was solved.

When I was young and naive, I believed HTML5 video is definitely the future of video. I still believe though, just that I also have learned that HTML5 still has a long way to go. Anyway, THAT small discovery made my day.

Sunday, July 1, 2012

The journey to an ideal billing option

General speaking, there are two types of billing we are using for our contract work: fixed price and Time and Materials (T&M). Fixed price contract is just like it sounds. Meanwhile a T&M project is similar to being an hourly employee, payment is made based on a set rate for the actual hours that you worked. Each of which has its own pros and cons and articles about that can be found at mostly every corner of the internet, as it turns out that this is a norm in consulting work in other industries too. What got my attention recently is how my ideal billing type has been changing through out the years.



When I was younger, having my first full-time internship, I was always fond of fixed-price projects. Why? It had always given me much less blocker doing thing that way. A project back then wasn't much different from a school assignment. The project requirements were given to me sometimes in a nicely formatted spec, sometimes a Redmine ticket or sometimes just a mockup. The only thing I needed to care was to finish the requirements in time. No one told me whether the project went through four rounds of development and lost us a bunch of money nor did I care about. I got my work done, and that was it. The simplicity made me happy.

Given that I am an untidy person, T&M projects, on the other hand, weren't that fun. I had to keep track of my time, and as I jumped between tasks and my Chinese classes, the little chore turned into a burden. The question "did I turn on/off my timer" kept running through my mind just about when I need some concentration. And even when I managed to get my task done, I needed to mind the time I spent on the task as well. Usually, I missed the estimate made by my PM. Even though this was expected (yo, I was an intern) and we "deal" with it by billing 50-75% of my time only, it still somehow left me a guilty feeling. Needless to say, in the early years of my career, fixed bid was the preferred option.

Further down the road, I gradually took more managerial work and the amount hasn't stopped increasing so far. The fixed bid that I used to love started to haunt me back. I soon learned that fixed bid contract is all about fortune telling and my team efficiency.

In order to make a reliable fixed bid without massively increasing the estimate, I have started to develop weird hypothesis about what would happen during the development process and truly wish for the ability to tell future like Nicolas Cage in Next. Ok, I accelerated thing a bit here. In practice, I make THREE versions of quote, each for ideal, normal and worst case scenarios. This all sounded insane at the first time I was asked to perform by my boss. Soon, though, I realize that engineers are optimistic and idealize most of the misty parts during estimating (hence worst case scenarios quote for the rescue). Yet, there are parts that are hard to predict anyhow, like the learning curve of a newbie, time to set up dev and prod environments for non-standard products, and deployment time. No matter how you look at it, it is definitely more work, boring work : (

And with all of that burden, I am not even making the estimate for myself, I am making it for my team. Which requires thorough understanding about the team and trust that they will do it in the right manner. If we are efficient at doing the work, we make money, or else an even or a lost. Efficiency of a person inevitably relies on one's emotion, the amount of work and morale. That complicated nature making the effort to jell a team just as challenging, if not more, as telling the future.


T&M billing option now proves to be useful for me, as an PM. I can really focus on getting the job done, rest assure that I will be paid for what I have done. Try stepping into customer's shoes, I also find T&M is more valuable for them, given that the consultant they are working with is ethical and trust-worthy. Terralien illustrate the point beautifully using the house building metaphor.
a fixed price agreement will almost always cost more and give you less than you need.
It has been pretty fun looking at the past and noting it down here. I am not sure how would my point of view change in the next few years but unarguably, this is one of the challenges whose answers define the shape of the company and set it apart from other norms. So I am pretty eagerly looking for next challenges here : )

Friday, June 22, 2012

Get started in Cogini Team


TEAMWORK GROUND RULES
There are three things that are important in general:

Ask: If a task is not clear, or more information is needed, please ask as soon
as possible. Asking is always ok. Doing the wrong thing (or doing nothing)
because you didn't ask is not ok.

Debrief: It's not "done" until you reported it done. This is often just a
one-sentence email to me or to the client, sometimes a "100%" mark in the task
list, or a ticket closed. It is done, completed or fixed only when whoever
needed it done knows about it.

Warn: If a deadline you know is important will likely be missed, warn me soon,
as the situation is evolving, and then we can usually figure something out. If
I have to learn at the moment of the deadline that it was missed, that's not
ok. If you are working on multiple projects with multiple project managers, or
if you're a freelancer, also warn me if your workload is above what you can
actually do, instead of not doing certain tasks.

Last but not least PRODUCTION SYSTEMS

When systems are in production, you need to be careful about what you do. 

It's easy to get in a habit during development of making bugs and fixing them,
but in production they can have real impact. So we need to have a review
and testing process for all releases to production. Test everything, even
simple typo fixes, as they can sometimes make a page give a parse error.  

In general, any bugs having to do with money can cause serious problems. 
And simply having the production site down for a few hours can result in
thousands of dollars of lost revenue. 

Sunday, October 23, 2011

A Cogini's internal TechTalk on Today HTML5

I made this slide and presented it to my colleagues a month ago. I even planned to publish the slide right after the presentation BUT, back then the layout of blogger made viewing deck.js presentation a pain in a**.

The problem hasn't vanished yet but with the current theme, it is less painful to view the slide, so...

The target of the speech is to identify HTML5 elements and features that you can use today, on any browsers. The selected elements are ones that nice to have but either don't break the website functionality if the browser doesn't support them (link relations) or comes hand in hand with a reliable fallback option (video/audio tag).

And here comes the slide. You might enjoy it better if activate your browser's full-screen mode. And here is the link to the original slide.

Sunday, September 11, 2011

My answer for the mobile application war

Preface
Just last week, our in-house project for the local market, PocketBank, kicked off. During the planning phase, a lot of time was spent on discussing the technologies we would be using in the project, which essentially a navigation app where we want an excellent offline mode and deploy on as many platforms as possible. The question was whether we should build a web app or a native app. The final decision was to go with native app as we failed to find a good map-kit with offline mode for web app. But thats not it, not yet. The discussion inspired further thoughts on the future of the ongoing application war.

I am not trying to make this blog another comparison between web app and native app as that kind of article/blog has been around for years and with a single Google search, you can find more than enough to read a whole night. What I am going to try is to predict the trend how people are and will be developing their applications for the current and future. The prediction at least will be carried out for my company for the coming time.


Opinions
Here are some opinions of mine when making decision about the trend:

  • The fact that native app and nothing else can take full advantage of the specific features devices and platforms never changes.
  • Both leading mobile platforms iOS and Android are currently go for native app and build up a tight ecosystem around the platform (and devices), app stores and developers. A few factors of this ecosystem are awesome, like one-click payment, the powerful tools (IDE, instruments, etc.) available to native stacks. Web payment alternative such as Paypal, Google Checkout or other payment gateway is just not as convenient. I worked with XCode for a while and felt like dragged back to stone age when working on a number of HTML/CSS/JS tools). Some other factors aren't nice though, like entry cost, revenue split and that the static app stores' content oriented billing model can't fit all kind of shopping and services on the web.
  • Development cost is always a big concern. An app for iOS and Android usually calls for a developer for each and preferably more. That's double the resources a web app requires. And native app is expensive also because it requires skills and knowledge that aren't widely available. You can draw on a larger talent pool using web technology than you can with Objective-C.
  • Mobile platforms are taking steps towards a better support for web app. WebOS is a great supporter when exposing all of the API in JavaScript. And Windows 8 follows that movement, a foreseeable convergence of native and web app. But wait, do you remember the one-good-one-bad circle of Microsoft products? Windows 95 was a breaking news, Windows 98 wasn't much more than a wrapper of 95. Windows 2000 was kinda good, but WinMe wasn't. Windows XP was Microsoft's greatest OS ever and Win Vista couldn't do anything worse. Perhaps we will have to wait till Win9.
  • When a platform comes up with a new stunning feature that is not in HTML5 specifications (which takes forever to complete), it gonna take time for different browsers to implement the feature (some might never do). Despite a common belief among One Web supporter that "Regardless of who you are, what device you're using and what browser you're accessing content from, no user should be left behind.", there are a number of model browsers not as supportive as others (Android's browser, I am looking at you particularly) and eventually the next IE6 will emerge. Hopefully with the current platform/application update mechanism, thing will be less a catastrophe.
  • The native-app wrappers like PhoneGap or Titanium are getting well-known these days and they have their own use when providing HTML-based app with a (limited) set of native API. But IMHO, web app makes a better UX. Many users acknowledge traditional drawback of web app and when the experience turns out to be much better than what user expected, a little quirks won't even find its place it user's mind. But such a native app will fall right into "a piece of junk" category.
  • You hate Android's fragment? You will even hate mobile browsers' fragment  even more.
  • One Web is more a business and development decision rather than a decision to create an optimal experience for the users. The typical reason is to lower the cost and/or complexity. Compared to native apps, the web is a much wilder place. There is little or no standard about UI and UX and hence nothing to guarantee a consistent experience for users. However there are some positive points when it comes to web app UX like
    • Accessibility: generic experience for different platforms
    • No installation or update
    • Performance (don't get me wrong, I am not talking about the speed if that is the "performance" you are thinking about): no native app will ever deliver fresh content as quickly as the web 
  • Joe Hewitt's tweet: "I want desperately to be a web developer again, but if I have to wait until 2020 for browsers to do what Cocoa can do in 2010, I won't wait"

My answer for the current...
  • The current generation of cell phones aren't quite powerful enough and HTML5 isn't quite developed enough so for coming time, web app won't be able to replace non-trivial native app. 
  • Native app is the number one choice for heavy tasks and new features. And by new features, I am not limiting to what platform vendors themselves have to offer but also the involvement and contribution of third-parties, a wish for a less-close future
  • Native-app wrapper wont be come mainstream, but remains relatively helpful for the access to (limited) platform API for the current time when WebOS is suspended and Win8 is in progress 
  • Business model like that of Bizness Apps will thrive as there is a growing demand for trivial apps from companies and no platform is proven to win the market
... and for the not-too-distant future
  • Eventually "web will win" is inevitable with direct support from platform level (e.g. WebOS and Win8)
  • Lot of effort and time are required to re-establish the ecosystem native apps is living in for web app, solve the feature puzzle and develop a new HIG that is neither iOS, Android nor any specific platform but a generic experience for all users
  • Native app remains the preferable choice for what it used to be the first ranked choice (above)
  • Native-app wrapper will become far less attractive, especially if there is a way to use native code to access platform API and then expose that to JavaScript. I wont be surprise if it will be eventually extinct





Friday, September 2, 2011

jQueryMobile - More in the FIXME list

A few week ago, I had a chance to work with jQueryMobile (JQM), a framework that I have known for long and looked forward to a chance to use for some practical development. (I was using Beta 2 when I wrote this post)

Well, after the first good impression (especially when compared to its ancestor, jQTouch), I started to find out a number of thorns here and there that prevented it from being use widely in the industry.


Most of the time when I write mobile web app, I use desktop browsers to test and develop the app and only move to the device to test major changes. I can tell that the page transition of JQM on my FF 5.01 and Chrome 13.0 is pretty flaky even when compared to the old jQTouch. The reason is because JQM is using keyframe animation and depends on how supportive the browser is, some frames might be dropped and causes the transition to be a bit rough. There is plan to switch to CSS3 transition, which guarantees better performance and support from major browsers, lets see how thing will go.


Currently, JQM provides developers with single-page (pages where only one div has data-role="page") and multi-page (single HTML document with multiple div with data-role="page"). And just like jQTouch, JQM uses hash-based URL for navigation.
So if I have a single-page document and want to "slide" to the next, my url is like
single_1 -> single_1#single_2
Similarly, urls of a multi-page document look like
multiple#foo and multiple#bar
I expected the two types as two great indigents for one-page apps. But no, different from my expectation, cooperation of the two types is half-baked. If I load a multiple-page document through AJAX, all navigation within the page are broken
single -> single#multiple -> single#foo (it should have been something like single#multiple#foo)
Also, the URL of an AJAX-loaded document is lengthy and ugly as it uses the format old_url#new_url, you can find this right on JQM's demo site
http://jquerymobile.com/demos/1.0b2/#/demos/1.0b2/docs/pages/page-anatomy.html
NOTICE: at the moment I was writing this post, jQM team has taken steps towards above problems with the launch of pushState, which clearly makes the url far neater and hopefully in the same manner handle single/multiple-page correctly.


And the last item in my list would be the bad "back" button. JQM provides default "back" button for pages loaded via AJAX. The problem with this default button is that it disappear when you refresh the page or load it from bookmark, which is a big FAIL for me. Developer can implement the "back" button manually too, but then the transition sucks. It wasnt possible for me to manipulate the transition effect and direction (in my case, it goes slide-right, where a normal "back" should go slide-left, but perhaps that's just me).

I would complain about the behavior of the button as well. JQM's "back" button functions as literal history of pages. This approach is similar to iOS' and Android's back button and works great for native apps. But web app is different. The user can interfere the URL, and when that comes, a history of pages leads to all kind of funny redirect as the "back" might structurally mess up the app workflow. I would love to see the button acts like a breadcrumb trail and therefore respect the app structure.


Just my two cents. I remain a big fan of jQueryMobile and its team, eagerly looking forward to the 1.0