Tuesday, November 21, 2017

Teaching Computer Science



Disadvantaged students face a wide range of problems on a daily basis which they must navigate before they ever have a chance to enter the classroom. As a veteran teacher in the Cleveland Municipal School District (ranked 602 out of 608 in the state) I witness first-hand how my students face poverty, hour long commutes (one way) to school on public transportation, and persistent threats to their safety.

I'm lucky to teach in a specialized STEM-centric school. If my students were at a different high school in the district it's possible that they would go through their day without even touching a computer. And if they DID have access to a computer, it would be ancient technology locked down by antiquated and often-misguided IT governance.

By contrast, at my school all of the 11th graders take my computer science class, where they learn to program Python on Raspberry Pi computers. Nothing is locked down (unless I, the teacher, wants it to be locked down).

Learning to program hits so many educational benchmarks. Critical thinking is a huge aspect of programming. The programming projects in my class help students exercise those critical thinking skills that also help out in other classes. And while not a substitute for reading, writing, social studies, and mathematics, all of these subject areas play key roles in in my class.


Python's simple syntax makes it the ideal programming language to teach. More than any other language I've encountered, which admittedly isn't much, Python code is readable and writable. Struggling students still find that the examples make sense, and advanced students can go ahead at their own pace. It may be possible that Python is helping my students graduate from high school, and ultimately save them from a life a poverty.

Friday, November 3, 2017

PiNet DHCP Configuration

I want to thank Leon Adato, monitoring guru, for his help on this project. This answer on askUbuntu was also helpful.

Background


A few years ago I proposed a new computer lab idea to my principal. Instead of purchasing all new equipment which would have costs ten-of-thousands of dollars, my proposal costs less than three thousand. Instead of standalone desktops or laptops, I used Raspberry Pi's and hand-me-down monitors, keyboard, and mice. The lab is fantastic, and it's capable of 97% of all the things that a traditional computer lab could do (assuming no proprietary software).

I didn't want students to lose their work or fight over which computer they were working on, so I decided to install PiNet, a project based on LTSP, which allows for network booting. 

The only problem that I came across with PiNet was that students were not able to access the internet, even if the server was connected to the wifi and the wired network at the same time. I had to find a way to share the wifi with the Raspberry Pi's. 

DHCP

A DHCP is needed on the server in order to hand out IP addresses to the Pi's. PiNet documentation has you use a router connected to your switch to act as a DHCP, but this won't allow you to share the wifi connection (at least I wasn't able to figure it out). This is how I installed the DHCP on the server and shared my wifi connection with the students' Pi's.

Install and Configure DHCP

First gather your network information with

ifconfig

Take note of what your wifi IP address because you don't want to chose an IP for your local network that conflicts with your wifi network. On my computer this the sections that's under wlps03. My IP starts with a 172.

Now install DHCP server.

sudo apt-get install isc-dhcp-server


After the install you need to configure the DHCP:


sudo nano /etc/dhcp/dhcpd.conf


This is what you'll see


Uncomment the line that says "authoritative" then a little further down you'll configure your DHCP details.


Since my wifi IP starts with 172, I chose to use 192.168.... for my local network. Netmask of 255.255.255.0. The second line tells the DHCP which IP numbers to hand out. I chose .10 through .40 because I have 25 Pi's that need IP addresses, so I figured 30 IPs would be a good number.

Hit ctrl-o to save. You'll be prompted for the filename, just hit ENTER. Exit the program by hitting ctrl-x.

Next week need to set the IP address of the server. Go to the network manager for this.

Select the Wired Connection, and edit. Under IPv4 Settings set the method, "Shared to other computers", then click back on the Connection name and SAVE.



Upon going back to your PiNet main menu you'll see your new IP address. My IP is 10.41.0.1


Make sure you change the SD cards' so that the IP in cmdline.txt matches the IP at the top of the PiNet screen.

Boot and enjoy your wifi!

Opinion: Rails vs. Django

 Opinion: Rails vs. Django Disclaimer: This is an ongoing piece. I'm probably going to be adding to it as time goes on. So I spent ...