Sunday, August 19, 2012

My First Dub-Dub.

The Pilgrimage

I'd heard of this event that happened each year at WWDC where a group of attendees would travel with bus loads of other attendees and visit the corporate Apple store and buy some swag, take pictures, hang out and eat a bit of lunch on the Sunday before the main event.  

The registration for WWDC opened promptly at 9am on Sunday morning.  I had no idea what to expect as I walked from my hotel to the Moscone West building.  But as I approached the number of nerdy looking folks seemed to certainly swell.  There must have been a few hundred other developers keen to pick up their badges and whatever swag Apple was providing attendees.  As the doors opened everyone was sucked into the building and a lot of people just started taking pictures.  I couldn't help it.  I did too.  

After collecting my badge and swag I had some time to kill so I had some Starbucks and browsed the inter-tubes until it was time to meet for the Pilgrimage to Cupertino.  Once on the bus I met a nice fellow from Eastern Europe.  It felt strange to me explaining to fellow WWDC attendees that I don't actually do iOS or OSX development full time.  In fact I do very little.  But I explained that I was trying to change that and hoped that my attendance would help me to bring that change into being.

Actually being at the Apple offices wasn't all that interesting.  It was basically an office building in a sea of other office buildings.  We got to mull around the parking lot and buy some more Apple branded swag in the corporate gift shopt.  I had lunch with some more nice people at the local restaurant that apparently a lot of Apple employees frequent.  

The experience was good, but not something I'd likely repeat.  Unless I attended with some other co-workers or friends again in the future.  I'm a bit shy, so going on my own is a bit of a lonely road to take.

Keynote Day:

I'd heard of the ridiculousness of the Keynote day and read all about how some people start to line up in the wee-hours of the morning to ensure a relatively close seat.  I was not one of these people.  This too is something I would never do on my own.  But with a couple others and some planning, I could be convinced to give it a shot.

My experience was however pretty interesting.  I managed to end up in line not far from the front door to the center.  Except that my position was after the line had wrapped itself 3/4 of the way around the block.  So my hopes of getting in the main room were pretty slim.  As luck would have it, I was in line very near a rather interesting and talkative fellow.  His name was Bill Atkinson.  Most people probably don't recognize that name.  But he wasn't shy about telling his tails.  Bill was a very, very early employee of Apple.  I believe he said he was number 30.  He hand some great stories about shipping the first Lisa and Mac.   Although the stories have blurred together for me and are starting to fade.  I was definitely a bit star struck.  Especially when he started to talk about the fact that he and Steve Jobs actually still met and talked not too long prior to his passing.  I also found it interesting that this man, with his lineage was still forced to wait in line with the rest of us.  It made me a bit doubtful of the stories. So once I had a viable internet connection I made sure to look him up.  Sure enough - this was the real deal.  Now I wished I'd got an autograph.  Although I'm not sure what I would have got him to sign.

After what seemed like an eternity of waiting and milling about in the lumbering and slowly moving line I finally got into the main ballroom where the keynote would be held.  I found a seat and waited patiently for it to happen. And it was fantastic.  Just watch the video.

Sessions, Sessions, Sessions:

My next few days were wall-to-wall sessions that I'm still not really allowed to talk about.  I went to sessions that covered a lot of the topics discussed in the keynote.  But I mostly stayed away from the social stuff.  Not really my cup of tea.  Although, not being an iOS or OSX developer proper, nothing really is my cup I suppose.  I just attended the sessions that covered topics I found interesting.  In particular, topics related to the developer tools, new language features and compelling new APIs that would soon be available.  I'd also have to fight to get decent internet connectivity the entire week.  I'd heard that the wireless was really good at WWDC, but this year must have been an exception.

Hump Day:

Typically, I got back to the hotel at the end of a day of sessions and decompress for a while.  Then either grab some dinner or actually go to bed early so I could be up early for the next day.  This is the genesis of my very recent obsession with podcasts.  I started to listen to Marco Arment and John Gruber's podcasts in these afternoons.  Given the heavy Apple bent in the topics covered, they felt very much at home and they even had a couple that came out while the conference was still going on.  I also followed the adventures of a number of the various popular Mac and iOS developers who were in attendance.  I follow some folks form Martian Craft, Panic, Pacific Helm, Black Pixel and others.  The sessions also gave me some incite into those folks on twitter who were from Apple.  There are a lot more of them than I'd realized and they are pretty active posters on the social network.  Notably though they seem to be developer facing employees that we are supposed to be able to reach. So it's not really all that surprising.  But I'd not been able to locate them previously, so I was still quite pleased and surprised.

Sensory Overload:

The last couple days were a bit of a grind. I bowed out of the beer bash due to my exhaustion.  I'm still not sure if I regret that decision or not. I made a plan to visit some family that lived in the area on Friday after the conference wrapped up. That helped.  But I was mostly missing my own family.  I had a few FaceTime chats where my daughter would be kissing my face on my iPad at home and I'd see the top of her head as she did.  It was pretty cute, but I also really wanted to be home after those calls.

Wrapped Up:

The last day there was a really well done lunch time talk by J.J. Abrams.  He plugged his iOS app a bit, but really gave the crowed a great review of his progress from a nobody to the Hollywood darling he is today.  That afternoon I took a train to see my family got to play with my 2nd cousin for a while.  It was oddly peaceful to be around a toddler again.

I still think about the week and all the things I didn't do and wish I had.  I hope to get to go back again another year with some friends and co-workers to better take advantage of all the week has to offer.  I'd also like to come back with some code and an application I'm working on so that I can have something to talk with the Apple engineers in attendance. I felt like I really didn't get to make use of the value of such a resource being so close this time around.

I really liked my first dub-dub.  I hope it's not my last. 

Saturday, August 18, 2012

Deconstructing Android Open 2011

A prelude:
I'd already written this post once...well most of it, but Blogger failed me. I thought it was auto-saving. Alas, it was not. I had about 2000 words written. It was probably a bit long, but I liked it and it was helping me to organize my thoughts. I'm going to try not to re-create that post now. I'm going to try and start fresh with a new post about Android Open. Here goes:

Day 1: Workshops
The conference started off on a very strong note.  Sunday was a day of 2-1/2 hour workshops.  The first one was a 101 style session.  I've been developing software for OCAP or (tru2way) for a number of years and recently learned how to develop software for iOS at a very beginner level.  I've even done a small amount of Symbian development in Qt. More recently, JavaScript and some other scripting languages for web application development are on my plate.  Up to this point I've mostly written systems software though. Writing an application is very different from systems programming.  But as I'd started to learn more new application development platforms I noticed a lot of similarities between them.  This workshop covered the basics of Android development and started to make it feel pretty familiar. At the same time it pointed out some of the differences from iOS. It was a very well structured workshop.

The second workshop was a bit of a mess.  It was supposed to talk about Android application design.  It was design focused, but it was more like a design 101 rather than being truly rooted in the nuances of designing a well structured and beatify Android application, we were treated to some rather rough definitions of basic design principles such as affordances, visibility and constraints.  Here's the link to the presentation.

Let me know what you think. I wasn't impressed.  However I think that if I were looking for a n introductory design talk I wouldn't have been so appalled. That said, I did learn some stuff about design that I didn't know before. I just wish that the description had more aptly described the actual contents of the workshop.

Android App Development 101 (Good)
Designing an App from Idea to Market (Not terrible, but could have been much better)

Day 2 & Day 3: Sessions, Sessions and More Sessions
In short: Some good, some bad.   The talks really shifted gears going into the actual conference and moving away from the workshop style talks from the first day.  These talks were short and focused.  Or at least the good ones were.

Here's a list of sessions I attended or have since watched on video:

  • Securing Android (Meh)
  • Beautiful Android (Not bad, but not great)
  • From iOS to Android (Bitter about Objective C mostly, but I learned some stuff)
  • Extending HTML 5 with Native Plugins: PhoneGap Plugins (Scattered presenter, but he tried)
  • Getting the Magic on Android Tablets (Ugh. Terrible presenter and not well structured talk)
  • Extending Development on Rooted Devices (Neat guy.  But too short and rushed to be much use)
  • The Honeycomb Action Bar: Front to Back
  • Fragments for All
  • Design, Building and Architecture Strategy for Twin Towers: Android & iOS (OMG this was boring)


Conclusion:
I personally wouldn't attend another of the Android Open conferences in the future.  I'm a lot more interested in the deeply technical programming topics that would actually teach me how to develop on the platform.  These talks were mostly too short and superficial to be of much use in that respect.  I did however really enjoy the extra activities where I got to see what a number of startups were working on with Android.  Next time I'd want to attend something like Google IO, or another conference I'd heard about while attending Android Open called: AnDevCon (Android Developer Conference).  These seem like they'd be more my speed.

Friday, March 16, 2012

Welcoming our New Overlords

So it looks like Cisco has decided to purchase the company I work for.  I have to admit that my feelings are currently mixed about this.  Those of you who I've worked with at TVWorks here in London Ontario will know why I'm a little skittish.  Long story short...they shut down the office about 2 years ago now. Here's a funny side note that I just found in looking up that link about the closing: The website still says that they have an office in London, Ontario.  On top of that, the second hit in my google search for: "TVWorks closing london" was a job posting that was still active for a position in the London office.  And if any of my ex-co-workers were to check out the site you'd see a couple familiar faces.

Anyway, my story goes like this: I used to work at Liberate Technologies.  I started there while they were attempting to file for bankruptcy.  I was recently out of University and wanted to work for a tech company that was doing something more interesting to me than the place I was working.  I was impatient and left my previous employer after about 3 months of full time employment to join Liberate. I figured they'd go out of business in a year or so, but at least I should learn something along the way that I probably would not have learned if I didn't give it a shot. I was right...at least partly.  I was learning a great deal.  My manager was great.  My team lead was a very good mentor who had a lot of great stories, great patience and a quirky sense of humor that I absolutely loved.  

Then something odd happened which I hadn't accounted for.  We got purchased by the company that was the big fish customer we were constantly chasing.  It was great!  There were retention bonuses, pay raises and a lot of talk about the things we could do together.  The day of the announcement our management was running around with cases of beer.  This place just turned it up to 11.  I was on cloud nine.

But over the next few months some things started to change.  The teams were getting pulled in lots of different directions and some of the people that I really admired and wanted to work with were leaving for far off places.  But I was busy and doing well and making a name for myself.  Things were still pretty good.  Then more people left.  Things continued on.  It was actually still pretty good.  We were really busy.  We were hiring like crazy.  Our numbers swelled.  Then we got a new name.  TVWorks.  For me this was a bad smell.  Mostly because the name seemed like a cheap knock off of GuideWorks, who was a partner of ours (and previously a competitor).  Oh and I moved in with my long-time girlfriend.  And we promptly got a cat.

Then things started to shift.  New management from the mothership, as we called it, came in with a lot of talk about how they were going to help us deploy things faster and make things happen.  The term "doubling down" was used and promptly mocked around the water-coolers.  The hiring turned from full-time, to contracts. The perks were starting to claw back.  There was more talk of fairness with other sites and integrating with the mothership in various ways in order to streamline things.  By the way, I married that girl I moved in with earlier...and bought a house.

This continued for some time.  We tried moving to an Agile-ish development style that was met with mixed results.  Some people really embraced it, others chaffed. The mothership was not all that amused.  Our co-owner backed out of the partnership.  Our free drinks suddenly had a cost and our Christmas party lost some of the previous flare. I was getting restless, but was still generally ok with things.  I struggled to find a place to fit and seemed to be always one step away from getting to do the work I'd hoped to do.

Then things got real sad. The contractor positions were removed.  We carried on.  Various key positions in senior management were suddenly removed. We looked at each other with odd expressions, but still marched on. And after a few more months of slow decline, and after numerous others left of their own accord due to the shifting winds, the final axe came down.  The office closed. And on the lighter side, my wife and I got pregnant with our first child.

All of those things came flooding back to me the moment I read the e-mail Thursday morning.  The ups and downs and the excitement which eventually turned to resentment.  It's because of that experience that I have a hard time walking into this new change with bright eyed optimism. Perhaps it's also because I'm a lot wiser and more cynical now that I'm older and have a daughter to think about.  Maybe the last experience has just made me a more jaded person.  I don't really know.  But I'm trying really hard to be positive about this new change. I think there is a good chance that it will be positive for a lot of reasons.  This is a very different situation than the last purchase that I went through for a lot of good reasons.

For starters the value that the buyer has put on us this time around is considerably more than when Liberate was bought up.  This time a technology company is buying another technology company rather than a media distribution company buying a software development company.  This should be a better fit between the way the corporations work.  It seems that we have a lot to offer these new overloads and I think they actually understand what it is we do and what we have to offer. I'm not clear that the previous transaction I was a part of had that same solid foundation.  And my daughter is walking around nowadays and is ridiculously cute.

Enough with my blathering.  I've just ordered the new Apple TV and I'm way more excited about that than this work stuff anyway.  But I feel better geting this off my chest.  Hopefully I don't get called into a dark office on Monday for saying something that I shouldn't have.  (It's happened before)

Thursday, February 9, 2012

Reviewing the Bio

Image: courtesy of Cult of Mac
I recently finished the Steve Job biography by Walter Isaacson.  It was great.  I don't recall ever finishing a book as quickly as I did this book. (My wife says she can't recall the last time I finished a book...period.) I think the closest was when I read The Shock Doctrine a few years back.  I loved the crazy stories in the Jobs biography, the anecdotes and the pacing of the novel were all quite good.  I also found the parts that discussed his illness very moving.  I actually welled up on occasion.  But I'm also a softy so that's really not that hard to make happen.

There are some lessons to be found in the book to be sure.  Some are cautionary, others are opportunities for all of us to learn something.  All that has been discussed by many others around the net.  And to be fair I think this next criticism has as well.

As I read about Steve Job's time at NeXT and this miss-adventures with Pixar I came to realize something.  The stories were getting to the point where the Apple purchase of NeXT was just about to happen and it hit me.  Wait a minute.  What changed?

It struck me that the events described at NeXT and at Pixar where missing something They seemed to be lacking any real explanation of how Jobs had moved from a bratty kid with insane mood swings and a childish temper to a man retained some of those same faults, but seemed to have many of them tempered and was more in control of himself. How did he get to this place where he was allowing concessions that he would have never even considered previously.  Isaacson offeres up a morsel of an explanation (or hypothesis) to the reader by summing up of Steve Job's experiences with NeXT and Pixar as giving him some sense of humility due to the failures that they and he experienced.  Except that in both cases they ended up doing pretty well.  NeXT was failing for sure, but still managed to be rescued by Apple in the purchase that brought Job's home to Apple.  And Pixar flourished as it created animated hit after hit after hit even though it had a rocky start.  So what actually changed?

Maybe I just missed the point.  But I also found the hammering home of this idea that Steve somehow embodied the cross-roads of technology and the liberal arts is a bit silly. Not that the notion of working at that cross-roads is silly.  Nor is it silly for a business such as Apple to attempt to own that area.  But I just felt like the book kept hitting that note so hard and so obviously that it failed to deliver the message very artfully.  Also that's not really the theme I was personally hoping to gleam from the book.

I really wanted to know how the journey between leaving Apple and returning to save it effected him and changed him into the man who could save it and build something as impressive he did from what was a company on the brink. That's what I was looking for.  Not this rather bland idea that you he just stayed true to this one ideal and that's what guided him and was injected into the DNA of Apple and that's all it took.  I don't buy it.  There needs to have been more.  Given what I read of his early days at Apple, something changed.  But what was it that influenced those changes?

Regardless of my own thoughts however, I would still wholeheartedly recommend anyone who's thought about starting a company, or really enjoyed any of Apples products, or who is just amazed by the things that Steve Jobs accomplished would definitely enjoy giving this book try.


Wednesday, January 25, 2012

On the side...

I've decided I should post a quick update on what's going on with my side project.  I totally missed my stated goal of getting an application deployed for the holidays.  But I had a good reason for it.  Or maybe just a good excuse.  I had a paying gig..and I don't mean my day job.  A friend of mine from a previous employer happened to have acquired a small grant from a local technology company support organization called the Tech Alliance. I've been eager to help him any way I could since he's basically managed to do thus far what I hope to be able to do my self at some point.  He's turned his side project into a full time business that he operates from home.

Anyway the story goes that Nokia had approached him a while back about his application.  They wanted it to be ported to their Symbian devices and were willing to support him in getting that done.  That amounted to some contract work to one of the many small mobile development contract houses out there these days.  Needless to say though, he wasn't particularly pleased with the results.  So when he got this grant from the Tech Alliance he was hoping to hire me to help him clean it up and maybe create a bit of a spike in sales.

My mission, should I chose to accept it, was to provide a working build environment and clean up a lot of the rough edges of the user interface.  A pretty simple task really.  Although I'd only really looked at a small amount of Qt code recently and wasn't at all aware of the joys of the Symbian operating system and SDK.  I'd originally tried to set things up with the Eclipse environment, because that is generally my tool of choice.  However the plugin for Qt wasn't working  particularly well for me and caused a number of problems.  So I gave up on that pretty quickly and decided to venture into the wild world of Qt Creator.  That is one annoyingly structured environment.  The workflow was horrible.  The simulator didn't even properly represent the look of the application and was very, very buggy.  When I finally got the application building I couldn't target the device because I had to wait for the certificate to become live because it had a date in the future rather than being available to use once downloaded.  Then the wonderful Qt Creator environment would crash every 2 or 3 times I re-loaded the application for debugging.  There was also a funny story about a USB cable.  But I don't think I'll go into that.

There were so many little quirks with the Qt SDK and Qt Creator system that I don't think I could even list them all here.  And I won't even get into how messy the code was.  It looked like each file was written by 5 different people, all of whom had completely different coding styles, none of which were about being readable.

I also spent some time on another possibly paid effort.  However that one didn't happen.  It's not dead yet, but postponed until the summer for various reasons.   That project is significantly larger and more effort than the one that distracted me before the holidays.  However the scope of quoting on it also ate up a considerable amount of my time.

I still hope to get a chance to do that project since it would have meant native iOS application development.  Which is really what I'm hoping to do with my side project.  Although I'm quite open to mobile development of any kind.  I plan to try and release my own application on Android as well as iOS when it is ready. It really is quite simple so I don't foresee any major effort in doing the port.  Of course my first target will be iOS.  I may even give the Windows Phone 7 a try at some point.  Then I have some larger, more complex applications I'd like to start working on.  My hope is to get my small application out on at least iOS by the summer and have made a good start on at least one of the larger projects before the fall.  We'll see how that goes.

One other thing.  I'm going to be doing my best to try and convince my employer to send me to WWDC this year.  I'm not hopeful of my success in that regard.  But I was thinking that maybe I could swing it if I offered to pay the conference fees if they could manage the travel.  I've made it a part of my personal goals at work to create an application that can demonstrate I have gained an advanced knowledge of iOS development.  So at least I have that going for me.  But now I have to actually start making something there too.  I have some thoughts that I'll have to try and find the time to squeeze in...probably while I should be eating lunch.

Here's a bit of a before and after shot of one screen.  You let me know which you like better.  I'll try not to get upset.



And here are some more snapshots I'd collected:



I used a much nicer image for that big logo than was previously there.  The old one was fuzzy since it was way too low resolution for the screens.  The changes in the other screen were to remove an action bar like mechanism for selecting favorites and allowing a couple other options that no one ever uses.  So I followed the design pattern that the latest iPhone and iPad implementations use which is much simler and more elegant.



Saturday, September 24, 2011

How I like to define JavaScript Objects

I've been really impressed by the expressiveness and power of JavaScript lately.  It's much more capable a language than I ever used to give it credit for.  The flexibility of JavaScript also can make it often harder to understand what is going on.  There are many ways to accomplish the same thing and they can look like completely different things.

If you have need to create a lot of custom "classes" in your application, I have a few things I've grown to appreciate.  In this post I'll talk about a style of class definition that I find readable, provides good encapsulation and can provide good performance when accessing functions on these objects.  I'm sure that if I'd worked with JavaScript longer I'd be able to enumerate all the problems with my approach, but so far I don't think there is a lot of down side. But I think part of the reason I like my approach is that it reminds me of Java with less ceremony.

Here's what I usually see around the web:
function MyClass (some, params, needed) {
    this.doSomeInit();
}
var p = MyClass.prototype; //Or = new ParentClass();
p.baz = "lorem";
p.fuzz = "ipsum";
p.foo = function() {
    return this.baz + this.fuzz;
};
p.bar = function() {
    return this.fuzz + this.baz;
};
I've also seen:
function MyClass (some, params, needed) {
    this.doSomeInit();
}

MyClass.prototype.baz = "lorem";
MyClass.prototype.fuzz = "ipsum";
MyClass.prototype.foo = function() {
    return this.baz + this.fuzz;
};

MyClass.prototype.bar = function() {
    return this.fuzz + this.baz;
};
So what's going on?  
The above code is basically just 2 different ways of defining a JavaScript "class".  I put class in quotes because JavaScript doesn't technically have classes.  It has objects.  My main gripe with these approaches is that it requires that these objects expose a lot of their internal structure by updating their prototype so that these public functions can manipulate the internal state of the object and do work. The only real difference in the 2 styles above is that one is slightly more efficient since it avoids the chaining of object property calls that's required.  There is a cost to calling MyClass.prototype each time you define a new function.  So if you're looking for speed you put that in a variable.

I prefer to do something like the following:
function MyClass (some, params, needed) {
    var baz = "lorem";
    var fuzz = "ipsum";

   function myPrivateFoo() {
       console.log("PRIVATE");
   }

    this.foo = function () {
        return baz + fuzz;
    };    
    this.bar = function () {
        myPrivateFoo();
        return fuzz + baz;
    };
}
This approach means that I don't have to expose the variables baz and fuzz.  I also get to use the parameters, "some", "params", "needed" without the need to create internal vars or properties on the prototype.  The functions foo() and bar() are both public privileged members of our object.   It also makes it easy for these public functions to use private functions.  My main reasons for liking this approach is that I think it's cleaner in that I like that my constructor encapsulates the class definition like you'd see in Java. I also like that my object can be more shy about what they expose to the world.  But is there a downside to this?  Actually there is.  

The catch is that every time the constructor is called all of the code in my constructor gets run.  All the function definitions are added to the prototype every time.  That's not so good.  Why?  Because if your custom object needs to be constructed a lot, then yes you'll take a hit in the performance department.  However that's usually a smell of something else not being quite right in the design and can be mitigated with a pattern that separates construction from execution and ensuring you are being judicious about your object creation. However if it truly is something that needs to be created thousands of times, then by all means follow one of the other approaches.  Or take a hybrid approach and define any functions that are fully public and don't require internal knowledge of your object state and define them explicitly with the MyClass.prototype.myFunction syntax and anything that has to access the internal state can be defined in the constructor.  There's not really a right answer here.  I'm just sharing my preference and providing a small argument for it.  

If you were to look at performance from another perspective, my approach may actually be preferred.  If you are using functions that an object exposes in a loop, or another pattern that requires lots of calls, my approach means that there are fewer property lookups on the object prototype since local variables can be used more often.  In practice I find that I'm not constructing custom objects very frequently, but I am calling functions on those objects in loops quite a bit.  So for me this approach is a good fit.  

Anyone else have a different take? I'd love to hear about it in the comments.