October 11, 2018: uQR: Generate QR Codes in MicroPython

This last week I ported the python-qrcode library to MicroPython. The result is uQR!

Porting python-qrcode to MicroPython involved:

  1. Removing libraries unavailable in MicroPython.
  2. Rewriting syntax that is unavailable in MicroPython.
  3. Removing Py2/Py3 cross-compatibility code.
  4. Removing QR code image generation.
  5. Rewriting recursive function calls into loops: MicroPython has a much shallower recursion limit than CPython.
  6. Consolidating all of the code into one file, for easier MicroPython deployment.

The result:A microcontroller connected to a miniature LED display, depicting a QR code.

Due to memory limitations, I can only create small QR codes on the ESP8266 microcontroller. But I’m getting an ESP32 and a slightly larger screen: I’d like to make a project and video about accepting lightning network payments with the ESP32.

September 6, 2018: Flying Cars – First Assignment

I just completed my first assignment in the Udacity Flying Car Nanodegree program.

Simulated drone flying in a square.

The task was to fly the drone in a square, and although there was no modeling of the physics of flight or sensors in the assignment, there was the challenge of programming the flight computer in such a way that competing goals (like collision avoidance) could flexibly assume control under appropriate conditions.

My solution is in GitHub, but here’s a sample of my writeup:

Autonomous flight is goverend by two sets of interacting control loops. The autopilot loop is responsible for low-level maintenance of flight goals. Its responsibilities are analogous to the “aviate” in “aviate, navigate, communicate”. Specifically, the autopilot has direct access to the flight sensors and GPS and can maintain station, or be programmed with and achieve a particular heading or destination.

The autopilot loop consists of:

  1. control inputs made by the autopilot upon the craft’s flight surfaces or motors
  2. the motion of the craft as effected by those flight surfaces or motors
  3. the readings of the craft’s sensors, as effected by the motion of the craft
  4. the new control inputs made by the autopilot as effected by its readings of its sensors

Read the rest of my writeup at GitHub…

August 12, 2018: Creating GitHub Repositories at the Command Line

I like programming in vim. But when I want to share a new project with the world, I have to fire up a web browser in order to create a new repository in GitHub.

No more. I dug into the GitHub API literature and found that you can create a repository by POST request to their RESTful web API. For example, you can  create a GitHub personal API token with at least the “public_repo” scope and then:

curl -u YOURGITHUBUSERNAME:YOURPERSONALAPITOKEN --header "Content-Type: application/json" --request POST --data '{"name": "test-repo"}' https://api.github.com/user/repos

See the API documentation link above for a full list of optional data that you can send to this endpoint. And of course, you can use any HTTP tool to send this request, curl is not required.

To make the process smoother, I added the following variables to my environment:

export GITHUB_CREATE_REPO_API_KEY="YOURPERSONALAPITOKEN"
export GITHUB_USERNAME="YOURGITHUBUSERNAME"

And then created the following shell script:

#!/bin/sh

curl -u $GITHUB_USERNAME:$GITHUB_CREATE_REPO_API_KEY --header "Content-Type: application/json" --request POST --data "{\"name\": \"$1\", \"description\": \"$2\"}" https://api.github.com/user/repos

With that script in my PATH, the command mkgithubrepo data-structures-exercises "Various data structures implemented in Python and C." creates a GitHub repository at https://github.com/JASchilz/data-structures-exercises with the description “Various data structures implemented in Python and C.”

March 19, 2018: Legendary Octo Sniffle 3D Printer Design Project

I’ve built a couple of 3D printers from kit. For me, a “3 hour” or “8 hour” assembly turns into 10 hours or 24 hours. I began to wonder: how could you design a printer with the easiest and quickest assembly?

The Legendary Octo Sniffle project is an answer to that question! It’s a delta printer under design, featuring a lead-screw drive and magnetic effector joints.

I have a few former students and coworkers who are interested in getting into 3D printing, so we’re getting together to design the printed parts.

See the Legendary Octo Sniffle design repo on GitHub.

Depiction of a simple effector carriage/sled.
Depiction of a simple effector carriage/sled for the Legendary Octo Sniffle.

February 21, 2018: My OMSCS Admissions Statements

Last year,  I applied to Georgia Tech’s Online Masters of Computer Science program. I’m now enrolled in my second semester; in my experience the program provides an excellent education and is an excellent match for my needs. But I’m not writing about the virtues of the OMSCS.

The application asks you to author two statements: a background statement and a statement of purpose. I sometimes visit the OMSCS subreddit—an excellent resource for anyone considering the program—and think over my experience with the admissions process. My statement responses and approach were a bit unconventional, but they didn’t disqualify me. I’m sharing them here for anyone exploring the long tail of Google advice for getting into the program.

Statement of Background

As I understood it, OMSCS admission is not competitive: they’ve employed an educational platform that scales, and would like to admit all who are qualified to study on that platform. I can’t find an official quote to that effect, so take it as heresay, but it’s the assumption that I base the rest of this post on.

Given that, Georgia Tech’s first question is, “Are you prepared for the program?” You answer this question in the background statement. Here’s their instruction:

Please describe your background (academic and extracurricular) and experience, including research, teaching, industry, and other relevant information.

And my response:

GENERAL

* Programming for 20 years, starting with language C.
* Picked up PHP, Python, and other languages as ideas or projects arose.
* Four year enlistment in the Marines.
* Achieved transfer admission to University of California, San Diego, towards goal of becoming a high school mathematics teacher.
* Minored in Mathematics, majored in Cognitive Science, with focus on theoretical neuroscience and machine learning. Graduated Cum Laude.
* Developed and analyzed behavioral experiments in MATLAB while working in a theoretical neuroscience lab, benchmarking results against Bayesian optimal models.
* Presented poster at Neuroscience conference.
* Taught high school math for two years in tribal, southwest Alaska.
* Formed company to develop educational software with machine learning component, in Python and Django.
* Now work as a web developer for the University of Washington, Office of Enrollment Information Services. Enroll in computer science and mechanical engineering courses from the University on lunch breaks.
* Teach Python to adult learners through the University's continuing education program.

CURRENT HOBBY PROJECTS

* 3D printer, built from kit.
* An interpretter/REPL for Bitcoin's internal programming language, built in JavaScript.
* Arduino programming, to include a networked alarm clock and networked thermostat.

RELEVANT COURSEWORK

* Natural Computation I (Machine learning via Bishop, plus applications in theoretical neuroscience, UCSD)
* Natural Computation II (Bayesian modeling in theoretical neuroscience, UCSD)
* Programming Languages (University of Washington)
* Data Abstractions (Data structures, concurrency, parallelism, and algorithms, University of Washington)
* Systems Programming (University of Washington)
* Operating Systems (Currently enrolled, University of Washington)

TEACHING

* High school mathematics, Yupiit School District, Alaska
* Python Internet Programming, University of Washington Continuum College.

Headings and bullet points. My experience with reading cover letters and resumes is that you get about ten seconds to convey your story to the person reading your application: your reader will glance over your application for about ten seconds before throwing you into either the “hard no” pile or the “maybies”. And did you read through the list? Or did you only take a few seconds to glance over it? If you only glanced, did you get a rough idea of a story from it?

I’m sure that the Georgia Tech admissions process is more holistic than a glance at your background statements, but I think that this list does convey a story to a ten-second scan.

Aside from listing the courses that I took in preparation for the program, I also wanted to answer some questions that might be raised by the rest of my application. I’ve picked up a lot of experience from different places: before and after the Marines, courses taken online and in person from community colleges in preparation for a transfer application, continuing education courses related to my Alaska teaching certificate. In the background statement, I wanted to put the story together: he transferred to UCSD to become a math teacher, and while he was there he did cognitive science research; he taught in Alaska, then followed up on that machine learning experience to develop educational software; now he’s programming for the University of Washington, taking classes, and teaching adults.

It’s a much tighter story in bullet points than I remember it in real life! And I’d like to say that if you had only looked over that list for ten seconds, you’d have picked up the highlights.

Nowhere in the application does it say that your description of your background has to be an essay. Use whatever format best answers the question of whether you have qualified yourself to join the program. In many cases, a list is the quickest way to answer that question with a “yes”. If you’re a marginal candidate trying to explain a 2.95 GPA with a story about challenge, perseverance, or growth then you might be able to best tell that story with an essay. In any case, choose the medium that suits the message.

Statement of Purpose

After answering whether or not you’re qualified to join the OMSCS, Georgia Tech will want to know whether your goals are a fit for the program. You address this in the statement of purpose:

Please give a Statement of Purpose detailing your academic and research goals as well as career plans. Include your reasons for choosing the College of Computing as opposed to other programs and/or other universities.

In effect, “Why Georgia Tech? Why the OMSCS?” or, “Will you be satisfied with your enrollment in this program?” My response:

In the next five years, I want to begin working on mission-critical aerospace software running close to the hardware.

The projects and companies that inspire me are constructing physical devices with semi-autonomous operation. For example, I'm working on a 3D printed, GPS guided autopilot for my sailboat. Most of all I want to work in aerospace, and I'm pursuing a master's degree to build the credentials and skills I need to begin programming real time control systems for that industry.

The OMSCS obviously presents the best combination of value, cost, and convenience for a working professional. For me personally, as an aspiring aerospace engineer, I hope that the program will yield an opportunity to work on a project that takes advantage of Georgia Tech's outstanding School of Aerospace Engineering.

You can use up to 4000 characters. I could have typed more, but I think that that would have obscured my answer: this thing that I want for myself is definitely something that Georgia Tech can help me achieve. Fewer words make it easier to see this at a ten-second glance.

Conclusion

I don’t think that my application really hinged on my application statements. I didn’t write them thinking that I had the burden of convincing anyone that I was qualified to join the program. My goal was to provide a story that led the reader through my application materials, a story that could be read at a ten-second glance.

It goes almost without saying that you shouldn’t reuse these materials directly for your own application. But I hope I’ve provided some inspiration!

November 29, 2011: Projects Added

Faces

A machine-learning driven art project, inspired by a hallucination, producing images from algorithms similar to those our cameras use to detect faces…Read More

A Python MUD

An as-yet untitled Python MUD base atop the Miniboa telnet server library…Read More

XPR

A toolkit for running psycho-visual experiments in Matlab…Read More

A Modern Trivium

Modern education does not teach us how to think, and only barely teaches us how to learn. In contrast, Medieval formal education began with these very topics, taught via the Trivium. I’m interested in combining the Trivium with models of self and group driven education…Read More