What made you feel competent in Python?

Thursday 23 May 2013This 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

[gravatar]
Have you seen the set of intermediate projects that Lynn Root put together?
[gravatar]
I built a parser for FrameMaker MIF files and some tkinter GUI apps for running builds.
[gravatar]
I think one of the big turning points for me was after I started writing some PyQt apps. Something simple like a GUI frontend to command line tools like ffmpeg, or PIL.

Another turning point was using python web frameworks, like web2py, to serve some dynamic content.
[gravatar]
Refactoring a few helper functions into more generic forms, making it a standalone package and sharing it on pypi.
[gravatar]
Getting my head around Deferreds, and building a little single-page app backed by Twisted.Web.
[gravatar]
Thomas Ballinger 3:52 AM on 24 May 2013
Starting to build libraries by factoring out shared code from command line tools and GUIs I'd written was a big turning point for me - so writing enough code to be bitten by enough bugs to need to find a better way to maintain more software.

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.
[gravatar]
To answer your original question, I came to Python development when I was already an experienced C/C++ dev. My first real project with it (not counting a university network programming assignment a few years earlier) was to create an automated test harness for some DSP code (including playing back audio files and ensuring we got the same answer as the Matlab model), which worked out just as well as I had hoped. The rest, as they say, is history :)
[gravatar]
Israel Fruchter 8:04 AM on 24 May 2013
Ned, hope those ideas might help.

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).
[gravatar]
The journey to programming competency begins when a new programmer encounters a problem they feel can be solved with the skills that they already have combined with something new they feel confident in learning.

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.
[gravatar]
I don't recall the project, but I spent an hour on a new script without running it. And it ran perfectly the first time. That was a big Python moment for me. I suspect this is more a testament to Python than my competence birth.

It's too bad I don't get to write more Python weekly.
[gravatar]
The first project that made me feel like a competent programmer was a Sudoku game -- I didn't write it in Python the first time, but when I did so later I think it would also work well for an intermediate type of project, especially because I could see more than one design option and had to choose, and could make more than one work. And then there were further options -- computer-play, solving (ideally before reading Norvig's piece)...

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.
[gravatar]
Couple of projects I found interesting

1- getting your Facebook profile and exploring social graph.
2- look into stats of your players and analyze them.
[gravatar]
I’d guess I’m sort of an intermediate level Python user. Here are some of the projects I’ve completed that really gave me some confidence that I could solve problems on my own using Python:

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!
[gravatar]
My first significant python project was to implement RFC 959,FTP client (http://www.ietf.org/rfc/rfc959.txt), using Python. At that time, having a live socket connection on a terminal to learn about webservices, and socket transactions with state where very illumination - as opposed to using the Unix socket programming from C.

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.
[gravatar]
I need some help! I would like to know how to program a picoscope 2206 using Python.
[gravatar]
There is a great set of open-ended problems on various topics here (https://github.com/karan/Projects). They have user-submitted solutions in various languages.

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.