Jun 7, 2014

General ideas about teaching programming : 'apps' vs. 'programs'

Apps are hard.  I wrote my first Appery.io app today*.  (It was a version of the homework we ask job candidates at work to complete.)

From a certain perspective, writing an app is rather easy.  You throw up some buttons, wire the data to the views, and ship it.  That wasn't so bad, right?  But the amount of knowledge you need to write an app is a bit daunting.

First, you need an idea.  You need to be able to clearly articulate the audience, the scope of what the app will and won't do.  Second, there's the layout and navigation flow of the app.  A poorly designed navigation experience can kill an application.  You need coding know-how.  What the classes are, how the different underlying APIs work together to make the views happen.  To say nothing of the necessary pre-reqs of understanding programming primitives, like variables, control flow, language syntax.  Finally, unless you're writing a local app, you need to know how the internet works.  What a RESTful API service is, how HTTP works with headers and params.  How to get an API key, how to authenticate.

Appery's a low entry point for building a very simple app, and maybe for copying tutorials you could get something a bit more dynamic, but the seams between knowing a very little to knowing pretty much everything there is to know about writing an app are close together and a bit rougher than you'd hope for a tool this simple.  There's a lot of places where you fail over into JavaScript, or where you need to know what a web proxy is (so that you're can get around making Cross Domain Requests**.)  Writing a mobile app in HTML, CSS, and JavaScript requires a surprising amount of web domain, app, and just plain networking knowledge.

That's asking a lot for new developers.  Admittedly, maybe the target market isn't new developers, it's companies that don't have the developers/time/money/inclination to create a native Android/iOS/Windows phone from scratch for each of the platforms.  It's significantly easier to throw an experienced dev at Appery and get a workable mobile app than to create a native app from scratch.  (Disclaimer: In no way is this an endorsement of Appery's product -- if anything, this experience has only deepened my belief that there's no substitute for a natively written app experience.)

But for a new dev audience (one without an experienced dev who can blunt corners and abstract away the rest of the considerable amount of knowledge that you need to write a native app), Appery seems like a terrifying and frustrating experience.  (Though if you know web development, well, then you know web development).

What would be better for young devs to spend a weekend doing?  Other than learning wire framing and writing very leakily abstracted apps?  They should learn programming.  They should write programs, not apps.  It could use quite a bit of set up to get going, but I really liked the challenge at the Hackette's Spotify Hackathon they held last year (https://github.com/pbos/spotify-hockey).  It basically involves writing a hockey team algorithm.  It's a good problem for a weekend project because a) the end product isn't about presenting your ideas (you just load up the different hockey teams and let them have a tournament style show down), b) it'd involve a non-trivial amount of programming, and c) it's kind of fun.

Or maybe that's a bit too advanced for completely new programmers.  Something like Scratch (http://scratch.mit.edu/) or even some format for writing text adventure games could be fun.  Basically, make it less about building a product, and more about writing a small program, with a code editor and a runtime environment.

/rant


* I work professionally as an Android app developer.

** If you clicked on this link, you just proved my point about needing massive amounts of previous knowledge.  Bonus points to you if you now get why CORS is a problem.  You're probably in the minority.

No comments:

Post a Comment

us

‪some days I remember the lies you told me and i laugh at both of us‬ ‪at me, for wanting so badly to believe you‬ ‪at you, for having t...