[HN Gopher] I teach Python on the Raspberry Pi 400 at the public...
       ___________________________________________________________________
        
       I teach Python on the Raspberry Pi 400 at the public library
        
       Author : feross
       Score  : 316 points
       Date   : 2021-06-14 13:33 UTC (1 days ago)
        
 (HTM) web link (opensource.com)
 (TXT) w3m dump (opensource.com)
        
       | [deleted]
        
       | fridif wrote:
       | Nice to be teaching students programming for free.
       | 
       | One potential cost optimization is to teach them using pen and
       | paper, visually, especially since "their keyboard skills were
       | rough".
        
         | qiqitori wrote:
         | I'm by no means an experienced teacher, but I think the hands-
         | on approach is the way to go for programming...
        
           | fridif wrote:
           | How can you code if you dont understand what it is you are
           | coding?
        
             | aidenn0 wrote:
             | I learned to code without understanding first, and then
             | came to understand later. I don't know if that's good or
             | bad pedagogy in general, but it worked for me. Maybe a few
             | more people can chime in; the plural of anecdote is data.
        
               | fridif wrote:
               | I'm totally fine with both approaches, but I want to
               | highlight two things the article mentioned:
               | 
               | 1) budget concerns for monitors, computers, keyboards 2)
               | students cant type
               | 
               | I think I could teach an array traversal using skittles,
               | and I could teach binary search using a physical english
               | dictionary.
               | 
               | One would be surprised how much of coding is trying to
               | understand the logic of what is trying to be done. The
               | api call can come after
        
               | drewzero1 wrote:
               | It definitely helped me start to understand sorting
               | algorithms when I tried using skittles and other physical
               | objects I could just move around. Before that it just
               | looked like a magic loop that worked somehow, but
               | afterward I had an idea of what the computer was doing in
               | each step.
               | 
               | Really, all algorithms are better when demonstrated on
               | sweet treats. :)
        
               | fridif wrote:
               | bonus if you get to eat them!
        
       | cochne wrote:
       | I wanted to do something similar! I messaged my local library
       | with a small proposal, but they never got back to me, very
       | disappointing.
        
         | nednar wrote:
         | > I messaged my local library
         | 
         | Suggestion: Talk to the people face-to-face, and have a demo
         | ready. If you tell them you want to do something for kids, in
         | the demo there are free cookies, and besides offering the space
         | they don't have to do anything, then the chance is almost 100%
         | that they jump in.
         | 
         | PS: Some more traditional organizations don't even read their
         | emails at all. So don't take it personally.
        
       | williesleg wrote:
       | I shit on a shingle in San Francisco
        
       | TaylorAlexander wrote:
       | Really great efforts and I appreciate the write up!
       | 
       | If anyone here wants to think more about how to teach computers
       | to children, I highly recommend this video with Seymour Papert,
       | creator of the LOGO programming language and origin of the turtle
       | concept.
       | 
       | https://youtu.be/ZG9cYhekB8A
       | 
       | The complete video series is available here:
       | https://el.media.mit.edu/logo-foundation/resources/onlogo/in...
        
         | ivan_ah wrote:
         | Another good video about technology in education in general.
         | It's old but, insights are timeless.
         | 
         | [ 1995 Technology In Education hearing featuring Seymour Papert
         | and Alan Kay hearing on education ]
         | 
         | https://www.youtube.com/watch?v=0CKGsJRoKKs
        
       | einpoklum wrote:
       | > At the end of the four-day course, each student received a
       | Raspberry Pi 400
       | 
       | So, the number of participants was limited to 5?
       | 
       | I don't know, that sounds a bit problematic. I would have opted
       | for helping students set up a Python environment on their PCs or
       | laptops (and maybe kept the RPi's to students who may not have
       | one; although identifying students in this situation may be
       | tricky)
        
         | noir_lord wrote:
         | > I would have opted for helping students set up a Python
         | environment on their PCs or laptops
         | 
         | You assume that students _have_ a PC or laptop particularly one
         | they can do whatever they want on and that even if they do
         | parents are happy with them installing development tooling on
         | the laptop.
        
           | einpoklum wrote:
           | 1. If you'd read my comment all the way, you would notice
           | that I don't assume they have a PC or laptop.
           | 
           | 2. You mean their parents are Perl or Ruby fanatics and will
           | not stand for Python being installed? ... Somehow I doubt
           | that's an issue.
        
             | gambiting wrote:
             | 2)
             | 
             | Some people have work issued laptops and know nothing about
             | computers. They might be working remotely for a call centre
             | nowadays, very common - so no, you can't install any tools
             | on those. And even if you could I know many parents who
             | wouldn't let their children install _anything_ on their
             | work machines as if that stops working they will get in
             | trouble at work.
        
         | 1-6 wrote:
         | It seems like giving out RPi's seem like the perfect reward.
         | It's tangible and it helps keep environments separate versus a
         | Windows or Mac laptop. Kids can take risks on the RPi by
         | breaking things which is a good learning technique.
        
           | drewzero1 wrote:
           | I do hope the kids can retain any enthusiasm for using the
           | RPis after the course is over, otherwise it might just sit on
           | their shelf doing nothing. That's a bit pessimistic, I guess,
           | but I definitely went through seasons of ignoring tech toys
           | I'd been so excited about initially.
           | 
           | +1 for being able to break things, though. I know I'm way
           | more likely to try risky (and educational!) maneuvers on a
           | spare computer than the one I have to use for (home)work,
           | assuming I even have one.
        
         | matthewowen wrote:
         | Well, why don't you go ahead and do it that way when you decide
         | to run one of these courses?
        
       | [deleted]
        
       | epmaybe wrote:
       | Does anyone have a good recommendation for 'relearning' basic
       | programming practices when you don't have much free time? I code
       | every now and then but my workflow for coding/debugging is
       | terrible now that I've essentially forgotten basic concepts like
       | stacks, breakpoints, unit tests, etc. embarrassed to say I use
       | print commands far too often.
        
         | oatflatwhite wrote:
         | There is no need to be embarrassed about using print commands
         | for debugging. Tried and true method for many decades.
         | 
         | Suggestion: find a problem you want to solve, some small
         | project or fun hack. And just do it. Every time you get stuck,
         | go to google and search for the answer. Spend time looking at
         | multiple responses and take your time rabbit holing and viewing
         | tangential information. The important part is starting the
         | project.
        
         | wirthjason wrote:
         | I don't know the context of your situation but use an IDE with
         | an graphical debugger. Eg. PyCharm. Then you can easily enter a
         | breakpoint and inspect your code, move up and down the stack to
         | see how you arrived at the point, etc.
        
       | themodelplumber wrote:
       | I didn't expect to see it was self-funded. I wonder if that was
       | done in anticipation of red tape, or something else? Anyhow, way
       | to go Don!
        
         | jennasys wrote:
         | It sounded like the purchase of the 5 Pi400s ended up being
         | covered by the library system, but the guy teaching still
         | provided his time and curriculum. I'd imagine getting budget
         | approval for $500 in hardware is a lot easier than getting it
         | for labor. It's good that the library had people there willing
         | to work the system to help make this happen.
        
       | lostmsu wrote:
       | If Pi was chosen for its price, there are quite a few laptops on
       | Ebay, that would have been much cheaper.
        
         | lvturner wrote:
         | Likely, as it was the library that bought them they had to buy
         | via a pre-vetted supplier. Also, if you bought from eBay I'd be
         | quite surprised if your overall time costs didn't multiply.
         | There's something to be said for the Pi's ability to work right
         | out the box without having to do any additional OS
         | configuration.
        
         | abdullahkhalids wrote:
         | The advantage of giving a "toy computer" to a kid is that
         | parents will not freak out if the kid tinkers with it. If a 10
         | year old opens their laptop, even a cheap one, a lot of parents
         | will freak out.
        
         | codetrotter wrote:
         | The Pi also has the advantage of having a huge huge community,
         | so any of the people learning from this person and deciding to
         | get a Pi of their own will be able to find a lot of help online
         | while they are experimenting with the Pi at home
        
         | _ph_ wrote:
         | The value of the Pi is, that it is affordable brand-new. You
         | can buy one or as many as you want and be sure that they are in
         | a perfect working state, no repairs or special set up required.
         | Just having identically machines is of extreme high value, if
         | you are looking not only for a personal item, but something you
         | can rely on for some kind of professional work.
         | 
         | Another nice thing is, that the Pi can boot and work solely on
         | a single micro-SD card. That makes it easy to have any number
         | of install "disks" ready at hand, you don't have to set up the
         | systems hard disk first.
         | 
         | Finally, the Pi gives you a nice set of IO-ports, you can
         | immediately start with any hardware tinkering project.
        
           | ChrisRR wrote:
           | Affordable is relative. Once you factor in a power supply,
           | mouse, mini-hdmi cable and SD card, you're looking at the
           | best part of PS100. And that's if you already have a monitor
           | or can use the TV
           | 
           | There's a hell of a lot of ex office PCs that can run python
           | for much cheaper, if not for free
        
             | rijoja wrote:
             | Yeah but then you have to do the research that you have all
             | the correct drivers and so forth. Also with time things
             | such as harddrives deteriorate. And also by your same
             | logic. If you are able to get computers for free then you
             | would also be able to get the keyboards, mouses and
             | displays for free right?
        
               | ChrisRR wrote:
               | I'm not talking ancient computers. A Core 2 is still a
               | very capable machine nowadays. That age of hard drive is
               | hardly breaking left right and centre
        
             | travisjungroth wrote:
             | If you're a broke kid who knows computers, then old office
             | PC is 100% the way to go. A bike, $20 and craigslist ad and
             | some door knocking will probably set you up by the end of
             | the day.
             | 
             | If you're trying to help other people, something new in box
             | is 100% the way to go. It's not worth the time of gathering
             | and messing with dissimilar hardware.
             | 
             | Both valid strategies. A question of pull vs push.
        
             | _ph_ wrote:
             | Yes, you can get a random PC that is faster than a Raspi
             | for cheaper. But it is a random used PC which you have to
             | individually set up. Not counting that it is much larger,
             | usually not portable and needs more electricity.
             | 
             | The Raspberry Pi 400 is a pretty much usable desktop
             | computer out of the box which you can buy as a complete set
             | for 100EUR new, including a nice book. It is also very nice
             | to use as it is compact, very portable and doesn't need
             | more than an USB power supply.
             | 
             | In comparison it is very easy to grab an used screen, as
             | the screen doesn't need to be set up. In addition, the Pi
             | works well with a current TV. Brings back the best of the
             | home computer age in the 80ies.
        
               | dhicks6345789 wrote:
               | I'd agree that, in a teaching context, it's vital to have
               | a consistant hardware / software experience - especially
               | with beginner users, even different keyboard layouts are
               | going to cause confusion. The Pi 400 is a great device,
               | nice and compact - if you get the starter kit you just
               | need to add a monitor / TV. That does somewhat assume
               | someone has a bit of room, though - some space to plug in
               | to what might be a shared TV. The really nice thing about
               | Raspbian is that is does actually work on older laptops
               | (with a couple of catches - no free Matlab), so, if you
               | have an older laptop available and can spend a bit of
               | time setting it up, you can give someone a very similar
               | experience on a more all-in-one device.
        
             | sleepybrett wrote:
             | But also now you have to try and fix up five rando laptops
             | that you got off ebay or friends. Who knows what the state
             | of the batteries, screens, keyboards are.
             | 
             | The pi400 kit is $100. Flash five cards and you are done.
             | If you scavange anything it's monitors, there is a whole
             | aisle old flatscreens at my local goodwill, you could find
             | decent enough ones for under $20 apiece. Alternatively any
             | local techish business probably has a closet of monitors
             | they would happily give away just to get them out of the
             | building.
        
             | justin66 wrote:
             | > There's a hell of a lot of ex office PCs that can run
             | python for much cheaper, if not for free
             | 
             | There are plenty of places that would donate to a cause
             | like this. Or to anyone willing to cart the stupid hardware
             | away, regardless of the cause. It is only "free" if one
             | considers their time - and somehow, the gasoline they buy -
             | to be worthless. The hours spent soliciting offers, picking
             | up hardware, performing admin and tech tasks on old
             | hardware, recycling the hardware that doesn't work, rinse
             | and repeat would better be spent preparing a curriculum for
             | the children.
             | 
             | Seriously, how does the above process not sound like hell
             | to you?
        
         | Cthulhu_ wrote:
         | You get what you pay for though, you don't need to spend hours
         | cleaning up someone else's grubby old laptop, and it's a
         | consistent and open source system.
        
           | wwe4323434 wrote:
           | Chances are you don't have to spend hours cleaning up an used
           | laptop. 15 minutes should be sufficient to get rid of dust
           | and upgrade memory of an old Thinkpad for example.
           | 
           | I agree about the open source part though, Raspberry Pi is a
           | good fit for teaching purposes.
        
             | p410n3 wrote:
             | > chances are
             | 
             | There you have it
        
             | _joel wrote:
             | Not in my experience. In fact one in particular would have
             | been more suitable for the furnace.
        
       | pgroves wrote:
       | The nice thing about programming on a RaspberryPI is that the
       | only websites that are light enough to use are Google,
       | Stackoverflow, Github, ReadTheDocs, etc. If you try to check
       | Reddit/Twitter/Facebook you get frustrated with how slow they are
       | and go back to the text editor.
        
         | 1-6 wrote:
         | I get your point but I recently bought a RPI with 8GB RAM.
         | Although it is in no way comparable to a modern Celeron or
         | Pentium, SBC's are already to the point where they can
         | sufficiently be used for web browsing.
        
         | sombremesa wrote:
         | What about HN?
        
       | jll29 wrote:
       | Great post. And kudos to the groundbreaking work by Eben Upton
       | and others in Cambridge, for giving the Raspberry PI to us so
       | this kind of effort can now happen anywhere in the world at
       | minimum cost.
       | 
       | PyTurtle is a great library for educational use - I used it to
       | teach 11-year-olds in Scotland how to draw a house. The approach
       | take was: instruct pupils to draw a house on paper, using only
       | straight lines; teach them briefly what a coordinate system is
       | (assigning numeric addresses - pairs of numbers - to points),
       | which they haven't had in their maths curriculum at that stage,
       | but which they easily picked up; translate the paper-based house
       | into a sequence of PyTurtle Python commands.
        
         | mathgenius wrote:
         | But turtles do not use coordinates, if anything they use
         | (relative) polar coordinates ... Oh, maybe you first
         | coordinatize the house drawing and then make turtle commands
         | from that? It seems that turtle programs don't need any
         | mathematical priming....
        
           | gorgoiler wrote:
           | from turtle import *         goto(20, 0)         goto(40,
           | -30)         # etc
           | 
           | turtle.py first introduced by G van Rossum in 1998.
        
           | jacquesm wrote:
           | Polar coordinates are coordinates too, and besides they can
           | use cartesian coordinates as well as long as you use 'up',
           | 'down', 'right' and 'left' commands, after all the fact that
           | they are relative doesn't really matter all that much.
        
         | pjmlp wrote:
         | While the achievements on PI cannot be denied, BeagleBoard
         | happened in 2008, Panda Board appeared in 2010, while PI exists
         | since 2012.
        
       | int_19h wrote:
       | Nice to see turtle graphics mentioned in this context. Back when
       | I learned to code, it was one of the more common teaching
       | techniques, and I still believe that it's one of the most "hands
       | on" ways to explain loops, recursion etc.
       | 
       | As far as development environments - have you tried Thonny
       | (https://thonny.org/)? It has some nice features in it that are
       | specifically geared towards explaining how things work. For
       | example, when you debug, you can step through subexpressions, and
       | their values are automatically substituted _in the editor_ as
       | they are computed.
        
         | curryst wrote:
         | I might be odd here, but my intro to Python was with turtle
         | graphics and I _despised_ it. My spatial sense is rather poor,
         | and having to translate between code and Cartesian coordinates
         | and vice versa was a heavy mental overhead.
         | for x in range(0, 10):             print(x)
         | 
         | Is way clearer to me than having to draw circles or lines and
         | then manually calculating the Cartesian coordinates I _should_
         | have hit to make sure it 's actually doing what I want.
         | 
         | Likewise with pretty much all of the constructs. It's easy to
         | understand a function that sums a list of ints, and it's easy
         | to check. It's much harder for me to grok and check a function
         | that draws circles at a list of Cartesian coordinates. A
         | recursive Fibonacci sequence is easy for me to grok; just have
         | it print out the values it's using at each loop. A recursive
         | function to draw fractals is going to take me forever to figure
         | out what recursion is actually _doing_. I can see that it
         | changes, but figuring out how /why or why I would ever want to
         | use it is really difficult.
         | 
         | I think it's just too much of an abstraction for me. Code ->
         | numbers -> coordinates -> image is too many indirections for me
         | to follow. When I wanted something "hands on", I usually
         | defaulted to consuming APIs. It's really not much harder to
         | install a Reddit API client and use it. It gives me something I
         | can check, it's something I would actually want to do, and it's
         | practically infinitely extensible.
        
           | int_19h wrote:
           | I'm not quite sure I follow; isn't the whole point of
           | _turtle_ graphics to not have to think about Cartesian
           | coordinates, but rather in terms of  "move that far" and
           | "turn that much" (at least initially)?
           | 
           | Or do you mean the other way around, as in, you start with an
           | image of the end result in your head that's defined in terms
           | of coordinates, and then you had to write the move/turn code
           | that achieves that? I can see how that would be quite
           | frustrating; but if you are already thinking in coordinates
           | throughout, then you don't need the "turtle" part anymore -
           | but you can still do graphics.
        
           | daniellarusso wrote:
           | What age were you introduced to Python?
           | 
           | Explaining what range() does to elementary age children seems
           | interesting.
        
           | aidenn0 wrote:
           | I've never taught turtle graphics in python, but in Logo,
           | Cartesian coordinates are seldom used. It's mostly relative
           | movement, which is far more intuitive
        
         | StavrosK wrote:
         | Thonny looks great, thanks for the tip! I've had friends who
         | had trouble understanding how return values work, this would
         | help!
        
           | jacquesm wrote:
           | That's a nice way to show functional programming as well: by
           | showing the inside-out nature of transformations of input.
        
         | sleepybrett wrote:
         | Back in the 80s I took a summer school class offered by the
         | district in 'computer programming' which was about half logo
         | half applesoft basic. The school even had a little 'turtlebot'
         | driving pen plotter bot, tethered to one of the //e's by what I
         | assume was a serial cable.
         | 
         | If your logo program was particularly cool the teacher would
         | print your program out on the little dot matrix printer and
         | project it up on a screen using an opaque projector and step
         | through it line by line while the little robot drew it out on a
         | piece of butcher paper.
         | 
         | Probably one of the early experiences that made me love pen
         | plotters.
        
       | [deleted]
        
       | cjohnson318 wrote:
       | Does anyone have thoughts on starting kids on manipulating CSVs
       | or xlrd, instead of turtle?
       | 
       | I was exposed to turtle graphics in school when I was a kid, but
       | I wasn't impressed. I thought there was a huge gulf between
       | turtle graphics and actual programming. It wasn't until 20 years
       | later that I realized there wasn't a huge gulf, I was just one
       | module away from doing real things. When I figured out how to
       | process data, and do useful things, it blew my mind.
        
         | cushychicken wrote:
         | >I was exposed to turtle graphics in school when I was a kid,
         | but I wasn't impressed
         | 
         | I think most kids would say the same thing about manipulating
         | spreadsheets.
         | 
         | I would have. Spreadsheets are fucking boring. Hell, I _still_
         | think spreadsheets are fucking boring.
         | 
         | The only reason that modifying spreadsheets is exciting to me
         | is because of how much time automating the modifications saves
         | me.
        
       | amatecha wrote:
       | FWIW if you are operating on an extremely small budget and want
       | to do something like this, you can definitely hit up your local
       | thrift shops (or craigslist) for very cheap used monitors. I know
       | that doesn't get you the Pi systems, but new monitors can be
       | quite pricy.
        
         | ChrisRR wrote:
         | FWIW you can probably find a hell of a lot ex office PCs for
         | free
         | 
         | I do admire the raspberry pi project for their work, but for
         | just programming simple python projects, any 15 year old core 2
         | duo will work and people can't get rid of them fast enough
        
           | rtpg wrote:
           | Yeah but then you're in the "manage a bunch of really old
           | hardware" business.
           | 
           | RasPi have that consistency factor and the "game boy" factor
           | of kinda being able to throw one against a wall and for it to
           | work.
           | 
           | It's not the best programming experience but at least it'll
           | be consistent. (Part of this is a Python problem tho tbh.
           | Every Django Girls thing is half "go through the code" and
           | half "try to figure out what weird situation your computer is
           | in", even for Macs)
        
             | TheOtherHobbes wrote:
             | But that's a fair representation of both computer ownership
             | and real programming.
        
               | paulcole wrote:
               | The ones who get bit by the programming bug have their
               | whole lives to be annoyed by the hassles of computer
               | ownership, upgrades, etc.
               | 
               | But most won't keep programming, so I think it's smart to
               | at least keep this class focused on its purpose, which
               | isn't to see who can get most frustrated by their decade
               | old Dell tower.
        
               | ChrisRR wrote:
               | A decade isn't exactly a long time. That's still a
               | windows 7 machine with an i5
               | 
               | Or just wipe it and throw ubuntu on it
        
               | paulcole wrote:
               | Let's say there are a dozen kids in the class. The
               | library provided the monitors. How does the volunteer
               | teacher get a dozen towers to and from the library? What
               | do they do with a dozen towers in between classes? Would
               | this be easier or harder with a dozen Pi 400s?
        
               | drewzero1 wrote:
               | This is the real strength of the Pi 400 for this
               | application: sure you could do it all cheaper with used
               | office hardware, but it turns this "just works" intro
               | class into a full advanced IT course (or a full-time IT
               | job for the volunteer teacher).
        
               | turpialito wrote:
               | If you want the RPi look and feel &/| if you happen to
               | have said PCs lying around &/| buying brand-new Pi's is
               | not an option, you can get Raspberry Pi OS for x86.
        
               | zachrose wrote:
               | Get them to yearn for the sea and they'll Google around
               | trying to figure out why Nokogiri won't compile on their
               | own
        
               | rtpg wrote:
               | The fact that real programming is a mess isn't like...
               | important! It's entirely incidental and almost entirely
               | due to this kind of attitude of "well I got it working on
               | my machine" that slows down making real progress
               | 
               | Not to mention that all this futzing around is usually
               | indicative of leaky abstractions up the wazoo.
               | 
               | There are hard things in programming, sometimes. It's
               | hard to write iterative quick sort without introducing
               | off-by-one bugs. But most shit is easy, and a lot of
               | hardness is around just busted tooling.
        
             | skrtskrt wrote:
             | > Part of this is a Python problem
             | 
             | Yeah it is kind of annoying that the language that's going
             | to be best for instructing kids/beginners has such a
             | terrible ecosystem that will put kids in such frustrating
             | PITA positions getting the environment right.
        
             | swiley wrote:
             | >even for Macs
             | 
             | In many ways Apple is making this kind of thing harder and
             | not easier.
        
           | userbinator wrote:
           | Don't forget the fact that standard PCs are _very_ well-
           | documented too. Instead of teaching on proprietary barely-
           | documented systems, choose one that has decades of
           | documentation and a huge software /hardware ecosystem.
        
         | Pxtl wrote:
         | Off lease refurbishers generally have old 1440x900 monitors in
         | bulk, although in COVID world they're pretty picked over as
         | everybody working remote has grabbed one or two.
        
       | one_off_comment wrote:
       | I'd love a list of the materials the author is using for their
       | standard work stations. I'm particularly curious about the
       | "inline power adapters". I see in one of the pictures each one
       | has a little black brick. Looks like maybe a USB hub or
       | something? The Raspberry Pi 400 already has 3 USB ports.
       | 
       | I'm speaking as a daily Raspberry Pi 400 user. I've tried one of
       | those USB hub things with power pass-through that I use for my
       | Mac Book Pro, but it didn't work with my RPi400.
       | 
       | Always up for hardware tips for improving my Pi situation.
        
         | one_off_comment wrote:
         | Oh, maybe it's an HDMI to VGA adapter?
        
         | sleepybrett wrote:
         | I bought a little raspberry pi kit off amazon the other day to
         | run retropi on. It came with a usb-c wall wart and a little
         | usbc-usbc adapter with a power button on it. It looks like the
         | one i'm seeing in the plastic bag in the picture.
         | 
         | https://www.amazon.com/CanaKit-Raspberry-4GB-Starter-Kit/dp/...
         | 
         | Top middle.
        
       ___________________________________________________________________
       (page generated 2021-06-15 23:02 UTC)