Replied to Shopping Sheet – Improving the Shopping Process During the Pandemic by Aaron DavisAaron Davis (readwriterespond.com)
The current pandemic has led to many changes in habits. One of which is that I like to be prepared when I go to the supermarket, especially when doing a big shop. Fine I may not last out the two to three weeks that Zeynep Tufekci flagged early on: For food, you can just buy two or three weeks’ wor...

Hi Aaron,
Since the start of covid I get a delivery from the supermarket once a week and make a quick trip to a smaller one in the evening. Newspaper from the wee coop early morning.

What I love about his post is the quote/  featured image. I liked it on flickr earlier.

Ten Lessons I Learned While Teaching Myself to Code

I’ve been messing around with code and scripting on and off since I started using computers. Never enough to get the basic stuff in my head long term. I suspect my aged brain as well as the lack of daily practise. I can still have “fun“.

Coding develops cognitive skills, problem solving and analytical thinking (“computational thinking”). By introducing and developing these abilities from primary school onwards, we create the building blocks and thought processes necessary for robotics and AI. This is not about displacing traditional subjects but, rather, changing the emphasis. Coding can comfortably sit alongside other subjects, especially those with a creative slant, reinforcing the development of key skills through multiple channels.

Digital skills: Why coding should at the centre of the school curriculum | Tes

Coding certainly can develop cognitive skills, problem solving and analytical thinking. A lot of other things can too. I think it is difficult.

Any class will present a wide range of learners. Designing or adapting lessons to try and get as many of them in the right zone to develop these skills is tricky. If you don’t get this right coding is neither productive or fun.

The article notes:

. Coding can comfortably sit alongside other subjects, especially those with a creative slant, reinforcing the development of key skills through multiple channels.

I’ve certainly found that putting coding into a context can lead to more fun and success. By adding elements art or making to a coding project more pupils are involved in problem solving, collaboration and creativity.

A difficulty in managing this might be the perceive need to be an expert in several different areas. I’ve certainly found myself in situations where I’ve not be completely confident around some of these areas.

The article acknowledges that covid has had an effect:

It is a reasonable assumption that this immersion in IT and technology is preparing young people for a digital future and teaching them the skills they will need.

But we need pupils to be creators as well as users:

there is a largely unrecognised digital difference between the users of technology and the creators

I think there is also a gap around literacy and the problems that the mixing of commercial and educational interests in technology. A lot of the uptake in digital solutions lacks any questioning of the provides of these solutions.

This is something I am not very sure I’d know where to start with? Perhaps Coding is not ‘fun’, it’s technically and ethically complex:

In just a few years, understanding programming will be an indispensable part of active citizenship. The idea that coding offers an unproblematic path to social progress and personal enhancement works to the advantage of the growing techno-plutocracy that’s insulating itself behind its own technology.

 Coding is not ‘fun’, it’s technically and ethically complex by Walter Vannini (Aeon)

Coding is seen as fun and glamorous, but that’s a sales pitch. In reality, it’s complicated, both technically and ethically

It’s better to admit that coding is complicated, technically and ethically. Computers, at the moment, can only execute orders, to varying degrees of sophistication. So it’s up to the developer to be clear: the machine does what you say, not what you mean. More and more ‘decisions’ are being entrusted to software, including life-or-death ones: think self-driving cars; think semi-autonomous weapons; think Facebook and Google making inferences about your marital, psychological or physical status, before selling it to the highest bidder. Yet it’s rarely in the interests of companies and governments to encourage us to probe what’s going on beneath these processes.

Clear well explained short and powerful article. via both Scripting News and Memex 1.1.

Perhaps we need another term for the coding like activity than can be a lot of fun for folk that have the skills that Walter Vannini explains coders need. I have a lot of fun dabbling in AppleScript, bash and JavaScript without the discipline and study necessary to be a coder.

Kids in school can have this sort of fun too, perhaps helping in maths and in skills like problem solving, working together and practical skills. Scratch and micro:bits can be a a lot of fun in a primary classroom.

Replied to https://twitter.com/stevebunce/status/1314847694440017920 by Steve Bunce (Twitter)
Free, fun and from Monday, come and follow-a-long with your class or at home! Next week at https://thecodehub.ie/eu-code-week-2020/index.html… You can be there live or watch the recordings later #eucodeweek #swiftplaygrounds #coding

EU Code Week 2020 – Quick Start to Coding with Swift Looks great Steve.

Liked https://twitter.com/cemocreates/status/1305699520567635968 by Celeste (twitter.com)

A lot of micro:bits from the BBC arrived in the centre where I work, ready to be distributed to North Lanarkshire schools. I’ve taken the opportunity to break one out and have a wee play.

The devices are aimed at secondary so outside my wheelhouse, but I could not resist a wee play.

The microbic works by creating code for it on a computer and flashing it to the device via USB (you can also use bluetooth from a mobile app). There are several different ways to create code. You can do in in the browser with severe different editors, Code Kingdom’s JavaScript, The Microsoft Block Editor, Microsoft Touch Develop or Python. I’ve had a quick try of most of these. You can also use the MU python editor that runs on Windows, OSX, Linux and Raspberry Pi.

Although I don’t really know any python I’ve found that the MU editor the most reliable. The browser based ones have been occasionally flaky, causing me to switch browsers a few times. I also like to have anything stored locally (the browser editor stores in local storage, but that means you need to either get an account sorted out or use the same browser on the same box all the time.)

There are already a nice set of resource building up, I found the Raspberry Pi and micro:bit Playground both useful.

When I was looking at the Tilty Game from the micro:bit Playground I though I might be able to make a ‘paint’ editor. This is the result. (click to start the movie, I’ve just found you can use a gif as a poster frame)

The code allows you to draw on the microbes LEDs, the left and right buttons move the cursor in a horizontal and vertical  directions and a double press toggle the lights.

And here is the code, I used hilite.me to make it look nicer. Not exactly rocket science. I expect there are better ways of doing this.

from microbit import *

Matrix = [[0 for x in range(5)] for x in range(5)]

#set initial position
x = 2
y = 2

def printmatrix():
    for x in range(5):
        for y in range(5):
            if (Matrix[x][y]):
                display.set_pixel(x, y, 6)
            else:
                display.set_pixel(x, y, 0)
    return;
            
#show cursor
display.set_pixel(x, y, 9)
 
while True:
    if button_a.is_pressed() and button_b.is_pressed():
        if (Matrix[x][y]==0):
            Matrix[x][y]=1
        else:
            Matrix[x][y]=0
        printmatrix()
        sleep(1000)
        continue
                 
    elif button_a.is_pressed():
        x = x + 1
        if (x>4):
            x=0
        printmatrix()
        display.set_pixel(x, y, 9)
    elif button_b.is_pressed():
        y = y + 1
        if (y>4):
            y=0
        printmatrix()
        display.set_pixel(x, y, 9)
    sleep(200)

The idea is we store a matrix of which lights are on. The ones turned on are shown by the printmatrix function. They are displayed at a brightness of 6 to distinguish them from the cursor, which is full beam.

The cursor is moved with the left and right buttons. it loops (I wonder if it would be better to bounce it?) Clicking the left and right buttons toggles the light on or of in the matrix. The reset button clears the screen.

I had quite a lot of fun getting this to work, the formatting of the script caught me out a few times. I wonder, if I was smarter, could I take the same approach and make a noughts and crosses app?

Featured image on this post a gif made from BBC micro:bit by Gareth Halfacree used under a Creative Commons — Attribution-ShareAlike 2.0 Generic — CC BY-SA 2.0 License.

Pinboard

I’ve been using pinboard for collecting links for five years now. I like it a lot, it feeds the Links page here and most of the enviable stuff.

One of the main things I like about it is its simplicity. Pinboard lists the links, titles, and descriptions without any images or fancy stuff. Adding links via the bookmarklet is simple. It supports the delicious API and has RSS so you can pull sets of links onto blogs and webpages easily enough.

Last week I used the service to play around with python a little. To produce a more visual representation of my recent links. I appreciate the irony. This was an excuse to play with several technologies that I do not know much about.

Last month I had read: this post Homemade RSS aggregator followup by Dr Drang. This shows how to make an RSS reader with python.

I’ve very occasionally played with python for an hour or two but do not really understand the basics. I can however try things repeatedly until they worked.

Planing and playing

My plan was to use the code from Dr Drang, simplifying it to deal with just one RSS feed. Using my pinboard links to produce a webpage. I also wanted to make thumbnails of the websites linked and play with CSS and JavaScript a bit.

The idea was to create the webpage in my dropbox. This could be updated automatically by the script running on my mac. I’ve had dropbox long enough to have a Public folder that is very handy for publishing webpages. This is now a pro and business option only.

Here is the script: pinboardrecent.py and the current output: Recent Pinboard.

Problems

The interesting thing about all of this is the several problems I hit and their solution.

The problem included:

  • Not know how to do something
  • Errors in the code I wrote
  • Errors with webkit2png 1 which I was using to produce the thumbnails.

The answers all involved google and testing and re-testing until things worked. In some all cases I am sure my answers were not the best way of doing things but they worked. I’ve noted most of these in the source. The other think I see in my code is lots of print statements that are commented out. I deleted lots more. There are surely better ways to find out what is going on/going wrong with a script but this works for me.

I am never going to be a programmer, but I get a lot of fun and occasional utility out of playing around like this.

There is a huge push to teach coding to pupils in school going on at the moment. A major reason for this is getting the right skills for employment. I hope a small side benefit will be giving learners the chance to have fun. Producing things for themselves rather than just use services and applications produced for them.

Tinkering with code that you do not understand may not be the best way to get a deep understanding of a language. It may not even help with learning the fundamental concepts. It does in my experience hook you into engaging with learning.

This term at work I’ll be involved in providing training in starting primary pupils coding. I’ll be recommending tinkering as one possible way of getting started and engaing pupils. I am sure some will be as fascinated as me.

  1. webkit2png has problems when trying to get thumbnails of non https sites on El Capitan (Mac OS X 10.11) google allowed me to find a fix and edit the source of webkit2png (which turned out to be python for extra learning).

If you want your kids to have a solid computer science education, encourage them to go build something cool. Not by typing in pedantic command words in a programming environment, but by learning just enough about how that peculiar little blocky world inside their computer works to discover what they and their friends can make with it together.

We shouldn’t be teaching kids “computer science.” Instead, we should provide them plenty of structured opportunities to play with hardware and software. There’s a whole world waiting to be unlocked.

from: Jeff Atwood: Learning to code is overrated – NY Daily News

The article stems from the news that all New York City pupils will be coding in 10 years.  English education is away ahead of them: National curriculum in England: computing programmes of study – GOV.UK

The counter argument is that there are a lot of coding jobs in Scotland waiting for applicants:

Scotland’s tech sector is booming and our employment partners have existing vacancies just waiting to be filled by CodeClan graduates. Learn with CodeClan and become part of shaping the future of the digital world.

from: Home | Digital Skills Academy Scotland | CodeClan
and
Digital tech sector ‘to see strong growth in Scotland’.

This links very much to the views expressed by Charlie Love on Radio #EDUtalk: we have a lack of these skills in Scotland.

I do wonder how we can gear up for typing in pedantic command words in a programming environment with our current decline in computer science teaching. Should we go down the same road as England or would it be better to take Jeff Atwood’s advice? Is there a happy medium?

Image my own from a brief encounter with processing.

Source: Thimble by Mozilla – An online code editor for learners & educators.

Thimble gets a nice update.  Here is the quickest webpage I could make: Kicking the Thimble.

You can now upload files, css, image, javascript ect and create & edit multiple files. Code completion seems a lot better to me too. It grumbles about Safari s oI switched to chrome which is recommended along with FireFox.

Obviously useful for learning to create webpages.