Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What was it like to learn Python? #2021

Closed
ErikSchierboom opened this issue Oct 3, 2019 · 8 comments
Closed

What was it like to learn Python? #2021

ErikSchierboom opened this issue Oct 3, 2019 · 8 comments
Assignees

Comments

@ErikSchierboom
Copy link
Member

We’ve recently started a project to find the best way to design our tracks, in order to optimize the learning experience of students.

As a first step, we’ll be examining the ways in which languages are unique and the ways in which they are similar. For this, we’d really like to use the knowledge of everyone involved in the Exercism community (students, mentors, maintainers) to answer the following questions:

  1. How was your experience learning Python? What was helpful while learning Python? What did you struggle with? How did you tackle problems?
  2. In what ways did Python differ from other languages you knew at the time? What was hard to learn? What did you have to unlearn? What syntax did you have to remap? What concepts carried over nicely?

Could you spare 5 minutes to help us by answering these questions? It would greatly help us improve the experience students have learning Python :)

Note: this issue is not meant as a discussion, just as a place for people to post their own, personal experiences.

Want to keep your thoughts private but still help? Feel free to email me at erik@exercism.io

Thank you!

@cmccandless cmccandless pinned this issue Oct 3, 2019
@cmccandless
Copy link
Contributor

How was your experience learning Python? What was helpful while learning Python? What did you struggle with? How did you tackle problems?

Initially, I did not like Python. I was coming from languages like Java, C#, and C++ where code structure was defined with braces and semicolons, and where strong typing kept you from making mistakes. What brought me back to Python was an interest in PC automation, and my searches for scripting various tasks kept bringing me to Python snippets and libraries that, written with care, were far easier to read than a lot of Java code I'd read (or written!).

In what ways did Python differ from other languages you knew at the time? What was hard to learn? What did you have to unlearn? What syntax did you have to remap? What concepts carried over nicely?

The biggest adjustment for me was duck-typing over strong-typing. As a beginner, I made a lot of mistakes passing in the wrong data type to various places. After some experience with it, I actually find it to be one of Python strengths, rather than a weakness. The flexibility of typing variables this way allows for some very elegant solutions.

@joaoluizn
Copy link
Contributor

First Part

How was your experience learning Python?

I was so positive when I started, wanted so much to learn Python for like a month, coming from Java which was my first lang, and by this, I had so much fun when every time I did something new, I was so impressed by how fast I could finish something that for me originally took eons using Java. I liked so much learning new Python libs from PyPi and trying to creat silly things. The indentation was fundamental to finally ident code correctly forever or even get worried about this for readability.

What was helpful while learning Python?

From an external perspective: other people that could help, community, python documentation, of course, good book references.
From a language perspective: The easy ways to debug my code and find it out where I was struggling, the iterative part of python that able us to debug printing, I keep using it even 3 years later.

What did you struggle with?

First of all, indentation problems from my environment(spaces vs tabs).
Had problems with objects value update, before learning shallow and deep copy and how exactly things were passed by in Python. And also some problems with numbers in Python 2.7.

How did you tackle problems?

Most of the time, printings and hand debugging, plus reading line by line verifying what was going on.

Second Part

In what ways did Python differ from other languages you knew at the time?

Python was way less verbose than Java of course (Yes!), but not that much strongly typed which wasn't exactly a problem. And absolutely fast to validate simple codes, things like IPython helped a lot

What was hard to learn?

Built-in structural objects, like tuple, dictionaries, set, list, not only knowing their existence but learn when to use each of them ideally. Also, the many ways to iterate.

What did you have to unlearn?

the semicolon by the end and most of the camel case notation.

What syntax did you have to remap?

I'm actually struggling to answer this question, can't remember exactly a thing. I'll say Switch Case!

What concepts carried over nicely?

Basics from imperative programming, conditionals, foreach, exceptions

That is all folks, glad this could help!

@yawpitch
Copy link
Contributor

yawpitch commented Oct 7, 2019

How was your experience learning Python?

Compared to a student today I'd say my experience was probably more difficult simply due to lack of quality resources... I started learning Python well before it was really popular or widespread, and most of the tooling available today (pip, virtualenv, pytest, etc) simply didn't exist. In some ways that kept the learning curve very focussed, as I wasn't dragged off on a lot of tangents, but it meant that you'd really sink or swim based on your ability to hack your way into using a terribly documented library via reverse engineering, duck typing, and gumption. I read a lot of the Python source code, since that was the only way to figure out what the hell was actually going on at times. Kids today have no idea how blessed they are to have the docs on python.org.

What was helpful while learning Python?

I found an excellent book called Learning Python that took a "from first principles" approach to introducing both the language and basic OOP programming in one foundational text. Many books followed, but that very curated, step-by-step introduction was invaluable.

What did you struggle with?

Once I got past the gaps in the documentation I didn't struggle with much at all, really ... the object model took a long time to really gel in my mind, but the overall design of Python is really very ergonomic compared to every other language I've encountered, and that made picking up the finer details more of an interesting challenge than a true struggle.

How did you tackle problems?

By opening up the REPL and using help and dir a lot. It's amazing how much easier things have gotten since StackOverflow came online, and it's even better since the Python source moved to Github.

In what ways did Python differ from other languages you knew at the time?

First, it was designed by a linguist instead of a sadist. Blocks are designated by their depth of indentation, which means you can follow the control flow by just running your finger down the text and occasionally moving it left and then right again ... there's no bloody braces everywhere, a heavenly lack of semicolons ... Python was designed, from the ground up, to favour being readable by humans over readable by machines. You don't need to think like a machine to read Python, though it doesn't hurt to be able to. The other languages I'd worked with were both statically typed and compiled, and so my first REPL was a revelation. Sure, I've realized since that dynamic typing can bite you in big systems, but I still have never seen another language that, used well, is anywhere near as naturally comprehensible as Python. Every language should have its version of the Zen of Python.

What was hard to learn?

The list comprehension was a new idea back then, and when it first dropped it seemed awkward and unnecessary, given that a slightly longer explicit for loop was so much more obvious .... back then though there was no significant performance benefit and there weren't yet set and dict comprehensions. They've since become the normal idiom, but at the time they weren't presented well because only the proponents really got their benefit early on. Also Unicode in Python 2 was just plain wrong ... that is so much simpler now.

What did you have to unlearn?

Nothing, really. It took a while to get used to not declaring types on everything ... also being afraid of crashing. Python's error messages and exceptions, once you get used to them, are incredibly good at pointing you to precisely where the problem is ... it's amazing how you can reverse engineer something just by crashing it enough times by passing in something you progressively duck-type more methods on.

What syntax did you have to remap?

Sigh ... the one thing TCL got right was the ternary if ... Python's ternary if sucks. I found it really frustrating to use a multi-line conditional to do something I used to be able to accomplish so easily in an exception.

What concepts carried over nicely?

I wouldn't precisely say that concepts "carried over" ... almost every concept I'd encounter in another language got simpler when I found its analog in Python. Things I'd struggled with before just got simpler ... I wish I'd learned them in Python first, just to see that they can be stated in a way that's ergonomic to humans.

@ibraheemybg
Copy link

Uhm to start with,am still a student and am currently learning python. I enjoy the language alot but i think i just know what is being thought in class. Ill really like to be a professional in python and be able to do substantial tasks using the language. Your help is needed please

@mbbroberg
Copy link

How was your experience learning Python?

I'm still on the road toward feeling confident in Python for daily use. Before hopping into Exercism, I used Codecademy. I cruised through their tutorials which gave me a gentle baseline. While it was a lot easier than figuring out how to configure Python locally, it didn't motivate me to take that leap into local development and my skills went stale. I more recently joined Opensource.com and started to invest in learning Python again as a way to connect with readers. I found a friend and mentor through the site, and he motivates me to share what I learn from him (like how to properly configure Python 3 as default on a Mac). Since then, I knew I wanted to get down to something more practical, and using Exercism has been a slightly more difficult but much more satisfying way to feel confident as a Python developer.

What was helpful while learning Python?

  • Writing articles while I learn ensures I "get it"
  • Mentorship has been essential to me–especially the mentors right on Exercism
  • Using a mobile app that gives me quiz-like reminders of Python syntax is a really helpful way to reinforce my learning

What did you struggle with? How did you tackle problems?

  • Structuring a project worth investing the time to build. I love playing around with tutorials, but I know from experience that I need to leap out of them eventually and build something. That honestly gives me pause.
    • I've been reading more Product Management focused articles and books on the side, and it's helping me think through user experience in a way that would make sense to more than just me. I also keep a notebook of daily frustrations, and I've been reiterating on how I might solve them with code. I finally landed on a workflow that is simple enough and complex enough to warrant building a Python utility to solve it and I'm excited to do so.
  • The pressure of being "Pythonic" or following the Zen of Python. It sets a bar that feels unrealistic at times, especially since Python allows for syntax that doesn't agree with either norm.
    • I find having mentors available gets me over the nerves. That's been huge in Exercism, and finding friends outside of the site to review my project ideas is the next step. I have the relationships, but I still haven't asked just yet.

In what ways did Python differ from other languages you knew at the time?

I don't code regularly enough to think of myself as knowing other languages. I've used Ruby and Go more than others, and written some Ruby with a GSD mentality to it pretty effectively. Given that context:

What was hard to learn?

Setting up my local environment. I don't know if I got lucky with Ruby or what, but it was stupidly easy to go from install to development. Python is so mucky with virtual environments, v2.x vs 3.x, and too many package managers to choose from. I ended up with conda/venv/pyenv/virtualenv/Docker images and Jupyter notebooks floating around without a clue what was installed where.

Go pretty famously has some learning curve around $GOPATH, but Python takes the cake for confusion in my experience.

What did you have to unlearn? What syntax did you have to remap?

From Ruby: chaining all the methods. I love how fluidly I could write methods, and that everything seemed to be a method call on an object. With Python, there are a number of built-in keywords like max() instead of x.max() and sorted() instead of using x.sort(). It's odd to me that there are better built-in keywords than built-in methods for objects. And more minorly, I constantly forget to use brackets in a print statement after writing puts x for a while.

From Go: I still don't get the rules on multivariable interaction with a function call. I just learned about dictionaries with a for k, v in dict syntax, but I miss the x, err := func(z) (but not the if err syntax). I'm trying to lean more on raise exception cases.

What concepts carried over nicely?

The fundamentals are the same across the board.

--

Thanks for all the hard work @ErikSchierboom and team. I hope this helps!

@NobbZ
Copy link
Member

NobbZ commented Nov 1, 2019

How was your experience learning Python? What was helpful while learning Python? What did you struggle with? How did you tackle problems?

I really did not enjoy learning python. I got used and accustomed to functional programming in the time before learning python.

I was struggling quite often with the fact that most data was manipulated inplace by method calls.

But as I did go at the same time, I was able to selectively adjust my mind for accepting mutability within a couple of days.

When I had any further problems beyond that, I either did some web search and usually got something usable on the first page of the results or I asked a coworker, who introduced all of us to python, as he did his thesis project in python and we built a product upon it afterwards.

In what ways did Python differ from other languages you knew at the time? What was hard to learn? What did you have to unlearn? What syntax did you have to remap? What concepts carried over nicely?

Mainy it differed in the mutability aspect from the languages I actively used that time.

Also I'm constantly struggling (still today) with the layout based forming of blocks. Especially the fact that I have to break most constructs on many lines, while not beeing allowed to have a multiline lambda is confusing to me and feels inconsistent.

Also as with go, I often get trapped by a far to small stack and the lack of tail call optimisation.

@stale stale bot added the abandoned label Nov 22, 2019
@stale stale bot removed the abandoned label Nov 23, 2019
@exercism exercism deleted a comment from stale bot Nov 23, 2019
@kanishksh4rma
Copy link

I didn't found it interesting at first, but then, as I started learning more and more it became more & more fun & joyful.

I highly recommend you to learn Python if you haven't yet !!!

By the way, shifting from C++ to Python was a bit difficult due to habit to end very sentence with semi-colon & non-indentation. Also, the in-built functions are very helpful but hard to memorize them all. Even, without any external library.

At the end, I just want to say - Thank God !! I learned python!! It helped me a lot in building machine learning and automation projects.

Good Luck for everyone

@github-actions
Copy link
Contributor

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@iHiD iHiD closed this as completed Feb 19, 2021
@BethanyG BethanyG unpinned this issue Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants