Wednesday, April 27, 2011

After decades of anticipation, the white iPhone has finally arrived.

Apple finally announced that the white iPhone will go on sale Thursday, and in a perfect world that would be fresh news. Not earth-shattering news, but an informative story for the folks who have been waiting for this oft-delayed gadget -- assuming those people still exist.
http://www.pcworld.com/article/226403/white_iphone_4_goes_on_sale_thursday.html

Thursday, April 21, 2011

UI Hacker - Code for Fun: iPhone: Get the class name of an object

iPhone: Get the class name of an object
Sometimes you want to know what type of object something is, when pulling it out of an array. In Obj-c there's a simple way to do that:

NSLog(@"object type = %@", [[myObject class] className]);
or
NSLog(@"object type = %@", [[myObject class] description]);
or!
if( [[myArray objectAtIndex:i] isKindOfClass:NSClassFromString(@"MyCustomClass")] ) { NSLog(@"it's a MyCustomClass"); }



UI Hacker - Code for Fun: iPhone: Get the class name of an object: "Sometimes you want to know what type of object something is, when pulling it out of an array. In Obj-c there's a simple way to do that: NS..."

Friday, February 18, 2011

Laws of Software Development

Bram's Law
The easier a piece of software is to write, the worse it's implemented in practice. (Bram Cohen)

Brooks' Law
Oversimplifying outrageously ... adding manpower to a late software project makes it later. (Fred Brooks)
The Cardinal Fundamental Law of Programming
It's harder to read code than to write it. (Anon. Documented by Joel Spolsky)

Conway's Law
Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure. (Melvin Conway)

Eagleson's Law
Any code of your own that you haven't looked at for six or more months might as well have been written by someone else.
Fitts' Law
The movement time required for tapping operations is a linear function of the log of the ratio of the distance to the target divided by width of the target. (Paul Fitts)
Gall's Law
A complex system that works is invariably found to have evolved from a simple system that worked. The inverse proposition also appears to be true: A complex system designed from scratch never works and cannot be made to work. You have to start over, beginning with a working simple system. (John Gall)
Greenspun's Tenth Rule of Programming
Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified bug-ridden slow implementation of half of Common Lisp. (Phillip Greenspun)

Hartree's Law
The time from now until the completion of the project tends to become constant. (Douglas Hartree).
Hoare's Law
Inside every large problem is a small problem struggling to get out. (Charles Hoare)
Hofstadter's Law
It always takes longer than you expect, even when you take into account Hofstadter's Law. (Douglas Hofstadter)
Lehman's Law of Continuing Change
A program that is used in a real-world environment must change, or become progressively less useful in that environment. (Manny Lehman)
Lehman's Law of Increasing Complexity
As a program evolves, it becomes more complex, and extra resources are needed to preserve and simplify its structure. (Manny Lehman)
Letts' Law
All programs evolve until they can send email. (Richard Letts).
C.f. Zawinski's Law.
Lubarsky's Law of Cybernetic Entomology
There is always one more bug.
Mosher's Law of Software Engineering
Don't worry if it doesn't work right. If everything did, you'd be out of a job.
The Ninety/Ninety Rule
The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time. (Tom Cargill of Bell Labs)
Parkinson's Law of Data
Data expands to fill the space available for storage. (Based on Parkinson's Law by Cyril Northcote Parkinson)
Proebsting's Law
Compiler Advances Double Computing Power Every 18 Years (Todd Proebsting)
Spolsky's Law of Leaky Abstractions
All non-trivial abstractions, to some degree, are leaky. (Joel Spolsky)

Wirth's Law
Software gets slower faster than hardware gets faster. (Martin Reiser, popularised by Niklaus Wirth)
Yannis' Law
Programmer productivity doubles every 6 years. (Yannis Smaragdakis)

Zawinski's Law of Software Envelopment
Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can. (Jamie Zawinski)

Tuesday, September 21, 2010

Collateral Damage: iPhone Tutorial ~ UIButtons and Animation

Collateral Damage: iPhone Tutorial ~ UIButtons and Animation: "[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5]; //Sets the Animation time to .5 Seconds

/*The Below Sets the transition to flip the button from the right. */
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:btnMyButton cache:YES];

[UIView commitAnimations];//Starts the Animation"

Monday, March 8, 2010

Apple’s iPad Launching April 3

This morning, Apple finally announced the release date for its anticipated iPad, detailing that the tablet device will be available starting Saturday, April 3.

Monday, February 1, 2010

Start Developing iPad Apps with iPhone SDK 3.2 beta

iPhone Developer Program Members can start developing the next generation of applications for iPad with iPhone SDK 3.2 beta, now available in the iPhone Dev Center.

The iPhone Dev Center also provides members with additional resources including the iPad Programming Guide, iPad Human Interface Guidelines, Preparing Universal Applications, and sample code.

Wednesday, January 20, 2010

Adding custom view in Navigation Bar

For my example I used label, you can use any view.

CGRect labelFrame = CGRectMake( 0, 0, 100, 20);
UILabel *aLabel = [[UILabel alloc] initWithFrame:labelFrame];
aLabel.font = [UIFont systemFontOfSize:13];

aLabel.textColor = [UIColor colorWithRed:0.22 green:0.0 blue:0.0 alpha:2.0];
aLabel.backgroundColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.0];
aLabel.textAlignment = UITextAlignmentRight;

aLabel.text = @"Custom";
//Important lines
UIBarButtonItem *aLabelItem = [[UIBarButtonItem alloc] initWithCustomView:aLabel];
self.navigationItem.rightBarButtonItem = aLabelItem;
//dont forget to release lable
[aLabel release];

Monday, January 18, 2010

Setting background color of UIView as of TableView

Setting the background color of UIView to background color used for table view by iPhone OS is pretty east . Just put the following line of code in your viewController's viewDidLoad or any UI initialization method.


self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];


And here you go...


Wish You All Belated Happy New Year....