Skip to content
This repository has been archived by the owner on Jan 3, 2018. It is now read-only.

Construct intermediate Python lesson. #128

Closed
gvwilson opened this issue Nov 2, 2013 · 10 comments
Closed

Construct intermediate Python lesson. #128

gvwilson opened this issue Nov 2, 2013 · 10 comments
Assignees
Labels

Comments

@gvwilson
Copy link
Contributor

gvwilson commented Nov 2, 2013

Construct lesson on Python for intermediates in r/intermediate.

@ethanwhite
Copy link
Contributor

I've just finished reviewing all of the core Python material in the repo and
would like to start a conversation about where we should be headed in creating
the intermediate Python lessons. I'd like to start by laying out my current
thinking on what we're trying to achieve at the intermediate level.

At this level the idea is that we aren't teaching basic programming concepts
like variables, loops, conditionals, etc. We should assume that everyone is
familiar with the general idea, but not that they know the Python syntax.

The one basic concept that I think falls in a gray area at the moment is
functions. Some individuals taking an intermediate bootcamp will be comfortable
with functions, but in my experience there are a lot of folks who get all of the
other basics and write a fair bit of code, but don't use functions. I'm curious
to hear others' impressions of the likely familiarity with functions of our
intermediate learners.

This freedom from teaching the basic concepts allows us to focus on higher
level, more conceptual ideas about how to write good code.

  • Documentation
  • Modularization
  • Readability
  • Defensive programming
  • Testing
  • etc.

To be clear I'm not talking about simply lecturing on these concepts in the
abstract, but about finding example based approaches like @gvwilson has taken
in #132 to demonstrate this aspect of what we teach.

Does this fit with how others are thinking about the intermediate bootcamps and
associated notes or are their alternatives that we should be discussing?

Unfortunately if this is the approach we're taking then much of the existing
material in bc doesn't seem to be a great fit to the task in it's current
state. The THW material is primarily focused on being a How To guide for doing
things in Python. It provides some great introductory material as well as more
advanced approaches to things in Python, but it doesn't really touch on the core
SWC concepts described above. The material in the swc directories has a lot
of the important core "best practice" material, but it is seems too introductory
for an intermediate workshop in many cases, it is too long/detailed to deliver
in a half or even a full day, and is broken up into sections by the basic
programming concepts that we are assuming students are familiar with.

Those are my initial thoughts. What do other folks think about what we should be
shooting for in the intermediate Python lessons and how it relates to existing
material?

@wking
Copy link
Contributor

wking commented Nov 13, 2013

On Wed, Nov 13, 2013 at 01:01:33PM -0800, Ethan White wrote:

  • Documentation
  • Modularization
  • Readability
  • Defensive programming
  • Testing

I like the concepts, and the obvious focus on best-practices over
syntactic details. Are we shooting for a single (day long?)
integrated swoop through each of those, or per-concept lessons that
stand alone 1? Integration is nice, it may make mixing instructors
(who may have different lesson preferences) awkward. I'm not sure
where the “average boot camp” lands on the instructor-compatibility
scale, or how often this whole segment will be taught by a single
instructor.

@jdblischak
Copy link
Contributor

I agree that the IPython notebooks in thw-python are too basic for an intermediate bootcamp. However, there are higher level lessons (developed primarily by @scopatz) that touch on many of the topics you mention, e.g. debugging, testing, and documentation.

I understand the desire to start from a clean slate, but these lessons should at least be consulted as past examples of more advanced Python material.

@ethanwhite
Copy link
Contributor

Thanks @jdblischak. I think I'd missed those since they weren't in the main Python folder. I'd actually prefer to avoid starting from a clean slate if possible. I'll make sure to look through all that material in the next couple of days.

@ethanwhite
Copy link
Contributor

Are we shooting for a single (day long?) integrated swoop through each of those, or per-concept lessons that stand alone [1]?

My general feeling is that a single integrated swoop tends to work best in a bootcamp framework. I definitely think that having separate sections on documentation, modularization, readability, and error handling will tend to make things more about how to do specific things and less about the overall approach to developing scientific code, which I think is what we're shooting for.

I am a bit torn on whether formal testing gets directly integrated or kept in it's own section. Certainly we should be talking about informal testing as we do the development, but do we jump straight in to unit testing or just do informal testing and then at the end come back and add in the unit testing. This would let us maintain testing as a separate set of notes which might make designing and maintaining material a bit easier (or make it harder to keep it in sync). It's also always been split out separately as one of the core things that we teach.

Integration is nice, it may make mixing instructors (who may have different lesson preferences) awkward. I'm not sure where the “average boot camp” lands on the instructor-compatibility scale, or how often this whole segment will be taught by a single instructor.

Since #132 seems to be OK with not worrying about this my inclination is to follow the same strategy, but I'm certainly open to discussion.

there are higher level lessons (developed primarily by @scopatz) that touch on many of the topics you mention, e.g. debugging, testing, and documentation.

OK, I've look through these and they definitely have some valuable material that should be integrated into our final notes.

@gvwilson
Copy link
Contributor Author

Given comments on the R thread, should the intermediate Python material
show people how to create a redistributable Python package? @embray did
this at STScI in September, and I think that seeing how helped people
understand what was going on when they installed stuff (or failed to).

@ahmadia
Copy link
Contributor

ahmadia commented Nov 14, 2013

@gvwilson - It's an interesting thought and it is not very hard to do for a
pure Python installation. You could cover packaging and installation in an
hour.

It gets tricky when you start dealing with other parts of the ecosystem
besides PyPi like Anaconda. Further thoughts should go in a meta-issue.

On Thu, Nov 14, 2013 at 1:18 PM, Greg Wilson notifications@github.comwrote:

Given comments on the R thread, should the intermediate Python material
show people how to create a redistributable Python package? @embray did
this at STScI in September, and I think that seeing how helped people
understand what was going on when they installed stuff (or failed to).


Reply to this email directly or view it on GitHubhttps://github.com//issues/128#issuecomment-28508381
.

@ethanwhite
Copy link
Contributor

See related conversation in #129 about what to include in Intermediate R (thanks Greg!). I wonder if we should actually have a single issue in which we discuss the general content of Intermediate R and Intermediate Python since presumably they should cover the same basic ground just in different languages.

@wking
Copy link
Contributor

wking commented Apr 19, 2014

This landed in #209, so I'm closing this issue.

@wking wking closed this as completed Apr 19, 2014
@ethanwhite
Copy link
Contributor

I guess whether we should close this depends on how we're thinking about the current state of things. I think of the existing material as about half of an Intermediate Python lesson, but I'm also not going to be getting back to adding new material in the near future. My general feeling is that this is still a To Do, but I'm happy either way.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants