Archive for the ‘Objective-C’ Category

CocoaConf DC Objective-C and Interface Builder Presentations

CocoaConf DC wrapped up on Saturday, and I thought I’d post the slides and Xcode projects from my presentations here. The conference had an awesome lineup of speakers, and I was a little bummed that prior commitments kept me from attending most of the other sessions. The couple I did manage to get to were excellent though.

Anyway, the first presentation I did was an introduction to Interface Builder targeted to beginners, and the second was an intermediate-level session exploring some cool features of the Objective-C runtime system. You can download the slides and the code from the links below.

Understanding Interface Builder

Understanding Interface Builder Slides


Understanding IB Xcode Projects

Objective-C Runtime Magic

Objective-C Runtime Magic Slides


Objective-C Runtime Magic Examples

Objective-C Tutorial Videos

I was in Dallas last week teaching iOS (iPhone/iPad) development at Neiman Marcus, and due to the wonderful, wintry weather (hm, nice alliteration), the second day of the class had to be cancelled. So I pushed out some homework assignments and PDFs of the course material via Dropbox, and put these videos together for some of the trickier bits on Objective-C.

http://vimeo.com/hubnut/?user_id=aboutobjects&color=00adef&background=000000&fullscreen=1&slideshow=0&stream=uploaded_videos&id=&server=vimeo.com

iPhone Development Tutorials Hit The Mark

I’m accustomed to getting occasional emails expressing appreciation for our iPhone development tutorials, but this one I received last week really blew me away. Here it is in its entirety:

Dear Mr. Lehr:

A small note to convey my sentiments regarding your tutorials.

The internet is rife with many iPhone tutorials. Unfortunately, many of them appear to be a re-hashing of the same tutorials and code providing little value. Almost all of them also use Interface Builder, which, though useful and has its valued purpose, is not always helpful in terms of a teaching instrument the way its applied (which appears to have more to do with reducing the needed educational content and replacing it with a few click and drags).

Your tutorials are unique in that they approach the programming tasks from the programmatic perspective instead of the Interface Builder perspective. This is novel and exposes your genuine interest in providing an actual education regarding the subject matter. This alone is outstanding, setting you apart from almost every other tutorial offering available. Indeed, it’s been my experience that only the “real pros” that offer the programmatic approach in tandem or as an alternative to the Interface Builder approach.

Your tutorial projects are complete. By way of example, Editable TableView, is a complete project which illustrates the commonly required aspects of this kind of project. Most tutorials available on the internet are incomplete, showing only a small portion of a project, or worse: offering a code snippet, and therefore devoid of the broader application context.

Your tutorials are well annotated, in a manner many commercial firms would use. Your comments are as complete as the code and projects, always being sure to convey the underlying code issues and therefore always explaining the real issues at hand.

It would not be fair to complain about the quality of other tutorials as they are often provided free and represent an effort by people in the community to provide something to others at their own expense. That said, sometimes the tutorials are nothing more than resources designed for commercial purposes, such as selling a book, and this interest comes through as a more pressing priority than the tutorial itself rendering them to various stages of uselessness. Whilst I would suggest yours are also provided for commercial purposes, the efforts put forward allows your offerings to standalone as quality work in and of themselves. This underscores your professionalism and again underscores your commitment to training.

Pretty remarkable, isn’t it? Someone who doesn’t know you taking 20 minutes to tell you. at length, how impressive your tutorials are and why. That’s a result of the impact you have made — your doing. I only wish I would have found them when I had started working with the iPhone a couple of years ago! In the meantime, I have become a professional on the nature and quality of other tutorials and can speak from a position of experience.

Please kindly accept my commendations on such a terrific job on your tutorials. Your contribution is as outstanding as it is impressive. You certainly set a new bar, which, though perhaps not hard to move, clearly took considerable effort and skill to move it to where you have. Very nice work. Thanks for setting such a fine new standard. I wish you the very best.

Sincerely,

[Name withheld by request]

Vancouver, BC, Canada

It’s incredibly gratifying to know that someone has gotten that much out of the tutorials. And I really, really appreciate the feedback. Thanks!

About Objects Student’s iPhone App Featured on the App Store

Craig McLeod, a developer at Resort Technology Partners who attended the About Objects Objective-C for Beginners and iPhone Programming Workshop classes back in October, sent me an email last week to let me know that his team’s very cool REALSI app is now available on Apple’s App Store. Here’s what he wrote:

January 26, 2010

Hey all,

My company started on a complex iPhone app, REALSKI, an Augmented Reality iPhone app, weeks before I went to my About Objects class. When I came back, I was able to jump into development become a key member of the project!

Apple has featured REALSKI under New & Noteworthy apps in iTunes as of yesterday. I don’t know how long it will stay there, but there is a possibility of Apple featuring it more prominently later on. They contacted us about promoting it last week.

It’s kind of a big deal to have a featured app so I’m telling people. The app requires an iPhone 3Gs and it is free. It comes with 5 ski resort maps included and there are over 80 more ski resorts available for download at $0.99 each.

What is augmented reality?
With the iPhone it is data/information layered over your iPhone camera’s current live view. We have taken ski run GPS data so that when you are at a ski resort you can hold up your iPhone and see the runs/lifts/buildings around you labeled accurately to what you are looking at through your iPhone’s camera.

The web page:
http://www.rtp.com/realski

This is me showing an early demo to Olympic and X-Games gold medalist Shaun White here in Vail this season. All the Olympic hopefuls are training down the road at Copper Ski Mountain and the Burton (original snowboard company) Team came over to Vail.
http://tweetphoto.com/5787850

Here is a pic of it being used a the World Cup ski race at Beaver Creek this season.

http://tweetphoto.com/5819905

The direct link to the app in iTunes
http://itunes.com/apps/realski

Craig McLeod demoing his team's (apparently jaw-dropping) REALSKI augmented reality iPhone app for Olympic medalist Shaun White and unidentified friend.

The picture of Craig demoing the app to Shaun White is too cool to leave as just a tweetphoto link (see above), so I just had to include it inline here.

Needless to say, I’m thrilled that Craig feels our training helped get him up to speed on iPhone development quickly enough to be a key contributor to a cool app that shipped just a few months later, though ultimately the credit goes to Craig. Nothing makes a teacher look so good as a great student. Way to go, Craig!

Slides from iPhone 101 at 360iDev

Here are the slides from the morning and afternoon sessions of the iPhone 101 class I gave at the 360iDev conference in Denver a couple of weeks ago. The morning session consisted of an introduction to programming in Objective-C. In the afternoon, we got into to iPhone development with UIKit.

Morning Session (PDF, 3MB)

Slides from the morning session of iPhone 101 (Introduction to Objective-C)

Afternoon Session (PDF, 5.2MB)

Slides from the afternoon session of iPhone 101 (Introduction to iPhone Programming)

I’ve cleaned up the Xcode projects I demoed during the lab exercise sessions and I even added numerous comment statements to the code to make things easier to follow. I’ll zip those projects up and post them as well, shortly.

Reactions to September iPhone Classes

I just finished teaching a two-week series of iPhone training courses last Friday, and I’m going to be heading out to Cupertino, CA on Sunday to deliver another one. (Okay, who’s the nut who schedules this stuff? Oh wait … that would be me.) Well, in spite of the grueling schedule I thought the class went really well, and feedback from the students was really great!

One of the unusual things about the class was that nearly half the attendees were from outside the U.S. (with the U.S. contingent including people from NASA and Penn State University). While it’s not uncommon for us to have students fly in from Canada, folks in this class came from an assortment of countries, including Ireland, France, and Venezuela. I think we all enjoyed the international flavor!

The training consisted of a series of courses: a 4-day ANSI C Programming course, a 2-day Objective-C for Beginners course, and a 5-day iPhone Programming Workshop course, presented back-to-back over a 12-day period with a one-day break. It’s an intense schedule, but seems to be the only way to cram all the material into a two-week delivery. And for most people that seems to be the outer limit of the amount of time they’re able to be away from their regular day jobs to attend.

Taking the full series tends to be most appealing to folks who are either relatively new to programming, or who don’t have a great deal of recent experience coding in compiled languages such as C, C++, C#, or Java. One of the participants who attended the most recent class wrote a series of blog entries about the experience, concluding with these thoughts:

11 days with 1 day off in between. 4 days in ANSI C (fantastic fun, learn do a lab, learn do a lab). Then 2 days in Objective C. Then 1 day off (Washington DC baby!). Then 5 days on the trot of iPhone programming starting not with the graphical Interface Builder but doing everything by hand. For me, this was THE way of learning and building real understanding and strength.

I came home with no sleep on the overnight return to Belfast, severely jetlagged but started coding Monday morning (since I was awake at 5am anyhow). I now feel comfortable in Xcode and very comfortable in Interface Builder. I know my view from my view controller from my UIVIEW from my App Delegate. When the error messages come (and they do, oh yes) I understand their complaint and I know where to heal their little bruises. [so far I hasten to add]

Read more

Here’s the complete set of postings on the class from Max O’Malley’s blog:

And here’s a sampling of feedback from some of the other attendees:

    “The course format is arguably the best in the market today. The course should be a must for people intending to build serious and robust applications for the iPhone.” — V. Suresh

    “Good course, good value. Thanks!!” — Misty Patcyk

    “Well presented. The pace and content were perfect for my needs. This was the most enjoyable course I’ve taken in years.” — Robin Winsor

    “The material is just perfect….In two weeks I learned more than in one university semester.” — Nicos Palimidis

    “[The instructor was] extremely knowledgeable. Really knows his stuff.” — Lynn Jenner

    “If you want to learn Objective-C, this is the course” — Steve Nelson

    “This course has been very important in shaping my thoughts for the future. It confirmed my love of coding and enabled me to begin my C/ObjC/iPhone journey.” — Richard Johnston

    “Great starting point for beginners.” — John Dutchak

Thanks everyone! Meanwhile, the iPhone Programming Workshop in Cupertino has already sold out more than a week before the start of class, so looks like we’re going to have another full house. Should be fun!

iPhone 101 Training at 360iDev in Denver

We just signed an agreement with the great folks over at 360iDev to present a one-day iPhone training class entitled iPhone 101. Although we were excited about the opportunity to do this, at first it looked like we might be stymied by a scheduling conflict.

Many thanks to Mike Sanford of Flipside5 for freeing me up by agreeing to cover day one of our own iPhone Programming Workshop here in Reston. The folks who have signed up for that class should be in for a real treat!

I just finished putting an outline together for the iPhone 101 course. It’s intended to be a fast-paced introduction, covering everything from the basics of C and Objective-C, through Xcode, Interface Builder, and Cocoa touch. For new folks it’ll be a light-speed orientation that should give them a solid overview of the key topics they’ll need to focus on to get up to speed.

For developers who’ve already been playing around with Objective-C, UIKit, Xcode, and IB for a while, it should serve to answer many of the questions they currently have. In fact, the class should help them get over the hump on things that may have them stumped at the moment.

In any case, if you’re planning to attend, be sure to bring your laptop, and hold onto your hat — we’re going to go pretty fast, but there’ll still be plenty of time for a decent amount of hands-on fun!

You can view the iPhone 101 training course outline here, or download the PDF version.

Slides from Objective-C/Java Comparison Talk

For anyone who may be interested, here are the slides from my presentation, Objective-C and Java: A Comparison, given at the August, 2009 Northern Virginia Java User’s Group meeting.

Objective-C and Java Slides (PDF, 3MB)

Objective-C and Java: a Comparison

That’s the title of a talk I’m giving this week at a meeting of the Northern Virginia Java User’s Group (NovaJUG) in Reston, VA. Here’s the abstract:

There’s a fair amount of anecdotal evidence that Java developers
disproportionately own Macintoshes and iPhones. Given the stunning growth of the
iPhone platform, many of us are probably wondering, “So what’s up with
Objective-C, Cocoa and the other technologies that ship with the iPhone SDK? Is
this stuff at all relevant to Java development and/or is it something I might be
interested in tinkering with in my spare time?”

Objective-C should arguably be of interest not only to Java developers, but to
anyone interested in Object-Oriented programming because of its unique approach
to O-O. In this talk, I’ll use example code to illustrate differences between
the two languages and discuss relative tradeoffs. As someone who was an
Objective-C developer before coming to Java, I’ll also point out several ways in
which Objective-C and Cocoa influenced (for the better, I think!) the way I
approached designing Java apps.

I’ll also provide a quick peek at the Cocoa and Cocoa touch platforms, and point
out some cool and surprising design patterns that are generally not part of a
Java developer’s vocabulary. And I’ll conduct a guided tour of a couple of
example iPhone apps to give you a better picture of how the Cocoa touch works
under the covers.

Getting Started with iPhone Development

We recently released a new set of iPhone 3.0 developer examples as free, downloadable Xcode projects. If you’re new to the iPhone SDK, or you’re trying to learn the basics of Core Animation, or the details of how to work with UITableView and UINavigationController, these are a great place to start. (You can download the examples here.)

These projects are designed as a progressive series that start with the rudiments of iPhone programming and gradually work their way up through the development of a fairly sophisticated productivity app. The examples concentrate on showing how to do things programatically — there are no .nib files in the projects.

We’re planning to release a corresponding set of .nib-based examples later this summer that will demonstrate how to develop the same apps using Interface Builder. It’s going to take a little longer to get them ready because of the extra writing required to adequately explain how things are connected, and exactly what Interface Builder is doing. IB is pretty mystical for developers who aren’t familiar with it, and there’s just too much of that magic going on for the examples to make sense with just code comments (which is primarily how the current set is documented).

Anyway, here’s an overview of the initial set of examples:

First App demonstrates the basic steps to configuring an iPhone app’s user interface programatically, without requiring an Interface Builder (.nib) file.

Editable Detail View demonstrates the use of controls such as text fields and buttons, including how to connect controls to the code that implements their behavior.

Animating a View introduces developers to the fundamentals of using Core Animation to animate view transformations.

Simple TableView demonstrates how to configure a table view programatically to present a list of values.

TableView with Navigation builds on the Simple TableView app to show how to use a navigation controller to manage navigating from a list to a detail view by tapping on a table row.

Editable TableView demonstrates how to add, remove, and reorder rows in a list view, and how to edit model object property values in a detail view.

TableView File Persistence shows how to create and populate a list of model objects from a property list (plist) file, and how to persist changes to the list.

Follow

Get every new post delivered to your Inbox.