[Edu-sig] A case against GUIs in intro CS :-)
Toby Donaldson
tjd at sfu.ca
Fri Jun 3 10:59:01 CEST 2005
> The problem is that GUI programming is given significant coverage in
> most mainstream introductory CS textbooks. Open an arbitrary Java-based
> textbook and you are likely to face GUIs from almost the beginning.
> Sample programs and exercises often come with GUI shells that obscure
> their essential non-GUI parts. I find the dominance of GUIs in java-based
> introductory books troublesome.
I agree that the overhead of writing hand-made Swing GUIs can be overwhelming, and that beginners should instead focus on clear and simple expression of algorithms and ideas. I too have struggled with Java and Swing, and have pretty much just given up on it and told students the bare minimum of what they need to know to get things going, with the promise that the underyling details of how it all works will be revealed in later CS courses. I have not yet decided if this encourages or discourages students from taking more CS courses. :-)
When I taught VB (Visual BASIC), however, the GUIs were great, and students almost universally said the course was more interesting and enjoyable because of them. In part, they liked the fact that their programs looked like real programs, and that there was some room for creativity in how they organized their interfaces. Student were often driven to do extra programming by a desire to add or fix features they had seen in programs. I liked the fact that there was a very clear design phase where you had to sketch out the interface. Talking about the interfaces was a good way to talk about the program without talking about the source code. This helped students organize their source code, and to see first-hand the benefits of modularity, i.e. they were always writing the code for widgets in specially-named functions. Also, GUI widgets roughly correspond to programming concepts, when deciding if you want to use a text book or a list (say), you are indirectly deciding which data structure you want to use. Some students said they thought that learning VB first made it easier to understand Java-like OO GUI models.
So far, in our Python courses, we haven't gotten around to any GUI programming, although its on the books to be included.
Of course, VB is an integrated tool for GUI development, so you can't fairly compare it to the process of making hand-made Swing GUIs.
As much as I like Python and dislike the BASIC part of VB, I do have to admit that my experiences with VB were probably the best I ever had teaching introductory programming (although it wasn't quite a CS1 course, just a humble introduction to "event-driven" programming).
Toby
More information about the Edu-sig
mailing list