Wednesday, September 19, 2012

We Are Making Things Too Hard

I once had a conversation with Bill Gates. Yes, in person, face to face. And while I will not go into the whole meeting he said a couple of things that I continue to think about on a regular basis. One of them is that he suggested that development tools have gotten more and more powerful but at the same time that has made it harder and harder for students and other beginners to use them. I think that anyone teaching programming using tools like Visual Studio and Eclipse and the various markup languages that seem to be growing in power and complexity daily would agree with this. This has spurred the growth on simpler tools such as Alice, Kodu, Scratch and IDEs for beginners like Small Basic, BlueJ and Greenfoot. These are great learning tools but I wonder if they keep beginners, and by that I mean hobby programmers as well as students, away for the main stream of programming. Away from the really cool stuff.

Today when you think about programming apps for phones you have three options: iPhone using Objective-C, Android using Java and Eclipse with add-ons (Or App Inventor about which I will say more later) or Windows Phone using Visual Studio (C#, C++ or Visual Basic). Your user interface is likely to be drawn using some sort of markup language that is probably going to have its own learning curve. In my humble opinion it shouldn’t be this way!

Many years ago I worked with an operating system  called TRAX. It’s so obscure not that I can’t even find it in Wikipedia. Why bring it up now? Because back 30 years ago this operating system used a mark up language for describing a user interface that was much like the ones we are using today. Where is the progress? Oh sure today we have some drag and drop capability and I love getting started that way using Visual Studio for Windows Phone and Windows 8 apps. But a lot of modifications seem to have to be made in the code. Sure I can do it. I have almost 40 years of experience writing code and messing around in mark-up languages.

As long as I have been programming which is about 40 years now people have been talking about programming getting easier and easier to the point where one day everyone would be able to program. It seems as though we went so far with that (remember Visual Basic 6.0 and earlier?) and then started backtracking. Now Visual Basic .NET was a huge step forward in power but we lost something in ease of use. Control arrays which I thought was one of the most powerful features in VB 6.0 were still doable in VB .NET but it took a lot more work that had to be coded by hand.

Moving from Windows Forms in earlier versions of Visual Studio to Silverlight and HTML5 today again seems like a bigger step backwards in ease of development than it is step forward in power. I’m not sure I understand the motivation behind it either. Who is pushing for this sort of thing?

Now a word or two about App Inventor for Android. I did a throw down event where we demonstrated development of apps for iPhone, Windows Phone (my part) and Android. I have no doubt that the App Inventor demo “won” for many definitions of won. I like to think I was second – Objective-C is weird looking to me. But with App Inventor one has a domain specific (phone in this case) version of a drag and drop block programming language (it builds on work at MIT that went into Scratch) that makes it easy to do very powerful things very easily. The demo made ME want to start developing for Android! Why can’t we have more of that sort of thing?

Why can’t we have domain specific blocks for more types of apps and applications? Why can’t we have more work in developing block languages that make it easy to avoid syntax and create more WYSIWYG user interfaces? Oh sure the professional programmers will sneer at it and stick with their powerful tools that make them feel like the elite – or is that l33t? But why not open development to the rest of the world?


TechKim said...

Have you seen Bret Victor's talk Inventing on Principle? The talk was to a technical audience and he wowed them with some amazing tools, but I think he really caught them off-guard when he started challenging them to identify a driving principle to live their life by. His principle is that "creators need immediate connection with what they are making". He believes that "ideas start out tiny, weak and fragile" and in order to develop and mature, the ideas need an environment where the creator can nurture them. The tools he's created to embody his principle are related to programming and they do away with the asynchronous model of programming (code -> compile -> execute), instead coding and its results are side by side and instantaneous.

Garth said...

For Android and iPhone development Corona is the way to go. Write simple to professional apps. My students enjoy working with it.

Gerald Thurman said...

The CS1 course in Arizona is really a course about learning programming using Java. The IDE is a huge pain in the... The class is fine for students who have already learned the basics of programming, but I feel sorry for the newbie students whose initial exposure to programming is Java.

Unknown said...
This comment has been removed by the author.
Unknown said...

People have been trying to replace programming with visual representations for years. The bottom line is that it just doesn't work for things other than boilerplate code and trivial applications. Look at all the efforts in MDA over the years. Martin Fowler has a good article on MDA where he basically summarizes and says that if you were to have a visual programming language or modeling language that would replace a textual language, it would have to be just as complex as the textual language. Thus, you're no better off because now it takes *longer* to program because of the burden of the user interface. It's an interesting idea, but in practice, it only gives people a leg up when they're first learning how to build trivial applications. When people advance a little more, then the visual languages become a hinderance. I think its much better to teach kids syntax and computation thinking and stop looking for the silver bullet that would somehow make programming "easier for all".

Javid Jamae

Computing Teacher said...

You make good points. I learned BASIC first - type it, compile it. The end.

Then it was Turbo Pascal. Type it. Compile it. The end.

Then along came Visual Studio, Delphi, etc - fine if you know what you are doing, horrible to teach sometimes. If you just want to start on the basics, you're outta luck- too much clutter.

As for the modern industrial IDEs - sheesh. It's like starting with power tools when all you want to teach is how to tap a nail into a wall. It's like teaching simple addition to Grade-1 with a multi-function graphics calculator that is best suited to advanced calculus.

That's why I think Greenfoot rocks. I have blogged my own experiences of using it, here

Best wishes,

Cefn Hoile said...

I don't agree with @MyKidCanCode's citation - that allowing full expressivity in a graphical language creates so much friction in the UI that the benefits of the visual programming environment vanish.

I conceived and ran a project called BT Rules which you can see several screencast demos of here (best fullscreen and with audio)...

Each domain has domain specific language structures to suit, maintaining the necessary expressivity.

Effectively, each of the domains we targeted (which specialise the tool with a single, simple XML file per domain) has documentation, autocompletion and compilation built in to a single, consistent interface which only demands that you understand your native language (we chose English).

Typically, other languages, development and deployment environments solve each of these problems separately, with different levels of success and worse, in ways which demand yet more learning for each language and aspect.

I'm sorry to say the project was ended for logistical reasons, (I left the company and the team was headhunted elsewhere), though I was very proud of the results.

For those interested, the code as outlined by could be licensed from BT, or aspects could be reimplemented as a greenfield development.


Freeman Crouch said...

Hi Alfred. I see the fate of school computer science as tied to the fate of end user programming. A tool that lets civilians program a little bit gets axed (Hypercard) or evolved into a difficult, pro-only tool (Delphi, VB). (Which of these will happen to App Inventor I wonder?) -- I also can't help relating this to how pro dev's speak out against end user programming, citing risks, as if hobbyists are going to be writing avionics software or something. Programming is broken and should be easier, at least in a lot of domains.