[Tutor] Learning to program, not code.

2014-12-19 Thread Brandon Dorsey
Hello All,

Programming has always been a passion of mine, however, I'm frequently
frustrated at

simple fact that I've been learning python for 8 months, and I have yet to
start, and finish, a simple

project.  I find difficult to not only visualize the execution, but to
figure out when and where to

use data structure 'x'.Any suggestions on how to approach programming
from a different angle?
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Learning to program, not code.

2014-12-21 Thread Brandon Dorsey
>
> I'm 28 years old, currently unemployed and not in school until fall of
> 2015 as a junior.  I picked up python a little under a year ago, with the
> hopes that I could make a career out of programming - when I finish school
> that is.  So, as of right now you could say it's a hobby, however, I
> figured that I would jump the gun and learn it now, on my own, with widely
> available resources we have today.  Currently, I have a solid foundation of
> how data structures and how OOP works, but the problem lies within having
> analysis paralysis.  I have a tendency to over analyze everything, and with
> programming - as we all know - there are a million ways to accomplish the
> same task.
>

On Fri, Dec 19, 2014 at 8:06 AM, Dave Angel  wrote:

> On 12/18/2014 09:09 PM, Brandon Dorsey wrote:
>
>> Hello All,
>>
>> Programming has always been a passion of mine,
>>
>
> A great start.  Can you tell us a little more about yourself?  Is Python
> the first language you've tried, or are you successful at other languages?
> Are you in school, at what level, do you already have some other career and
> this is a hobby?  Do you have some hobbies that programming might synergize
> with?
>
> > however, I'm frequently
>
>> frustrated at
>>
>> simple fact that I've been learning python for 8 months, and I have yet to
>> start, and finish, a simple
>>
>> project.
>>
>
> How are you learning python?  Are you in a class, did you buy a book,
> download a tutorial, what?
>
>   I find difficult to not only visualize the execution,
>>
>
> There are tools that may help with that, but it's not clear to me whether
> that would really help.  If you want to play, you could look at:
>
> ttp://www.pythontutor.com/visualize.html#mode=edit
>
>  but to figure out when and where to
>>
>> use data structure 'x'.
>>
>
> Alan gave some brief descriptions.  You should realize that those are just
> the particular collections that are in the builtin section of python.
> There are many more in the standard library, MANY more out on the internet
> (eg. pypi), and many more in your head, just aching to come out.
>
> Any suggestions on how to approach programming
>
>> from a different angle?
>>
>
> That's a great perspective.
>
> We're now drowning in a sea of riches, information on any topic.  But in
> most cases, you have to be introduced to a topic systematically, with
> controlled flow, in order to understand what the fancier concepts are all
> about.  When I "started" programming in 1966, it was with a borrowed
> Fortran book over spring break.  I wrote a number of programs on sheets of
> paper, but had no machine to execute them on.  (I also expect there were
> more errors than useful statements, but I didn't know anything about that
> either)  I went on a field trip to the nearest computer, which was at
> Yale.  I got to see the actual machinery through some large windows, but
> didn't have a chance to run anything till almost a year later, at my own
> college.  Even then, freshmen weren't taught anything about them, and I had
> to learn from another student how to submit punched cards to the computer.
> And how to run jobs without having a legitimate account.
>
> Frequently when people develop an interest in programming now, it's in
> order to write a game, design a website, or to solve some fairly complex
> problem.  If they then try to research the tools, they get overwhelmed with
> the possibilities. And without a narrower focus, they never get that
> satisfaction that comes with finishing a project.
>
> Without knowing anything at all about you really, I'd suggest you either
> take a course, or really *do* a tutorial.  Many people just read a book (or
> site) about the subject, and don't actually try the exercises.  In my case
> it was excusable, since I didn't have the several million dollars necessary
> to buy a computer, but the principle still holds. Start small, and
> systematically build up your abilities.  If you're disciplined enough to do
> that on your own, there are many Python tutorials that you can download.
> And when you get stuck, you'll have a manageable problem that somebody can
> help with.
>
> If you've done all that, and you're still stuck, then be much more
> specific in your question here.  Pick a project (or exercise, or
> assignment) that you've started working on, and describe the following:
>
> 1) python version and OS version
> 2) project description
> 3) code fragment that shows your present difficulty
> 4) what happens, and what you hope

[Tutor] multiple objects with one assignment?

2015-01-02 Thread Brandon Dorsey
I know there is are easier ways to assign multiple objects to a variable,
but why, does the following code work?  Why does it return a tuple versus a
list?  I know it has something to do with the semi-colon, but I didn't know
it wouldn't  raise an error.

greetings = "hello,", "what's", "your", "name?"
print(greetings)

x = 1, 2, 3, 4, 5, 6, 7
print(x)

I assumed that you could only assign one object per assignment without the
presence of tuples, list, or dictionaries.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] multiple objects with one assignment?

2015-01-02 Thread Brandon Dorsey
On Fri, Jan 2, 2015 at 6:34 AM, Steven D'Aprano  wrote:

> The thing to remember is that *commas*, not parentheses, are used for
> making tuples. The round brackets are just for grouping.
>

That's what I was confused about.  I didn't realize commas defined tuples,
not parentheses.  Is this the case
for list and dictionaires as well?

--
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] multiple objects with one assignment?

2015-01-02 Thread Brandon Dorsey
On Fri, Jan 2, 2015 at 6:27 AM, Dave Angel  wrote:

Ben's description is very good.  But I think the main thing you're missing
> is that a tuple is created by the comma, not by parentheses.  In some
> contexts, parentheses need to be added to make it non-ambiguous, since
> comma is overloaded.


That's what I was baffled about.


--
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] multiple objects with one assignment?

2015-01-02 Thread Brandon Dorsey
On Fri, Jan 2, 2015 at 6:08 AM, Ben Finney 
wrote:

> Does it help you to understand if I clarify that a tuple is one value?
> That a list is one value? That a dict is one value?
>

Well I knew that those data structures represent one value that can hold
"x" amount of objects, but what I didn't realize was that commas are used
for making
tuples, not parentheses.

Thank you for the clarification.


--
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor