[Tutor] Hello Python Tutor - help please!

Cecilia Chavana-Bryant cecilia.chavana-bryant at ouce.ox.ac.uk
Wed Aug 22 17:33:03 CEST 2012


Hola Bill,

Many thanks for your reply to my post, you seem to understand the predicament I am in very well. Unfortunately, I am currently working from home and do not have someone close by to help and this is why I came to this space. This is also why I asked for advise about interactive tutorials or video tutorials. I have found that I keep getting lost with the more traditional tutorials where you just read and then do exercises. Following the guide I mentioned on my initial post I got through the first 2 chapters but I found them quite hard going. I don't know if this makes me not a complete beginner but I certainly do not feel like I learned much from reading them. Maybe it is the trying to learn the "computer ecosystem" of terminal commands at the same time that is making this learning process so tough.

With respect to my field data, during my 2 yrs of fieldwork I collected a large amount of data which is currently stored in excel files. My research involves remote sensing (data from Earth-observation satellites) and I work with data from the MODIS NASA satellite which monitors the health of forest canopies using reflectance data. My research is based in the Amazon. I have collected field data to monitor the leaf dynamics of canopy leaves during the dry season. Dry season is the time of year when many tropical trees change their old leaves for new ones. New leaves are more photosynthetically active (absorb more carbon from and release more oxygen into the atmosphere) so the leaf exchange of such a large forest region as the Amazon can have huge effects on regional and global carbon and water cycles and thus on global climate (apologies if I'm giving you loads more information than you need or requested?!). My data involves a large amount of data on leaf demography (we demographically surveyed more than 120,000 leaves), and thousands of morphological and reflectance measurements. I will have to reorganise this data and create a few easily manipulable datasets so I can sort data according to leaf age, canopy position, date, etc. Then I will have to do statistical analyses on the data. I will also have to model some of the data.

Many thanks for taking the time to respond to my post so comprehensively and for your good wishes.


Cecilia Chavana-Bryant
DPhil Candidate - Remote sensing and tropical phenology
Environmental Change Institute
School of Geography and the Environment
University of Oxford
South Parks Road, Oxford, OX1 3QY
Web: http://www.eci.ox.ac.uk/teaching/doctoral/chavanabryantcecilia.php
Tel Direct: +44 (0)1865 275861
Fax: +44 (0)1865 275885
________________________________
From: William R. Wing (Bill Wing) [wrw at mac.com]
Sent: 22 August 2012 15:17
To: Cecilia Chavana-Bryant
Cc: William R. Wing (Bill Wing)
Subject: Re: [Tutor] Hello Python Tutor - help please!

On Aug 22, 2012, at 6:10 AM, Cecilia Chavana-Bryant <cecilia.chavana-bryant at ouce.ox.ac.uk<mailto:cecilia.chavana-bryant at ouce.ox.ac.uk>> wrote:

Dear all,

I am just returning to my doctoral studies after a 7-month medical leave and desperately trying to catch up for lost time. I am COMPLETELY new to programming, well, I did try learning C for 3 weeks 3 yrs ago (with very little success) but had to stop and then spent 2 years in the Amazon climbing trees (lots more enjoyable than learning to programme!) and collecting loads of field data that I now need to post-process and analyse. By the way, the 3 weeks I spent trying to learn C really ended up being spent trying to get to grips with using a terminal for the first time in my life.


Could you say a few words about what the field data is, and how you hope to analyze it.  That is, are you headed in the direction of plotting species density on maps, or the time evolution of something, or doing statistics?

Since getting back to work, I was advised to try learning Python instead of C as it is a much easier first language to learn. I have been trying, but again, to not great success. I started following "A Primer on Scientific programming with Python" but I kept getting lost and stuck, specially on the exercises. I have also been advised that I should not try to learn programming by following guides but by trying to write the programmes I need to analyse my data. Although I can understand the logic behind this last bit of advise (it gives context and direction to the learning process) I have also gotten stuck trying this approach as "I do not know how to programme!". Thus, I was hoping that some of you can remember how you got started and point me towards any really good interactive learning guides/materials and/or have a good learning strategy for a complete beginner. I have searched the web and was overwhelmed by choice of tutorials and guides. I have skimmed through a couple of tutorials but then fail to see how all that relates to my own work and I get stuck with what seems like basic important concepts so I don't progress. I then think I should try to make some progress with my own data analysing and go back to trying to learn to write a programme for my specific needs and get stuck again because this requires more advanced skills then the basic programming concepts I have been reading about on the learning guides. So, I am now feeling VERY frustrated and have no idea what on Earth I am doing! Can anyone please offer guidance in my learning process? I don't know how and what I should be spending my time learning first and/or if I should focus my learning towards the skill areas I will require to write my specific programmes, although I have no idea what these are. I would like advise on finding some really good interactive(let you know if your solution to an exercise is correct or not) and or video tutorials that give you feedback on the solutions you write to exercises.

Many thanks in advance for all your help, it will be much appreciated!



I think there are three problems here, and you are (for better or worse) attempting to tackle all three at once.  First, and foremost, "leaning to program" really means learning a particular way of thinking about a problem, and how to decompose it into a sequence of steps.  Most programmers learned that way of thinking about problems so early in their careers they've forgotten it[*].  In parallel with that, you are trying to learn and understand the whole computer "ecosystem" of terminal commands, reading and writing files (and structuring their contents), data types, utilities, and libraries.  Finally, there is the actual work of writing the specific programs necessary to deal with your data.  Under any circumstances, tackling these all at once (or even in series) would be a heroic undertaking, doing so under the pressure of writing your thesis is (and this is purely my personal opinion) going to require that you have someone there at your elbow to help you through the first few days (weeks) of learning, particularly to help you with the first two issues I mention above.

I agree that Python is an excellent choice for a first language.  It allows instant testing, provides immediate feedback with very good error messages, and is very flexible.

[*] Years ago, I agreed to help a co-worker "learn to program".  This was back in the days of FORTRAN-IV, McCracken, and computers on which 64 thousand memory locations was a lot of memory.  I showed him how to use an editor to enter code, loaned him my copy of McCracken, explained on a blackboard how the various statements worked and how FORTRAN directed logic flow and could do arithmetic.  Then, as an initial exercise, I asked him to write a program to find prime numbers.  This is a very standard initial exercise in programming, and forces the student to think through how you would test a number to find out if it is prime.  If it is, print it out and if it isn't, go on to the next one.  HIS solution was to define a square array indexed with the integers on each side.  The cells of that array were the products of the integers, and he intended to then scan that square looking for the numbers that DIDN'T exist in it.  Those would be prime.  So, note that there is nothing logically wrong with this solution.  But in a practical world (particularly a world with very limited memory) it stops working at a fairly small value of prime numbers.  The point I'm trying to make (in far too long winded a fashion) is that "learning to program" involves a lot more than just rote leaning of syntax.

We all wish you the VERY best of luck.  We will give you all the help we can, but I do hope you have someone close by.

Good luck,
Bill



Cecilia Chavana-Bryant
DPhil Candidate - Remote sensing and tropical phenology
Environmental Change Institute
School of Geography and the Environment
University of Oxford
South Parks Road, Oxford, OX1 3QY
Web: http://www.eci.ox.ac.uk/teaching/doctoral/chavanabryantcecilia.php
Tel Direct: +44 (0)1865 275861
Fax: +44 (0)1865 275885
_______________________________________________
Tutor maillist  -  Tutor at python.org<mailto:Tutor at python.org>
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120822/73681b8b/attachment-0001.html>


More information about the Tutor mailing list