Thursday 23 May 2013 — This is more than 11 years old. Be careful.
I’m trying to come up with more project ideas for intermediate learners, somewhat along the lines of Intermediate Python Workshop Projects.
So here’s a question for people who remember coming up from beginner: as you moved from exercises like those in Learn Python the Hard Way, up to your own self-guided work on small projects, what project were you working on that made you feel independent and skilled? What program first felt like your own work rather than an exercise the teacher had assigned?
I don’t want anything too large, but big enough that there’s room for design, and multiple approaches, etc.
If you came to Python from another programming language, then what was the project that first made you feel competent at programming in general?
Any and all ideas welcome. Thanks in advance!
Comments
Another turning point was using python web frameworks, like web2py, to serve some dynamic content.
As for projects outside of work: Scrabble cheater (already listed) might have been it for me, but also Tetris, a ray tracer, a Risk board game, and (maybe too large and too many knowledge dependencies, but powerfully cool), an irc client and server, and finally, a bittorrent client.
Things I rewrote or refactored enough times to develop opinions about structure made me feel independent and skilled, actions I think were motivated by working on projects a bit too large or to complicated for my abstraction skills at the time.
1) When solving a real problem (not some made up by a teacher/instructor)
It was for me, when I saved my wife pictures from a deleted SD card.
She have 600 pictures taken in a party she was payed to photograph.
In 23 lines of python code, I've extracted all the pictures from the image of the SD card. I still have that snippet of code in my mailbox.
2) When trying using different libraries to solve the same problem.
for me it was parsing binary data of MPEG transport stream.
I was using python built-in first, then BitString, and then Construct (http://construct.readthedocs.org/)
3) Messing with the python source code
In work, I wanted badly to be able to write test code in python for an embedded devices we are working on.
I got python cross compiled, and I needed it to use our in house memory
allocation library.
Maybe this kind is a bit more the intermediate...
bottom line, from my POV solving a real problem/itch. Make your students present their problems and itches. Guide them how it can be done in python (yeah and that's makes planning ahead a bit difficult).
New skills expand the universe of problems that can be solved. Once this process has gone through a couple of cycles, it begins to feed on itself and competency is reached.
The hard part is identifying problems that are interesting to the student but small enough to be tackled alone. +1 to newcoder.io for helping to fill the very real gap between codeacademy and stack overflow.
It's too bad I don't get to write more Python weekly.
I also like projects when I teach intermediate Python-y things that involve accessing data through a really well-documented API (Twitter, bit.ly, the FAA, in my opinion) and not just printing the resulting data but doing something complex with it as a result -- it's open-ended but it has definite design elements and a lot of satisfaction.
1- getting your Facebook profile and exploring social graph.
2- look into stats of your players and analyze them.
There is the by now classic Sudoku solver. My first attempt could only solve the easy problems. But my third program could solve even the puzzles that are rated as diabolically difficult. This problem forces a programmer to really get their mind around recursive programming. It also requires a good deal of solver strategy in order to minimize time spent going down blind allies. The problem is not tractable just by brute force.
Using the brilliant PyParsing module I wrote a program that does spreadsheet style cell math. This program could parse and evaluate typical cell equations including function calls to standard math functions : sin(), log10(), atan2() etc. The arguments to these function could also be expressions that required further parsing. So yet more experience with recursion.
Using the ctypes module I wrote a Pythonic wrapper around a usb device dynamic link library. The particular device was a USB two channel oscilloscope ( PicoScope PS2206). But in principle any device driver dll with a good C API can be wrapped and accessed from Python using ctypes. Very satisfying project.
Most recently I used the extraordinary PySide (Qt4) graphics library to write a mouse / keyboard interactive GUI for exploring quadratic and cubic Bezier curves. The anchor and control points can be moved about and the Bezier is redrawn in real time. I also added an animation feature that shows how the Bezier can be constructed from straight line segments connecting between the anchor and control points. You really learn a lot about OO programming writing GUI code.
Python is fun!
The last intermediate project I completed was a language interpreter/front-end for programming in Tamil(Indian language) scripts accessing most of underlying Python builtins, using mixed English-Tamil identifiers and Tamil only keywords. You get to learn about LL(1) parser, custom lexers, UTF-8 coding, and visitor patterns.
Python has been a very engaging journey.
Add a comment: