Pages

Thursday, May 31, 2012

Hack SenchaTouch Core



I've worked on some projects with SenchaTouch. Basically, I love the core functionality of SenchaTouch. It supports many useful features for developers, includes:

+ A standard OOP with Javascript and its dynamically/clever JS class loading.
+ Data package for loading data from Ajax (JSON, XML) + Storage + Model
+ Dom accessing/querying
+ Logging

However, currently SenchaTouch cannot support some mobile OS with its UI layer, ex: Window Phone 7. So, when moving to a project that have the need to support a specific phones, we need to consider other frameworks to use (just for supporting the UI layer), like: JQuery Mobile.

Btw, I don't want to rewrite everything from scratch. I want to have a core framework that developer can based on to develop features. They need to follow only 1 coding convention, 1 style of OOP programming with JS. After reviewing some popular JS frameworks on the community, I decide to use the Core of SenchaTouch for this purpose.

Firstly, I create a simple project which includes the whole of SenchaTouch library and try to remove unnecessary classes in its folder. JS files are loaded in a very messy ways and I cannot control it after 30 mins. I found this is a crazy way.

I found that SenchaTouch supports a way to build its files using Sencha SDK tool (http://www.sencha.com/products/sdk-tools) and in SenchaTouch folder, you can find a jsb3 file. This file is used for building the SenchaTouch JS output files (to includes into your HTML pages).

I start from this one. Just copy the touch.jsb3 files to another one and customize it. Customizing task is only "removing all unnecessary JS files" (mostly they are classes of UI layer).

After doing this step, I have a problem with the JS loading mechanism of SenchaTouch via Ext.Loader.    In the final package of the senchatouch, it loads all js files based on the default path = src folder. In my new project, I copy the senchatouch into www/lib folder. So, a lot of files cannot be loaded because of wrong path.

Because of this reason, I decide to separate the output into 2 packages:
1/ touch-core.js: includes the fundamental js classes for loading JS files + SenchaTouch class system.
2/ touch-extra.js: includes all of other advanced features of SenchaTouch: logging, Ajax, data model, storage

I must put the code of

Ext.Loader.setConfig({
enabled : true,
paths : {
'Ext' : 'libs/touch'
}
});
between 2 script tags to make it understand the correct path of Ext before loading the touch-extra file.


I found another critical issue in SenchaTouch build jsb3 file: the order of JS files are not correct and missing loading some important files. So, instead of using only 2 JS files (touch-core.js, touch-extra.js), it loads a lot of other files in the SenchaTouch src folder.

I decide to do a next improvement step. Based on the loading order of JS files, I put all of missing JS files/re-arrange the order of JS files in the jsb3 project. It takes me 1-2 hours :(. Finally, I created a jsb3 files for building the SenchaTouch core as my expectation:

touch-core.js: for using the Sencha Class system + DOM features.
touch-extra.js: for using other features (Ajax, Logging, Data Model, Storage, wrapper classes of using Device features, Utils).

After refactoring a little bit more, I can control deeply the way that Ext.Loader load JS files dynamically  and the final script to use "Touch Core" in my project looks better. Now I only need to embed 3 js files:
+ touch-core.js
+ touch-extra.js
+ app.js

In the app.js file, I set the path of Ext.Loader to make it understand the correct path to load my application scripts:

Ext.Loader.setConfig({
enabled : true,
paths : {
'MyApp' : 'js/MyApp'
}
});


Now, I don't need to set the path of 'Ext' namespace anymore because I put all necessary scripts into the 2 Touch JS files.


I did some testings with all expected features in Sencha Core as mentioning at the beginning and see it works very well. From now, I can use any other HTML5 framework for the presentation layer and use the Sencha coding style with my favorite features to save my time.



I put the jsb files and the tutorial to use it into Github at: https://github.com/khoatran/Sencha-Core-build
If you want to use it or create your own custom build of Sencha, you can get this as a reference.





Wednesday, August 24, 2011

Learning art and graphic design

For a long time, I've worked on technical solutions/consulting for many projects in my life. This job is great and interesting. However, one day  I found that: I became too "logic" strictly. In my mindset, there are only 2 guys for 2 different views: tech and business.


To be more flexible and creative, I think I need characters of an "artist". Actually, I don't know what would be happened in a kind of combination "Technology, Business and Art". However, I think it's very interesting and may make some evolutions in my future way.


So, what is exactly the kind of "artist" that I want to be? Actually, I stick my "art" need into software domain, not too general as  other artist guys, eg:  "photographer or painter".   I try to define criteria of this guy as below:


1. He needs to know evaluating how beauty a (web) design/artwork is.
2. He needs to know how to create beautiful-AND-creative designs/artworks.
3. He needs to have deep knowledge about User Experience (UX) and how to make a design in best UX.
4.  He needs to know how to research common habit/characters of the "crowd" to give the the best creative artwork (certainly in software domain :)).

I think these criteria are best match for the web designer job.

I don't know where to start from the beginning. I did asking my friends working as web designer and surfing on Internet to find my answers.  Everyone has his own way to learn Kungfu, right?

Below is the list of thing that I think I need to learn:

1. Color theory/ color harmony
2. Theory of graphic elements (shapes/lines/...)
3. Typography
4. Some basic concepts of photography.
4. UX common theory/best practices.
5. Learning graphic tools.
6. Enjoy/evaluating and stimulate some artwork that already done by others in the community.
7. Create my own "artwork".

 I start the "course" 3 days ago. Everything seems good till now. Below is the first "artwork" I did myself: the "KBird" logo. :))



It's still rubbish, but it could be a little bit progress. I think I will write down what/how I learn after finishing this course in other articles.

 Hope it helps for anyone has the same need like me. :)








Wednesday, May 4, 2011

Ubuntu for my mom


My mom does not know anything about computer. She often asks me to copy traditional songs that she liked to her very old-fashion phone. Everyday, she loves to hear news on TV and keep track any things related to health. These tools (phone and TV) are  "most hi-tech" things that she can use currently. 

I am beside her just 2-3 hours per day (not count the sleeping time). So, I know that she feels very lonely and sad when I am not there. I decide to help her know more about computer. It's a good tool for her to discover favorite things to relax at home. Anyway, helping an old person without knowledge about computer is not an easy task. 

All of my computers at home installed with Ubuntu. It's good for any tech guys liked me, but not too easy for my mom if she wants to learn.  
My mom and I


During my life, I develop software projects for many clients, many bosses - but never for my mom (the most important person of my life). This is the time I need to do that. So, I decide to setup the first IT project for my family. I call it "Ubuntu for my mom". The target is: helping my mom can use my Ubuntu computers in some days.

I will update these steps on the same post when I finish on each day. So, please comment if you have any good ideas to help me simplify/improve the "project".

Day 1: Setup a simple screen and help my mom to use the mouse for reading news

Step 1: Setting up

+ Create an account for my mom on Ubuntu. Setup for automatically login for that account. She does not get acquainted with the keyboard/mouse at the beginning. I did that to prevent confusion to her.
+ Install the Vietnamese locale for my Ubuntu. My mom does not know English. So, localization is suitable for her.
+ Changing the theme of my Ubuntu. Using big icons, theme with big contrast color. My mother's eyes are not good. This way helps her to know where to click on the screen.
+ Clean up all unnecessary icons on the screen.
+ Install Prism. Prism helps to create shortcut/application based on web URLs. I created some shortcuts for my mom for reading big magazines in VietNam (TuoiTre, ThanhNien, PhuNu, ...) on the desktop.

My screen after setting up:


Step 2: Help my mom know how to turn on/off the computer:

This step is easy for me, but not memorizable for my mom. So, I decide to put a big note on the "button to turn on the computer". Now, she knows how to turn on.

So, how to shutdown the computer? I added a single RED shortcut on the top menu. She just need to remember the "RED" color button to click. Now, it's totally easy for my mom.

Step 2: Help my mom to use the mouse

+ I guide my mom to use the mouse with very basic concepts: left button click, left button double click and scroll. She does not remember too much about when to use which actions. So, I take a big note and stick on my desk. After 1 hour, now she knows how to use the mouse for reading news with shortcuts I created for her.
+ I also guide her how to "minimize, maximize and close" windows on the screen.
+ Another important point: I guide my mom for navigate and click into link of the online magazine to see detail content for each articles, categories.

Result: day 1 is in very good progress. My mom can read news online and turn off the computer when I am not at home.

Wednesday, August 18, 2010

Knowledgeroot - installation and backup/restore

Knowledgeroot is an open source knowledgebase system. It helps you to create a central place for organizing information/knowledge for your team. 

Below is a screenshot from our current knowledgeroot system:


Anyway, the installation guide for this open source is not clear enough for you to install easily. I've just found a great guideline on below link:

http://www.debian-administration.org/users/ericrox/weblog/1


I already tried to install it on my Ubuntu desktop for the team to use currently. After some days, I need to move this system to another server because if I shutdown my computer, noone can use it anymore :)

Fortunately, backup & restore knowledge root is easy. You just need to backup/restore the database only. All attached files are stored inside the MySQL DB.


MySQL v.5.0 supports some nice commands for you to backup data:
http://dev.mysql.com/doc/refman/5.0/en/mysqlhotcopy.html


In this case, I prefer to copy the whole folder of my knowledgeroot database (because it contains also binary data files). So, I did below steps:


Step 1: using mysqlhotcopy to create backup database in raw


Below is the command I use to backup my knowledgeroot database to current directory:

sudo mysqlhotcopy -u my_db_account -p password_of_my_db_account  knowledgeroot . 


Step 2: copy this folder into USB, and copy it to the data directory of mysql (default mysql data directory is located at: /var/lib/mysql


However, I need to do a quick trick to copy this folder because /var/lib/mysql folder is not owned by my account by default
(a) sudo chown -R myaccount /var/lib/mysql
(b) copy the backup data folder into /var/lib/mysql
(c) return the owner for mysql account by this command:  sudo chown -R mysql:mysql /var/lib/mysql




Saturday, June 5, 2010

Smartphone market

Some useful information for all mobile developers

Mobile market share (2009)

(The graph below presents for general mobile market share)
Source: Gartner

Smartphone market share


Source: Nielsen

Worldwide Mobile Terminal Sales to End Users in 1Q10

(Thousands of Units)
Company
1Q10
 Units
1Q10 Market Share (%)
1Q09
 Units
1Q09 Market Share (%)
Nokia
110,105.6
35.0
97,398.2
36.2
Samsung
64,897.1
20.6
51,385.4
19.1
LG
27,190.1
8.6
26,546.9
9.9
RIM
10,552.5
3.4
7,233.5
2.7
Sony Ericsson
9,865.6
3.1
14,470.3
5.4
Motorola
9,574.5
3.0
16,587.3
6.2
Apple
8,359.7
2.7
3,938.8
1.5
ZTE
5,375.4
1.7
3,369.6
1.3
G-Five
4,345.0
1.4


Huawei
3,970.0
1.3
3,217.9
1.2
Others
60,418.1
19.2
44,972.2
16.5
Total
314,653.50
100.0
269,120.10
100.0
Source: Gartner (May 2010)

Worldwide Smartphone Sales to End Users by Operating System in 1Q10

(Thousands of Units)
Company
1Q10
 Units
1Q10 Market Share (%)
1Q09
 Units
1Q09 Market Share (%)
Symbian
24,069.8
44.3
17,825.3
48.8
Research In Motion
10,552.6
19.4
7,533.6
20.6
iPhone OS
8,359.7
15.4
3,848.1
10.5
Android
5,214.7
9.6
575.3
1.6
Microsoft Windows Mobile
3,706.0
6.8
3,738.7
10.2
Linux
1,993.9
3.7
2,540.5
7.0
Other OSs
404.8
0.7
445.9
1.2
Total
54,301.4
100.0
36,507.4
100.0
Source: Gartner (May 2010)

Refs:
http://blog.nielsen.com/nielsenwire/online_mobile/iphone-vs-android/

Comparision of smartphones

A useful link from wikipedia for comparison os smartphones
http://en.wikipedia.org/wiki/Comparison_of_smartphones

Wednesday, April 14, 2010

Gesture recoginization in iPhone SDK

For many magazine applications running on iPad, you easily see that the application detect your gestures for interactions on the content: rotate, swipe right to left (or left to right), tap. If we have to handle these gestures manually by code, it is not efficient.

So, Apple tries to make our developer life easier to breath by providing us a built-in mechanism to detect these common gestures on the latest iPhone SDK version.


You can find these APIs from UIGestureRecognizer class.
"A gesture-recognizer object (or, simply, a gesture recognizer) decouples the logic for recognizing a gesture and acting on that recognition. When one of these objects recognizes a common gesture or, in some cases, a change in the gesture, it sends an action message to each designated target object" - from Apple API documentation.


This class derives to:
1. UITapGestureRecognizer: presents the gesture that p fingers tapped the screen q times consecutively.
  • Input properties: numberOfTaps (q), numberOfFingers (p)
  • Output properties: location, touches
2. UISwipeGestureRecognizer: represents the gesture that p fingers tapped the screen q times consecutively.

3. UIRotationGestureRecognizer: looks for rotation gestures involving two touches. When the user moves the fingers opposite each other in a circular motion, the underlying view should rotate in a corresponding direction and speed.

4. UIPinchGestureRecognizer: represents the gesture that 2 fingers moving towards or away from a center point. This gesture is usually used for scaling a view.
  • Input properties: scaleThreshold
  • Output properties: scale, velocity, anchorPoint, transform
scaleThreshold is the critical scale the fingers must first move apart/together before this recognizer could fire.

5. UILongPressGestureRecognizer: represents the gesture that p fingers moved/stayed on the screen continuously for T seconds.
  • Input properties: numberOfFingers (p), delay (T), allowableMovement
  • Output properties: touches, centroid, startPoint
6. UIDragRecognizer: represents the gesture that 1 or more fingers moving on the screen for a distance of d. Optionally it may also be constrained to moving only within an angle of θ ± Δθ.
  • Input properties: minimumDistance (d), angle (θ), maximumDeviation (Δθ), restrictsToAngle
  • Output properties: touch, startPosition, startAngle
Note that the angles are in radians.
7. UIPanGestureRecognizer: represents the gesture that 1 or more fingers moving on the screen for a relatively large distance. This gesture is usually used for scrolling, and is used by UIScroller and UIScrollView.
  • Input properties: directionalLockEnabled
  • Output properties: offset, velocity, transform
8. UITapAndAHalfRecognizer: represents the gesture that 1 finger tapped the screen q times consecutively, and then moved/stayed on the screen.
  • Input properties: numberOfFullTaps (q), allowableMovement
  • Output properties: touch


An example for how to use these API:
UISwipeGestureRecognizer *swipeRecognizer = [[[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(DidSwipe:)] autorelease];

By default this line of code detect the swipes from left to right.

If you want to detect a swipe from right to left add the below line after the above line:
swipeRecognizer.direction = UISwipeGestureRecognizerDirectionLeft;

On 1 view, you can add many gesture recognizers to handle different interactions by using below function
[self.view addGestureRecognizer:swipeRecognizer];

After that, just implement the [DidSwipe] method we already registered above:
- (void) DidSwipe:(UISwipeGestureRecognizer*)sender{
   Do something...
}


Refs:
+ http://iphonedevwiki.net/index.php/UIGestureRecognizer
+ iPhone SDK 3.2 API document

Happy coding!

Monday, March 29, 2010

Top reasons you should NOT join to the mobile team at Pyramid Consulting

1. There are many exciting things in our activities. You may DIE if you cannot control your emotions.
2. There’re many interesting things to learn. You will be overloaded with knowledge and new things – but useful for your work & your life.
3. Your friends may envy you because you can do many wonderful & crazy things.
4. We’re NOT colleague only. We’re brothers in a family. If you’re afraid of having more brothers, don’t join us.
5. We share all things together, all troubles & happiness, both in work & life. If you’re afraid of sharing, this team is not a good choice for you.
6. All members are courage men. Dare to talk, dare to do, dare to share.
7. You cannot stand some our bad habits for relaxing at the weekend: drink & eat dog meat, play some games – may be good (or bad) for your health.
8. If you can think of more reasons NOT to join into mobile team, please share to us.

Monday, March 15, 2010

Multiple phone application framework

Multiple phone application frameworks are: frameworks/solutions that allow developers to build applications to run on multi phone devices.

Recently, there' re some companies trying to build these solutions. This may make a new trend in developing application on mobile: build once, run every where (at least on most popular mobile platform) :)

Actually, this idea is good. However, it meets some troubles:
  • Mobile Platform + their SDKs are changes frequently. The multiple phones application frameworks cannot catch up with the speed of change of the platform + SDKs. Mobile developers prefer to have chance to use the latest APIs to make use of the strength of the newest platform.
  • On some popular mobile platforms (Apple, Android, BlackBerry), there' re always some private APIs - means some APIs are not official public. Developers must work on the real platform & SDK to use these APIs. The multiple phones application frameworks cannot wrap these APIs into their library because it needs to be more generic to be used in a common way.


Anyway, we should wait.

You can checkout a list of some open source multiple phone application frameworks here

Thursday, December 3, 2009

The Presentation Secrets of Steve Jobs

This is a book bought on Amazon. Below is a slide summary for content inside. It makes me very interesting.

Wednesday, December 2, 2009

iPhoneARKit and Point Of Interest apps on iPhone

A point of interest, or POI, is a specific point location that someone may find useful or interesting. An example is a point on the Earth representing the location of the Space Needle, or a point on Mars representing the location of the mountain, Olympus Mons.

The term is widely used in cartography, especially in electronic variants including GIS, and GPS navigation software. In this context the synonym waypoint is common.
(from wikipedia)

iPhoneARKit is a great tool for developing POI (Point Of Interest) apps on iPhone. We've just done the first demo based on this library. It's a simple application to detect POI locations in camera view and show related information (in the context of this demo - is shops with coupons)


Bee Buzz Finder from Vinh Nguyen on Vimeo.


Many business ideas comes from this, right?

Saturday, November 28, 2009

Convert MTS/M2TS(AVCHD) to AVI

Yesterday, I used a Sony camera to record  some our video demos.  Unfortunately, output videos are in AHCHD format. So, I have to find a way to export them to avi or other format before putting to our R&D press.
Actually, there are many commercial softwares to do this. However, I don't like them. He he, I love things  free and open source. FFMPEG is the best one in the open source world for conversion video/audio format. Anyway, I found some bad things with FFMPEG:
+ Difficult for compilation in Windows. It was developed for best use in Linux world. To compile it in Windows, we need Cygwin or MSYS.

+ Loss documentation in practice. It takes me more than 1 hour to find the best command to convert MTS file to avi.



Finally, I compile FFMPEG successfully in Windows and my Ubuntu. I also run it successfully for my conversion need. However, let me show you some shortest ways to work with FFMPEG for conversion from MTS to AVI.

Install FFMPEG

In Ubuntu, it's very easy. Just open Synaptic package manager to find and install ffmpeg.
In windows, you need to compile ffmpeg before using. However, there a site contains some distribution binary package. You can download the final package to use in http://ffmpeg.arrozcru.org/builds/

Command to convert your MTS file to avi



ffmpeg -i your-mts-file.MTS -vcodec libxvid -b 18000k -acodec libmp3lame -ac 2 -ab 320k -ar 44100 -deinterlace -s 1440x1080 your-output.avi


If you run this in Ubuntu and found the error: Unknown encoder 'libxvid', please install libavcodec-unstripped (you can find this in synaptic package manager).

To understand more about above command, you should read the ffmpeg documentation here

Wednesday, November 25, 2009

Playing augmented reality with my business card

Augmented Reality is one of topics that I am doing research. I choose a simple demo to make this topic more interesting: playing with business card.
The target of the demo is: playing a video after detecting the marker on the business card.

FlarManager is the library that I choose to work because it's very flexible and easy to use. It wraps FlarToolkit and make it works with many Flash 3D engines: Sandy, Papervision3D, Away3D,...
This is the result:






Below is list of step that I did to make this demo run:
Step 1: Download FlarManager. You can get its source code from SVN here.
Step 2: Configure FlexBuilder and setup the project to build the whole source code of FlarManager (just follow steps in this tutorial)
Step 3: Capture my business card and print out the logo of my company.
Step 4: Use this online tool to create marker from the printed logo. After finishing this step, we get the output is a pattern file using in recognizing the marker under camera. You should save the output file with .pat extension (example: mylogo.pat). You must remember the resolution of your pattern for using in configuration of next steps.

Step 5: Open the FlarManager project by FlexBuilder, the FLARManagerTutorial_Collada.as is the default running demo. So, I choose this file to customize the code. I am very lazy and don't want to do any complex thing. He he
Step 6: Configure the marker.
+ Copy our .pat file into resource folder (or any places in your project).
+ Go to \resources\flarConfig.xml, add your pattern file location in the patterns section.

Step 7: Go to the FLARManagerTutorial_Collada.as file and write code to load video and play it on a plane. This is a very simple task for any Flash developer.

Step 8: Play the video when the marker is detected. To do this, you just need to add the Plane as child of this.activeMarker. FlarManager did everything and return to us the activeMarker in correct position. So, we just add our game above the active marker and play.


Do you want to have a special an AR business card with your own logo? He he, try this.

Monday, November 23, 2009

My tech stream Yahoo pipe

I love tech. So, reading tech news is 1 of my habits. I would like to share with you my Yahoo pipe to combine and collect latest technologies (it is not enough to cover all news every day, he he - but these are sources that I often read).

http://pipes.yahoo.com/trandangkhoa/technews
To get run and get data from this pipe as RSS, you can use this link:

http://pipes.yahoo.com/pipes/pipe.run?_id=140fad2e657ef7c3c1b8ce547772be87&_render=rss

Saturday, November 21, 2009

Build iPhone application by Flash CS5

This week, we need to decide whether we should choose putting Flash Professional CS5 into research/training targets of next month. Actually, we already had an iPhone team - with senior developers - has much experience on many projects. However, some Flash developers in our company  want to join to iPhone development. So, we need to consider learning roads to help them to join this interesting domain in shortest time.


How Flash CS5 supports developers to create iPhone application

Adobe creates a very clever solution to enable your Flash content to run on the iPhone. They don't create a Flash Player and run your Flash content inside. The Flash Professional CS5 support a iPhone packaging tool converts your Flash content into a real iPhone application. If you have experience on Unity 3D iPhone, you can imagine this as the same packaging tool.

Advantages of Flash CS5

+ Flash Professional CS5 is the only Windows development environment for iPhone Applications. We don't need to prepare expensive Mac computers for iPhone development.
+ There are more than 2 million Flash designers/developers compared to the 65,000 iPhone developers. The Flash community is so big, so it's easier to find solutions for technical issues in development.
+ There are millions of Flash games begging to be converted to run on the iPhone. => this forces Adobe must find a way to support this. It's not temporary, it's a real trend => Adobe solution must be persistent in a long time.
+ Familiar environment/languages with Flash developers => easy to learn.

Disadvantages

+ Adobe can not catch up with new advanced features in latest iPhone SDK. Flash developers can not use latest technologies from Apple immediately.
+ Currently, some video formats are not supported in the Adobe conversion solution (H264 is an example).
+ You cannot use the cool Flash PixelBender technology released last year in your iPhone Apps at this time.
+ The iPhone itself uses a fraction of the power compared to a PC. Be careful what you program. It may look good on your laptop but barely run on your iPhone.

Final conclusion

Flash CS5 for iPhone development is a great news. However, we can not choose something not stable for production. We need to try more before making decision. This will be a research target in R&D team later. Any new technology always needs time for growing and being proved its strength in the real life.

We're very happy to receive your feedback or any good news from this tech.

Thursday, November 12, 2009

How the iPhone locates you?

This article is for my beloved developers - who always want to know what the truth behind the stage is.

All content in this article is based on  iPhone cookbook - a great book for iPhone developers.




Methods for positioning used in iPhone

The iPhone uses three (or possibly four) methods to locate you.These technologies including:
+ GPS Positioning
+ WiFi Positioning
+ Cell Tower Positioning
+ Internet Provider Positioning

GPS Positioning

GPS system tracks your movement courtesy of a series of medium Earth orbit satellites provided by the U.S. Department of Defense. These satellites emit microwave signals, which your iPhone picks up and uses to triangulate your position to a high level of accuracy. Like any GPS system, this requires a clear path between you and the satellites, so it works best outdoors and away from trees.

WiFi Positioning

Core Location’s preferred pseudo-GPS geopositioning method calls on Wifi-positioning service provided by SkyHook Wireless.

SkyHook offers extremely accurate WiFi placement. When an iPhone knows the WiFi and WiMax routers you are near, it uses their MAC addresses to search SkyHook’s databases, positioning you from that data.

This way provides pretty accurate positioning and can usually locate you within a few hundred feet of your actual location

Cell Tower Positioning

Currently, iPhone use cell tower positioning service through:
+ Google Maps cell tower positioning.
+ SkyHook cell tower positioning (not sure 100%).

By this way, the iPhone uses its antenna to find the nearest four or five cell towers (of the service providers) and then triangulates your position based on the cell tower signal strength. You’ve probably seen cell tower location in action; it’s the kind that shows you about a half mile away from where you are standing—assuming you’re not standing right next to an actual cell tower.

Internet Provider Positioning

This approach uses an Internet provider location to find the nearest mapped Internet provider’s central office. The returned data is typically up to several miles off your actual location—unless you happen to be visiting your Internet provider.
SkyHook actually offers a third positioning approach, but it is never seen the iPhone use.

Hybridizing the Approaches

So, what iPhone acutally works with 4 above methods?

The iPhone approaches location in stages. Based on the accuracy level you request, it uses a fallback method. If it cannot accurately locate you with GPS or SkyHook WiFi mapping, it falls back to the cell tower location of Google Maps. If that doesn’t work, it presumably falls back further to SkyHook Internet provider location. And if that doesn’t work, it finally fails. The latest releases of the SDK actually provide multiple (asynchronous!) success callbacks for each of these fallback methods. You may receive three or four results at any time.

Wednesday, November 4, 2009

Programming language community index 2009

This is the index from Tiobe website of top programming languages until 2009


Position
Oct 2009
Position
Oct 2008
Delta in Position
Programming Language
Ratings
Oct 2009
1
1

Java
18.718%
2
2

C
16.891%
3
5

PHP
10.390%
4
3

C++
9.911%
5
4

(Visual) Basic
8.729%
6
8

C#
4.433%
7
6

Python
3.914%
8
7

Perl
3.776%
9
11

JavaScript
3.033%
10
10

Ruby
2.458%
11
9

Delphi
2.140%
12
13

PL/SQL
1.020%
13
49

Objective-C
0.902%
14
14

SAS
0.805%
15
16

Pascal
0.669%
16
20

ABAP
0.661%
17
19

Lisp/Scheme
0.605%
18
22

MATLAB
0.577%
19
12

D
0.570%
20
15

Lua
0.527%



The long term trends for the top 10 programming languages can be found in the line diagram below.

Predicting trends from this information
+ Some traditional languages as Java, C is down (not too much). These languages will not die (at least in 10 years later) because of the need to develop/maintain enterprise application/ embedded systems.
+ Scripting languages like Ruby, Python are trends at this time.
+ PHP still keeps its position. There are many open source from PHP community with great features. It can offer the cheapest solutions to develop application for small/medium organizations.
+ Objective C is still new but a hot trend because of the need to develop applications on Mac and iPhone.