Mitch’s documentary looks amazing. I can’t wait to see how it comes out!
"fallenrogue" Under Leon's hat.
I just saw this today and loved it. Enjoy.
Web frameworks are a dime a dozen these days, and they all promise to deliver enormous productivity boosts without limiting your creativity. The darker side of it is that while they often allow you to create applications very quickly, sometimes they make it pretty hard to…
This just in: Nerds are Mad at the iPad!!!!
I love how a device that no one has really used has caused such a rift in the geek/nerd/tech/yawn universe. So, I’m going to weigh in….
I remember when Apple came out with the Macbook Air and nerds were up in arms over that because of the price. It was under powered by their stupid, nonsensical standards. You know what happened? People who travel a lot and need a computer that allows them to get things done (email, documents, presentations, etc) while traveling on a plane or a subway or whatever. Guess what happened? They loved it and geeks didn’t buy one. You also forgot about it the next time another machine was added to the Macbook Pro line. Because __that__ machine was for you.
Not every user experience has to be a ubiquitous homogenized one. People are heralding iPad as things like a Kindle killer. Nope, you’re wrong again. If sales go down, they’ll drop the price. If no one buys it they’ll devote more time into building apps for iPad or the subsequent Google Android Tablets that are bound to pop up in the next year or two.
So, if you’re interested in one, buy one. If you’re not, then don’t. If more people like them than don’t then they’ll go the way of the Newton. If not, then get a Macbook and start hacking away at apps for it and fleece the millions of iPhone, iPod and iPad users out there who actually are interested in the device.
Oh yeah, and no one, __NO ONE__ has ever, __EVER__ said that the iPad was the end all be all of the future of computing, because that would be hyperbolic. IF you’re worried about your kid _not_ getting into computing because you only own an iPad, then buy that little hacker a mac mini and give them room to run. But stop with the whiny conjecture and hyperbolic punditry. I’m over it.
DISCLAIMER: I’ve been programming for years. Frankly, a computer that my parents can use without calling me for tech support every week has me pretty excited.
Me? Waiting to play with it but am very intrigued.
Anti Patterns Catalog
Anti Patterns Catalog: ” Anti Patterns Catalog ‘Catalog’ is a technical term in the PatternCommunity: a list of patterns is called a catalog. This catalog lists AntiPatterns. AbstractionInversion AccidentalComplexity AccidentalInclusion AcmePattern AlcoholFueledDevelopment AmbiguousViewpoint AnalogyBreakdownAntiPattern AnalysisParalysis AnAthena AnchoredHelper? AppointedTeam ArchitectsDontCode ArchitectureAsRequirements ArchitectureByImplication AsynchronousUnitTesting AutogeneratedStovepipeAntiPattern BearTrap BigBallOfMud BlameStorming BlowhardJamboree BoatAnchor CargoCult CascadingDialogBoxesAntiPattern ConfigurationAbomination? ContinuousObsolescence ControlFreak CornCob CoverYourAssets CreepingFeaturitis CrciCards CopyAndPasteProgramming DeadEnd DeathByPlanning DecisionByArithmetic DesignByCommittee DesignForTheSakeOfDesign. DiscordantRewardMechanisms DoerAndKnower DryWaterhole EgalitarianCompensation EmailIsDangerous EmperorsNewClothes EmpireBuilding ExceptionFunnel FalseEconomy FalseSurrogateEndpoint “
“Good design means never having to say “Click Here”.
“You have enemies? Good. That means you’ve stood up for something, sometime in your life.”
‘You have enemies? Good. That means you’ve stood up for something, sometime in your life.’
- Winston Churchill
(Via Minimal.)
The CodeMash Precompiler Part 0
I’ve had several interested friends ask about “how the precompiler” went. As the acting Iteration Manager I can say that it exceeded my every expectation but what does that “mean”. Well I’m going to be compiling the information that was collected from the event and putting it into a case study for a team of 50 developers, whom only half of which were familiar with the tools and process methodology, working from scratch on an application.
What did we learn?
What did we succeed at?
What did we fail at?
Those at the retrospective probably know some of those answers because we discussed them as a group and I made notes about how I may present this workshop in the future. (possibly at CodeMash again next year?)
But I wanted to let everyone know that we did complete most of the app to make it fully functional. In fact, in the afternoon we were already looking to refactor the architecture of the application and that is where it is right now. So, Cory Flanigan’s group at set out to do just that. Cory and I will seek to complete the touches and push out to http://symposiast.com.
So, stay tuned and if you’re interested in seeing where we ended up check out the code that was committed and merged into master at http://github.com/fallenrogue/CodeMash-2010-Precompiler-Application.
iPhone and Android Development - NOT STARTING A FLAME WAR!!!!
Perception is truly reality. The way we see the world shapes how we look to solve problems. It’s with that grain of salt that I offer up this response to Mr. @JonathanPenn’s tweet to substantiate my claims on the interwebs this morning. Boy, I hate getting into these messes but he’s right to call me out and clarify. Here’s our convo:
With that history you must know that I spent years in .NET and C# so Java is going to seem like second nature to my eyes; rather than, say, a C++ programmer who will, likely, see something familiar in Apple’s Cocoa/Obj-C environment.
That said, my comment takes the following into consideration…
Java is dominant right now (stats!). In the Enterprise, they’ve got a pretty large hold on the development community and love it or hate it, that lowers the barrier of entry to developing on Android. Most Java developers will be immediately comfortable with the conventions laid out in Android’s development cycle and given there’s an exceptional Eclipse plugin for Android development Java developers don’t need to learn much more than Android’s specifics in their own language, IDE and platform of choice.
There’s a mountain of Java tutorials available. Even if you’re new to Java you’re going to be hard pressed to miss out on the latest and greatest information that the platform has to offer. My searches for information on Cocoa development have met with wildly differing opinions and little consensus. In fact, I was in the C based API on my sample app to play/manage sounds until Jon mentioned there was an Objective-C based API that could do the same thing. Even Apple’s documentation was wishy-washy on the subject until I took the time to read the Cocoa Touch programming guide for Audio (not a fun read, BTW) that it even mentioned the class Jon pointed out.
On a 1-1 basis Android’s frameworks seem to be providing developers simple abstractions to every possible task that you’re going to want to perform on the device while Apple’s Cocoa Touch frameworks seem to be a mess of improvements over Cocoa, missing abstractions and idioms are published by Apple and not driven by the community using them. AGAIN- that is conjecture but that’s what I’m seeing.
Take, for instance, the following snippets to load an internal sound file reference and play it. First iPhone -
NSString *soundFilePath =
[[NSBundle mainBundle] pathForResource: sound
ofType: theType];
NSURL *fileURL = [[NSURL alloc] initFileURLWithPath: soundFilePath];
AVAudioPlayer *newPlayer =
[[AVAudioPlayer alloc] initWithContentsOfURL: fileURL
error: nil];
[newPlayer prepareToPlay];
[newPlayer setDelegate: self];
[newPlayer play];
See, it’s not complex. The syntax is simple enough (for the AVAudioPlayer class, this is not the C API which is far more complex) but things like getting a reference to an internal URI is 2 lines of chunky code that create references that I need to track now. It’s not bad, but there should be a simple way to load our references.
Let’s compare that snippet with the Android version.
MediaPlayer mp = MediaPlayer.create(this, R.raw.mySoundFile);
mp.start();
That’s it. I’m not splitting hairs over brevity; that’s not the point, the point is that the abstraction seems to be in the right place. We know we’re going to play sounds on a device. We know that those sounds are going to be local or networked. These are clear points of abstraction in OO and should be provided to the developer (IMHO).
From my perspective I get to tell the right objects to do what I want them to do and the details and minutia are encapsulated behind a nice API. If we’re on the same topic here are 2 equally good APIs first from iPhone and then from Android
Taking a photo with iPhone (in main.m)
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
// cruft leading to our delegate implementation...
-(void)imagePickerController: (UIImagePickerController *)picker didFinishPickingImage(UIImage *)image editingInfo:(NSDictionary *)editingInfo
{
// now I have image reference I can use! Sweet!
}
See, there’s an operation that I know I’m going to need to perform on a phone equipped with a camera. Once you’re familiar with cocoa’s delegate/callback system then doing something with the camera is that simple. But still, I’m interfacing with a Controller object and not the Camera or “media” object. From an MVC perspective Apple’s controllers seem pretty heavy and try as I may there’s something icky. The Abstraction is there, though which is my complaint with many of the other functions I’d expect an always connected device to abstract. Let’s look at Android’s API for doing the same thing.
Taking a photo with Android
Camera camera = Camera.open();
camera.takePicture(null, null, new PictureCallback(){
public void onPictureTaken(byte[] _data, Camera _camera){
//Handle the photo
}
});
So, lines of code aside they’re very similar but the Android object API is clear and uses the same idioms it has established with other objects in the system. There’s no muddy “is it a Controller or Model” confusion. To me, that’s an simple OO encapsulation that provides an intuitive API. AGAIN: my eyes, my perspective and my opinion.
For the last few points, before I go back to exploring both of these GREAT platforms. Things that have me more interested in Android at this moment than iPhone…
1: Android is open. Which means there’s a greater chance that your app will be seen on a diverse set of devices. This is a blessing and a curse. You’ll be required to handle such discrepancies but again, Google seems to have abstracted those decisions into small questions you can ask the platform in one method. But you will have to be concerned about it and I can see a legion of experts born from this very issue. Good knew is you can sell or give away your apps on your terms. Not Apple’s.
2: Testing. Java has better support for current BDD/TDD methodologies. I’m going to state conjecture as fact here. I can’t find a great BDD framework for Obj-C and who cares if I can’t use it well in cases where I’m testing C code.
3: Memory Management is a solved problem. Google knows it, you know it. the C champions will always lay claim that Garbage Collection is slower than their own hand crafted memory management techniques and that may, in fact, be true. But by what degree? What about line of business application developers? They know the value of one less thing to worry about; one less thing that can go wrong. I know obj-C 2 has an opt-in GC but I never see it in use on the iPhone and I’m not sure why. I assumed it wasn’t supported, again, someone please let me know in the comments if this is wrong.
In the end, everything is perspective
As one who primarily has developed line of business applications and the bulk of that on the .NET platform or in Ruby, Google’s Android platform seems directly poised at the GTD crowd and Apple’s iPhone seems hell bent on restoring C++ and it’s superset Obj-C to the forefront of Alpha-Geekdom. Both are great approaches but when you couple the innovation coming out of the Android devices, the open source ease of startup, tooling support and articulate APIs; Apple needs to continue to innovate on the development side as well as the consumer side.
Apple is, hands down, the reason we’re even interested in this comparison. I love my iPhone. I’m certainly not giving up on my goal of getting in the App Store with something, ANYTHING. But I must say, if they are not cognizant of the power that Google is providing developers they may see folks piloting, prototyping and promoting Android over the iPhone.
I don’t know if it’s time for the Cocoa community to build a better boat or Apple’s but somehow, to me, that’s yet another solved problem and therefore another win for Android.
OK, Jon. I await your post clarifying all of this up for me on the iPhone side and even better, I CANT WAIT to pair with you on iPhone fun at CodeMash! ;)
Lessons from Uncle Bob
Those of you who were fortunate enough to hear Uncle Bob Martin speak at Columbus Ruby Brigade last Monday are aware of the amount of wisdom that can be garnered from listening to him. If that is the case then certainly pair programming with him for the day would be equally enlightening.
Monday morning when I walked into the EdgeCase offices there in a corner was a face that I was familiar with but had never met personally. This is not unfamiliar for me, I’m usually the last person to know anyone with a reputation that precedes them. I say hello and introduce myself but as he was already pairing with our friend Adam I said hi, got a Mountain Dew out of the fridge, found a seat in the bullpen and got down to the business.
10 minutes into the day Adam has something else that has to be done for a client so we look around and Ken says: “Leon why don’t you pair with Uncle Bob on a few features”
I don’t know the app.
I don’t know what were working on.
I run to sit next to Uncle Bob.
I don’t care what we’re working on, there’s no way that I’m going to impress a man who’s literally been there and done that so it was time to sponge. Or at least I thought. Over the next 5 hours we meticulously poured over the details of what I would perceive as a simple feature to understand not just what the feature is but why we couldn’t test the particular abstraction. Uncle Bob was interested in seeing how we could test a haml view in isolation of the rest of the app and frankly I was fascinated. We were looking over APIs and playing around with how to mock state for our view just so we could ensure that numbers that were currency would be properly set to 2 decimal places.
You see, it was not that the task was simple or complex, the task was not important. What was important was how we were planning to work on the task. How were we going to cleanly isolate the functionality so that we could simply test and verify that we had, in fact, completed the task. In the end, we didn’t quite isolate the view in the way that he (and eventually I) wanted but we completed the task and Uncle Bob was clearly amused by the session that day and, as I hope, he seemed to have fun pairing with me as we ran down the rabbit hole, exploring the possibilities of our API and expanding my concept of what it means to be testable.
It’s difficult to communicate wisdom transferred; it’s difficult to work next to someone whom you’ve respected from a far for so long and package the experience in 500 words or so and I hope that I’ve been able to capture a bit of it. While I may not communicate it well now, know that it was a great experience, one that I hope to replicate again and again as I seek to improve how I approach my craft and evolve my understanding of the profession I’m in.
Thanks Uncle Bob for the great day of code! I had a blast!