Subscribe to XML Feed
07 Jun 2010

World Wide Developer Conference 2010

This is my second year attending WWDC and I feel very lucky to have the resources to attend this year. Just automatically draft $75 dollars from each paycheck and you to can attend WWDC. I have always paid my own way to the event. This year’s conference was jammed pack with great information for iPhone/iPad developers. WWDC is under NDA, so I am not allowed to disclose any technical information about the conference. I am not even permitted to reveal any of the sessions I’ve attended the past week. So most of this blog post will cover my observations on travel, keynote, lines, and evening plans.

Pre-WWDC Pilgrimage

My day started out very early on Sunday to catch the first JetBlue flight out of Austin, TX to San Francisco. The flight had many attendees on board and just about everywhere you looked, an iPad was pulled out for entertainment. I was fortunate to have two friends attend WWDC this year. So I wasn’t traveling alone on this trip. The first thing planned upon arrival was the Pre-WWDC Pilgrimage that was organized by Jeff LaMarche. Jeff did a fantastic job of organizing two large buses to transport over 150 geeks to visit the Mothership. The trip was a blast. I met a quite of few fellow iPhone/Mac developers and thoroughly enjoyed talking about all things iPhone, SDK, and Objective-C tips/tricks. The main purpose of the pilgrimage was to purchase Apple swag at the company store. I picked up a few items for me, my wife, and friends. We all then had a bite to eat afterwards and returned to San Francisco. Sunday night concluded with a meetup of friends and other iPhone devs from the Austin area at a bar called the Cheiftan. Great times were had by all.


Keynote

I decided to get in line early in order to get a good seat for the keynote. I woke up at approximately 4:20 AM and jumped in line at around 5:00 AM. By that time, there were already over a 500 attendees ahead of me in line. There were more geeks crazier than me. I couldn’t fathom staying in line for the whole night. I met one gentlemen from Paris, France who was experiencing his first SteveNote. We spent the next hour discussing work, projects and possible keynote announcements. The line didn’t start moving until 7:30 AM or so. I spent the next two and a half hours outside Moscone West discussing our passion for software with other developers from around the world. There were over 5200 attendees from 52 different countries. It was a diverse mix of people waiting in line for the main event. Around 7:30 AM, the line then moved forward moving all of us inside, crammed in like sardines on the second floor of Moscone West. I am not complaining. I much rather wait inside with free breakfast and juice available. I managed to get a decent seat for the keynote address considering that press, VIPs, and Apple employees were given the best seats already. I manage to find a seat right smack in the middle of room with a big screen monitors to my left and right.

I got trapped by Steve Job’s Reality Distortion field during the keynote. It’s hard not to given the environment and surroundings. You have to experience the keynote first hand to understand. The air is electric with excitement and anticipation. Very much like the start of a rock concert. I am always surprised at the number of press that attend and the cameras that go off when Steve jumps on stage. It’s literally like watching the Super Bowl with tons of camera flashes that go off in the background. Nothing Apple announced during the keynote surprised me. Everyone was expecting a brand new iPhone. What impressed me the most was the new Retina Display that now allows the iPhone 4 to boast a resolution at 326 ppi display. The current iPhone 3GS screen resolution is 480 × 320. With Retina Display, the new iPhone 4 has a resolution of 960 × 640. I am looking forward to seeing crisp and clear text that John Gruber described on his recent post on the new device. I am also pleased to hear that Apple’s own A4 chip will make it’s debut with iPhone 4. No doubt, power consumption will be improved with an additional 2 more hours of talk time on 3G. I will certainly be placing my pre-order with the Apple Online Store on Tuesday morning (June 15).

ADAs and Stump the Experts

The Apple Design Awards were great to watch. You are just blown away by the winners. They push the envelope and the potential of the iPhone and iPad. All apps were well deserving. Firemint took home two ADAs for Flight Control (iPad) and Real Racing (iPhone/iPod Touch). Both apps are fantastic and fun to play. This year’s winners set the bar really high for everyone in the room. There was no controversy at all on whether an app was more deserving than the rest. All apps that won this year’s ADAs are all well deserved. The highlight of the evening and one of my favorite sessions at WWDC is Stump the Experts. The most notable memorable moment was when fellow attendee, Bill Atkinson, told his story of HyperCard. The audience gave Bill a well deserved standing ovation for is work on the original Macintosh. It’s great fun to see this game show get played out as members of the audience dual against some of the brightest engineers from Apple. I always come out of the session shaking my head and asking myself, “how on earth did they come up with that answer?”. Maybe I’ll find the courage next year to submit my own question for the panel of experts.

Inspiration and Ideas

Attending this year’s WWDC opened a whole new box of ideas for me. The new features that have been introduced with iOS 4 opens up so many potential app ideas. I can’t wait to see what developers will come out with in the next few months. Especially with the announcement of the new three-axis gyro sensor. It was really inspiring to meet and talk with some of the developers of your favorite apps (Mac or iOS device). Some of these well known developers are very gracious with their time and answer any question you may have. This was my second WWDC conference for me and it will certainly won’t be my last. I plan on attending next year and hopefully by then, I’ll have a couple of great apps to show off and talk about.

View Comments
27 May 2010

Cocoa Books Part 2: Big Nerd Ranch's iPhone Programming

This is a brief review of the second cocoa book I’ve read the past month. This particular book was focused on Cocoa Touch for the iPhone OS as compared to my first review of Cocoa and Objective-C: Up and Running which primarily covered cocoa apps for Mac OS X.

iPhone Programming by Joe Conway and Aaron Hillegass

Very first thing I noticed were the number of chapters that are included in this book. Overall, there are 28 chapters that span 381 pages. I thought this was great since most of the chapters would be small enough for me to complete in several hours (including exercises). I love that each chapter focused on key concepts of Objective-C and Cocoa frameworks. I approached this book with the goal of reading one chapter a day as suggested by the authors. The authors of the book also indicated that the material is based on their iPhone Development Bootcamp course. So I treated each chapter as an individual class. Again, I decided to start from the beginning with chapter 1 and work my way through the entire book.

The first few chapters cover the creation of a simple iPhone application and some core concepts of the Objective-C language. The chapter on Objective-C basics deals with the fundamentals of creating a class, initializing an object, setting up accessors and class methods. Great stuff and no doubt essential topics that are required when creating an iPhone app. One of my favorite chapters is the one devoted to Memory Management (chapter 3). This chapter does a fantastic job of describing manual reference counting and utilizing retain counts. The way they describe the dangers of releasing an object too early if a new owner of that object never retained it was straight forward. In fact, there is a simple example using this concept of passing a grocery list to your friend. This example shows you two ways of shooting yourself in the foot if you mis-handle your retain counts. You can either create a memory leak or deallocate an object prematurely. The authors do a good job of laying out the details of how easily it would be to make these errors. These are two common mistakes made by beginning iPhone Programmers. Then there is a nice transition from their description of how easy it is to create memory leaks to a nice discussion on how to avoid them using autorelease. This chapter alone is worth the price of the book. Memory management made absolute sense to me upon finishing this chapter.

Upon finishing the basics, the book dives right into iPhone development with chapter 4 (Delegation and Core Location). I love that the authors decided to use an actual framework (CoreLocation.framework) to teach you the basics of delegation. Choosing the CoreLocation.framework to demonstrate the use of protocols and showing how the stock AppDelegate conforms to the CLLocationManagerDelegate was a great idea. This example shows the reader how they can incorporate great iPhone SDK features into their own applications. This sort of content keeps the reader engaged and eager to get to the next chapter. Using an actual framework instead of some contrived code sample to demonstrate this important topic gives the reader some real world context. If you decide to go a step further and display your location on a map, you apply the same exact concepts when adding the MapKit framework. Select an object to conform to the protocol, look up the protocol in the reference guide, figure out which delegate methods to implement, create an instance of the delegate, inform the delegate of the object that implements the delegate methods. The authors describe these steps in an easy and seamless fashion. It’s very easy to follow along. This is such an important concept for beginners to understand and the authors did a wonderful job of explaining it. An iPhone app is one large delegate. You need to grasp the concepts of protocols and delegates if you plan to make any meaningful progress when developing your iPhone app.

UIView, ViewControllers and UITableViewControllers are presented each with their own chapters. It was pointed out that the Tab Bar (UITabBarController) is a subclass of UIViewController. Something I never realized before nor questioned. The book also covers how to create custom ViewControllers programmatically and with Interface Builder. Upon completing some of these core chapters involving ViewControllers, UINavigationControllers and UITableViewControllers the reader is left with some great boiler plate code that can be used in future projects. There is really only one correct way to draw table view cells. I am only talking about blank table view cells. Filling those cells with content is going to involve your own custom code. Each of the examples ultimately provide a great starter kit for your own custom iPhone project. There is great chapter devoted to sub-classing the UITableViewCell. It provides some great instructions on how to drop custom view objects on top of the contentView. It’s a recipe on how to develop your very own cell layout that I am going to find useful for my own apps.

When starting out with my first iPhone project I would often times run into this very common road block for newbies. How does one share their model data between multiple view controllers? Chapter 12 (UINavigationController) lays out a great technique that is commonly used by experience iPhone developers. The authors expressed that you should “have all data in the root view controller and only pass subsets of that data to the next UIViewController”. The solution to this problem is really simple and easy to implement. Just pass a property that has been previously set by the model instance. Don’t attempt to load the whole data model for the view controller that needs the data. Feed it only a subset of the data using properties. I am happy the author went over this technique in detail. This piece of advice will certainly be utilized in future iPhone projects.

The most important chapters that I found in the book are the ones that covered persistent storage. The book covers three main ways to save your data via archiving, SQLite, and Core Data. The book offered a rule of thumb when determining which set of “Persistent Mechanisms” to store your data. “If you are dealing with a small amount of data, say, less than a thousand rows, archiving is all you need.” I thought this was a great piece of advise. Why convolute your project with Core Data when ultimately you will only save less than 100 items/rows of data. Keep your app simple and go for the easiest persistent storage solution. There is a great table at the end of chapter 27 that summarizes the pros and cons of archiving, SQLite, and Core Data. Very useful when determining which solution is best for your project. I don’t want to go into great detail on the contents of each chapter. But I’ll be visiting the SQLite chapter quite often to make sure that I am correctly setting up my query correctly to fetch specific rows of data. The chapter on Core Data was very easy to follow and read. The object diagrams that depict the relationships between entities and their attributes was key to understanding how one would layout their entities within the data model in Xcode.

This is one of the best iPhone Programming books in the market. It’s on equal footing with Beginning iPhone 3 Development by Jeff LaMarche and Dave Mark. I highly recommend both books.

View Comments
27 May 2010

Cocoa Books Part 1

This blog has been pretty quiet the pass month. I haven’t posted anything since my iPad Review. I thought it was time to provide a status update with my progress learning Objective-C and Cocoa. I have spent the past month reading two books devoted to iPhone Programming and Cocoa. For this post I’ll express my thoughts on Scott Stevenson’s “Cocoa and Objective-C: Up and Running”. The second part of this post will be devoted to iPhone Programming by Joe Conway and Aaron Hillegass. That blog post should be available in the next couple of days.

Cocoa and Objective-C: Up and Running

The first book I decided to tackle was Cocoa and Objective-C: Up and Running because it was written by Scott Stevenson. A well known and respected Cocoa Developer. I have seen a couple of his CocoaHeads videos from the past and seen him host CocoaHeads WWDC08 in person. I was very impressed with his knowledge and quite fond of his cocoa tutorial site Cocoa Dev Central. So I wasn’t disappointed with his explanations of some of the most fundamental Objective-C topics. I decided to start from the beginning of the book even though I already have some experience with Objective-C and have already submitted a small iPhone utility app to the App Store. I thought it couldn’t hurt to review some basic C programming topics and Objective-C fundamentals. Chapters 2 thru 6 are very easy to digest for the experienced programmer. It was a nice primer for some advanced Objective-C concepts and sort of got me back into the mind set of a Cocoa programmer. In fact, exploring some of the key concepts of C was like going back in time 10 years ago. I remember trying to make some sense of some problem sets from my Operating Systems class in college while also trying to get a handle of the C programming language. Every homework assignment was to be written in C using vi on a Sun Ultra 10 Workstation. Professor Williams was very particular on where our homework assignments were to be completed. It has been a while since I learned pointers, dynamic memory and structs. But it was good preparation for re-learning memory management in Objective-C.

Chapter 6 was devoted to reference counting and the lifecycle of an instance variable. I loved that Stevenson shows his readers how to construct accessor methods (getters/setters) manually. For instance, he explains on why you need to autorelease the old object then retain the new one within the setter. Then he shows you how that can be done under the covers by using the @property directive. He even shows you how to use @property declarations to automatically generate instance values for “64-Bit Objective-C”. One thing I wish he didn’t do was utilize that pattern for the rest of the book. I prefer to manually declare my instance variables within the interface even though it’s consider redundant. Another concept that I thought was explained exceptionally well was Categories for Private Methods. I remember seeing some Apple sample code with an @interface directive being declared from within the implementation file and not the header. This confused the hell out of me. Now I understand that Objective-C has no formal way of creating private methods in a class. Place the category declaration in the implementation file if you care to use private methods. Chapter 7 of the book was solely devoted to Cocoa’s foundation classes. In my opinion, this chapter was dry and very difficult to read through since it read more like a reference book. It’s a very long chapter and the key gem was the explanation of Toll-Free Bridging. Again, I remember looking through sample code and seeing the exchange of NSString and CFStringRef without realizing exactly what benefit this provided a Cocoa programmer. Overall, Stevensons explanations of some of the fundamental Objective-C concepts caused me to have a quite of few ah-ha moments. It made me giddy that I was finally getting the hang of this language.

The most interesting and fun chapters of the book was 8 (Basic Controls) and 9 (Designing Applications Using MVC). In fact, I read Chapter 9 twice to make sure that I had full understanding of the concepts that were presented. Chapter 8 covered the majority of the built-in controls in AppKit. This chapter did a fine job on explaining Action/Target connections that are involved with Interface Builder and Xcode. And did a pretty good job of explaining the Responder Chain which can be a tricky concept to understand. My main gripe with this chapter was the length. It would have been better served if the chapter was broken up in pieces. My preference with programming books is to consume concepts in small parts. I try to devote myself to read one chapter per day (if manageable). Overall, I believe it took me 3 evenings to cover the concepts explained in “Basic Controls”. The same could be said about Chapter 9. There isn’t as much text to read in chapter 9. But there is a whole lot of source code to cover. Typing all the code in that chapter took me a while. Then trying to get the sample project to look, act and feel like how it was described in the book force me the read the chapter twice. There were a lot of small details that I missed when constructing the gallery application with Interface Builder. You have to be really alert to catch the small details that explain how to setup the UI with Interface Builder’s inspector. It’s very easy to skip a sentence and to miss a detail that should of been set within the attributes setting. I can’t forget to mention the way Stevenson laid out the gallery application. The reader was now able to view first-hand how an experience Cocoa developer compose their project structure. For instance, Stevenson expressed that simple cocoa projects can be constructed using the default application delegate class. All of your controls can be dropped in that one delegate class if you are writing a small app. But larger and complicated applications may be better served with separate window controllers that may or may not have their own XIB files. The same emphasis is also placed on View controllers. Creating building blocks through the utilization of sectioned view controllers and window controllers provide code portability, and ease of use in regards to code maintenance.

Overall, the book was fun to read with the lone exception of Chapter 7. But you really can’t get around the dry explanation of all the Foundation classes. There really is one way to describe an NSArray.

View Comments
11 Apr 2010

iPad Review (just my opinion)

There are plenty of reviews that go over the pros and cons of Apple’s new “magical and revolutionary” product. In fact, two of my favorites reviews are by John Gruber of Daring Fireball and Ars Technica. There is no shortage of iPad musing on the blogosphere. But this won’t deter me from expressing my own quick thoughts on the device. Including my personal top 5 favorite iPad apps. And really, who’s reading this blog anyway?

Just like every other early adopter of Apple technology, I received my iPad (16GB) on the day it officially released. When I placed my order with the Apple Online Store, I didn’t realize that the release date for the iPad was Saturday, April 3rd. I normally have all my packages, especially new gadgets, shipped to the office. And like any other hardcore geek, I spent all of Saturday morning and part of the afternoon at the office waiting for my iPad to be delivered. As sad as it may seem, I didn’t mind waiting at the office for the chance to get my hands on the most over-hyped computer ever known in our industry.

Portability

The iPad is slim but unexpectedly heavy. I have to agree with other reviewers when they say that it’s difficult to hold with one hand. I own a Amazon Kindle and 10.2 ounces is easier to handle with one hand than the iPad’s 1.5 pounds. The Kindle feels like it was made for reading because it’s so easy to handle. The iPad makes leisure reading awkward. I have to use both hands when reading a book or just lay the device on a flat table or surface. Already it feels a little constrained. The ease of handling the Kindle has spoiled me.

Consumption

I consume my fair share of blogs, tweets,and articles when browsing the internet. The iPad was created for consumers like me. What it does best is allow me to focus on one thing at a time when consuming media. Whether it’s browsing the web with Safari, watching Movies or reading a book, I can focus on the task at hand. That’s what I love most about the iPad. It blocks outside distraction from other apps. I would also like to mention that the glossy LED-Backlit IPS display is fantastic. I have alway been a fan of glossy screens. So I have a bias towards this type of screen. I think the resolution is just about perfect for reading. And I can’t get over just how great photos look on this device. Case in point is the new New York Times app “Editor’s Choice”. When that particular app is loaded, you can’t help but notice how crisp the photos look on their pages.

Creating Content

One of the biggest complaints made against the iPad is how difficult it is to create content. This includes creating documents, spreadsheets, email and notes. My experience with the virtual keyboard has been clumsy, even when in landscape mode. I don’t have very big fingers. It’s really easy to hit other keys on the virtual keyboard due to it’s sensitivity. Sometimes it feels like I am not even touching the screen and a letter will pop out of nowhere. I like to rest my finger tips on the actual keys and you can’t do that with the iPad’s keyboard. This has caused me to look down at the keyboard while typing. This alone cuts my typing speed from 60 wpm to 25 wpm. Also, syncing files to your Pages, Numbers, and Keynote applications is a multi-step process that includes iTunes. It’s not difficult to get documents on your iPad, but I feel there is a lot of room for improvement in this area. At least allow the iWork suite to sync to my MobileMe disk and discover my documents.

Overall, the iPad will do a decent job of allowing you to edit forms on web pages, compose email, and edit existing documents. If you need to type a 10 page proposal for work, the virtual keyboard won’t cut it. You need to break out your bluetooth physical keyboard.

App Selection

Right at launch, there were already over a 1,000 iPad specific apps available. The majority of those apps didn’t even have a physical device for testing. But most of those apps I downloaded function pretty well. Some of the apps I purchased did have some bugs. Hopefully most of the kinks will eventually get ironed out in future releases. I reminded myself that developers only had 60 days to complete and submit their apps. No small task. There was a headliner app for each of the major categories. For example, the news category had some stellar apps that include, New York Times, Instapaper, NPR and USA Today. For a news junkie like myself, this was total bliss. Each of those apps are well done and provided a reading experience I never encountered before. NPR’s iPad app totally blows away it’s own website. I am actually surprised at the quality and design of the app. Then under the Books category there were two gems, “The Elements” and “Kindle”. The Elements app is by far my favorite app. The experience is something out of a Harry Potter book with small animations that demonstrate’s each element on the periodic table. I imagined this is how future text books will look like if they used the iPad as teaching tool. I was also pleasantly surprised to see 1Password available. 1Password had become one of my most used and valuable tools on both my Mac and iPhone. There was no shortage of selection of quality apps for the iPad launch. I never once considered installing any of my iPhone apps to my iPad.

Favorite iPad Apps (So far…)

- NetNewsWire (Easy choice since I am always reading blogs)
- The Elements
- GoodReader (PDF Viewer)
- Kindle (Too much invested in the Kindle eco-system)
- NPR (Great source for news. Waiting for the release of ‘This American Life’ App.)

Final Thoughts

The iPad hasn’t changed my lifestyle. I am not a road warrior or in need of a portable computer for my daily computer needs. My 15’ Macbook Pro handles all my computational tasks very well. My iPad serves nothing more than a convenient portable computer when sitting on my couch, front porch or bed. It will serve me well when reading books, browsing the web, watching television shows and writing email. When I do travel, I don’t plan on taking my laptop. The iPad will be the only portable computer accompanying me.

View Comments

Older Posts

Finding my identity as a coder (side-projects) 03 Apr 2010 Comments