Learning project 2: What's different

In this post, I’d like to talk about what’s different between this project and other similar things I’ve seen. I haven’t seen everything (by a long shot), and I certainly would love to see more prior art posts — I’ve now at least glanced at all the ones mentioned in the comments to the last post, though it’s been a while since I looked at the Kahn Academy, and that’s probably the closest to what I’ve got in mind.

Mo’ money, mo problems

A lot of the replies to the previous post asked if this is a commercial project or a hobby/personal one. This is very much a noncommercial project. I wouldn’t mind if it brought me money, fame, and the adoration of the masses, but that’s not a major motivation. I don’t want to teach sales-people for some great faceless company how to sell more protection plans for small electronics. I want to teach everybody whatever they want to know, and it’s the people who have the least money (but the most free time) who can use something like this the best. Ideally, the same system will have a wide variety of knowledges in all sorts of different fields — you shouldn’t have to have 27 accounts at 27 different online academic institutes to get a rounded education.

Content & Uncontent

Of course, any system needs content, which is one of the reasons I’m not focusing on content directly. I don’t want to put lessons in this system, and certainly not courses (more on that later). I want to put links to content in. There are plenty of resources for learning things in the world already, the hard bit is finding ones that are right for you — that don’t assume knowledge that you do not have, and don’t teach you things that you already know. Linking to tutorials & lessons means that we don’t have to reinvent those wheels.

Bragging Rights

It’s not hard to find quizzes on the internet. In fact, it’s hard to use the internet without coming across 10 million quizzes, most of which tell you what disney princess you are, or something similarly useless. A large part of the remainder are useful only for bragging rights. While I’m sure you could use your scores in this system to brag with, that’s not what I want to focus on. Rather, the questions we ask are a way of pinning down what we think you know and don’t know, in order to help direct your experince. The scores we give aren’t there for bragging about, but informing you and letting us guide you.

Courses vs Lessons

Most e-learning platforms seem to take the classroom experience and either replicate it online, or help it go smoother in real life. That is, you are a student, you enroll in a course, you watch lectures, do tests, and at the end, you (hopefully) get a thing that says “congratulations, you passed”. That system was developed in order to make administration easier and teaching parallelizable. Those aren’t really concerns of ours. When you take a course, especially when it’s not an intermediate one of a linked series of courses (IE, inside a university), you often end up sitting through many lessons which are designed to get everybody on the same page before the meat of the course starts. In some cases, you will discover at the end that you really knew almost all the material, and you just wasted your time, and in the case of a real university, quite a lot of your money. If we administer on much smaller scale — every lesson — then we waste less of your time. Of course, if you are a single teacher in a one-room school-house, you can’t do that — you’d spend all your time keeping the log-books up to date, and trying to teach 30 different kids 30 different lessons all at the same time. Our educational system grew out of that, and hasn’t caught up yet.

Smart Statistics

Ideally, I’d like a large portion of this thing to be self-curating (that’s something that will hopefully get added shortly after the very basics are in, and improve slowly over time). To do that requires much smarter scoring then the majority of online quizzes, which count all questions as equal. There will need to be a complex network of interactions between questions, knowledges, tutorials, and students, in order to improve upon our initial guesses as to what is harder, what is required for a tutorial to work well, and what it teaches. I’m currently thinking that Item Response Theory (thanks for the link!) is an excellent place to start from — probably the two-parameter form, since it seems a happy medium. That should allow us to be smart, at the least, about knowing what question to ask next.

Learning project: introduction

Past & Prologue

So, one of the great projects that have been rattling around in my head for some time has recently come back into the front burner of my brain again: computer-assisted learning. Jess has more or less been constantly thinking of this for the last decade+, from a rather different viewpoint — the writing of documentation and tutorials, especially around DBIx::Class and Catalyst. I think my current ideas are worthy of implementation, and I think that without building an active community around them, the project will falter, and that’d be a shame. So, enough of the past / prologue for the moment…


The basic idea goes like this: first, ask questions to determine what the student does and does not know.
Then, point them at something to read or watch, which requires only things that they do know, and will teach them things that they do not know. Now, since that basic idea is a bit … vague, a more detailed, and less formal English sketch of the system will follow.


1: Knowledges. Knowledges are things like “conjugation of Latin verbs”, “how to spell conjugation”, “SQL data definition language”, “sines that you should remember while doing trig”. Rather specific things that a reasonable human can learn in 15 minutes, if they understand the other knowledges that it is based on.

2: Questions. Questions are how we assess knowledges. Each question has, in addition to the obvious, a set of knowledges that it is related to, with strengths. When a student gets a paticular question right, we are more confident of their knowledge in each of the related categories. Contrarywise, if a student gets a question wrong, we are more confident in their lack of knowledge. That is, for each student and each knowledge, we track not just a score, but a confidence interval. Somewhat sadly, for reasons of ease of implementation, we will likely start with multiple-choice questions, though I’d ideally like to have some system which would allow for more free-form answers, be less subject to luck, and to confirm-rather-then-determine behavior.

3: Tutorials. These are, from one point of view, the entire point of the system. Each tutorial has a set of prerequisites, and a set of knowledges it is expected to improve. The actual content, I think, wouldn’t be a part of this site, but rather a link to it. That allows the easy use of existing content, a variety of forms of content (interactive applets, youtube videos, blog entries, blocks of text, etc), and allows the content authors to use whatever tools they like to create their content.

4: Students. From another point of view, these are the entire point of the system — it’d be a bit useless without users. As, I suppose, is true with any such description, students are well-described above. We track their score in each knolwedge, along with a confidence interval. Once we’re confident that they meet the prerequisites, we start showing them some tutorials that we believe may fill in holes in their knowledges.


Now, what I want from you guys… First, holes. Poke holes in my design above. What are we forgetting about?
Secondly, hope. Tell me you’d like to use such a system, tell me you’d like to translate it, to write content for it, to create bug reports, and to fix them, to style and make it look pretty… Thirdly, content. This should probably wait a bit, but it’s always good to get a good feel for the concrete when you are still working on the abstract layers. Fourthly, algorithms. What’s the best way to create a level and confidence interval off of a series of questions like this. Can we dynamically tweak question difficulties and/or tutorial parameters based upon results? How should we determine what question is best to ask next?

Looking forward to reading interesting, intriguing, informative, and introspective responses.

Project notes: Prius hacking.

1: Reversing camera switch. - That is, a switch to lie to the display unit, telling it we are reversing, so the reversing camera displays without the car actually moving backward.

1.1: Disassemble dash to be able to get at the display unit’s wiring. DONE.

1.2: Put a connector inline to the existing wiring. Should hold wires securely, have no visible changes to the car when external things aren’t connected.

1.2.1: Decide upon, and buy connector: DONE. Have gone with a Molex Mini-Fit Jr, 20-pin. This is the same connector as ATX power supplies (without the extra 4-pin connector), so are reasonably easy to find in general-commercial-availablity.

1.2.2: Figure out how to connect the connector, in the car, without major disasembly, or melting bits of the car.

1.2.3: Do so, at least for 12 V (accessory or always-on?) and REV. Other lines can come later.

1.3: Measure current on both those lines. 12 V will be reasonably large, rev should be quite small.

1.4: Make the “new part” for the reversing switch. 20-pin connector male, 12v line goes straight through and to one of the inputs of DPST switch. Other input of the switch is REV line from car. Output is REV line to display. Female ATX connector.

1.5: Insert in, hope it worked!

2: Likewise for the input from the display to the reversing camera. Switch signal line from camera with composite video line from the Pi. Should “ground” lines also be switched, or should they be connected? Do I need to worry about the switch adding interference, or otherwise mucking up the signal?

3: Replace the switches with transistors connected to the pi’s GPIO lines, so it can “break in’ to the display under it’s own control.


So, I’m sitting in the car, while Jess is driving back to the UK (well, the chunnel … well, to Luxemberg to find cheap gas ) on the way back from the Perl reunification summit and YAPC::EU 2012, Frankfurt. I figure this is a good time to do the blogging thing again, and give some of my throughts about Perl (the programming language), perl (the implementation of the programming language), Perl (the city^Wtown), and other such things, and possibly even my role in them in the future.

If Oxford is, as I like to say, a monument to a place where there used to be a city, then Frankfurt is it’s antithesis, a city which is proud of it’s past, but unafraid of it’s future. It may not get it right all the time — there seems to be quite a bit of disagreement over construction right next to the cathedral (insert photo, with the city lives) — but it’s not prepared to rest on it’s laurels. I see that sort of thing all over Europe, to the extent that I’ve seen all over Europe (on the first day of this trip, I was in the UK, France, Belgium, Luxembourg, and Germany … though most of those only in the car. The thing is, in the UK, you see signs everywhere, you are now entering Fooville, mideval market town, ,, twinned with… The signs in Europe have name of the town, and a lovely drawing. Sometimes, it’s of the old church, or villege hall, but sometimes it includes a wind turbine, or such. They are more then their past.

Perl, too, the language and the implementation, needs to be more then it’s past. It needs to look to the future, not as something that will get here eventually, but something that we can strive toward every day. That, in a way, was the point of the perl reunification summit. How can we make the transition smooth between perl 5 and 6? How can we make it so that our past, our present, and our future can live together in peace, and we can keep our old along with our new? A lot of techniques for bridging the gap were discused, and I think what will happen is that all of them will be worked on in parallel.

Larry Wall is working on a perl 5 grammar for perl 6. One of the cool things about perl 6 is that you can mutate the grammar of perl 6, in perl 6, at runtime. As they say, all is fair if you predeclare. So, you need to mutate the perl 6 grammar until it closely resembles the perl 5 grammar. Then you need to figure out how the perl 5 semantics map onto the perl 6 semantics — fortunately, I think, the semantics of perl 6 are mostly a superset of those of perl 5. For example, in perl 6, you can declare your argument list to be a list of aliases to your arguments, a copy of the list of aliases, or read-only (in which case, it doesn’t matter if they are aliases or copies). In perl 5, they are always aliases — so maping p5 to p6 there is easy, just pretend they were declared :rw.

Frew showed us a very cool thing called perlito, which allows you to compile perl 5 and perl 6 to javascript, perl 5, or perl 6. I have very high hopes for that, though I haven’t found the time yet to look into it in any depth…

…because all the hack-time I’ve had recently has been going into some other things that I shall now attempt to share.

Recently, the skilful, evil, and batshit crazy Matt S. Trout, who I am honoured to call friend, has been hacking on something called Object::Remote. The idea is that you can have two instances of perl, quite possibbly running as different users, on different machines, transparently create objects and use them on each-other. The interesting thing is, there’s no real reason that both ends have to be running perl 5. One end could be perl 6 (which Matt is now hacking on), or one end could be Java (which I am now working on). Thus, perl becomes a glue language again, in this world where APIs are more likely to be in the form of libraries then in the form of processes, and a glue language between it’s own future and past.

Is perl 5 the past and perl 6 the future, anyway? I don’t know. I don’t think anybody else really knows either. Perhaps they will be two alternate universes that have created a dimensional tunnel between each-other, and set up trade. Perhaps perl 5 will become known as a great language, that gave birth to an even greater son, and became an honoured advisor to his son, once his son was ready to take up the mantle and mace of office. Perhaps perl 5 will subsume the best bits of perl 6, and perl 6 will become known as a successful research project that never really finished.

I don’t know what the future will be, but I do not fear it.

Unfortunately, I have now come to a great last line, but still have more to say.

As often happens at such things, a fair number of people came up to me, and said hi, and I had no idea who they were… because they recognized me from when I was highly active on perlmonks. I haven’t been active like that anywhere for a long time. I shirk responsibility, and hack on great things without telling many people, and without soliciting, or responding to, feedback. I have been afraid to try to shape the future. I met, again, a highly interesting girl called Erin (also, Wraith, or Mordwerk). (Again, because Jess and I interacted with her a fair bit at YAPC::NA 2011, Ashville.) She mentioned that she hacks C, and I got her onto the private IRC channel where Matt and his friends hang out… and pointed her at http://github.com/theorbtwo/XSify, both because its always good to get more people who can go “I get this, and it’s brilliant”, and in the hopes that she can use it for something useful, package it, and take over the project from me, and that’d be a great fealing for me. Even if she’s not willing to take it over, she’ll hopefully inspire me to get it into a better state.

Also, she’s interested in porting Perl to something which is apparently a modern descendent of the hoary, and dusty, old Amiga ST, from a time before time, or at least a time before the computing world was obsessed with backward compatability, and everything had to be DOS-compatable or Apple. This fits in well, I think, with … well, we didn’t catch his name, but an Australian Opera guy who used to hack on an implementation of an OS which is mostly a reimplementation of the hory, dusty, old Amiga OS, of similar age (somewhat newer, I think — I’d check Wikipedia, but I have no network access, which is probably for the best). That OS lacks the fork() syscall. Jess has been working on another project along that vein — probably a more useful, if less epicly silly, project — with the monitary help of TPF. (Thanks, Karen, Mark, and everybody working hard there.) The Android is a modern, mostly-unix machine, which it would be nice to have perl on. It’s not that difficult to compile for it, but it shouldn’t be not-that-hard, it should be easy. It should be something that gets regular testing, and something that you can install as a regular application, on a regular android, without doing anything potentially dangerous, illegal, or warranty-voiding.

I’ve been helping Jess of late as a sort of Guru, and I think I’ve been fairly succesful in that role. I’d like to continue my role as a guru, somebody you go to when you have a problem beyond your ken, and offers you the right vauge advice to get you past it, and hopefully, the student is enlightened, a shoulder for those who will see further to stand on… but more importantly, I’d like to become a developer again. Somebody who makes things, says “I have made this for me, and for you, and for all of us. This is ours now, this is a brick upon which we can build the future.”

Introducing Java::Bridge (really, this time)

So, a few days ago, I intended to post a paragraph of metablogging, and then get on with introducing a project. Then I was going to post a few paragraphs. Then I actually write it, decided it deserved it’s own entry, and posted it … and decided that I deserved a break. So here I am, a few days later…

Java::Bridge’s intent is to be a way to use and control any arbitrary Java API you want, from inside of Perl code, without requiring the author of Java::Bridge (IE me) to have considered your use case in advance, or having to have a Java compiler on the target system. (Or, for that matter, a C compiler. Preferably, at all.)

Why is this useful, you ask? Well, a month or two ago, my wonderful girlfriend got a wonderful shiny new Android tablet. Naturally, I want to hack on her new toy, like you do. She will, however, very explicitly not allow me to root it. And, despite Android being based on Linux, it’s APIs are not C, it’s APIs are Java. There is hope: there is a perl implementation available, and even an Android.pm, which uses the Android Scripting Environment to allow you to be able to call Android APIs from perl-space!

So what’s wrong? As I was reading the docs for the ASE, I realized that it only allows use of a very few APIs. It had a lot of functionality near what I wanted, but not the specific bits I wanted.

So, Java::Bridge was started. It’s not as complicated as it sounds. Perl, of course, has a rich history of metaprogramming. You can create an modify classes at runtime to your heart’s content, and in the last few years, things like mro, Moose, and Class::Meta have made it much easier to do it. Java, it turns out, also has a (somewhat less nice, but not horrible) system for metaprogramming, called reflection. It has some niggles — most annoyingly so far, the rules of getMethod do not match the rules of the Java language — but it’s not horrible, and since my focus is calling Java from Perl, the worst depredations of hackery happen on the Perl side.

So, it’s somewhat slow going, but http://github.com/theorbtwo/Java—Bridge/ has my code thus far. Please, have a poke, ask me questions.

Surprisingly, like I said, it’s slow going — but there are very few points at which I went “oh, bleep, I don’t think this is possible”, it’s been more of “right, done, now only 10,000,000-1 things to do”. This is much preferable.

The next big hurdle is going to be letting you subclass java classes from Perl code, then pass them about. I’m afraid that’s going to be necessary for some stuff — it turns out that Java has a hack for dynamically creating a new class that implements arbitrary interfaces, but not that descend from arbitrary classes… but parts of the android API go “create a new subclass of android.app.Activity and change these methods” and the like, which shall be … tricky.

Oh, and of course, it doesn’t actually run on Android yet.

My, it’s hard to get me going, but I do like to waffle once you do, eh?

So, to repeat: http://github.com/theorbtwo/Java—Bridge/ - play, extend, enjoy, tell me what I’ve got wrong, what you want to be able to do.