[omaha] Python Workshops @ DoSpace Group

Adam Schaal adam at scha.al
Mon Jan 4 09:00:15 EST 2016


When I go to a workshop like this, I tend to have more fun/interest if I'm
challenged.  While I appreciate the fact that you'd like to introduce
excellent coding practices by having a majority of the file coded, I
encourage you to leave a good chunk to the user.  For example, if you have
defined methods/functions and tell them to create their own, I think it's
far more likely that they'll copy the way you've created a method/function,
then to fill our it's inner workings.  Perhaps, that's already what you
were thinking, but I just wanted to clarify.

Learning Python was extremely applicable when I was solving ACM-like
algorithm challenges - I like the idea of converting programmers into
python devs - maybe even in other fields.  I think that a challenge/problem
like that where a programmer can clearly see python's advantages over other
languages would be a valuable asset to the class.

With all this said, I'm still a relative beginner - maybe even your target
demo - so take what I say with a grain of salt.

Adam Schaal


On Sun, Jan 3, 2016 at 11:11 PM, Jeff Hinrichs - DM&T via Omaha <
omaha at python.org> wrote:

> Burch,
> I think you are hitting the nail on the head. And it is good that you are
> pointing out that the goal might appear to be too geared to a programming
> as a profession.  I am glad that you said something, because I am looking
> to approach this the other way round.  That is to inspire programming in
> other professions.   With the current push on in the sciences for
> repeatable results in data analysis, I would think that within the next
> decade that anyone who works with data for a profession (not programmer's
> but analysts, scientists, etc.) would be ill equipped if they can't wrangle
> data.
>
> To that end, many just like you and myself (when I attended college, you
> only received 1 credit hour for a language class.  They were graduating
> Computer Scientists not programmers.) pick up a language or other tool,
> based on our ability and the reference material that we have at hand (or
> online).  And that first exposure sits like concrete, as you stated. The
> example you sited about file handling is very insightful and I think lends
> credence to my goal of making the first contact for those new to
> programming as positive as we can.
>
> My goal is to have the examples that we show to the class be as good as we
> can make them.  Be written in a way that lends itself to good convention
> and best current practices.  So that when we show students example code --
> it is of good quality, not a questionable example that was thrown together
> to demonstrate one thing while completely ignoring all other good
> practices.  I believe the examples we pick for use in these still fictional
> classes should show not only what we want to demonstrate on the micro level
> but also be a good example on the macro level.  So that if a
> student/attendee used one of our examples as a starting point for something
> bigger, they would be on good footing.   When people first start
> programming we don't write code as much as borrow it from other places.
> *wink*   My goal is to create the best quality code examples, that they can
> borrow for other things.
>
> Also, for beginners a blank file is too much.  The examples I've come up
> with so far require that they fill in the missing pieces, concatenate some
> strings here, finish out the function body there, but the rest of the code
> should be stellar because we wrote it for them.  Doc strings where they
> belong, conventions followed for naming variables (no more i, j, k which
> dominate in Fortran or x and y like it is a math problem)with descriptive
> names.  So that when the time comes for a student to create a variable out
> of thin air they will be more likely to be descriptive too.  But even if
> they don't use descriptive names students won't be berated, what matters is
> that code does what is intended.
>
> As for testing, I am not going to try and sell you on it.  (Like backup and
> restore, most are not concerned until the ugly happens.) I am not even
> planning on talking about it in these opening workshops.  However, that
> doesn't mean I am going to favor code examples that are not testable.  Far
> from it.  Everyone of my current example exercises has associated tests.
> The students won't run the tests but my agent, sam will.  When they finish
> an exercise I'll know, as sam will let me know their code is running and
> passing the tests.  That also requires that the creator of the specific lab
> write in a way that is testable.  However, none of this is a burden to the
> student as they are not going to be running the tests or even thinking
> about creating testable code but they'll be learning it subliminally.
>
> And now that I've used the word, subliminal -- I just realized that was my
> goal all the time.  In each example, given on a slide or as an exercise
> there is the part that you are talking about discretely.  Focusing on that
> topic.  However, the surrounding and supporting code is also teaching and
> informing the student.  That is the part that needs more love in just about
> every example I've seen on the internet.
>
> If none of this made sense or you still don't agree (However, I think that
> I'm tripping over myself agreeing with you.) please say so.  The point of
> this thread is to have a conversation where we can flesh out some
> reasonable goals and then see if we can meet them.  So if you are reading
> this and have an opinion, a point, a question then please, please chime in.
>
>
>
>
> On Sun, Jan 3, 2016 at 8:36 PM, Burch Kealey via Omaha <omaha at python.org>
> wrote:
>
> >
> > I will make an observation - this is not meant to be critical but I want
> > you (collectively) to chew on it.  If I want to learn to be a programmer
> I
> > would look for a well structured learning path.  If I want to learn to do
> > things to make my life easier I am not sure I want to take the same path
> as
> > if I wanted to learn to be a programmer.
> >
> > This note is sent in response to both Jeff's and Wes's posting.  Please I
> > am not trying to be critical but you guys are programmers by training and
> > vocation I am not.  I don't have the time to learn to be a programmer.
> > Unit Tests, what the heck are those?  Why do I care?
> >
> > I ask a question on SO and a bunch of idiots jump up and are critical for
> > the fact that my code is not PEP 8 compliant - okay it makes them feel
> good
> > but it does not help me.  For example, for the longest time ( say 5
> years)
> > when I opened and read a file I would do this
> >
> > mydata = open('some file path','r').readlines()
> >
> > That is not PEP 8 compliant (I don't think), but when I first Googled to
> > learn how to open a file and read the contents into a list - I think this
> > is the webpage I found
> >
> > http://openbookproject.net/pybiblio/tips/wilson/loadingfile.php
> >
> > It was only this year that I took the time to learn the right way
> >
> > with open('some file path','r') as f_handle:
> >     data = f_handle.readlines()
> >
> > Why did I not bother learning the right way before this year, I was too
> > busy learning how to do other things and it was working for me.  Why did
> I
> > even bother learning the right way, because I got sick of the way the
> > conversation would get channeled if I had a question or comment about
> > something and the pros would say well you are not opening the file right.
> > My response is who gives a drat, that is not the problem, but they are
> > stuck on that issue.
> >
> > I am probably not explaining this well - certainly you want to teach
> > people the right way but I would be careful about how far you take it.
> Our
> > software is used by over 5,000 people and I have never written a unit
> test
> > (have no clue).  I know that is not a big number but it is the amazing
> > thing about Python.
> >
> > Don't cringe, drink some OJ!
> >
> > Just an observation.
> >
> > Happy New Year
> >
> > Burch
> > ________________________________________
> > From: Omaha <omaha-bounces+bkealey=mail.unomaha.edu at python.org> on
> behalf
> > of Wes Turner via Omaha <omaha at python.org>
> > Sent: Sunday, January 3, 2016 8:12 PM
> > To: Omaha Python Users Group
> > Cc: Wes Turner
> > Subject: Re: [omaha] Python Workshops @ DoSpace Group
> >
> > https://wrdrd.com/docs/tools/#python
> > * http://learnxinyminutes.com/docs/python/ # ./git
> >
> > "[omaha] For Python beginners"
> > https://mail.python.org/pipermail//omaha/2015-May/001816.html
> >
> > * http://docs.python.org/tutorial
> > * https://scipy-lectures.github.io/intro/language/python_language.html
> > * https://github.com/audreyr/cookiecutter-
> > <https://github.com/audreyr/cookiecutter-pypackage>pypackage
> > <https://github.com/audreyr/cookiecutter-pypackage>
> >
> >   *Create and test a package w/ git[hub] and CI"
> >
> > * Rosalind [Bioinformatics] exercises are outstanding
> >   1. they're already set up for online grading/points
> >   2. you get to learn about the domain
> >   * | Homepage: http://rosalind.info/
> >   * https://wrdrd.com/docs/consulting/data-science#rosalind
> >
> > * "How to create and *test* a package for your Rosalind solutions"
> >
> >    * "Testing as a core scientific process #126"
> > https://github.com/scipy-lectures/scipy-lecture-notes/issues/126
> >
> >    * TDD first!
> >       [null] hypothesis, code, test!, [commit]
> >
> >       *
> >
> https://westurner.org/wiki/awesome-python-testing.html#workflow-evolution
> >
> >          *
> > https://wrdrd.com/docs/consulting/education-technology#jupyter-and-tdd
> >           *
> > https://wrdrd.com/docs/consulting/education-technology#nbgrader
> >
> > [omaha] November 18 Meeting - Celebrate and Plan!
> > https://mail.python.org/pipermail/omaha/2015-November/001943.html
> >
> > > The software carpentry lessons are great (and designed for group
> > instruction IIUC):
> > > * https://software-carpentry.org/lessons.html
> >
> > ... https://westurner.org/opengov/us/ne/#cs-skills-for-stem-fields :
> >
> > *
> https://wrdrd.com/docs/consulting/software-development#computer-science
> > To all of who offered to help in any form with giving Python workshops @
> > DoSpace,
> >
> > I've been hammering out some ideas for a class targeted at those new to
> > programming in particular.
> >
> > We should probably start a conversation about it and see what we can put
> > together.
> >
> > Here are some goals, because we need to have something to measure
> against:
> >
> > * should allow for students to do something with Python as soon as
> possible
> > - don't want them bored and inattentive.
> >
> > * The See/Do affect of examples should have the following qualities:
> >
> >   * be pep8 compliant (only deviating when we are teaching a specific
> > topic.)
> >
> >   * be easy to test.  No example has print or input in the middle of a
> > function other than main or one designed to deal with user interaction.
> > Too many examples mix I/O with processing leaving students with a knack
> for
> > writing hard to test code.  (All example code and problems should have an
> > associated test suite [py.test] to accompany them.)
> >
> >   * Should emphasize DRY and only deviate when showing them undry
> > situations and how to correct.
> >
> >   * Early coding problems are often quite boring, so there should be some
> > sort of setup for them, a backstory, to get the students invested in
> their
> > solution.  For Example - learning comparison operators -- "Sam is a young
> > AI with untrained neural nets and we need to write a module to help train
> > him had to organize two things so he can put them on a shelf in order."
> >  Sounds a lot more interesting than write a function that compares 2
> things
> > and output them in order from smallest to largest. *yawn*
> >
> >
> > So what are your ideas?  What are you willing to help out with?  We'll
> need
> > material reviewers, testers and trainers and TAs for actual classes.
> >
> >
> > I believe someone has offered to be our DoSpace ambassador. Sorry, but I
> > didn't write down your name at the meeting.  Would you speak up once
> again.
> >
> >
> > --
> > Best,
> >
> > Jeff Hinrichs
> > 402.218.1473
> > _______________________________________________
> > Omaha Python Users Group mailing list
> > Omaha at python.org
> > https://mail.python.org/mailman/listinfo/omaha
> > http://www.OmahaPython.org
> > _______________________________________________
> > Omaha Python Users Group mailing list
> > Omaha at python.org
> > https://mail.python.org/mailman/listinfo/omaha
> > http://www.OmahaPython.org
> > _______________________________________________
> > Omaha Python Users Group mailing list
> > Omaha at python.org
> > https://mail.python.org/mailman/listinfo/omaha
> > http://www.OmahaPython.org
> >
>
>
>
> --
> Best,
>
> Jeff Hinrichs
> 402.218.1473
> _______________________________________________
> Omaha Python Users Group mailing list
> Omaha at python.org
> https://mail.python.org/mailman/listinfo/omaha
> http://www.OmahaPython.org
>


More information about the Omaha mailing list