Re:Think Python 2e
by theblazehen on Wednesday April 05, 2023 @01:04PM
(#35457236)
I've found https://learnxinyminutes.com/ to be a decent quick-start guide to many languages, where it assumes you already know the essential principles
Re:Think Python 2e
by NikolaNovak on Wednesday April 05, 2023 @03:29PM
(#35459244)
Oh, that's a good find, thanks! And, exhaustive (across languages)!
I think that’s a problem for most languages with the possible exception of C++. Almost every book and tutorial just assumes that they’re teaching you your very first programming language.
Except for the vast number of books/tutorials of the type "X for Y programmers" with Y often being C. (Or Java or Python or C++.) And X being pretty much anything under the sun.
This is what ChatGPT is made for. I also like to learn concepts by analogy with concepts I already know. Before, you had to search for books and posts made explicitly with this in mind. "Javascript for Python Developers" or the like. Now you can explicitly ask GPT to formulate explanations with your specific context in mind. Game changer.
And made, even, to help me write out a series of tutorials on ChinesePython[0], a topic which intrigued me for years but I always found daunting to learn (along with learning Chinese), what with the lack of materials that used English, so I made this for people completely new to Chinese.
0: https://chinesememe.substack.com/i/103754530/chinesepython
I'm very skeptical of this use case. It's great if it gives you correct information but I often find it ranging from slightly wrong to completely off base.
It sure does, but nevertheless: if you already understand the fundamentals of programming, I'd say this is a fine thing to do with GPT.
Re:Think Python 2e
by __MatrixMan__ on Wednesday April 05, 2023 @03:42PM
(#35459395)
But has it ever been harmfully wrong? Like, you run the code and it does the wrong thing, so you work on it until it's right and maybe learn something unexpected along the way, right?
I think it's reasonably analogous to how learning worked without an AI buddy, but it's faster because unlike using search engines for help, you don't have to navigate a space that's weaponized against your attention to find the next useful bit.
Re:Think Python 2e
by NikolaNovak on Wednesday April 05, 2023 @03:26PM
(#35459193)
That's funny, I'm actually starting to lean that way as well! It can go at the speed or in the direction I choose to. The power is blinding! :-)
A variable in Python is quite a different beast from a variable in C though.
Re:Think Python 2e
by NikolaNovak on Wednesday April 05, 2023 @03:28PM
(#35459224)
Agreed; so the 20 books that start with "A variable is like an imaginary box you can put stuff into!", and then lingers on the concept with 4 pages of illustrations and analogies from your childhood, is not useful to me; whereas a book that tells me quickly about global and local scopes in Python, whether it passes variables by values or references, if variables are pointers or not, etc; would be lovely :)
In C, a variable has traditionally been a box (memory location) that you put things into. Possibly a box that can only contain pointers to other boxes. That mental model breaks down slightly with references that modern C++ prefers, but still is useful.
In python a variable is just a name. Assigments change what object this name references. But nobody is ever going to change which object this name references, unless you do it yourself. They can mutate the object, but not the name, if that makes sense.
Re:Think Python 2e
by jjtheblunt on Wednesday April 05, 2023 @01:12PM
(#35457347)
https://docs.python.org
is perfect for your situation. Very organized and very quick to look up syntax by idea.
Official manuals are usually enough for that.
Python's official reference might be more appropriate for this. But sometimes, even if things seem similar (e.g. both languages have variables), the semantics might be different. C/C++ has passing by value or by reference. Python and Java has neither, you can mutate the object, but you cannot reassign it (so you can't change the value of an int, but you can change some field of an object.
How about a "learn Python if you got your comsci degree with C 20 years ago but are now in hands off management role" though? :-) I don't need to learn what a variable is for 20th time, but can't jump into "advanced Python" books either, so I've found myself stuck a bit between two extremes.