Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I might be odd here, but my intro to Python was with turtle graphics and I despised it. My spatial sense is rather poor, and having to translate between code and Cartesian coordinates and vice versa was a heavy mental overhead.

    for x in range(0, 10):
        print(x)
Is way clearer to me than having to draw circles or lines and then manually calculating the Cartesian coordinates I should have hit to make sure it's actually doing what I want.

Likewise with pretty much all of the constructs. It's easy to understand a function that sums a list of ints, and it's easy to check. It's much harder for me to grok and check a function that draws circles at a list of Cartesian coordinates. A recursive Fibonacci sequence is easy for me to grok; just have it print out the values it's using at each loop. A recursive function to draw fractals is going to take me forever to figure out what recursion is actually doing. I can see that it changes, but figuring out how/why or why I would ever want to use it is really difficult.

I think it's just too much of an abstraction for me. Code -> numbers -> coordinates -> image is too many indirections for me to follow. When I wanted something "hands on", I usually defaulted to consuming APIs. It's really not much harder to install a Reddit API client and use it. It gives me something I can check, it's something I would actually want to do, and it's practically infinitely extensible.



I'm not quite sure I follow; isn't the whole point of turtle graphics to not have to think about Cartesian coordinates, but rather in terms of "move that far" and "turn that much" (at least initially)?

Or do you mean the other way around, as in, you start with an image of the end result in your head that's defined in terms of coordinates, and then you had to write the move/turn code that achieves that? I can see how that would be quite frustrating; but if you are already thinking in coordinates throughout, then you don't need the "turtle" part anymore - but you can still do graphics.


I've never taught turtle graphics in python, but in Logo, Cartesian coordinates are seldom used. It's mostly relative movement, which is far more intuitive


What age were you introduced to Python?

Explaining what range() does to elementary age children seems interesting.


For the first approximation, you can simply explain it as part of the for-statement syntax. When you get to lists and iterating over them, this simple approach breaks, but by then you can redefine it as a kind of list.

Once you have explained iterators - and I don't mean the nitty gritty of __iter__(), next() etc, but rather the high-level notion of a function that yields multiple values to the caller, the true meaning of range() is easily explained in those terms.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: