• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Learning Python

Mr. Pedantic

[H]ard|Gawd
Joined
Sep 19, 2009
Messages
1,707
I'm trying to learn Python as my first language, but the problem is the various guides I've seen only explain the syntax - after reading several pages I still don't have any idea what the point is of doing math in Python instead of just using a calculator, or a program with a practical purpose that requires finding the length of a string. I mean, they're cool functions, but what's the point of it? So I guess what I'm looking for is a tutorial or guide shows you how to make a few 'proper' programs and explains the syntax as it comes up.
 
If "the point" isn't self-evident, why are you trying to learn to write software in the first place?

You want to know what practical programs need to know the lengths of strings? The answer is: damn near all of them.
 
eh, why choose python? is tthat just some random language you picked or is it for a website?
reason being it sounds like you need some fundamentals, not sure python is the best beginners language
 
If "the point" isn't self-evident, why are you trying to learn to write software in the first place?
How does "the point" of a function have anything to do with why I want to learn to program?

You want to know what practical programs need to know the lengths of strings? The answer is: damn near all of them.
Well, pardon me if I didn't know, that was kind of the idea.

eh, why choose python? is tthat just some random language you picked or is it for a website?
reason being it sounds like you need some fundamentals, not sure python is the best beginners language
I talked with a few CS and EE friends, and they said Python was a good place to start.
 
The point has a lot to do with it. Imagine if instead of asking about programming you asked something like "I want to learn how to build houses, but I don't see what the point of hammering nails is".

Its ok to want to build a house and not know how to wire up a switch, but to not recognize the need and benefits to putting in switches is very confusing to someone familiar with building houses.

So I ask again, why do you want to learn how to write software? What appeals to you about it? What do you wish to accomplish?

How does "the point" of a function have anything to do with why I want to learn to program?

Well, pardon me if I didn't know, that was kind of the idea.

I talked with a few CS and EE friends, and they said Python was a good place to start.
 
The point has a lot to do with it. Imagine if instead of asking about programming you asked something like "I want to learn how to build houses, but I don't see what the point of hammering nails is".
It would be a valid question if the only thing anyone ever told you about hammering nails was that it's achievable with a hammer.

So I ask again, why do you want to learn how to write software? What appeals to you about it? What do you wish to accomplish?
I want to be able to, well, do stuff. Like, write things that will do what I want them to or modify others so that it suits my purposes, not someone else's.
 
you might find value in O'Reilly: Programming Python. It walks through programs to do different things, and teaches the programming along the way.

I hated that book personally, because i knew what problems i wanted to solve, and i just needed to learn how python worked.

(If you are in south jersey, PM me, and you can probably have my copy).
 
In addition to a decent book, I think the Python Koans are great for getting familiar with the ins and outs of the language.
 
you might find value in O'Reilly: Programming Python. It walks through programs to do different things, and teaches the programming along the way.

I hated that book personally, because i knew what problems i wanted to solve, and i just needed to learn how python worked.
Oh wow. That sounds like what I'm looking for. I'll try get hold of a copy.

(If you are in south jersey, PM me, and you can probably have my copy).
Thanks for the offer, but I think New Zealand is a long way from South Jersey... :D

What kind of stuff?
I'm not quite sure at the moment. I'm sure learning how to build a shed would give you many of the skills, say, to build a house. But I won't know until I learn how to build the shed and find out what skills I've learned, will I?
 
It sounds like you should get Apress Beginning Python: From Novice to Professional.

I bought a lot of Python books awhile back and unlike most books that just concentrate on the Python syntax and core libraries, that book teaches you Python and also uses various popular Python 3rd party libraries, too. Of course is has console apps, but it will also show how to make screen scrapers, a simple game using pygame, drawing/plotting app, chatroom app, etc.

I do like the Oreilly Python books, as well as the Quick Python book from Manning Press, but it sounds like you want something less academic and in-depth.

Oh yeah, another book to consider, is the just released Head First Python. Also by Oreilly Media but this is part of the Head First series and is full of pictures and drawings to make learning more fun. Some people swear by that series. Take a look at that one as it may be even better suited for you.
 
As an Amazon Associate, HardForum may earn from qualifying purchases.
I'll also throw in that this is the best python book i have used: (if you are already a programmer).
Python Essential Reference

But you won't like it. At All!

Its a reference book and has no exercises or reasons why you should use python or what you could use it for.
 
I honestly think the official tutorial is pretty good: http://docs.python.org/tutorial/

Even if you don't see "the point" of operations and what not early on, stick with it. Programming isn't something you just pick up on a whim. It's gonna take some time and dedication to it to really get good. Just stick with it and it'll pay off in the end.
 
I can't really learn that way. I'd read/did up to chapter 6 and I realized I didn't really see the point of much of it, and a lot of it wasn't going in, because even though the things you could do with the stuff the tutorial talked about was kind of interesting, I couldn't actually do anything with it. For me it's kind of like trying to learn English by memorizing all the vocab first, without learning any of the syntax. You've got all these operations and functions, but what do you do with them?
 
you are not making any sense, at all. people are asking you questions that you are ignoring.
if you want to program you must have some sort of application in mind.
What is it you want to build? Frankly if you cannot answer that simple question than you are just trolling.
 
It could be that traditional programming isn't for you. I frankly love that boring, behind the scenes stuff. Even something simple like the FizzBuzz test is fun to me.

You could just switching up and try another language. I've recommended ActionScript, the Flash programming language, to graphic design friends. You immediately learn how to move objects, animate movieclips, make interactive buttons and at the same time learn programming fundamentals and even Object Oriented Programming principles. It helped to keep my more visually-oriented friends motivated as they could really "see" what they were doing.

And because ActionScript is an ECMA-based language, you can easily learn JavaScript later if you decide. Also because of it's dot notation syntax, it would make the transition easier to C#, Java or other C-sytyle languages later on.

Only con is that Flash CS 5 isn't free, but you can download the 30-day trial for free.
 
ActionScript might be an ok starting point. Just go with AS3. Avoid AS2 like the plague. It's a very poorly designed language. I'd also not recommend Flash CS5 for programming. It's a graphic designer's tool. Flex Builder is much better suited to coders: http://labs.adobe.com/technologies/flashbuilder_burrito/

As for python, I'm pretty confused by what "point" you're trying to get. The tutorial is covering pretty much what any scripting language is going to provide: arithmetic, flow control, I/O, and string manipulation. It's up to you, the programmer, to build something interesting on top of all that.

If you want to see a more interesting example of what you can do with python, check these out:
http://fragments.turtlemeat.com/pythonwebserver.php
http://wiki.wxpython.org/
http://code.activestate.com/recipes...th-embedded-image-and-plain-t/?in=lang-python

Like jiminator said, we can help you find something up your alley if you give us direction. At this point, I'm just hearing "I want to code but I don't like what I'm setting in these tutorials."
 
The Google team put out quite a few good Python seminars on Youtube.

I also recall them broadcasting a workshop (classroom atmosphere) of learning Python from scratch. Video + examples + example problems were all included and you could follow along as if you were there.

I don't have any links handy but you should be able to find them fairly easy on Google/Youtube.
 
I'm trying to learn Python as my first language, but the problem is the various guides I've seen only explain the syntax - after reading several pages I still don't have any idea what the point is of doing math in Python instead of just using a calculator, or a program with a practical purpose that requires finding the length of a string. I mean, they're cool functions, but what's the point of it? So I guess what I'm looking for is a tutorial or guide shows you how to make a few 'proper' programs and explains the syntax as it comes up.

the point of doing math is to allow user defined parameters, rather than precaculated. Length of string is great if you want to say for example in a GUI wan't to allow a backspace functionality etc.
 
It could be that traditional programming isn't for you. I frankly love that boring, behind the scenes stuff. Even something simple like the FizzBuzz test is fun to me.

What a great test! In my opinion, this has less to do with knowing how to program and more to do with understanding logic. any 'programmer' should be able to write pseudo-code for such a simple example. whether the code compiles is far less important than whether or not the logic is sound.
 
What a great test! In my opinion, this has less to do with knowing how to program and more to do with understanding logic. any 'programmer' should be able to write pseudo-code for such a simple example. whether the code compiles is far less important than whether or not the logic is sound.

I don't really agree with that. The amount of logic required to do this is basically nothing.

If you planned to solve this with any modern/popular language it just comes down to knowing what "the function you need to know about (omitting to not spoil the puzzle)" does and it becomes trivial to solve.
 
I don't really agree with that. The amount of logic required to do this is basically nothing.

If you planned to solve this with any modern/popular language it just comes down to knowing what "the function you need to know about (omitting to not spoil the puzzle)" does and it becomes trivial to solve.

if you're saying what I think you're saying, then we're saying the same thing. the example provided in the link above is very basic logic, yes, but it is logic that is required.

If you don't understand the logic (ie. the math/algorithm required to solve the problem), then it doesn't matter if you can 'program'. programming comes with practice. sound logic requires a certain mindset that is much harder to learn.

I suppose my only point is that I could teach someone with sound logical principles how to 'program' much easier than I could teach a 'programmer' sound logical principles.
 
I suppose my only point is that I could teach someone with sound logical principles how to 'program' much easier than I could teach a 'programmer' sound logical principles.

Definitely. Strong logic is quite surprising really.

I remember about 2 years ago I was speaking to my friend who had absolutely no programming experience at all. He was awesome at math and logically sound.

I was having trouble with a math related formula (my math skills are kind of sub-par) and after explaining the problem he was able to come up with a real programming solution in under 10 minutes.

All I did was explain to him what an if statement and for loop do. Made me really jealous that it came to him so easily too.
 
Remarkably, competence is something that's hard to find.

Definitely. We interview a lot of people just to find anyone who seems to know what they're doing.

It's kind of depressing to see how many candidates apply and cannot write even a simple program.
 
... I still don't have any idea what the point is of doing math in Python instead of just using a calculator?

If the purpose of your program is to, say, calculate taxes, it wouldn't be much of a program if it required you to use a calculator to do the math now, would it?

...or a program with a practical purpose that requires finding the length of a string.
what is the length of a valid zip code? Wouldn't it be nice if your program could check the length of the zip code the user entered to see if it's the right length?
 
Back
Top