The end of the polite cough

This nasty little virus has a lot to answer for. Including the death of a British tradition, the “polite cough”. In times gone by if a British person wanted to attract someone’s attention - perhaps it might be a waiter, or a a person who has cut in front of you in a queue, or someone who has parked their car on your foot - you would issue a polite cough to open up the sequence of apologies that would inevitably follow: “I’m so sorry that I left my foot lying around on the ground where you could drive over it” - etc etc.

Nowadays a polite cough has every chance of having you wrestled to the ground by a couple of burly folks in hazmat suits. Oh well. At least we’ve still got the “disapproving look” left.

Hull University Rocks

UniNext.png

Hull University was very good to me. It paid off my mortgage and helped me get my kids through college. Admittedly I was there a bit longer than I planned. Went for a three year degree course and ended up staying for another 35 years, finishing up as a lecturer in their wonderful Computer Science department.

I left a few years ago but I’m proud to be a fellow of the university and I’ve been able to watch them try to respond to this awful pandemic thingy. One thing I’m sure of is that all the staff will be moving mountains to make things work going forward and they’ll do it with the best interests of the students. Because they always did.

This is a Hull Computer Science speciality. Three Thing Game. If you fancy having fun writing games you form a team and you get given three things to base it on and a weekend to write it. I took this picture in 2013. Quite a few of the people in the shot are now out there making games of their own. You can find out more about it here. It’s hilarious whether or not you want to end up a game developer.

If are looking for place to study, don’t for get Hull. Lovely place. Lovely people. Find out more here.

Killing your favourite children

boats.png

Ages ago I went to a creative writing seminar. It was really interesting. One of the points that they made was that sometimes when writing you have to “kill your favourite child”. What they meant was that you might have a lovely chunk of prose that you are very proud of, but it just don’t quite fit into the context of the piece you are writing. There are two things you can do. Spend ages trying to make your wonderful words fit and fail. Or just get rid of them and move on.

I was reminded of this today when I was writing Chapter 9 of Begin to Code with JavaScript. I’m talking about software objects and I’d written a lovely piece of code that used a schema to create objects and properties on the fly. You can do this kind of thing in JavaScript and its awesome. However, I couldn’t make the example fit into the rest of the chapter. I spent far too long trying to create a solid context, wrote a few pages and then stood back from the piece, took a long hard look at it and then threw the whole thing away. What is left is much better, and of course I’ve not completely discarded the stuff. I never throw anything away.

Sometimes you have to ditch something that you really like because of your loyalty to the final result.

Hull Rocks

Walkway.jpg

They were having a discussion on Radio Humberside this morning about the future of Hull. They asked me to contribute some thoughts. I made some notes (most of which I never used). So I thought I’d pop them on the blog. The question posed was something like: “As a person who has lived in Hull for a while, what do you think of the state of the city and potential for the future?”. These are my answers in bullet point form:

  • There are amazing things going on at the Fruit Market . I’ve been involved with c4di for ages and their building is now fully occupied with people making stuff and doing things. With more coming.

  • We’ve got super fast fibre networking, something which other places have just started to realise might be a good thing.

  • We also have a city wide LoRa network which is free for anyone to use for connected product development and a couple of local companies, KCOM and Connexin, who can provide you with a paid network service you can use to commercialise your solution.

  • Humber Street is awesome. The new pedestrian bridge will make a huge difference to access to the area.

  • We must give give local students a trajectory that encourages them to say in Hull when they graduate. As I said this morning, “It’s cheap and nice”, a killer combo. Students tend to be quite conservative about where they go in their local area. We need to encourage them to take a look at the lovely places we have where you could build a good life..

  • Hull Makerspace is a great development which lets anyone from the community explore technology.

It’s a crying shame that this nasty virus has come along just as we were getting up speed with all this, I really hope that progress is not knocked too far off beam by it.

Indoor thunder with Norns

norns shower.png

I’m slowly getting my head around the Norns device that I built on my birthday. It works by running Lua scripts that talk to SuperCollider engines to make sounds. There’s also a sound sampler and sllcer and you interact with it via your browser. It’s great fun, but at the moment I’m using it to make the sound of rainfall thanks to the lovely Shower app. I’m trying to get my head around how such a short piece of code can produce something that sounds quite realistic. And very relaxing.

Adventures in function names: saveItem or storeItem?

lego functions.png

I’m writing Begin to Code with JavaScript at the moment and I was struck with how the choice of function names can be confusing. I’ve made the point that a good way to come up with a function name is to make them out of a verb and a noun. So storeItem sounds like a good name for a function. Store the item. What could be simpler?

Unfortunately this has the potential to be confusing. It’s because the word store can be a verb (do the storing) or a noun (a store that contains things). So storeItem might mean an item from the store. My strong advice is to try and pick unambiguous verbs, which is why I much prefer saveItem.

Perhaps I’m overthinking this (it has been known) but I’ve been surprised how many times I’ve picked confusing names for things based on distinctions like these. One of the great things about modern development is the ease with which you can rename identifiers, so if you do decide that the name you first came up with is confusing you can change it.

New Begin to Code with JavaScript Podcasts Available

Do you want to learn JavaScript the fun and painless way? Then go forward 200 years into the future when they can plug something straight into your head. For now though, you could do worse than investigate the Begin to Code with JavaScript podcasts for my new book I’ve just uploaded. They are packed with jokes, music, song, dance and misleading product descriptions.

You can get a draft of the book for free and watch screencasts where I code things live that nearly always work. Search Apple Podcasts for “begin to code with JavaScript” or listen fresh from the web at https://www.robmiles.com/jspodcast

Low Power Raspberry Pi in MagPi Magazine

magpie.png

I was digitally leafing through the latest copy of MagPi magazine when I had a sense of déjà-vu. They’ve included my HackSpace magazine article about creating Low Power clock controlled Raspberry Pi.

Quite chuffed. I’ve always fancied being in that magazine and now I am. Without even trying.

Authors note: I hope you are all really impressed by me typing “ déjà-vu” correctly. It was surprisingly hard to do.

You must read "Hello World" by Hannah Fry

If computers, big data, artificial intelligence and self-driving cars confuse you, you should read Hello World by Hannah Fry. Hannah is a proper scientist with a wonderful writing style and she makes the technology easy to understand. She also isn’t afraid to muse on the dark side of all this shiny stuff.

There is no assumed computer knowledge, everything is clearly explained and put into context and subjects are introduced with engaging real-life stories. Everything is also properly referenced so that you can follow up on things that you find especially interesting. Excellent stuff.