[Tutor] Learning to program, not code.
Dave Angel
davea at davea.name
Fri Dec 19 14:06:39 CET 2014
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 hoped would happen
5) any error messages (show the full stack trace) you get
6) meaningful subject line
Python is a fabulous language for learning. You can get feedback a few
seconds after you run the code, and you can make a change and try again
in under a minute. I worked in one environment where the turnaround for
a compile was about a day and a half. And in another where the compile
of the complete application was done only once a week, and making it was
a half-time job for the build-master.
I've also worked in environments where I had to build my own programming
tools, starting with a text editor. And in environments where we
entered the code in hex. And generating the hex was a pencil/paper
exercise. Looseleaf notebook was the source code.
--
DaveA
More information about the Tutor
mailing list