Learning Python

Everything else!

Moderators: Bakhtosh, EvilHomer3k

Post Reply
User avatar
Formix
Posts: 639
Joined: Wed Jun 29, 2005 6:48 am

Learning Python

Post by Formix »

I'm hoping for some hivemind help. My 10 year old son (and maybe me too, a bit) is looking to learn some python this summer. Any suggestions for IDEs and editors? I'm the tinyist bit familiar with Netbeans, and Komodo looks good, but I'm open to real-world usage suggestions. Thank you!
User avatar
RunningMn9
Posts: 24466
Joined: Tue Oct 12, 2004 11:55 pm
Location: The Sword Coast
Contact:

Re: Learning Python

Post by RunningMn9 »

At this stage, I don't know how important the IDE/editor selection is. Generally, whatever material you are using to learn the language will probably offer a suggestion on the toolset they recommend, and it's easier to stick with that. My initial reaction was that I'm sure that Eclipse could be useful, and that can also be used for tons of other languages, so a familiar environment might made that easy to move around and grow a bit.

For my money (well for the US government's money), there is no better IDE than Visual Studio, but that might be overkill here. I spend my days in some combination of Android Studio, Eclipse and Visual Studio, and while I'm used to all three, there is no real comparison. For Python, I assume the option you'd entertain is Visual Studio Code, which is allegedly an extremely lightweight environment, but still pretty well-featured. And of course it's free (as it the VS 2017 Community Edition, which gets you access to lots of languages, including Python).

But in the end, I would repeat that at this stage, which IDE you choose probably isn't that critical.
And in banks across the world
Christians, Moslems, Hindus, Jews
And every other race, creed, colour, tint or hue
Get down on their knees and pray
The raccoon and the groundhog neatly
Make up bags of change
But the monkey in the corner
Well he's slowly drifting out of range
User avatar
Isgrimnur
Posts: 82287
Joined: Sun Oct 15, 2006 12:29 am
Location: Chookity pok
Contact:

Re: Learning Python

Post by Isgrimnur »

Notepad. :twisted:
It's almost as if people are the problem.
User avatar
RunningMn9
Posts: 24466
Joined: Tue Oct 12, 2004 11:55 pm
Location: The Sword Coast
Contact:

Re: Learning Python

Post by RunningMn9 »

Isgrimnur wrote: Tue Jun 19, 2018 9:23 am Notepad. :twisted:
I would have suggested that, but it seemed unnecessarily cruel given the existence of Notepad++ which will at least give you syntax highlighting for Python.

If I was advising my son, I'd advise Eclipse because he knows that from his basic understanding of Java.
And in banks across the world
Christians, Moslems, Hindus, Jews
And every other race, creed, colour, tint or hue
Get down on their knees and pray
The raccoon and the groundhog neatly
Make up bags of change
But the monkey in the corner
Well he's slowly drifting out of range
User avatar
noxiousdog
Posts: 24627
Joined: Tue Oct 12, 2004 11:27 pm
Contact:

Re: Learning Python

Post by noxiousdog »

Have you seen Code Academy?

Also, I think we have been using PyCharm for easy stuff around the office.
Black Lives Matter

"To wield Grond, the mighty hammer of the Federal Government, is to be intoxicated with power beyond what you and I can reckon (though I figure we can ball park it pretty good with computers and maths). Need to tunnel through a mountain? Grond. Kill a mighty ogre? Grond. Hangnail? Grond. Spider? Grond (actually, that's a legit use, moreso than the rest)." - Peacedog
User avatar
hitbyambulance
Posts: 10261
Joined: Wed Oct 13, 2004 3:51 am
Location: Map Ref 47.6°N 122.35°W
Contact:

Re: Learning Python

Post by hitbyambulance »

self-taught here - i would strongly recommend against using an IDE. the purpose is to learn the language and not let your editor make tons of autofill suggestions. Notepad++ with Python syntax highlighting is great.

also if you don't feel like doing the official python tutorials, Zed Shaw's "Learn Python the Hard Way" series is excellent. https://learnpythonthehardway.org/

this is also good, since there're online interactive shells to run the code:
https://www.learnpython.org/
User avatar
RunningMn9
Posts: 24466
Joined: Tue Oct 12, 2004 11:55 pm
Location: The Sword Coast
Contact:

Re: Learning Python

Post by RunningMn9 »

hitbyambulance wrote: Tue Jun 19, 2018 1:10 pmi would strongly recommend against using an IDE.
This is advice worth considering, although I don't know whether or not I agree with it yet. I was self-taught, but during a time when IDE's didn't exist yet. So I didn't have a choice. If I had the choice, I don't know if that's the choice I would make.

The primary reason is that when I am learning a language, I want to learn the language, not spend my time dealing with command line tools. It's an interesting thought though, as I could be completely wrong since it was so long ago that I actually had to teach myself to program (back in the days of typing lines of BASIC code into my Commodore 64 in the early-to-mid-80s. QuickBasic was the first actual editor that I used, and it was life changing at the time.

When I learned Pascal in high school, or C/C++/Fortran in college, having to use command-line tools made me angry. I learned Java on the job, and that was after we already had a tool chain established (Android Studio). I started playing with Eclipse when I was doing some straight Java code on Windows to better understand the kinds of questions my son had in school. I'm not a huge fan of Eclipse, but I do all my personal Java stuff in it and it works pretty well.

It's been so long since I did anything with Python that I really don't know what the best answer is for a beginner. So just trying to be a little more generic with the language, and then offering my advice on that.
And in banks across the world
Christians, Moslems, Hindus, Jews
And every other race, creed, colour, tint or hue
Get down on their knees and pray
The raccoon and the groundhog neatly
Make up bags of change
But the monkey in the corner
Well he's slowly drifting out of range
User avatar
coopasonic
Posts: 20992
Joined: Fri Mar 04, 2005 11:43 pm
Location: Dallas-ish

Re: Learning Python

Post by coopasonic »

I learned Java a few years ago on the job augmented by a community college class to cover the basic stuff that on the job really wasn't going to cover. The instructor made us start with notepad++/Ultraedit up through the first few exercises just so we could get a better understanding of what the IDE would be doing for us. I think that approach makes sense. Understand how it works with some hands on, then let IntelliJ do it all for you. Same reason you don't just start with Spring Boot (no, seriously, start with Spring Boot).
-Coop
Black Lives Matter
User avatar
GreenGoo
Posts: 42336
Joined: Thu Oct 14, 2004 10:46 pm
Location: Ottawa, ON

Re: Learning Python

Post by GreenGoo »

Eclipse or ultraedit were my tools of choice when I did that sort of thing.

It really depends on whether he's a coder learning a new language or just a dude learning to code. The needs are different.
malchior
Posts: 24795
Joined: Wed Oct 13, 2004 12:58 pm

Re: Learning Python

Post by malchior »

Spyder but it has a data science / machine learning spin to it if that influences any.
Jeff V
Posts: 36420
Joined: Fri Oct 15, 2004 7:17 pm
Location: Nowhere you want to be.

Re: Learning Python

Post by Jeff V »

It is a late parrot.
Black Lives Matter
User avatar
Victoria Raverna
Posts: 5113
Joined: Fri Oct 15, 2004 2:23 am
Location: Jakarta

Re: Learning Python

Post by Victoria Raverna »

IDE is not that important. Most of the time, I now do my coding (only scripts for the last ten years or so) using vi as the editor.

Maybe more important is a project. Decide on what application or tool that you want to try to code with python then just try to do it.
User avatar
Anonymous Bosch
Posts: 10514
Joined: Thu Oct 14, 2004 6:09 pm
Location: Northern California [originally from the UK]

Re: Learning Python

Post by Anonymous Bosch »

'd definitely go with Notepad++.

BTW, Al Sweigart's Invent with Python series of books (which are available completely free of charge to read online) provide a highly kid-friendly and enjoyable introduction to Python programming that's ideal for children:
Encrypt Messages and Hack Ciphers

Image

Cracking Codes with Python teaches complete beginners how to program in the Python programming language. The book features the source code to several ciphers and hacking programs for these ciphers. The programs include the Caesar cipher, transposition cipher, simple substitution cipher, multiplicative & affine ciphers, Vigenere cipher, and hacking programs for each of these ciphers. The final chapters cover the modern RSA cipher and public key cryptography.

Cracking Codes with Python is the new edition of Hacking Secret Ciphers with Python.

Read Online for Free

Create Computer Games

Image

Invent Your Own Computer Games with Python teaches you how to program in the Python language. Each chapter gives you the complete source code for a new game, and then teaches the programming concepts from the examples. Games include Guess the Number, Hangman, Tic Tac Toe, and Reversi. This book also has an introduction to making games with 2D graphics using the Pygame framework.

Read Online for Free

Make Games with Graphics

Image

Making Games with Python & Pygame covers the Pygame library with the source code for 11 games. Making Games was written as a sequel for the same age range as Invent with Python. Once you have an understanding of the basics of Python programming, you can now expand your abilities using the Pygame library to make games with graphics, animation, and sound.

The book features the source code to 11 games. The games are clones of classics such as Nibbles, Tetris, Simon, Bejeweled, Othello, Connect Four, Flood It, and others.

Read Online for Free
"There is only one basic human right, the right to do as you damn well please. And with it comes the only basic human duty, the duty to take the consequences." — P. J. O'Rourke
User avatar
Ænima
Posts: 788
Joined: Wed Oct 13, 2004 1:48 pm
Location: New Plymouth, New Zealand

Re: Learning Python

Post by Ænima »

I've done a fair amount of python coding and used plenty of IDEs over the years. The question of whether or not to use one, and how much it matters is more a question of what you want to accomplish. If you want to learn to be a well rounded software engineer, then starting with command line tools and a simple editor would probably be worth your while. However, this kind of thing can really be a turn off if you are just getting your feet wet. If you just want to play with some code without having to worry about what is going on behind the scenes, a good IDE will make your life a heck of a lot easier.

PyCharm is the best of the best, IMO when it comes to Python. Bonus, it's free for the community. Jetbrains does great work, and if you later move on to other languages, they have other IDEs that have familiar interfaces for a bunch of them. Visual Studio Code is a nice lighter weight editor, but it's a little less plug and play because you need to decide what plugins you want to make it behave as desired. I'd stay away from Eclipse and vi. They both can be effective, but Eclipse is bulky and awkward, and just learning how to use vi is a task in and of itself.

I like Python the Hard Way, personally, but I'd say take a look at the first few chapters of each of the free books listed above and figure out which you find the most interesting. That's the most important thing when it comes to learning this kind of stuff.

Good luck!
User avatar
Formix
Posts: 639
Joined: Wed Jun 29, 2005 6:48 am

Re: Learning Python

Post by Formix »

It shouldn't really surprise me, but you guys have given me a lot of great info, and some thinking to do. I hadn't even considered Notepad, despite knowing somewhere in a disused portion of my brain that it would also work. Thanks!
User avatar
GreenGoo
Posts: 42336
Joined: Thu Oct 14, 2004 10:46 pm
Location: Ottawa, ON

Re: Learning Python

Post by GreenGoo »

Yeah, but that's like asking for advice in writing a novel, and someone saying that a quill and ink have traditionally done that job. While it's true that notepad would work, why make things harder than they have to be?
User avatar
RunningMn9
Posts: 24466
Joined: Tue Oct 12, 2004 11:55 pm
Location: The Sword Coast
Contact:

Re: Learning Python

Post by RunningMn9 »

Formix wrote: Wed Jun 20, 2018 5:54 amIt shouldn't really surprise me, but you guys have given me a lot of great info, and some thinking to do. I hadn't even considered Notepad, despite knowing somewhere in a disused portion of my brain that it would also work. Thanks!
A text editor like vi / Notepad / Notepad++ will work. But as noted earlier, it may not be the best choice. While I agree that for non-complex work, it is probably sufficient, there's a part of me that is vaguely annoyed at the suggestion that you should make learning something harder. IDEs add value. Lots of it in most cases. Will using a modern IDE with auto-completion make it less likely that you will memorize certain things? Probably. But at the same time, there's no longer much value in memorizing things.

Most programmers that I know firmly believe that they are doing things the one, right way to do things. I still haven't met one that is correct in that belief (me included). If you find editing Python code in Notepad++ (please don't use Notepad when Notepad++ is freely available and at least gives you syntax highlighting) and then going to the command-line tools to build an enjoyable task, then by all means, take that path.

If you want to reduce the barrier to entry (probably an important consideration with a 10 yr old), then I would ignore my other advice and listen to Ænima.

This conversation reminds me of a dispute I had a couple of weeks ago at work, when one of my co-workers was horrified that I was building a UI with an editor, rather than lovingly hand-crafting it programatically. I was actually speechless. But then I remember that being nearly 15 years older than this guy, I was a professional programmer back when I was forced to have to create Windows dialogs in Notepad via resource scripts. Never. Again.

You've got a lot of options here. Whatever gets your son (and/or you) learning and engaged is the way to go, and that depends on you guys. As soon as you get to *any* level of complexity though, the IDE will become your best friend.
And in banks across the world
Christians, Moslems, Hindus, Jews
And every other race, creed, colour, tint or hue
Get down on their knees and pray
The raccoon and the groundhog neatly
Make up bags of change
But the monkey in the corner
Well he's slowly drifting out of range
User avatar
RunningMn9
Posts: 24466
Joined: Tue Oct 12, 2004 11:55 pm
Location: The Sword Coast
Contact:

Re: Learning Python

Post by RunningMn9 »

I should point out that I'm not suggesting that going the harder route is not a viable path, or that it has no merit. I just think that considering we are primarily talking about a 10 year old, you should be aware of the options and how they can impact initial difficulty. That's all. I don't think that any advice here is wrong, just that it should all be considered in context. At 10 years old, are you trying to make a professional programmer? Or spark an interest in programming?
And in banks across the world
Christians, Moslems, Hindus, Jews
And every other race, creed, colour, tint or hue
Get down on their knees and pray
The raccoon and the groundhog neatly
Make up bags of change
But the monkey in the corner
Well he's slowly drifting out of range
User avatar
raydude
Posts: 3894
Joined: Mon Oct 18, 2004 9:22 am

Re: Learning Python

Post by raydude »

My first exposure to programming was to Fortran, perl, and pascal. Then I eventually learned Java. These were languages where the line statement had a terminator and you could group lines together using brackets.

Going to Python and trying to learn and program it via a text editor was incredibly painful because Python does away with line terminators and uses "spacing" to determine how lines are grouped. It was worse because I have my own internal system of using tabs and spaces, and in Python a "tab" is different from a "space" when it comes to determining grouping.

When I started using Pycharm and it automatically indented lines when it spotted the beginning of a "for" loop or a function definition I was genuinely relieved. For that reason alone I would recommend using an IDE over a simple text editor.
User avatar
Isgrimnur
Posts: 82287
Joined: Sun Oct 15, 2006 12:29 am
Location: Chookity pok
Contact:

Re: Learning Python

Post by Isgrimnur »

Quick results. There's a reason for the Hello, World program (even though I hate it). Being able to see immediate results and then progress on a reasonable learning/feedback scale is critical, and I would imagine especially at that age.
It's almost as if people are the problem.
User avatar
Kasey Chang
Posts: 20751
Joined: Sat Oct 30, 2004 4:20 pm
Location: San Francisco, CA
Contact:

Re: Learning Python

Post by Kasey Chang »

I taught myself just enough Python to scrape a website for a SINGLE field so I can get a notification of my EZ-Pass/Fastrak balance every day.
My game FAQs | Playing: She Will Punish Them, Sunrider: Mask of Arcadius, The Outer Worlds
User avatar
Formix
Posts: 639
Joined: Wed Jun 29, 2005 6:48 am

Re: Learning Python

Post by Formix »

This thread really delivers! Thanks fellas for the input, I appreciate it. Given that I am trying to spark an enjoyment of coding, I think an IDE may be the best bet. Now, does anyone have an opinion about curved vs. straight swords?
Post Reply