News for hackers. Stuff that matters.
Re:PythonTurtle - the most low-threshold way for learning/te... by cool-RR on Saturday August 01, 2009 @09:13AM (#736266)
This is my little side project that I've been working on for a few months.

It is a way for curious people who are not computer-savvy to teach themselves Python. Of course, it can also be used in a class with an instructor.

Yes, I am aware of turtle.py, the turtle module shipped with the Python standard library. It has a few problems which I found unforgivable: mainly that it's not geared towards people who may not know anything about programming, or how to use IDLE. This is why I decided to make this project.

I'd love to get your comments and feedback.

Re:PythonTurtle - the most low-threshold way for learning/te... by orp on Saturday August 01, 2009 @06:58PM (#736796)
Hi,

Cool project.

The only issue I found with it so far is that unlike the old logo, the borders of the 'world' aren't circular. That means that if you type 'go(500)' from the opening position, the turtle disappears.

But it's a minor issue, really. My kid is 4 and I'm going to show it to him tomorrow, see how he likes it.

Re:PythonTurtle - the most low-threshold way for learning/te... by cool-RR on Saturday August 01, 2009 @07:07PM (#736810)
I agree, it's a bit annoying that it continues into infinity; I considered having a "spherical" world, but the problem is that the window size may change, and I don't know how I could keep it consistent when it happens. If you got an idea on how to solve that I'll consider it.
Re:PythonTurtle - the most low-threshold way for learning/te... by cesare on Saturday August 01, 2009 @09:29AM (#736273)
Nice.

I see from the source that you're using wxwidgets so it should be easy to port it to OS X and linux as well.

Re:PythonTurtle - the most low-threshold way for learning/te... by cool-RR on Saturday August 01, 2009 @09:34AM (#736278)
That's right, it's all Python and wxPython so porting it should be trivial. A Mac version will come, I hope that someone more Mac-savvy than myself will help me with making it.
Re:PythonTurtle - the most low-threshold way for learning/te... by d0mine on Saturday August 01, 2009 @06:31PM (#736764)
It works as is on Ubuntu.

PythonTurtle screenshot with a dragon curve http://img35.imageshack.us/i/screenshotpythonturtled.png/

    >>> def dragon(level=4, size=200, direction=45):
    ...     """From http://rosettacode.org/wiki/Dragon_curve
    ...     """
    ... 	if level == 0:
    ... 		go(size)
    ... 		return
    ... 	turn(direction)
    ... 	dragon(level-1, size/1.41421356237, 45)
    ... 	turn(-direction*2)
    ... 	dragon(level-1, size/1.41421356237, -45)
    ... 	turn(direction)
    ... 
    >>> dragon(10)
Re:PythonTurtle - the most low-threshold way for learning/te... by lowdown on Saturday August 01, 2009 @02:10PM (#736486)
I'll look at it today and see if I can get it up on the Mac
Re:PythonTurtle - the most low-threshold way for learning/te... by pasbesoin on Saturday August 01, 2009 @09:36AM (#736280)
I have some friends whose kids are approaching the computer-capable age. I've been keeping my eyes open for environments that might intrigue and inspire them. I'm adding yours to the list.

I like the idea of it being Python, so that perhaps they might smoothly transition from fun to "real" problem solving (which is, I find, the most fun of all).

Re:PythonTurtle - the most low-threshold way for learning/te... by davi on Saturday August 01, 2009 @10:30AM (#736308)
What else is on your list so far?
Re:PythonTurtle - the most low-threshold way for learning/te... by pasbesoin on Saturday August 01, 2009 @05:55PM (#736724)
Off the top of my head (it's a mental list and some saved pages/bookmarks I'd have to track down):

Scratch (MIT)

Alice (Cornell, IIRC -- just saw that an update is due next week)

One or more versions of Logo (e.g Berkeley) (recently, there's at least one that's hosted in the browser; might lower the gap since no explicit installation is required).

A couple of things I'm forgetting right now.

When I run across these or particularly a nice introduction to one or another, I forward the page on to the parents FYI. When/if they start to respond with "tell us more", I'll go more in depth (and excavate those pages and bookmarks).

Suggestions welcome. Since they're not my kids, my approach has been somewhat lackadaisical.

Re:PythonTurtle - the most low-threshold way for learning/te... by gasull on Saturday August 01, 2009 @11:27AM (#736339)
This was recently on HN:

http://www.technologyreview.com/computing/22919/

This other program is great for either children or adults:

http://brainworkshop.sourceforge.net/

Re:PythonTurtle - the most low-threshold way for learning/te... by davidalln on Saturday August 01, 2009 @12:15PM (#736383)
Reminds me a lot of Logo. I think back in 1st grade computer class it was a turtle we controlled as well.

Also, in AP Comp Sci we went over the basics of functions by making a turtle move across a plane.

Why turtles?

Re:PythonTurtle - the most low-threshold way for learning/te... by sp332 on Saturday August 01, 2009 @12:59PM (#736412)
They're called turtles because, back in the day, they were actual robots that looked like turtles. http://www.ias.uwe.ac.uk/Robots/gwonline/gwonline.html
Re:PythonTurtle - the most low-threshold way for learning/te... by kierank on Saturday August 01, 2009 @01:37PM (#736450)
Yep, they had one of those at my primary school.
Re:PythonTurtle - the most low-threshold way for learning/te... by cool-RR on Saturday August 01, 2009 @12:29PM (#736394)
Yeah, it's directly inspired from Logo. Logo was great because you were immediately able to program, and immediately see the results on the screen. There wasn't any annoying procedures to do before you could start, no graphics packages to learn. That was my goal here -- to have as few barriers as possible between the person and the programming.

Why turtles? I don't know actually, I'm just following Logo's convention. Some implementations make it a little arrow - I prefer the turtle, especially because kids like it better. Though there isn't really a reason that a turtle should leave a trail, so maybe a slug would make more sense.

Re:PythonTurtle - the most low-threshold way for learning/te... by pasbesoin on Saturday August 01, 2009 @06:01PM (#736728)
Yes. I'm very much in favor of "desired results quickly". For kids, that may be something cool and graphical and/or audible.

For adults, it's often solving a problem at hand.

I think that the ability to gets things done, that one desires, draws many people in. A large initial learning curve before that happens is often a deal breaker.

Once you're engaged, that's the time to keep teaching you more.

Re:PythonTurtle - the most low-threshold way for learning/te... by jacquesm on Saturday August 01, 2009 @05:56PM (#736725)
Super! I know a kid that has been literally begging me to teach him programming and I have been looking high and low for something like this. The closest I got so far was a logo in javascript: http://www.calormen.com/Logo/
Re:PythonTurtle - the most low-threshold way for learning/te... by le_dominator on Saturday August 01, 2009 @10:46AM (#736318)
Just gave it a try on a Windows Vista box and it crashes on startup. I'm going to give it a try on Windows XP later when I wake up from my "nap" as I haven't slept yet ;)

This is a great and noble initiative and I look forward to checking it out when I'm more than semi-conscious. Please, no wise ass correlations between semi-consciousness and the use of Windows Vista :D

I'm Swayze.

Re:PythonTurtle - the most low-threshold way for learning/te... by cool-RR on Saturday August 01, 2009 @10:52AM (#736323)
Thanks for telling me - I don't have a Vista box, but I should definitely solve that. I think I'll install Vista on VMWare and look at that.
Re:PythonTurtle - the most low-threshold way for learning/te... by cool-RR on Saturday August 01, 2009 @06:09PM (#736742)
Solved! Download the new version from the site.

Tell me if it gives you a weird error message after you close the program.

Re:PythonTurtle - the most low-threshold way for learning/te... by Akin on Saturday August 01, 2009 @01:36PM (#736446)
Crashes on Windows 7 as well at startup. Compatibility modes and running under admin privileges didn't help either.
Re:PythonTurtle - the most low-threshold way for learning/te... by cool-RR on Saturday August 01, 2009 @06:10PM (#736743)
I solved the Vista problem - please re-download it and tell me if it works on Win 7 now.
Re:PythonTurtle - the most low-threshold way for learning/te... by cool-RR on Saturday August 01, 2009 @02:04PM (#736481)
I'll get on it.
Re:PythonTurtle - the most low-threshold way for learning/te... by Akin on Saturday August 01, 2009 @06:38PM (#736779)
requires administrator privileges at startup. Once launched with admin privileges, fails with following error: Failed to load shared library comctl32.dll (error 126: the specified module could not found)

Note that there's a comctl32.dll on windows\system32.

Edit: Never mind, I left it at compatibility mode. Reverted back to native run mode and it's working fine now except that at upon exit, it complains about not being able to open log file because of privilege issues.

Re:PythonTurtle - the most low-threshold way for learning/te... by cool-RR on Saturday August 01, 2009 @07:09PM (#736814)
Right, I saw that log file thing on Vista too, I'll look into that. But as long as it works, that's good enough. Thanks to you I don't have to start downloading Windows 7 :)
Re:PythonTurtle - the most low-threshold way for learning/te... by aneesh on Saturday August 01, 2009 @01:36PM (#736448)
This reminds me of Karel, another beginner language that lets you move a robot.

http://en.wikipedia.org/wiki/Karel_%28programming_language%2...