Thursday, September 02, 2010

Programming mobile phones ...

I am currently designing/developing a new subject that will teach students how to build software for mobile devices. It is proving to be a real challenge. Especially finding a suitable balance between showing how to use API and the higher level design/engineering concepts.

Why is this hard? For a number of reasons Universities want to be seen as places of 'education' rather than 'training'. That is, they want the students to have a greater depth rather than knowledge of the API. Personally I prefer to the training first and then principles later approach. I find that the best way to get students moving forward is to get them started and learn by example (doing stuff even it is a bit sloppy) --- build deeper understanding at a later stage.

Why not start with concepts first? The simple answer is that the brain has a reference point to start with and the conversations are a lot more meaningful. A weak analogy is that we do not start 2 year old kids on language semantics/grammar and spelling first -- we just talk to them and worry about semantics of a language later. That is the learning is via a process of incremental refinement -- and most of the time we do not even bother correcting poor grammar.

Will they pick up bad habits if we do not give them deeper concepts first? Well, that depends on the teacher. If you use sloppy and poorly thought out examples -- then sure, they will pick up bad habits and potentially do a lot of damage to their learning.

Back to the mobile phones ...

I have not programmed a mobile phone at any serious level except for a small JavaME software that convinced me that JavaME was a dead technology. Currently I am systematically learning how to program an iPhone taking a lot of notes to reflect on my own learning experience.

Based on progress so far ...

  • The baseline knowledge required to build a reasonable piece of software for the iPhone is quite high. This is not a platform to start students new to programming on. Need to have skill in use of design patterns, events, user-interface construction/APIs and OOP.
  • XCode IDE does require some level of formal 'tool training' to speed up the learning process (and more importantly to ensure that students do not feel dumb/lost -- quite important because the motivation to learn drops rather fast once that feeling of being lost sets in).
  • Designing each screen and the various iterations on paper is proving to be very helpful. I am not sufficiently familiar with the API and libraries, so I do not yet know what is available out of the box and what requires custom engineering. As a part of this exercise, I am looking at different software designed and built for mobile devices and writing down how they may have been assembled -- mostly as an experiment to see if they helps me learn developing for these devices faster. So far the results are promising, I'll not try this technique with others and refine as needed.
  • I am planning to use a few systems as case studies and get students to decompose them in order to learn how they are built. Essentially a critical review process to understand the design patterns, navigation strategies, UX issues etc.
  • I am allocating quite a bit of time for the mobile operating system related issues -- how processes / apps are scheduled / allocated resources etc. File I/O, Network I/O.
  • Data handling is slightly different and things like sqlite need to be discussed within the context of mobile applications.
  • Mobile web applications (HTML5/CSS/Javascript) -- mostly the considerations are to do with design rather than the actual technologies. Esp. touch interface considerations.
  • These devices have very different usability issues associated with them. The simulator is just not enough.
Well in a few months I have to make the harder choices -- identifying and defining a final set of learning outcomes that can be achieved in a single semester and then start building out the material.

-- rv

6 comments:

Anonymous said...

Putting the high level concepts aside for a moment, why not teach the students Android as the API of choice? Most of them would know Java already right? Also no outlay cost for the dev environment.

Dwain Bunker said...

Completely agree with Justin.

Rajesh Vasa said...

iPhone was selected by the Dean for strategic reasons (it is a platform that is currently getting a disproportional media representation). I am currently putting forward a case to push for Android since it will be easier to pick up and learn.

Windows Mobile 7 will have an impact as well (though it is too early to say how much).

Daniel Chambers said...

Why develop for the iPhone when you've got two other great platforms right at hand: Windows Phone 7 (which RTMed yesterday and tools for which have been available for ages) and Android?

If you go iPhone, what will your non-Mac toting students use to develop on? You can hardly require them to buy a Mac to do this subject, and nobody wants to be chained to a Mac-filled lab in order to do their work. Windows Phone 7 and Android can both be developed on the platform that most people already have, using tools and languages that people are already familiar with, which allows you to avoid re-covering that stuff and to focus on issues specific to mobile phone development.

Anonymous said...

I thought the CS193P course from Stanford was great and it's a shame that Swinburne never offered anything like that, because it was enjoyable to go through it online (including the Google groups).

Daniel, Swinburne has Mac labs. They're to be used only for subjects and by students that require Macs (e.g. some design faculty courses).

Of course, if it's an elective, then having access to a Mac is a reasonable requirement and is the fault of the student for enrolling in the subject ;).

There are other reasons though, i.e. it's A LOT cheaper to buy iOS devices than it is Android ones; a brand new iPod touch runs $289 and Apple is kind to larger institutions that buy heavily into iOS with discounts and a lot of help from Apple reps.

Dwain Bunker said...

@Anonymous, I think Daniel's point was that a Mobile Phone programming subject should be about Mobile Phone Programming rather than specifically tied to one type of mobile phone.

Obviously someone wouldn't enroll in a subject requiring a mac if they didn't own one. That is why this is an issue; people who want to dabble in phone programming are left with no alternative in this scenario.

That is a pretty reasonable argument and is probably why Raj is, as he mentioned, putting forward a case to push for Android.