Tag Archives: Iphone

General Purpose GPU Programming for Mobile

 

GPU_Computing

There are times that your app collects a whole lot of data (by capturing it live or by downloading from a third party, or import from email), and you want to do a whole ton of reports and visualisations inside your app. .

To do lots of computing inside your smartphone is a very challenging job, as I have experienced myself in processing video data. A small trick is to use your GPU, which could be 10-100 times faster than your CPU in calculating floating point.

Setting up a GPU shader and calculation could be a huge task for anybody who are not familiar with OpenGL. So, this excellent GPGPU library could help you a lot, all you need to do is to change the calculation inside the vsh file. I am planning to make it even easier for anybody to use in the near future.

Windows Phone Potential?

I normally hear from Windows developer to say that their Windows market share is much bigger than the total of iOS and Android together. And the sales of Windows 8 has bypassed all the sales of iOS and Android from the beginning to now.

Windows Phone 8

Windows Phone 8

It is quite unfair to compare the whole Windows 8 with iOS or Android. And if we do take that demand into PCs and laptops, then why the hell we do not compare the supply side? It is very clear that if Windows 8 could be a shared platform between PCs, tablets and phones, then all the old software, all the old games would have beome compatible to the Windows 8 system in the short amount of time. And many apps for tablets and phones would be quite different than the ones in PC. No, I don’t mean technology, I am talking about the business model, the purpose of the software.

I don’t mean that iOS and Android is a better market than Windows Phone for indie business. These markets have become very competitive and continue being so. You either have to figure out a market niche or be very lucky.

Openess v.s closeness

Open v.s close

Open v.s close

I have a long support for open source system, the open standard, a more open and shared data in the web. 3 years ago, I thought that the win of Android is obvious and the reality has proven me right. I was confident with my knowledge and guessing until I read a long fan boy of Apple. Yes, he is a fan boy of Apple, and the article has really favoured Apple. But he made an important point great product wins. Not the great product in terms of technology, nor in terms of openess. It is a great product in users’ minds, either by its value provision or by good marketing.

By opening the platform, Android opens the door for more hardware suppliers. But that openess means nothing if the operating system sucks, it means nothing if the compatibility and the user interface are not good. Looking at Linux and all the free open source operating system. They are more opened, easier to adopt into the hardware by the suppliers, but they suck. Either the UI, the lack of applications and features, but they suck.

I think this article gives a very good point of view as well.

5 things to know about cross-platform development for iOS/Android

Cross Platform App

Cross Platform App

People love the idea of cross-platform development for iOS/Android or try to use a familiar language to develop apps for either or both platforms. There are many solutions and platforms out there and each of them has pros and cons, here we will try to name a few and analyse them: MonoTouch, Appcelerator, RubyMotion, PhoneGap, HTML5, Java2ObjC…

The pro is quite clear, it supports both platforms at the same time, you only need 1 guy with 1 skill (either it is C#/Javascript/HTML5 or Ruby) to learn and quickly produce apps for both platforms at the same time.

The cons are quite depending on which you choose to go with, but we will analyse them in some aspects: easy for maintenance, native performance, delay for update, community support, pricing/bankrupt, talent hiring

1. Easy for Maintenance

I found some of the platforms are challenging to maintain, just to name a few: appcelerator and phone gap… With javascript and not available debugger, when it comes to debugging, you will spend as twice/three times as much to debug. Other platforms do support debugging well like MonoTouch or RubyMotion…

One thing that most cross-platform framework has problem is that it adds another layer of complexity into your system. If some bug happens or something does not run as intended, you have three times of works. You have to check if the bug is your bug, is your framework’s bug, the interaction between the framework and the iOS/Android platform, and finally, if that is a bug of iOS/Android. Let’s take a simple example:
iOS had an old bug with rotation and I encountered that bug when I tried to use Appcelerator to build my simple project. It took me the whole day to find that bug was an Apple bug, there is a work around in Apple way but that is not well supported by Appcelerator….

2. Native Performance
When it comes to native performance, I can say that most of the third-party frameworks do well in this area. However, HTML5 is not an excel when it comes to this, or at least, not yet. Facebook has shown us an important lesson with its decision to be back to native to improve its performance. I think that in the future, when the WebKit, the hardware and the requirement for a good app has matched each other, more and more apps will be developed using HTML5 and other open web technologies. Simply, because it is open.

So, if you are building something simple and may grow well over a long time, you may consider the hybrid approach to combine HTML5 and native code. This could work well with if you can integrate it with the web service at your backend.

3. Delay for update/community support/pricing
All of them come to the same problem of third-party frameworks, that middle complexity layer that you add into your project. Most of the frameworks will update quite fast when Apple release a new version, except many minor bugs. I used to have code that is working well with Apple in the iOS4 release and stop working when iOS5 is released. The problem gets worse when most iOS5 beta still works well with my apps. So, when I try to run our app on iOS5 final release, I get panic. I don’t know what is wrong with my code, is it the middle framework, is it just Apple’s release has changed something. I finally figure out that Apple has changed some rules in their API and that affects the old way the middle framework is working. I need to wait for their update to get it work.

Most of the middle framework has their premium supports but you either have to pay more or you have to wait a hell long of time. And most of the communities are a fraction of either the iOS/Objc communities or Android communities. At there, at least somebody has worked with your problem, somebody tested and figured a work around.

4. Bankrupt?
There are quite a lot of third-party frameworks around, and I am quite sure many of them will go bankrupt or stop working after a while. Or the price can go up, or the support rate gets slow down. You don’t know what the hell is waiting for you there. If your product is very important, be careful, you don’t want to throw tens of thousands of lines of code away and start all over again. These middle frameworks code, unfortunately, are not much reusable. You can generate Objective-C/Java code from them and then continue working from that. But, believe me, reading, understanding and maintaining those generated code are as twice as hard as you write it from the beginning. I don’t say all of them may have problems, but be careful which framework you pick, how long your project will last, and make sure there is a good match. If your project is pretty longer than 3-5 years, maybe thinking deep about it…

5. Talent Hiring
This is a people management, a project management issue. I remember 3 years ago, finding a good iOS developer is as hard as hell. Although it is easier now, it may not make sense to have a whole team of engineers in Ruby/C# and 1 guy in iOS and 1 guy in Android (or 1 guy for both iOS/Android). That means you have to feed 2 more guys, training them with company’s culture, to understand the domain knowledge that you have. And when things grow, each of these 3 teams grows. Another solution is that 1 of the web guy need to learn both iOS and Android development. That’s why it may make sense for you to reuse your team’s talent. It is also a good thing to consider to have a guy with HTML5 to approach the app in hybrid (HTML5+native code) model.

Why knowledge/skill costs a lot?

Yesterday, I have just done a very good job. It is very good because I spent almost a year keep thinking and trying to solve the problem but I couldn’t really solve much. However, the solution yesterday was so easy and short that I was shocked. It reminds me of the following story:

1 guy with a car broken going into a gargage. The repairer asks him for 100$ and it took him the whole day to fix the car. However, the car gets broken again after just a few days. The owner was so disappointed and tried with a new repairer. This new repairer, an elder, just took a quick look at the car and blow the hammer 3 times into some specific place. He then charged the owner 500$. This time, the owner was shocked, “How can I pay you 500$ for just 3 hammer blows?”. “1$ for 1 hammer blow and 497$ for me to know where to do so”.

It just shows me how much matter the knowledge, the thinking through the problem matters, not how much the efforts. Of course, experience and knowledge comes after efforts, but always think before doing

iPhone v.s Android

The smartphone game is over. The tablet game will be finished soon, within 2 years.

iPhone versus Android

iPhone versus Android

 

 

Android wins, iPhone loses. 75% v.s 15%, soon will become 85% v.s 5%. But that doesn’t matter much for Apple. Apple is a brand for high-end products. They don’t aim to gain all market share. To gain market share, Apple has to attack more of the low-end market, which means they have to lower their price. However, matching other supplier’s price may be harmful for Apple’s brand, although they may achieve it by more efficient supply chain and factories.  To become a high-end brand, Apple spends a significant amount of money on their brand and will not scarify it for the market share.

But in this ecosystem war, the bigger ecosystem leads to a win by monopoly. When 75, 80 or 85% of the market is using Android, app developers will flock to there, and make the ecosystem become much more valuable for customer. To continue earning a lot of money, Apple has to continue what it has done best under Steve Jobs’s empire. New product, new market, new value, or new software that people are willing to purchase with high-price.

What will be the next Apple’s product? Probably Apple TV, I am not even sure about that.

And the important questions for most of us, as app developers, what should we do? Should we all move to Android yet, should we change our strategy of iOS first, Android second? Or should we start discussing about Mobile Web App?

I am writing more on the Mobile Web App v.s Mobile Native App in the next post, catch it soon.

Quick thoughts about Patent

Patent Suing

Patent Suing

 

Apple sues Samsung, Yahoo sues Facebook, Facebook countersues Yahoo. Oracle v.s Google. Microsoft v.s Google. That’s too much of suing in last year and this year. I sometimes wonder about this situation, some law court does for clear cases, some are stupid and some are totally crap.

 

 

 

 

I agree with some ideas here and here about patent infringement:

He’s confusing four very different things here. First of all, he calls it “stealing”, but nothing is lost from the victim in the case of using the same idea. In fact, you can break this law without even knowing that someone else thought of the idea first. This is one of the biggest problems with patents; there is no good safe way to find out if any idea you come up with is patented or not. Most other crimes require intent, patent infringement does not.

It is actually weird for Yahoo to sue Facebook over some patent like this:

Only two of the 10 patents at issue are directly related to social networking technology. Most focus on online advertising, including methods for preventing “click fraud,” as well as privacy and technology for customizing the information users see on a Web page.

“If what Yahoo is saying is literally true, then it seems like a lot of companies would be liable,” said Shubha Ghosh, a professor who specializes in intellectual property at The University of Wisconsin Law School. But he added, much would depend on whether a judge defines the patents broadly or narrowly.

And as you can see, some patent infringement happens without an intent. That is crazy.

Some patents infringment should be sued. If Samsung lawyers cannot distinguish between a Samsung device and an Apple device, then well, Samsung does something very wrong.

Apple says Samsung’s blatantly ripped off its device designs. Not true, Samsung replies!Too bad its lawyer blew that argument harder than a hydrogen bomb blowjob: they couldn’t tell the difference between a Galaxy Tab and iPad. In court.

Law may need changing to adapt some new situations. And we are into the patent war, lawyers, it is your time now!

http://notch.tumblr.com/post/27897241780/even-experts-get-it-wrong

Suggested Frameworks for iOS

Here are some suggested frameworks for iOS development, since I have used all of them quite a lot. I think they are good frameworks/libraries that you may need to know. It could save you a good amount of time in researching and reinventing the wheel.

List of Frameworks/Code Snippets for Objective-C:

List of some good components

CorePlot : Core Plot is a plotting framework for OS X and iOS. It provides 2D visualization of data, and is tightly integrated with Apple technologies like Core Animation, Core Data, and Cocoa Bindings.

Core Plot Graph

Core Plot Graph

iPhone Cocoa Http Server:

CocoaHTTPServer is a small, lightweight, embeddable HTTP server for Mac OS X or iOS applications.

Sometimes developers need an embedded HTTP server in their app. Perhaps it’s a server application with remote monitoring. Or perhaps it’s a desktop application using HTTP for the communication backend. Or perhaps it’s an iOS app providing over-the-air access to documents. Whatever your reason, CocoaHTTPServer can get the job done. It provides:

 

Personalization and Price Discrimination

Price Discrimination

Price Discrimination

Since my courses in CMU, I always ask myself if first-degree price discrimination is feasible in e-commerce, and if it is, then how. Anybody knows that the main problem with price discrimination is customers exchange information to each other. And when people know that they are charged differently, they get annoyed.

 

 

 
 

I just encountered this 2 valuable articles in economist.com (Online firms are getting better at calculating how much they can sting you for. Here’s how to pay less) and (How deep are your pockets?). They are explaining to me many good insights, how and what products these firms can charge people differently.

  • Getting your information from cookie, as normal
  • Getting your computer type, if you are an Apple user, you are more likely to pay for higher prices
  • These software can even track your mouse movement

It also explains to me which websites can charge people differently based on no logic. Flight, hotel, secondhand cars and other similar products and services can do this job easily. They already displayed the price sales differently every single day or hour without any complains from the user. With the usage of smartphone, I think this trend will continue when firms have more information and idea about how bad you want their products.

It would be annoyed for any users if they happen to know that they are charged differently just because they are using a Macbook Pro or just because they like the product more than everybody else. I still recommend you to not use this price discrimination strategy intensively but rather to focus on better customer experience. They would help you to do viral marketing and gain more transactions for your company.

Steve Jobs: What I feel about him

Steve Jobs

Steve Jobs

I finished this book quite a time ago, but I didn’t feel to fully understand and let all the information and knowledge penetrates into my mind. There are conflicts, there are debates, there are loves and hates from everybody. It is so easy for people to judge emotionally and I didn’t think that I understand everything to start writing it out.

There are many lessons inside this book, and each single person takes his own belief from the book. I have my own lessons, hope that it is not emotionally biased and spend time thinking through it for a while.

 

 

Autocratic, it is so necessary in the success of the company. People may believe that Steve Jobs was fired due to his wrong approach of management or people favored a salesman too much more than the product guy. I think it was mainly an organization politics problem, Steve Jobs was right but he did not get enough power and networks to back him up. I believe in his autocratic, as much as I believe in Mark Zuckerberg’s autocratic system. Forecasting an uncertain future is too hard to convince everybody to follow the leader. It is wasting both time and efforts. It was a quite shock for me while reading this article. I agree with the Jeff Bezos’s style of management in this article: https://plus.google.com/112678702228711889851/posts/eVeouesvaVX

Steve Jobs is not a genius, sorry for any of his fans. I don’t underestimate his talents and efforts but no success comes overnight. He was in a hard time after leaving Apple, building NeXT and then Pixar Animation Studios. There were up and downs in his life but he chose to stick into his core value and keep moving forward with innovative ideas. He has a great mind to recognize the great ideas, a great mind on how to make a product perfect. People may say that many ideas are not original by him. If they look deeper into the product development process, there are 2 things people must understand: the possession feeling and a great care of details. I love the ways Steve Jobs take an idea as if it is his own, as if it is his baby. That’s how passion and great care for the products are made from. If the product manager doesn’t have the feeling of the product as his own. Steve Jobs took this possession to a great level, and ignores the original owner as a whole.

The last great thing that I learn from Steve Jobs is details matter, a lot. I learnt from my own product development, from writing my own book. Details matter, a lot. People may not care about how great most of your works are, but they quickly recognize your mistakes. It is part of how people’s psychology works, they would assume you need to produce a great product so the great parts are normal. And negative emotion has a bigger impact than positive emotion.