Open utterances-bot opened 3 years ago
I understand the exercises (mostly after reading the solution), but it is so much. How do you learn these codes... is there a coding dictionary?
@yvanmil that is a good question, I think the best way to learn is to combine several things: (Today is a good way to start how to learn to code)
You need to have a good motivation, focus and take it step by step as a ladder, avoid going fast, instead learn as much as possible on each step.
It can be similar to learning how to draw, or play an instrument, its kind of a craft.
@yvanmil you are learning it right now! :) A great resource for Python tutorials is https://realpython.com/, and if you like this hands-on style of practicing working with code, I really liked Codeacademy's model. These two resources together with a lot of real-life applications were my path to learning and improving which of course is always in process. :)
Lastly, some people have made "cheat sheets" for Python that can help when you need to remember specific commands over and over again: https://www.pythoncheatsheet.org/
@yvanmil Programming might seem complex at the beginning, and there's no programmer who will ever know everything about a programming language (specially because, programming languages also change). There's not a codding dictionary, but official documentation. Don't get discourage, when in doubt, consult the documentation and look for examples on the web.
Thank you for the motivation..... -- Yvonne van Mil research and mapping
web: www.yvonnevanmil.com I mail: @.*** I phone: +31 (0)64 139 9049 I LinkedIn: https://www.linkedin.com/in/yvonnevanmil/
Op ma 15 mrt. 2021 om 16:18 schreef Manuel Garcia @.***
:
@yvanmil https://github.com/yvanmil Programming might seem complex at the beginning, and there's no programmer who will ever know everything about a programming language (specially because, programming languages also change). There's not a codding dictionary, but official documentation https://docs.python.org/3/. Don't get discourage, when in doubt, consult the documentation and look for examples on the web.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/the-magnificents/04-02-2021-Carpentry-for-HGIS/issues/56#issuecomment-799503637, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR4XBS2UYCHMQIHOB5WQPHDTDYQOBANCNFSM4ZGXUHMQ .
Done. Interesting to see the difference between Program A and Program B in the last exercise. When would be the behaviour shown in Program A desired? Or is this to show that making a copy before changing a variable should be done as in Program B?
The slicing with double colons is a bit of a mystery to me, especially the difference between the two examples, which seem to do something totally different. The rest I found more understandable. Maybe I have to get used to the PY syntax some more.
In the case of the last one (as well as in the previous), the main difference is that "A" points to an existing object "old", while "B" creates a new object from an existing one. "B" creates a new spot in memory for this particular assignment, while the other just references to that existing variable. This is why in A programs both results are the same.
I if you want to compare old and new, value then you should keep both values before doing the comparison, hence B is more suitable in this sense.
Lists and indexing — Python essentials for GIS learners
https://the-magnificents.github.io/04-02-2021-Carpentry-for-HGIS/01_Day_1_Unix_Shell/excercises/B6_Exercise_Lists.html