Death is very likely the single best invention of life. It is life’s change agent. It clears out the old to make way for the new. Right now the new is you, but someday not too long from now, you will gradually become the old and be cleared away. Sorry to be so dramatic, but it is quite true.
Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma — which is living with the results of other people’s thinking. Don’t let the noise of others’ opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.
— Steve Jobs, 1955 - 2011 (via eploko)Your problems aren’t what make you special. Everyone has problems. Your solutions make you special. — Everyone has problems. Your solutions make you special. – Bootstrapping Postmark | The Startup Foundry
Don’t give your customers what they ask for; give them what they want. — Ten Lessons from GitHub’s First Year
“Actually, Sheldon Has Better Design.”
If you’re an iOS developer, and love the scicom The Big Bang Theory, then you have to watch season 4 episode 12: The Bus Pants Utilization (original air date is January 6, 2011.)
In this episode, Leonard comes up with an idea for his iOS app and derails his friendship with Sheldon.
What’s the app? It’s a handwriting-recognition based equations solver, or in Sheldon’s way: “The Surprisingly Helpful Equation-Linked Differential Optimized Numerator.” The basic idea behind this is to use iPhone’s camera to take a picture of the equation, and scan it with handwriting recognition, then run it through a symbolic evaluation engine, and bam.
During the episode, they show several actual Objective-C code snippets and interesting design sketches on white boards, here are some of them:
You can see they have a
CRecognitionobject holds anUIImageinstance variable, and sadly they are naming it_Photo(with underline as prefix), it’s not the naming convention Apple suggested.
The next morning, Sheldon started his own design, if you look closer, it’s much more considered than Leonard’s.
For example, since this is an utility app, Sheldon comes up with a flip view design that similar to built-in Camera app. You can see a full screen
SPhotoViewwith a snapshot button in the middle, and on the other side, it’sSEquationViewand aUITableViewat the bottom with some buttons.
In here, you can see more details. A
UITableViewholds the scanned equations, and supports rotation for landscape full screen detail view and portrait detail view. And on the right side, Sheldon shows a better understanding ofUIViewController’s view hierarchy.
Later, Leonard’s team is doing some reference counting. Instead of accessing instance variable directly in
-initWithPhoto:and-dealloc, they decide to use retain propertyself.photo, with class method to return a autoreleasedCRecognitionobject, and claim there’s no leak.What a mess, you should always use instance variable directly in
-initWithPhoto:and-deallocwhen creating/releasing instance object.
Here you see Leonard’s app class hierarchy, mostly C/C++ style naming convention for the class names, almost everything starts with letter “C” (is for “Class” I think),
CAppDelegate,CMainView,CCameraView,CSymbolicView, etc. They should use prescribed prefix like “LRH,” which means Leonard, Rajesh and Howard.
The beautiful Penny next to Sheldon, and there’s Facebook API behind him.
In the end, Penny’s shoes app project. There’re many of them on the AppStore already, and her UI design looks kinda lame.
And Sheldon is working on this project…
Conclusion
I love and enjoy this episode a lot, and the TBBT crew dis a great job for all these minor details, they looks very convincible to me.
But, they should all use Mac when doing the coding, I only saw Raj’s MacBook Pro, and rest of them are all using PC. That’s not right, you can’t run Xcode on PC, well, unless they all use Hackintosh…
References
- The Big Bang Theory: 4x12 The Bus Pants Utilization
- Apple: Introduction to Coding Guidelines for Cocoa
- [digdog dig]; To nil, or not to nil, that is the question
(via cocoaheads)
[video]
[video]
[video]
Whether you think you can or think you can’t, you are right. — Henry Ford
[video]