Category: education

OK, OK, I’ll RTFM!

Through the course of my progress through the iPhone Developer’s Cookbook, one thing is becoming increasingly clear to me: I did not understand fundamentals of Objective-C.

I really thought that my foundations in java, C#, and even C (thank you, Operating Systems with Jason Nieh) was enough.  I breezed through lists of the differences, read some code, and I was done, thankyouverymuch.  I even skimmed the “Objective-C bootcamp” section and deemed it irrelevant for me.

But with this challenge, I’ve promised myself to read every page of this book.  And you know what?  I really needed to RTFM.  Why?

  • I didn’t realize Objective-C is dynamically typed (even though I should have realized this with all the id variables floating around!)
  • I didn’t know selectors were basically just another way of saying “method name”
  • I didn’t know that if you do a child-to-parent assignment, like assigning an NSMutableArray to an NSArray, you’ll get the somewhat vague “assignment from distinct Objective-C” warning
  • I didn’t know you should always check for if (!self) in your init methods because in case of memory warnings, [super init] can return nil
  • I didn’t know that Apple has a standard on Class methods: any object returned by a class method is returned to you already autoreleased

It’s little things like these that can really trip me up.  So far, the Erica/Alexis project is incredibly rewarding.

Zombies, demystifying the XIB, and console clearing: iPhone Cookbook Lessons

I’m on page 58 of the second edition of Erica Sadun’s “iPhone Developer’s Cookbook,” and here are the most important lessons I’ve learned so far:

  1. Zombies!
  2. What’s inside that XIB?
  3. The Clear Log Button

Setting NSZombieEnabled to YESZombies!
Did you know that, by default, your XCode project is NOT enabled to catch Zombies?  And by zombies, I mean objects that you have released, but then subsequently try to access?  THEY ARE ZOMBIES! They are the dead that still roam.  This is good for horror films, but very bad for your code.  But, by default, XCode’s debugger has no way to catch these nasties.

If you try and access a destroyed or released object, you’ll get back a cryptic objc_msgSend.  But!  If you ENABLE THE ZOMBIES as Sadun suggests, you’ll get back a much better message. In my case, I’m trying to access an array (via this call: CFShow([array self])) that I’ve already released. This gives me the following message in my gdb console:

2010-03-30 21:39:28.180 HelloWorld2[2398:207] *** -[CFArray self]: message sent to deallocated instance 0x1810260

interfacebuilderGetting inside those .xib files
Read more »

iPhone Fluency in 163 Recipes

I recently picked up the Second Edition of Erica Sadun’s “The iPhone Developer’s Cookbook,” that focuses on the iPhone 3.0 SDK.

Now, admittedly, a third edition is now required given that the iPad comes along with SDK 3.2. However, I still feel that completing all 163 recipes outlined in Sadun’s book will bring me from iPhone development amateur to iPhone development expert–and give me a leg up in understanding the next version of the SDK.

So, my goal is to get through all 163 recipes over the remaining 347 days left this year.

Thanks to Julie & Julia for the inspiration on this one.

Stop what you’re doing and GO BUY A PEPSI! (Or, why anti-gay groups can’t have anything nice, EVER)

afa-will-starveI’ve always enjoyed a good diet Pepsi but I usually find myself ordering Diet Coke out of habit.

I received an email the other day from the American Family Association that has made me into a complete + total Pepsi Evangelist.

The American Family Association is one of those wingnut conservative groups that spends a lot of money fighting gay marriage.  I signed up out of simple curiosity, and out of a desire to get to know, and try to understand, the opposition, and people that frown on me and my life.

picture-31So the latest thing that’s gotten their panties all in a wad is Pepsi.  Now the AFA seems to think that because Pepsi does the following things, they are the pinnacle of all evil and must be STOPPED:

  1. Asks their employees to take diversity training courses
  2. Advertises in magazines like OUT
  3. Gives money to charities like the Human Rights Campaign
  4. Is a sponsor of the NYC Gay Pride Parade

Now, the HILARIOUS thing about all of this, is the AFA is asking people to boycott Pepsi. But if the above is their criteria, I got some news for them. They can’t just stop at Pepsi. Here is a list of just a SAMPLING of the companies that not only received 100% on last year’s HRC Corporate Equality Index, all of whom fit the bill based on the bullet points above (except perhaps for the parade sponsorship), but were also rated a “Best Place to Work” for LGBT employees:

And that’s just a partial list of the Food category!  They also can’t buy camera or develop film (Eastman Kodak Co.), own a computer (Intel Corp., Microsoft Corp., Apple Inc., International Business Machines Corp. (IBM) , Hewlett-Packard Co., Dell Inc.), have a good calculator (Texas Instruments Inc.), ever fly in a plane (Boeing Co.) or pretty much do anything, EVER.

So back to Pepsi for a moment.

Read more »

Learning to write iPhone Apps, and the intersection of Apple and LOLCATS

There are three main resources I’ve been using to teach myself Objective-C, Cocoa Touch and iPhone programming:

The cookbook is excellent as a reference, and as a human-readable, easy-analogy alternative to the lecture slides.
The class itself holds your hand with their assignments, and I have been slowly builing up my Obj-C development skills through their carefully thought-out assignments.

Finally, the ADC videos provide an excellent window into what iPhone OS 3.0 can do, and code samples to help you start actually doing it.

Now, you may be asking, “that’s all fine and good, but where do the LOLCATS come in?”

SO, you only need look at someone and you can quickly make an assessment if they’re an apple or a PC person.  Apple’s TV marketing depends on it.  But I would like to argue that you need only look at their EDUCATIONAL SLIDE MATERIAL to make the same assessment.

Sure, this isn’t from WWDC, but this is on iTunes to help people understand how to use iPhone OS 3.0.  If I wasn’t a Mac convert before, this truly would have made me a believer:
applelolcats.png

Brilliant.  Bloody fucking brilliant.

To Succeed, Break it up; Bloomberg and Scrum?


I am FLOORED by the Bloomberg platform, and thrilled to finally have a terminal to call my own.  There are two particularly impressive areas: (1) the customer service Bloomberg provides to users of its terminal, and (2) the platform itself, in areas like my portable, “Bloomberg Anywhere” card that reads my finger print and logs me in by holding the card up to the screen and scanning.

To learn more, I’ve picked up “Bloomberg by Bloomberg” from the Brooklyn Business Library.  It is full of quotables, but here are two on the theme of agile development that struck me:

Start with a small piece; fulfill one goal at a time, on time. Do it with all things in life. Sit down and learn to read one-syllable words. If you try to read Chaucer in elementary school, you’ll never accomplish anything.

Life, I’ve found, works the following way: Daily, you’re presented with many small and surprising opportunities. Sometimes, you seize one that takes you to the top. Most, though, if valuable at all, take you only a little way. To succeed, you must string together many small incremental advances–rather than count on hitting the lottery jackpot once

What is so fascinating to me is that Bloomberg’s methodology is essentially Scrum — but he was doing it before there was such a thing!  Recall, Bloomberg L.P. was started in 1981, and Scrum only has its roots in the paper by Hirotaka Takeuchi and Ikujiro Nonaka (and their paper, “The New New Product Development Game“). Who’s to say that Toyota was the only innovator in this realm?

In reading Bloomberg’s autobiography, it’s clear that the build, review with users, revise, review with users, revise, repeat, was also crucial to advancement at Bloomberg.

The lesson, though, is clear.  Break it up, start small, and be flexible.

The History of New York

nycskyline.jpgWhen I was an undergraduate, one of the most popular classes was one taught by Professor Kenneth Jackson: The History of the City of New York. Some came because they heard good things about it; other because they were fascinated by the Burns documentary in which Professor Jackson appears.

My personal fascination was a bit of both: In my first semester, I had a computer science class in a large auditorium. With over 300 students it was easily my biggest class, so nothing seemed strange when I slipped into a seat in the packed lecture hall, out of breath from running. What did seem strange was that the room was dark, but sometimes Professor Sklar would show us videos of robots playing soccer and the like. What was strange, was that we were watching a movie about New York. I kept waiting for the connection — none came. Eventually, I realized I was in the wrong class: and I wasn’t twenty minutes late, I was forty minutes early!

I stayed in my seat, entranced by the commentary. You can look straight up any of the avenues in New York and see all the way to the top of the city. True! Had I noticed it? No! New York was a city founded by the Dutch to make a buck. It began as a real estate transaction between the Dutch and the American Indians. On and on it went.

The class was too demanding when I finally returned my senior year; Professor Jackson mandated the students attend multiple walking tours and write several papers. But I will always regret missing out on the Midnight Bike Ride through the city, that he took the class on every year. I passed by them in a car on the way home from a date. I wanted to follow them; I had no bike. But nostalgia and regret cannot take away from the pleasure of watching the Burns documentary, New York.

Penn Station, 1940It shocks me that the Flatiron building went up in 1903. That New York invented the Express Train. That the first subways cost a nickel, and remained that way for fifty years. That Ellis Island, on its busiest days, let in 16,000 immigrants. How the city tripled in size in the 19th – 20th century due to immigration. How people from all over the world came here, awed by Lady Liberty, settling into a city of skyscrapers and hopes and dreams, and managed not to kill one another. Much.

More Italians than in Naples; more Irish than in Dublin. “By 1905, four out of five New Yorkers were either the children of immigrants, or immigrants themselves. Forever after, many Americans would view New York as a foreign country.” Did you know Penn Station used to be BEAUTIFUL!

LouiseBrooks theme byThemocracy