Custom Search

Tuesday, September 28, 2010

BlackBerry's Revolution through Playbook

BlackBerry is going to launch a enterprise ready professional grade tablet "Playbook"  with a whole lot of features to its users.
Some of the features are here below
  • Ideal for games, media, apps and everything the real Internet offers
  • Full Adobe® Flash® 10.1 enabled
  • Built-in support for HTML 5
  • No-compromise, beautiful rendering of text, graphics and video
  • 7" LCD display, 1024 x 600 screen resolution
  • 5.1" x 7.6" x 0.4" (130mm x 194mm x 10mm)
  • 0.9 lbs (400g)
  • Built-in microUSB connector
  • Multi-touch capacitive screen
  • Wi-Fi® 802.11 a/b/g/n
  • Powerful, user-friendly QNX technology - it's what the World Wide Web runs on
  • On-screen keyboard
  • True multi-tasking
  • Crystal clear HD display
  • Rich stereo sound
  • 3 MP high definition forward-facing camera
  • 5 MP high definition rear-facing camera
  • Codec support for superior media playback, creation and video calling
  • 1080p HD video; H.264, MPEG4, WMV HDMI video output
  • Micro USB, Micro HDMI, and DLNA media streaming
  • Push technology,Email, calendar, BBM™, tasks, documents and more BlackBerry security and data efficiency
  • Full computing power in a tablet format
  • 1 GHz dual-core processor
  • 1GB RAM
  • Symmetrical dual-core processing
  • Rapid development environment
  • Reliable BlackBerry Tablet OS, powered by QNX technology
  • Supports POSIX OS, SMP, Open GL, BlackBerry® 6, WebKit, Adobe® Flash®, Java® and Adobe Mobile AIR
  • Out-of-the-box compatibility with BlackBerry® Enterprise Server
  • Seamless pairing for a secure window into your BlackBerry® smartphone
  • 3G access via existing BlackBerry smartphone service plan
  • Corporate data access
  • Secure and manageable

Creating and Deleting Folders in iOS 4

iOS 4 comes with a bunch of features and one of them is folders. You can manage and arrange the applications the way you want it to be. Its an amazing features isn't it?


    Here is the Video that demonstrates how you can achieve this

Creating IPhone Applications in Mac OS X Tutorial - 1

Here is the tutorial to create a very basic iPhone application with the primary focus for beginners. 
iPhone applications development can be done only in mac, though some alternatives exist which are not recommended.

To start up with a simple tutorial follow the below instructions:
  • Open XCode from the dock
  • Create a new View Based application from the templates provided.
  • Give a new name for the project as Tut1.
  • Now open the Tut1ViewController.xib file under the Resources section in the project
  • Now the interface builder application gets launched opening the Tut1ViewController.xib file. xib files are generally referred as NIB files. These are the interface files wherein you can drag and drop simple components like labels , buttons, text fields and complex components like maps, web-views and so on. For time being since this is the first tutorial we will concentrate on simple components
  • Once the Tut1ViewController.xib is opened select the library option or press (Command-shift-L) to launch the library.
  • Now drag and drop a label to Tut1ViewController.xib file 
  • Double click on the label and edit the text.Save Tut1ViewController.xib file and close it.
  • In the Overview section on the top pane select iPhone simulator . We wont run it on the device since it requires special provisioning profiles which is got by registering to apple developer account.
  • In Xcode click on the Build&Go option at the top
  • Sample application is launched in the iPhone simulator

Thursday, September 23, 2010

MAC OS X command Line tips. Part - II






A powerful command for text to speech conversion from text file.
$root:~ say -o sample.aiff -f sample.txt

 Drag and drop the folder to the terminal to get the full path
 $root:~ cd < drag the folder here >
        
This drag and drop mechanism can be used for any command where you need the path
Execute the last command   $root:~ !!

Using NSUserDefaults in iphone code

Saving a string to NSUserDefaults:
NSUserDefaults *settings = [NSUserDefaults standardUserDefaults];
[userSettings setObject: @"Sample" forKey: @"key"];
[userSettings synchronize];

Retrieving the saved data using NSUserDefaults:
NSUserDefaults *settings = [NSUserDefaults standardUserDefaults];    
[userSettings stringForKey:@"key"];

Similarly basic types as integer, Boolean, float and so on can be set to user defaults.

Getting the iPhone phone number using NSUserDefaults:
[[NSUserDefaults standardUserDefaults] objectForKey:@"SBFormattedPhoneNumber"];

Note: Never try to save critical information as passwords in the user defaults

Essentials for good User interface in iphone application

Point # 1
Problem Solution: The most and the important key point under consideration is, the application must be able to solve the problem statement elegantly. You should know what kind of application is to be developed and that should be a mere solution to the problem statement.



Point # 2
Clearly Define the type of the application: The application types are distinguished as shown in the following grid
Application Type Grid
  • Serious / tool :  In this kind of applications , concentration on the functionality is more rather than presentation .Therefore these applications are not graphically rich. A key note to be made about these kinda applications is that keep all the UI controls clean and aligned neatly.
  • Fun/Entertainment:  These kind of applications are intensely graphical, multitouch centric.
  • Utility: These applications normally have a single screen and are efficiency focused. (Middle of the grid)
Point # 3
Usability of the application:  Once you know what kind of applications, the next thing to be considered is the usability of the applications.Some of the points on thumb under consideration are:
  •  Solid application hierarchy
  •  Clean layout
  • Structural integrity is of main focus
Point # 4
 Good App Icon: The saying "First impression is the best impression" is always true when it comes to visual things. Therefore its really necessary to have a good looking icon for the application. Certain things to be considered when choosing an icon:

  • Do not have application name inside the icon.
  • Let the icon have high quality art in it
  • Its really good if the icon reveals what the application is all about and what it does
  • Remember that an icon is the applications business card.
Point # 5
 High Fidelity User interface: 
  • Making it IPhone like
  • Employ tactile design
  • Start with paper prototypes and pencil sketches
Point # 6
Dynamic content: 
  • Your app needs a pulse
  • Make your application to be dynamic by providing regular updates. By giving Updates the users will be pleased with the application.
  • Make your store attractive
Point # 7
Animation: 
  • In order to give a realistic look to the application animation is must
  • Situations like deleting some items, moving items, selecting pages and so on
       Use Animation to: 
       - enhance a task or concept
       - provide valuable feedback
       - clarify a process or concept
      
        Avoid :
      - Animating everything
      - Gratuitous animation
      - Distracting from the main task

Point # 8
 Application needs a definition statement:
     Define a solution not a collection of features

Wednesday, September 22, 2010

MAC OS X command Line tips. Part - I

  • open  : $root:~ open .  Opens the current directory in the Finder
  • top     : $root:~ top -o vsize  This gives the statistics about the memory usage by the applications.    Press q to quit.
  • sips   : $root:~sips -Z  250X250 sample.png  This command resizes the image to the     specified resolution
 Some shortcuts to use in Command line :
  • Control-a  takes control to the beginning of the line 
  • Control-e  takes control to the end of the line
  • Control-b  move back on character
  • Control-f   move forward one character

Using say command in Mac OS X

For all the MAC OS X users here is a good tip of text to speech conversion mechanism using the say command line tool.
Steps to do:
  • Open the Terminal
  • Type the following command -> $root:~ say hi
This is the most simple thing that can be done with this command.The default voice is Victoria.
There are lots of fascinating features about this command line tool. You can output the voice as an audio file , also one can specify the male or female voice and so forth.
Following are some male voices:
  • $root:~ say -v Fred hi
  • $root:~ say -v Junior hi 
 Following are some female voices:
  • $root:~ say -v Kathy hi
  • $root:~ say -v Agnes hi 
Command to output the voice to an audio file
      say -O hi.aiff hi
      This will save the file hi.aiff to the current directory. 

Using say command in perl programs
      `say hi`;

 

Concurrency with NSOperation: (Threading What-why-where-how)

What is concurrency?

- Doing multiple things together. Often known as multi-threading

Why bother?

- Keep the UI responsive

- Leverage idle resources

Where to take advantage of concurrency?

- In case of intense computations like parsing or image manipulations concurrency is really suitable. This is needed for good user experience in applications by not blocking the UI or the main thread thereby enhancing the application performance

- During Significant disk I/O like accessing large data sets and importing data

Note: Instrument before using this feature. Do not use for simple operations where you gain nothing much with this approach. Eg: adding a+b in separate thread. Find out the granularity and then decide whether concurrent is really required

Where to avoid Concurrency?

- During networking procedure do not use concurrency as these events consume high latency

- Use asynchronous API's instead of synchronous. In case of asynchronous API's system handles concurrency for you. Therefore avoid blocking (synchronous) API's for network tasks

- Do not use concurrency for idle behaviors. Instead use NSTimers for such processes, where CPU cycles are wasted.

The Challenge

- Traditionally threading is really hard

- Managing shared mutable state is difficult

- IPhone OS ( NSOperation) makes it a lot easier

Concurrency simplified - Thread confinement

- Keep object access confined to one thread

- Forget about locking, signalling, sync points.

- NSOperation and NSOperationQueue provide this

NSOperation:

- Compelling object oriented encapsulation

- here you can know the state (isExecuting,isFinished …) or set dependencies or you can set priority

Tuesday, September 21, 2010

A basic note on UIImage

UIImage
Its a wrapper to the existing CGImage class. CG refers to core graphics and is basically C API's with whole lot of features.

- In the case of imageNamed: method the image is actually cached by the OS .All the subsequent calls will return the cached image. However with imageWithContentsOfFile: method the image is lazily loaded on demand.Lazy loading is one of the key point to be considered for better performance.

Relevance:
- Avoid loading many images at once, particularly in the applicationDidFinishLaunching: or viewDidLoad: method. This can slow down the application or the view that is to be loaded.
- Iphone OS itself uses the imageNamed: to load the images from the NIB

When to use imageWithContentsOfFile:
- Any image that is not needed immediately
- images used infrequently or rarely. This is to avoid the OS caching images that are not used frequently in turn not pressurizing OS cache.