a hobbyist's dilemma

J

John Salerno

Now that I've learned much of Python, I'm sort of stuck with what to do
with it. I'm not a professional programmer, so I don't really have a use
for Python now. But I really want to come up with some neat uses for it
(for fun, and so I don't just start forgetting it right after I learned it).

I found a few exercises online, but I wonder if anyone has other ideas
(or exercise websites) that I can use to keep my Python skills going.
The projects in Dive Into Python are a little too complicated for me
right now, I think. I kind of like doing functional stuff, because OOP
still has my mind warped, and I love that Python lets you write programs
without having to mess with classes.

Anyway, any suggestions are appreciated!
 
F

Felipe Almeida Lessa

Em Qua, 2006-03-29 às 18:07 +0000, John Salerno escreveu:
I found a few exercises online, but I wonder if anyone has other ideas
(or exercise websites) that I can use to keep my Python skills going.

Try creating simple games using PyGame. Think of simple things like
minesweeper.
 
J

John Salerno

Felipe said:
Em Qua, 2006-03-29 às 18:07 +0000, John Salerno escreveu:

Try creating simple games using PyGame. Think of simple things like
minesweeper.

Actually, PyGame *is* something I am interested in experimenting with. I
definitely want to use it, but I also want to try some stuff with the
basics too, just so I don't immediately get into the complicated stuff
without working with the usual things first, like lists and
dictionaries, etc.
 
J

John Salerno

John said:
Actually, PyGame *is* something I am interested in experimenting with. I
definitely want to use it, but I also want to try some stuff with the
basics too, just so I don't immediately get into the complicated stuff
without working with the usual things first, like lists and
dictionaries, etc.

Funny...I was just reading the docs for PyGame and wxPython, and they
said this, respectively:
----------------------------------
"The most important thing is to feel confident using python. Learning
something as potentially complicated as graphics programming will be a
real chore if you're also unfamiliar with the language you're using.
Write a few sizable non-graphical programs in python - parse some text
files, write a guessing game or a journal-entry program or something.
Get comfortable with string and list manipulation - know how to split,
slice and combine strings and lists." -- PyGame
-------------------------------------------

"First of all, if you are new to Python, and especially if you are new
to programming in general, it makes the most sense to learn Python
itself first, without any GUI stuff. This can be frustrating if your
goal is to write GUI programs, and particularly if you have experience
with an environment like Visual Basic in which GUI programming is
integrated into the environment. It is worth it, however, to take some
time to learn about Python. Python is a very powerful language capable
of doing many things both with and without GUIs.

Without first understanding topics such as functions, modules, and
classes, adding wxPython to the mix will only increase the confusion."
-- wx Python
 
E

Enigma Curry

I would second the vote for pythonchallenge. It's what taught me
Python.

The amazing thing about the python challenge is by the time your done
with it, you've gotten through a very large and diverse sampling of the
python docs. It really gave me a good understanding of all the things
that Python can do. You'll still want to read more traditional
tutorials and thoery as well, but that can wait, just play around with
it for a while.
 
J

John Salerno

Enigma said:
I would second the vote for pythonchallenge. It's what taught me
Python.

The amazing thing about the python challenge is by the time your done
with it, you've gotten through a very large and diverse sampling of the
python docs. It really gave me a good understanding of all the things
that Python can do. You'll still want to read more traditional
tutorials and thoery as well, but that can wait, just play around with
it for a while.

Yup, stuck on the second exercise. I know mostly what to do, but there's
one thing hanging me up, so time to search through the docs. :)
 
G

Gerard Flanagan

John said:
Now that I've learned much of Python, I'm sort of stuck with what to do
with it. I'm not a professional programmer, so I don't really have a use
for Python now. But I really want to come up with some neat uses for it
(for fun, and so I don't just start forgetting it right after I learned it).

I found a few exercises online, but I wonder if anyone has other ideas
(or exercise websites) that I can use to keep my Python skills going.
The projects in Dive Into Python are a little too complicated for me
right now, I think. I kind of like doing functional stuff, because OOP
still has my mind warped, and I love that Python lets you write programs
without having to mess with classes.

Anyway, any suggestions are appreciated!

Having worked (briefly) as a teacher and tutor, I know that a good way
of helping *oneself* to really understand something is thinking "Ok,
how would I explain this to someone else?" It is also very rewarding
to pass on knowledge, and, in particular, to see a 'furrowed brow' turn
into 'Ah, I see!' (and even more satisfying if the student is not
strong academically). [that's possibly a bit rose-tinted...:-1]

So my suggestion would be to write some exercises yourself, something
that you think would be useful to someone with less knowledge of the
language than you.

Gerard
 
T

Terry Reedy

John Salerno said:
Actually, PyGame *is* something I am interested in experimenting with. I
definitely want to use it, but I also want to try some stuff with the
basics too, just so I don't immediately get into the complicated stuff
without working with the usual things first, like lists and
dictionaries, etc.

So start with a game that is playable with a text interface. Perhaps
hangman, perhaps with a different metaphor ;-) That requires basic i/o,
lists, import of random module, and conditional statements.

tjr
 
J

Jim Sizelove

John said:
Now that I've learned much of Python, I'm sort of stuck with what to do
with it. I'm not a professional programmer, so I don't really have a use
for Python now. But I really want to come up with some neat uses for it
(for fun, and so I don't just start forgetting it right after I learned
it).

Here are some other ideas:

You can find sample code for project ideas at Useless Python
(http://uselesspython.com) and the Python Cookbook
(http://aspn.activestate.com/ASPN/Python/Cookbook/).

Hang out at the python tutor mailing list
(http://mail.python.org/mailman/listinfo/tutor) and learn from others
and learn by helping others.

Enjoy your python adventures,
Jim Sizelove
 
R

Ravi Teja

I don't have any dearth of Python needs ( I now, sort of pay my tuition
through Python :) ). But I use it for fun as well, say gaming. For
example, I have scripts that send keystrokes based on voice commands or
other keystrokes.

Having a productive language like Python at your disposal can help
automate many of your day to day tasks.
http://www.python.org/doc/essays/cp4e.html

Besides, it's a lot easier (and fun) to write code for yourself than to
make it to distribute to others.
 
B

Benny

John said:
Anyway, any suggestions are appreciated!

What've you got for hobbies? As my first Python
based project I wrote something that put up a GUI
and allowed me to add and delete records in a file
so that I could catalogue my model railway collection.

Now I could have used a dB package (overkill) or a
spreadsheet (if all you have is a hammer, every
problem looks like a nail) or something that
someone else had written (mostly MS Windows based)
but part of the point was to practise programming
in Python. (On top of which, if I do it this way,
the thing's much more portable across the OS's that
I use.)

At the point that my enthusiasm returns I'm going
to be coding up a simulation of a gravity shunting
yard using PyGame (based on something I saw at
the Dutch National Railway Museum) and then further
extend that to a more generic shunting simulator.
(Should keep me happy whilst I build the basics
of the track plan on the model railway boards...)
 
J

John Salerno

Benny said:
What've you got for hobbies?

Hmm, my hobbies...well, programming for one. :) Also literature and
anything computer-related. I suppose I could try to catalog some books.
One like I'd like to learn is how to use Python with MySQL, but I just
can't get MySQL to work on my computer, so I'm at a dead end there.
Seems like the best option for cataloging though.
 
F

Fredrik Lundh

John said:
One like I'd like to learn is how to use Python with MySQL, but I just
can't get MySQL to work on my computer, so I'm at a dead end there.
Seems like the best option for cataloging though.

if you want to play with SQL and Python's DB-API *without* having
to install server stuff, pysqlite is a good choice:

http://initd.org/tracker/pysqlite

</F>
 
J

John Salerno

benchline said:
Since you want to learn to use python with a database you may want to
try it with SQLite. SQLite is a very easy to use database that stores
the whole database in one file. Working with it would be very similar
to working with Mysql through python.

http://www.sqlite.org
http://initd.org/tracker/pysqlite

The thing about mysql is that it's also the db used on my website, so I
figure it might be nice to learn that one in case I ever need to use
that db also. Unless the basic uses for all databases are the same (i.e.
if it isn't like learning a new language for each different database)
 
A

Alex Martelli

John Salerno said:
Now that I've learned much of Python, I'm sort of stuck with what to do
with it. I'm not a professional programmer, so I don't really have a use
for Python now. But I really want to come up with some neat uses for it
(for fun, and so I don't just start forgetting it right after I learned it).

Instead of hacking away on your own, I suggest you look around
sourceforge and other such repositories of open-source programs: find
out what projects are written in Python and may be looking for helpers,
prioritize them in terms of your interests, and email the admins of the
top one offering to help -- if they politely decline, try the second
one, and so forth. The best and most fun programming is that done in
teams; also, participating in an open-souce effort gives you extra
motivation to keep at it when the going gets hard (if the going never
gets hard then you're not tackling problems that are interesting
enough!-) -- as you know you're helping others, not just putzing around,
you'll feel that extra push towards sticking with the task!


Alex
 
K

Kent Johnson

John said:
The thing about mysql is that it's also the db used on my website, so I
figure it might be nice to learn that one in case I ever need to use
that db also. Unless the basic uses for all databases are the same (i.e.
if it isn't like learning a new language for each different database)

Most of what you learn working with SQLite will apply to any relational
database you use from Python - how to use DB-API and how to write SQL
(or how to avoid writing SQL with SQLObject or SQLAlchemy). There are
pesky differences in data types and how to pass parameters but the
basics are the same.

Kent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,291
Messages
2,571,453
Members
48,137
Latest member
IndiraMcCo

Latest Threads

Top