[Microbit-Python] Fwd: Python editor - BBC MicroBit. Next steps...

Michael sparks.m at gmail.com
Fri Jun 5 16:36:17 CEST 2015


[ Forwarded as per request by ntoll -  sorry if you get this twice:-) ]

Hi,


Those I haven't seen for a while - good to see you, those I haven't met,
pleased to meet you :-)

> Michael Sparks also works for the BBC in R&D and was the mastermind
> behind the prototype.

I don't think I've ever been called a mastermind before, not outside of
fancy dress anyway :)

By way of clarification of what I can bring to the table please excuse the
info dump below.


I'm still unclear about how much I can share of this and how much I can't.
(I have a document that details the dev process about what I built and how
though, which may be of use)

I'm assuming that I can share everything I built during that time frame
with everyone on this d-list.

For reasons of practicality, this is what I built/created (largely from
scratch) in
the main 12-13 week development window for the *prototype*. (mid
sept-mid-dec)

(Apologies for the copy and paste)

  * Designing hardware including picking hardware components
    This is also clearly an embedded systems device, so would be natively
    compiled in C or C++, but would need a friendlier  language - which
    implies a front end language to back end language compiler

    -- In this case I created a python to C++ compiler.

  * Designing firmware to control the device, including creating a font for
    its display

  * Building web systems for:
    * Children to write programs
    * Supporting browsing programs, supporting parents and teachers,
      and protecting children, enabling group working and sharing.
    * Storing and tracking programs creating graphically in both
      graphical and python forms.
    * Batch compiling python programs such that they can run on a
      Microcontroller

    * This had to be robust enough for use in schools at the end of that
main dev period

  * Client side applications for assisting loading user programs onto
    the device

  * A prototol for interacting with the device as a peripheral

  * Support for direct programming of the device, and also usage in an
    IOT context.

  * Client side toolset/examples for working with the device as a peripheral
   (As well as libraries this included a PySde-QT editor/micro development
environment)

  * Power optimisations - there was an aspiration to run for a few days
    continuous off a single 2032 battery. (achieved incidentally)

  * Alongside all this detailed specifications of the device needed to be
    created, such that any part of this system could be changed.

For 6 weeks of that I had part-time help from 2 colleagues, to help flesh
out the website primarily.

Back end storage incidentally was loosely based on git's storage model.

Note: all the above refers to the prototype that's been waved around in
public, not the
final production system. The prototype had two main jobs:

* To be usable in schools to test the proposition with children
  - During this development continued, but of the bug fixing kind, which is
why I described
    the above as the main dev window)
* To be suitable as a reference implementation for understanding (and
sanity checking)
  the functional/technical specs

Both aspects have very different forces on the prototype - the former means
it
needs to be sufficiently fast, stable, robust and cheap enough to produce
at the
scale of hundreds to low thousands of users, the latter means it has to be
as
simple enough to be understandable and flexible to change.

> However, for oddly bureaucratic reasons he can't
> collaborate with us as a BBC employee but he *can* as a member of the
> Python community

Before anyone asks, let's just ignore this - anything I do on this is
either BBC owned or if I do it on my own time open source (Apache 2
generally, but flexible). I can't get a straight answer from anyone about
this (I get the impression my manager is baffled by this too :-) ). Think
W1A and lots of good will.

Those of you who have met me know that my reaction to bureaucracy is to try
and code round it :-)

So, I started my own reimplementation - a couple of months ago of the
python to C++ compiler that I had at the core of the original prototype (from
scratch, on my own time, with my own tools). I want something I can use
with cubs/scouts. since I work with them in my spare time. I figured it'd
be quicker to start again :-) (Also, if there was one bit of the system I'd
wanted to redo, it was that bit :)

Anyway, code talks - this is what I have at present, that is public:

https://pypi.python.org/pypi/pyxie

(Apache 2 license)

It's early stages, but does handle things like parsing, basic type
inference, code generation, and does have a language spec, tests etc. It's
loosely based on the SWP parser I've given lightning talks about in the
past. I do have a github project for that, and the only reason that's not
public yet is because I just want it to be a bit more complete before doing
so.

If I'm able to share the existing python/C++ compiler created for the
microbit project, I'll do that. It's a bit rough and ready, and total dev
time on that part of the system was probably 4-5 weeks at most, so it takes
a lot of short cuts, and you'll see why I started again anyway :)

Has everyone seen/got access to the prototype website built for the
school's trial? (It's not advertised anywhere, but it was always left open)

The IOT toolset referred to above is here:

  - http://github.com/sparkslabs/iotoy

(From previous R&D work released a while ago)

Best Regards,


Michael.



On 5 June 2015 at 14:17, Nicholas H.Tollervey <ntoll at ntoll.org> wrote:

> Hi,
>
> At last, you've all signed the NDA and the PSF and BBC have ironed out
> their partnership agreement..! We can start to create a web-based Python
> editor..! :-)
>
> Our immediate next steps are as follows:
>
> * Set up a mailing list. (I have microbit at python.org ready and will
> subscribe you to it - it is a PRIVATE mailing list. If you want to
> remain OFF the list, just ping me an email and I'll remove you);
>
> * Organise our diaries for a weekend hack (please see:
> http://doodle.com/e75bmkskgc6gm6mt - I've used the weekends I can make.
> If this proves difficult we'll have to think of perhaps an evening
> "projects night" type affair);
>
> * Give everyone access to the GitHub MicroBit account and arrange our
> own GitHub repository.
>
> Once we have the mailing list set up I'll brain-dump everything that I
> know, along with links to the appropriate documentation on the MicroBit
> GitHub account and our own private GitHub repos.
>
> The initial hack-day type meeting has one outcome: answer the question,
> "given the time and technical constraints, can we create a Python editor
> for the touch-develop platform promoted by the BBC to use to program the
> MicroBit? If so, what steps, and by whom, need to be taken?"
>
> I'm more than happy to answer any questions you may have.
>
> Who is everyone in the To and cc'd fields..? Many of you will already
> know each other, but for those of you who don't:
>
> CC'd are Fiona and Howard who are the project manager and technical
> manager for the MicroBit project.
>
> Michael Sparks also works for the BBC in R&D and was the mastermind
> behind the prototype. However, for oddly bureaucratic reasons he can't
> collaborate with us as a BBC employee but he *can* as a member of the
> Python community (as many of you will remember, Michael is already a
> significant figure in the UK Python community having helped to organise
> and run the early PyCon UKs with the late John Pinner).
>
> I've also cc'd Damien George (of MicroPython fame) because he's also
> getting Python to run on the device but in a different way to us -
> although I'm guessing there are plenty of opportunities for us to peek
> over shoulders and bounce ideas around. I've also cc'd Jonathan Austin
> from ARM who first told me that the hardware could run MicroPython -
> he's also Damien's next-door neighbour and appears to be Py-curious ;-).
>
> Harry and Giles work at Python Anywhere and have offered to host any
> work that we do. Obviously, they also have bags of experience with
> web-based Python editing environments.
>
> Tim is a Python core developer with a passion for education and
> computing with young people. He also works within the Microsoft
> eco-system - such knowledge will be useful given that the scaffolding
> application we're using is from Microsoft (although it's actually a
> node.js app).
>
> Michael Foord is another Python core developer, beard aficionado and
> former colleague of Giles and Harry when they were Resolver Systems. I
> believe they once wrote a "Python compiler" (note the quotes) together
> as part of their Resolver work.
>
> Mark Shannon is yet another Python core developer with an expertise in
> compilers and was, most recently and famously, final arbiter of Guido's
> type annotations work (a hard job if ever there was one). ;-)
>
> Naomi Ceder is a Director of the Board of the Python Software
> Foundation, a Python programmer, former teacher and community organiser.
> Despite only being in the UK for about a year she's already contributed
> a huge amount in terms of the TransCode hack days and helping to
> organise PyCon UK including contributions to the education track.
>
> Carrie Anne Philbin is another Director of the Board of the Python
> Software Foundation, the Raspberry Pi Foundation's "Education Pioneer",
> award winning teacher, author, programmer, speaker and so the list goes
> on. Carrie Anne may not be able to attend our hack days or have time to
> contribute code but will be watching with interest and no doubt will
> have suggestions.
>
> Gautier, Tom and Vincent are, collectively, "We Are Wizards" - and
> literally create magic through code. I've worked with Gautier at Fry-IT
> and know Tom (formerly of Google) and Vincent from the London code dojo.
> They bring a considerable breadth and depth of Python development
> experience (among other things).
>
> Phew.
>
> Let's see what we can make..!
>
> As always, comments, suggestions and constructive critique most welcome!
>
> Best wishes,
>
> Nicholas.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/microbit/attachments/20150605/7c1808a1/attachment-0001.html>


More information about the Microbit mailing list