Hi Kirby & Edu-sig, I’ve just returned from a year-long assignment abroad where I wrangled Django/Python and JavaScript systems for the Government of Guyana. As a side project I also taught an 8 week course on WebApp development to the GIS division of their Geology and Mines Commission. I’d like to briefly tell about that course and an approach that worked really well.
The “approach” that worked so well was to have a colleague performing live development on a laptop, projected on a screen, while I did the talking. Backing up just a bit, the original invitation was wide-open and amounted to “teach the group something useful” in 8 weeks -- 2x per week from 5-8pm. The group was 17 GIS professionals with no programming experience. I’d never taught an actual class on software development, either, so it was an experiment. I had just a few days to propose and prepare. What I decided to do was “drag” the group through the process of developing a GIS web application. We used GitHub and started with a blank page. We used pure, static JavaScript, in the end, thus avoiding the Django (Python) server aspect altogether. We incorporated GIS by using OpenLayers and features stored in GeoJSON files. But the team teaching aspect is the point of this post. Not every teacher can have the luxury of a like-minded programmer anticipating their next thought and coding-it-up live while you narrate, but wow! did that ever work well. I am convinced that it enabled us to cover much more material in the short time that we had available, as well as exposing students to every aspect of the development process along the way. We thought out-loud, discussed design and implementation as a group, on and on, with the advantage of my colleague on the projected laptop, able to demonstrate the effects of certain alternatives etc.. That’s about it. This technique would, of course, work for teaching any programming language, namely Python. You can see what we developed here <https://github.com/ccosse/ggmc>, and you can play the actual game here <https://asymptopia.github.io/ggmc/> (it’s a geography scavenger hunt game, btw). Given the importance of the web and the similarities between Python and JavaScript, especially transferring data via JSON, I cannot imagine teaching one without the other. Although our 8 weeks was not enough to get much into Python, we did port several small exercises between JavaScript and Python to emphasize their similarities. Happy programming, Charles Cossé http://ccosse.github.io/ On Mon, Jul 18, 2016 at 2:30 PM, kirby urner <kirby.ur...@gmail.com> wrote: > > I'm prepping for class tomorrow, as a Python instructor for employed > adults eligible for California State funded professional development > electives, not for college credit but career-relevant nonetheless. > > My approach is to use collections.namedtuple to show the tuple (a > sequence type, like a list) having its "slots" accessed via dot notation, > not just through indexing, then swapping in an equivalent class that > does the same thing (down to having __getitem__ in some > examples). > > Seeing how a class duplicates features we've already introduced, > makes a nice bridge to "defining your own types" (vs using the > __builtins__ or standard library types). > > Once with have dicts and lists introduced, near the start, we're > ready to talk about JSON already, which brings in early previews > of web services, APIs, inter-operability with JavaScript (ES) and > of course MongoDB. > > I just use json module to store .json files, as soon as we get to the > function open( ), i.e. here's a first example of > > Talking about Python in the context of getting between a browser > and a database or persistent storage, gets the juices flowing about > "an ecosystem". > > These two source code files show off the web API angle, using > an open API to get IMDB information (movie database): > > https://github.com/4dsolutions/Python5/blob/master/get_movie.py > > https://github.com/4dsolutions/Python5/blob/master/get_movie_v2.py > > Here's another example, going from namedtuple Element > (for Periodic Table atoms), to class-based Element: > > namedtuple: > > https://github.com/4dsolutions/Python5/blob/master/elements_02.py > > class based: > > https://github.com/4dsolutions/Python5/blob/master/elements_04.py > > Actually running these would require the *.json files, both included in > the repo: > > elements_v1.json > elements_v2.json > > Next stop: SQLite and try / except syntax. > > Kirby > > PS: I'm pushing Pyret pretty seriously even though it's very much > the moving target. > > Follow the action on Twitter @4DsolutionsPDX > > python-cuba working group also going well. Py2017 shaping up. > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > https://mail.python.org/mailman/listinfo/edu-sig > >
_______________________________________________ Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig