10 ms·
I teach Python on the Raspberry Pi 400 at the public library
- deleted 5y ago[deleted]
- themodelplumber 5y agoI 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 5y agoIt 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 5y agoIf Pi was chosen for its price, there are quite a few laptops on Ebay, that would have been much cheaper.
- lvturner 5y agoLikely, 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.
- codetrotter 5y agoThe 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
- Cthulhu_ 5y agoYou 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 5y agoChances 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.
- _ph_ 5y agoThe 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 5y agoAffordable is relative. Once you factor in a power supply, mouse, mini-hdmi cable and SD card, you're looking at the best part of £100. 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 5y agoYeah 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 5y agoI'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
- AndresNavarro 5y agoI think you are missing the point. Doing that for one machine for yourself: easy, cheap, maybe even fun. Doing that for 5-10 unknown machines for other people to use in a class... Each may be different, you have to setup each one, they may fail or misbehave at any moment, even during class... Not my idea of easy, cheap or fun. Talking from experience in exactly that kind of situations, working with donated hardware in a school setting.
- abdullahkhalids 5y agoThe 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.
- deleted 5y ago[deleted]
- amatecha 5y agoFWIW 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.
- Pxtl 5y agoOff 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.
- ChrisRR 5y agoFWIW 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 5y agoYeah 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 5y agoBut that's a fair representation of both computer ownership and real programming.
- paulcole 5y agoThe 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.
- int_19h 5y agoNice 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/ 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.
- StavrosK 5y agoThonny looks great, thanks for the tip! I've had friends who had trouble understanding how return values work, this would help!
- jacquesm 5y agoThat's a nice way to show functional programming as well: by showing the inside-out nature of transformations of input.
- curryst 5y agoI 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.
- einpoklum 5y ago> 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 5y ago> 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 5y ago1. 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 5y ago2) 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.
- matthewowen 5y agoWell, why don't you go ahead and do it that way when you decide to run one of these courses?
- 1-6 5y agoIt 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.
- jll29 5y agoGreat 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 5y agoBut 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....
- jacquesm 5y agoPolar 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.
- gorgoiler 5y agofrom turtle import * goto(20, 0) goto(40, -30) # etc turtle.py first introduced by G van Rossum in 1998.
- pjmlp 5y agoWhile the achievements on PI cannot be denied, BeagleBoard happened in 2008, Panda Board appeared in 2010, while PI exists since 2012.
- TaylorAlexander 5y agoReally 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 https://youtu.be/ZG9cYhekB8A The complete video series is available here: https://el.media.mit.edu/logo-foundation/resources/onlogo/index.html https://el.media.mit.edu/logo-foundation/resources/onlogo/in...
- ivan_ah 5y agoAnother 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 https://www.youtube.com/watch?v=0CKGsJRoKKs
- TaylorAlexander 5y agoWow I’ve so far just watched the beginning with Papert but that is really good. Really got me thinking about how to teach robotics in “robotics land”. I’ve sort of done that once before but it would be great to do more.
- fridif 5y agoNice 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 5y agoI'm by no means an experienced teacher, but I think the hands-on approach is the way to go for programming...
- fridif 5y agoHow can you code if you dont understand what it is you are coding?
- aidenn0 5y agoI 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 5y agoI'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 5y agoIt 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. :)
- deleted 5y ago[deleted]
- epmaybe 5y agoDoes 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.
- wirthjason 5y agoI 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.
- oatflatwhite 5y agoThere 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.
- cochne 5y agoI wanted to do something similar! I messaged my local library with a small proposal, but they never got back to me, very disappointing.
- nednar 5y ago> 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.
- pgroves 5y agoThe 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.
- sombremesa 5y agoWhat about HN?
- 1-6 5y agoI 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.
- one_off_comment 5y agoI'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 5y agoOh, maybe it's an HDMI to VGA adapter?
- sleepybrett 5y agoI 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/B07V5JTMV9/ref=sxts_rp_s1_0?cv_ct_cx=raspberry+pi+kit&dchild=1&keywords=raspberry+pi+kit&pd_rd_i=B07V5JTMV9&pd_rd_r=c017f5cd-c74f-45ea-a2df-07ade9972338&pd_rd_w=fVROZ&pd_rd_wg=BoeoH&pf_rd_p=e64e557a-9088-4af1-8992-8ddbd7854c7f&pf_rd_r=EJ1XZA45BFW139JQ0K3C&psc=1&qid=1623775962&sr=1-1-f0029781-b79b-4b60-9cb0-eeda4dea34d6 https://www.amazon.com/CanaKit-Raspberry-4GB-Starter-Kit/dp/... Top middle.
- cjohnson318 5y agoDoes 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 5y ago>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.
- williesleg 5y agoI shit on a shingle in San Francisco