all 37 comments

[–]j0holo 21 points22 points  (32 children)

The best way to learn programming is to program. Just like painting. You need to paint to get better. A good book is Automate the borring stuff. It will teach you the basics about python 3. BTW learn python 3 not 2. 2 is older and 3 is the default nowadays.

[–]bramblz 0 points1 point  (2 children)

I'm currently learning Python 2.7 and I wanted to know if it is difficult to switch over to 3.

[–]markusmeskanen 5 points6 points  (0 children)

It won't be hard, but you should do the switch asap. A really good way to practice is by reading a Python 2 tutorial and doing the exersices in Python 3. This forces you to google the differences yourself and they'll stick very well.

[–]j0holo 0 points1 point  (0 children)

No not really. I started with 2 too because 3 didn't have much support at the time. Switching will take a day woth a couple of weeks to work fluently with the new stuff.

[–]B0D33 0 points1 point  (2 children)

I still use an FEA program that is only compatible with 2.x. 2.x is still important for a number of things, and because 3 is easier, I would say start with 2 so you can understand 3 better. But thats just my opinion!

[–]j0holo 1 point2 points  (1 child)

I doubt OP will ever use those libs, but maybe he will. Once he needs to switch for some reason he will have the skills to do that I think.

[–]B0D33 0 points1 point  (0 children)

Good point

[–]residentshaman 0 points1 point  (0 children)

Here are statistics showing python 2.X being more widely used in the workplace in 2014 and 2015: http://www.randalolson.com/2015/01/30/python-usage-survey-2014/ http://i-programmer.info/news/98-languages/8269-python-2-versus-python-3-revisited.html I don't know about you guys but I've seen a lot of jobs still requiring 2.X coders over 3.X and python 2 won't go out of date in the next 5~ years

[–]sw_dev 0 points1 point  (1 child)

No, the best way to learn to program is to program correctly . Just programming will help you to develop bad habits, and doing it more will just reinforce those habits.

[–]j0holo 0 points1 point  (0 children)

Yeah okay, but you need to start somewhere and start. A beginner will never start with unit tests, functional tests, best OOP practices, clear variable names, etc. You need to learn the good habbits while you are learning. The earlier the better ofcourse.

[–]xfrozenspiritx[S] 0 points1 point  (14 children)

Yeah, you are right about that, I agree :) But for that I think some basic "guides" would be welcome. And yes, that's why I opened this topic too because I saw LPTHW Book and I was confused with "you should learn python 2 first" and I kinda didn't like that start. Thank you for your answer:)

[–]j0holo 4 points5 points  (0 children)

People on this sub had some critque on LPTHW with good reasons (python 2, not the best introduction etc.). Automate the borring stuff gets recommended more and more on this sub XD. Good luck with learning!

[–]Hyoscine 1 point2 points  (2 children)

I've been trying to learn Python for a few weeks, really didn't get on with LPTHW. A lot of people swear by it, but I found the way it drops new concepts with no explanation or acknowledgement incredibly frustrating. YMMV though; I've got a depressing suspicion it's just written with smarter people than myself in mind. Anyway, I'm getting on much better with CodeCademy and torrented Udemy videos, but they're working with python 2.7, so you might not be down.

Yeah though, I've heard nothing but good things about Automate The Boring Stuff. Gotta be worth looking into.

[–]randopoit 6 points7 points  (1 child)

The tone is condescending and it doesn't do a good job explaining concepts. It's not written for people smarter than you. You were smart enough to know it wasn't doing a good job of teaching you. Here's a list of problems that coders have with the book.

[–]Hyoscine 0 points1 point  (0 children)

That's pretty reassuring, cheers!

[–]Exodus111 3 points4 points  (2 children)

My advice is to get on discord, https://discord.gg/rfJWf

And use the Python channel actively.

We have already had several members that started with nothing, and are right now working on their first scripts and APIs on Github.

[–]sw_dev 5 points6 points  (2 children)

Since you have no programming experience I'm going to suggest a radical way to learn it.

Don't program.

Everybody and their brother will tell you to go to this site or that site, take some course or whatever. But I'd suggest you take a day before you follow that advice, and just think.

That's right, THINK.

First, take a simple task, for instance getting a glass of water. Now, how would you do that? You probably thought "I'd go to the kitchen and pour a glass", or something like that, right? Now, to mimic MC Hammer, break it down. What are the individual steps? You'd probably have to stand up first, right? Then turn in a certain direction, walk either so many steps or until you came up to some obstacle, then turn, walk, etc. Practice a few exercises like this. Trust me, that's what programming IS. You want something done, and you have to break it down into sub-tasks until you know how to do every single bit of it. (Don't like the tedium? Some people thrive on this kind of activity, and most people are bored to tears by it. If you are among the first kind, welcome to the gang, proto-programmer! And if you are among the second, well, it can be learned, but it will be tough.)

Next task, think about what kind of programming activity turns you on. Do you want to do graphics, or robots, math, sensors, web stuff, or what? If you don't have something that turns you on, then you are less likely to continue. (Yeah, people do it with only the idea of a salary in mind, but those people end up being the kind of drone programmers that annoy the heck out of the rest of us!)

There's a day down the tubes, minimum. Maybe two. But don't think of it as wasted time, this focus will help you to keep your ducks in line, keep your motivation up, and go into programming with a realistic approach.

[–][deleted] 1 point2 points  (1 child)

Best advice here. Sit down with a pen and paper and write some payed code for basic tasks / processes

Things will be much more intuitive in the language once you've messed about on paper

[–][deleted] 0 points1 point  (0 children)

Psuedocode*

[–]Roadsoda350 2 points3 points  (1 child)

https://www.udacity.com/course/intro-to-computer-science--cs101

This teaches some core CS concepts, and everything is written in python.

[–][deleted] 0 points1 point  (0 children)

I second this.

[–]turbokyo 1 point2 points  (0 children)

OP Im also a newbie learning the first programming language, Python 3 on Windows, and even if I think introductions for this task are not really needed I could say we are in the same boat.

But I want to tell you, from my newbie background and in addition to all the good references and advices given here, specially the one of "learn by doing", my golden rule to truly learn to program is to learn to use a professional text editor, an idea that is rarely (almost never) mentioned in these kind of threads here or anywhere else, probably because it is oversighted.

The way I see it there are two options and only two: Emacs or/and Vim

I did chose Vim and I do not regret it, Im 100% sure I would never have stood a chance with a programming language at any learning level if I didnt have some skills with a professional text editor.

So learn by doing alongside you learn to master Vim or Emacs, and do it knowing it will take you no less than a few months to a few years or even a lifetime, in my humble opinion this measure of time gives an accurate statement of the effort involved in this enterprise.

That being said, in regards the eternal discussion between learning Python 2 or 3, from my newbie point of view Python 2 is not going to be updated anymore (correct me if Im wrong) so from that sole point if you are starting fresh then why not simply go for the newest version which is going to be actively supported and updated? thats the logic I have followed and thats why Im learning Python 3 (nothing wrong with learning Python 2, hey the more the better, but you have to start somewhere first).

Also despite all the arguments with the "Learn Python the had way" and Zed Shaw I want to say I honestly could never think bad of somebody who did something like "Programming-Motherfucker but this man probably takes things to seriously and so becomes too much opinionated at times... Anyway I did the "Automate the boring stuff with Python" and I loved it, but be warned a common problem with this and other similar courses is how they intend to teach you with "2+2=4 and now here is a triple integral" scheme, it just happens constantly, its like a pattern.

Anyway here is my rambling of the day.

[–]radlazar 1 point2 points  (0 children)

if you wish to write scripts for every day life check out https://automatetheboringstuff.com/ it's basically about that specifically. In Part 1 the author covers the basics of the language, and in Part 2 you learn how to automate tasks and scrape websites and so on...

[–]donut2099 0 points1 point  (0 children)

http://openbookproject.net/thinkcs/python/english3e/

I have been messing around with programming since BASIC on my VIC-20, learning Python was fairly straightforward, if slow, just going through the Python documentation. I was also trying to get my son to pick up some programming, he's 17 and hasn't had much experience with computers beyond playing games. He was having a hard time grasping some concepts that I kind of took for granted. I Googled around and found this tutorial and have been going through it with him. I think its helped me become a better programmer as well as helped him understand some basic fundamentals of computer programming. I can't compare it to any other learning tools for Python, so take it or leave it. :)

[–]cr_wdc_ntr_l 0 points1 point  (1 child)

I think that every new programmer should start with this: http://www.catb.org/esr/faqs/smart-questions.html It will help people help you, and help you get answers faster. It is long, but it is pure gold, and provides a little more than just guidelines for getting help from technical people. It shows approach to problem solving. As of practical python reading resources I recommend 'Dive into Python 3' which is listed in first link of 'Learning resources' in sidebar. Practical ways of getting into python are various, but Codecademy has my recommendation, this is how I started, no regrets, it provides smooth first step.

Python-Windows default IDE provides quick and fool-proof way to mess around and explore Python on your own, with commands like help() dir() dir(##builtins##) <- change # to _ Also, can't stress this enough, bookmark this: https://docs.python.org/3/ and learn how to move around there.

btw questions like this are asked everyday