Friday, May 27, 2016

Research about Pseudocode

Research Findings:
1.  Pseudocode is an informal high-level description of the operating principle of a computer program or other algorithm.
2.   There are many opportunities for developers to make mistakes, create unintentional complexity, or simply lose their way. Pseudocode is an incredibly useful tool in the developer's toolbox, helping her avoid many of the pitfalls that plague such a complex undertaking.
3.   Developers can look at the whole picture rather than the specific elements that make up that picture. They can be sure they have adequately defined the problem before they get too deep into the actual prototyping phase and realize they have forgotten something important. The prototyping phase can then move along more quickly, simply because there is no need to keep correcting code that has already been written.
4.   The output of design is Pseudocode.
5.  Pseudocode is logic without syntax. Architect needs to write readable pseudocode
6.  A workable solution is a solution that step by step logically considers and eliminates options.
7.  Pseudocode helps the developer stop thinking about syntax, start thinking about "is my logic logical? Am I making sense solving this problem? Is this solution step by step ?"
8.  Pseudocode bridges the gap between logic and syntax of building perfect statements.
9.  Pseudocode does not have to be perfect computer code, but it should make perfect logic.
10.  Pseudocode is an informal, high-level description of the operating procedure of a computer program or other algorithm. It uses the structural conventions of a programming language, but is intended for human reading rather than machine reading

Rule:
1.  Concentrate on logic first, build perfect statements later. [Golden Rule.]

Benefits:
1.  Focus on the big picture, instead of detailed level pointer manipulation.
2.  There is no standardised style or format, so one pseudocode may be different from another.
3.  To improve concentration, pseudocode helps.
4.  Programmer does not have to think about syntax. Programmer can concentrate on logic.
5.  Pseudocode can be reviewed by groups more easily than real code.
6.  Pseudocode allows programmers who work in different computer language to talk to each other.

Disadvantage:
1.  We do not get a picture of the design.

Goals:
1.  Very brief,
2.  Let other people understand the high level design of the algorithm

Code:
1.  Clean
2.  Executable and give right results.

Recommendations:
1.  For middle and hard level problems, need to write Pseudocode for communication and reduce defects.
2.  For very simple problem, don't need to write Pseudocode.
3.  I have written some pseudocode to help solve some middle problem, like parsing expression.
4.  Only use Pseudocode as high level design. And then write code to implement it.

References:
https://en.wikipedia.org/wiki/Pseudocode
http://www.ehow.com/info_10060077_advantages-using-pseudocode.html
http://www.cs.iit.edu/~cs561/cs105/pseudocode1/sld001.htm
http://formaldesign-techniques.blogspot.com/2009/03/advantages-and-disadvantages-of_20.html
https://docs.google.com/document/d/14x2S42cQ4J20uKRc_2LxrM-u39LE6j3M5FVCdQx5Jg8/edit
https://www.reddit.com/r/programming/comments/1250eg/how_to_crack_the_toughest_coding_interviews_by/





Wednesday, May 25, 2016

Research about Android and IPhone market

Reality:
1. Android is dominating the market, dominating the downloads, but it is losing the app sales, etc.
2. Android 4+ has 40% of the market.

Differences:
1. For releasing an app, Android is better than Apple, etc.

Feelings:
1. You will never know which is winning ultimately IPhone or Android ?

References:
http://www.businessinsider.com/iphone-v-android-market-share-2014-5
http://bgr.com/2014/07/01/android-market-share-2014/
http://www.forbes.com/sites/tonybradley/2013/11/15/android-dominates-market-share-but-apple-makes-all-the-money/
http://techland.time.com/2013/04/16/ios-vs-android/
http://www.inc.com/erik-sherman/should-mobile-tech-startups-focus-on-android-over-ios.html
http://www.inquisitr.com/467457/google-android-4-0-now-controls-40-marketshare/

References in China:
http://chanye.18183.com/201407/140166.html
http://www.cnbeta.com/articles/303821.htm
http://chanye.ptbus.com/151150/
http://www.ali213.net/news/html/2014-7/110648.html
http://mytwoandahalfcents.com/android-app-vs-iphone-app-which-do-you-choose-for-your-startup/











Research about Android File Transfer

Research Findings:
1.  USB drivers for Android phones and tablets are needed for connecting our devices to the computer. This includes, using the device for development which requires Android SDK USB drivers, ADB and Fastboot drivers, transferring media content and files to your phone storage etc.
2.  Android doesn’t include a file manager app by default.
3.   With the Android device in its default MTP mode (PTP is also available, and USB mass storage may be available on older devices), it will appear in your Windows or Linux file manager window as a standard device.
4.  Older Android devices support USB mass storage for transferring files back and forth with a computer. Modern Android devices use the MTP or PTP protocols — you can choose which one you prefer.
5.  USB mass storage is the standard protocol used by flash drives, external hard drives, SD cards, and other USB storage devices. The drive makes itself completely available to the computer, just as if it were an internal drive.
6.  Apple’s Mac OS X is a holdout — it doesn’t include MTP support at all. Apple’s iPod, iPhone, and iPad use their own proprietary syncing protocol along with iTunes, so why would they want to support a competing protocol?
7.  Any software program that supports grabbing photos from a digital camera will support grabbing photos from an Android phone when you select the PTP mode. PTP was designed to be a standard protocol for communicating with digital cameras.
8.  your Android device will work with digital camera applications that support PTP but not MTP. Apple’s Mac OS X does support PTP, so you can use PTP mode to transfer photos from an Android device to a Mac over a USB connection without any special software.
9.  4GB limit is a filesystem limitation
10.  Whether you’re formatting an internal drive, external drive, USB flash drive, or SD card, Windows will give you the choice of NTFS, FAT32, and exFAT.
11.  Android is a Linux-based operating system
12.  Google’s Android developers could modify the Linux kernel to fit their needs. Linux gives the Android developers a pre-built, already maintained operating system kernel to start with so they don’t have to write their own kernel.
14.  The hardware abstraction layer (HAL) defines a standard interface for hardware vendors to implement and allows Android to be agnostic about lower-level driver implementations. The HAL allows you to implement functionality without affecting or modifying the higher level system. HAL implementations are packaged into modules (.so) file and loaded by the Android system at the appropriate time.
15.  Android is a mobile operating system (OS) currently developed by Google, based on the Linux kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets.
16.  Android has the largest installed base of all operating systems of any kind. Android has been the best selling OS on tablets since 2013, and on smartphones it is dominant by any metric
17.  Android was unveiled in 2007, along with the founding of the Open Handset Alliance – a consortium of hardware, software, and telecommunication companies devoted to advancing open standards for mobile devices
18.  As of July 2013, the Google Play store has had over one million Android applications ("apps") published, and over 50 billion applications downloaded

Experience:
1. The storage is very limited, constrainted by storage size.

Tools:
File Explorer
Internal SD Card
External SD Card
Android Camera

Storage:
Internal Storage Options

Android Phones:
Sansung Galaxy S6
Android Version 5.1.1 Lollipop

System Architecture:
https://source.android.com/devices/

File Storage:
DCIM
Downloads

Image Transfer:
Preview App
Image Transfer App
FTU
Ext4

Good Tools:
Airdrop (Not Gallery)

Common Issues:
your device is rooted
Device Storage is too small
Hard to transfer media and movies to Computer
Pictures don't show in Image Transfer App
Which part is owned by Hardware Manufactor, Android Framework, and Application Developer ?
Many times doesn't recognize gestures.

References:
https://source.android.com/devices/
http://android.stackexchange.com/questions/48812/bypass-4gb-limitation-of-android-file-transfer
https://en.wikipedia.org/wiki/Android_(operating_system)



Friday, May 13, 2016

Research about API Gateway

Research Findings:
1.  The API Gateway service provides API aggregation and transformation, simplifying backend system integration and optimizing mobile content. When you have to connect your mobile app to backend systems, the API Gateway provides a flexible and scalable solution.
2.  Services are integrated with Cloud Foundry by implementing a documented API for which the cloud controller is the client; we call this the Service Broker API.
3.  The API Gateway is one of the products available on the Pivotal CF Mobile Services. It allows developers to easily create edge gateways proxy calls between devices and your organization internal services.
4.  Pivotal’s API Gateway uses javascript as its core language, but not your usual javascript engine. It’s powered by Nashorn, the latest JDK script engine. This approach allows developers to enjoy the benefits of using a simple script language such as javascript, while still being able to seamless integrate with Spring beans. You can invoke any Java Spring bean from your javascript code.
5.  Service brokers are an abstraction provided by Cloud Foundry that encourages loose coupling between an application and the service instances it consumes.
6.  Service brokers negotiate the details of the relationship between an application and its services, including the service's actual location, the appropriate credentials to use when accessing it, and limits on how much of the service's resources an application can consume.
7.  Every service broker follows a similar lifetime, involving separate actions by several different roles. Each of these actions, taken together, create the final service broker instance that application developers can consume
8.  Service brokers advertise a catalog of service offerings and service plans, as well as interpreting calls for provision (create), bind, unbind, and deprovision (delete).
9.  as companies think about cloud strategies, they need to think about API strategies, too. Secondly, this move by Amazon clearly puts pressure on cloud service providers to offer similar functionality – which Pivotal has already done.
10.  When you have a great idea for an API, just like a great blog series, you often need a way to publish, promote, and administer it. This is the fundamental idea behind API management. API gateways on the other hand simply front an existing system with open API formats (like REST and JSON), possibly authorization and authentication semantics, but definitely to make it easier for software to be built on top of an existing system.
11.  API gateways are considerably different than API management. Gateways simply expose and handle requests to services; API management provides value-add around that core functionality, like caching, rate-limiting, billing, reporting, key/credential administration, and real-time diagnostics.
12.

Keywords:
API Gateway
Service Broker

Terms:
Org, Space
Service Marketplace

Tools:
Ribbon
Eureka
Circuit Breaker
Zuul
Nashorn




References:
https://docs.pivotal.io/mobile/apigateway/
https://docs.pivotal.io/mobile/apigateway/dashboard-user-guide.html
http://docs.pivotal.io/pivotalcf/services/overview.html
http://docs.cloudfoundry.org/services/overview.html
https://docs.google.com/document/d/15G8ew0qEDqpuBTWH9YGHKhda6HaLvfKuS4pnB-CPm50/mobilebasic
http://www.3scale.net/2015/07/3scale-api-gateway-pivotal-web-services/
http://wwpi.com/aws-launches-api-gateway-to-build-run-scalable-application-backends/
http://www.developereconomics.com/api-management-tools-how-to-find-the-one-for-you/
http://www.slideshare.net/KaiWaehner/a-new-front-for-soa-open-api-and-api-management-as-game-changer
http://blog.smartbear.com/big-data/how-does-amazon-api-gateway-affect-api-management/
https://www.google.com/search?q=pivotal+cloud+foundry+api+gateway&safe=active&espv=2&biw=960&bih=484&site=webhp&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjgiMX08NfKAhVCjXIKHcDfBlIQ_AUICCgD#imgrc=VXVL9nf4v8DXuM%3A
https://www.google.com/search?q=pivotal+cloud+foundry+api+gateway&safe=active&espv=2&biw=960&bih=484&site=webhp&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjgiMX08NfKAhVCjXIKHcDfBlIQ_AUICCgD#imgrc=G3IFfhBIzCzDaM%3A
https://www.google.com/search?q=pivotal+cloud+foundry+api+gateway&safe=active&espv=2&biw=960&bih=484&site=webhp&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjgiMX08NfKAhVCjXIKHcDfBlIQ_AUICCgD#imgrc=O0lIoiUgmh_N1M%3A
https://blog.pivotal.io/pivotal-cloud-foundry/products/an-introduction-to-the-pivotal-cf-mobile-suite-api-gateway
http://apigee.com/about/products/apigee-edge-intelligent-api-management
https://blog.pivotal.io/pivotal-cloud-foundry/products/an-introduction-to-the-pivotal-cf-mobile-suite-api-gateway
https://spring.io/blog/2015/01/28/the-api-gateway-pattern-angular-js-and-spring-security-part-iv
https://docs.pivotal.io/mobile/app_analytics/development-guide.html

Research about Pivotal Cloud Foundry Architecture

Architectures:



Deployment Time:


Centralized Logging:
Centralized Logging Capability

uuid from end to end.


Run Time:

Architectures;