“Actually, Sheldon Has Better Design.”
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 an
UIImageinstance 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’s
UITableViewat 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 of
UIViewController’s view hierarchy.
Later, Leonard’s team is doing some reference counting. Instead of accessing instance variable directly in
-dealloc, they decide to use retain property
self.photo, with class method to return a autoreleased
CRecognitionobject, and claim there’s no leak.
What a mess, you should always use instance variable directly in
-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),
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…
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…
66 Notes/ Hide
- photogenicseeing likes this
- beneathtwomoons likes this
- slicesofawesome reblogged this from do-nothing
- slicesofawesome likes this
- do-nothing reblogged this from digdog
- amigo155 likes this
- digdoritos reblogged this from digdog
- digdoritos likes this
- drkizoo reblogged this from digdog
- hameteman reblogged this from digdog and added:
- botalpha likes this
- we-break-the-earth reblogged this from digdog and added:
- inamiy likes this
- noplans reblogged this from do-nothing
- iosdevlog likes this
- ashokgelal reblogged this from myconsole
- digdog likes this
- khealywu likes this
- shortbreadsh likes this
- astonishingbrettwhite likes this
- benzado reblogged this from digdog and added:
- fri13th likes this
- appiphone likes this
- jarodl likes this
- melissayu likes this
- zonble likes this
- benzado likes this
- codestuffs reblogged this from digdog
- codestuffs likes this
- beefdisciple likes this
- bigbangtheory-fan likes this
- travisjeffery likes this
- achappell reblogged this from cocoaheads and added:
- myconsole reblogged this from cocoaheads
- mitchjohnson likes this
- nfarina likes this
- yllan likes this
- corntoole likes this
- cocoageek likes this
- wallonboots reblogged this from cocoaheads
- cocoaheads reblogged this from digdog
- digdog posted this