Advent of refactoring

I made a video series!

The “Advent of Refactoring”

going through a whole bunch of code refactoring concepts, focussing on web development in Django/Wordpress.

  1. Renaming Things
  2. Extract Variable
  3. Extracting Functions
  4. Extract (class) methods
  5. Converting a function to a method class
  6. Moving things around
  7. Guard Clauses
  8. Composition & Inheritance
  9. Data to JS
  10. Generators & Separating concerns
  11. Positional to Named arguments
  12. Extracting blobs of text (SQL, HTML, etc)
  13. Functions that create functions (closures)
  14. callbacks into functions
  15. try catch
  16. wrapper functions
  17. python decorators & context managers
  18. (django) QuerySets & Model property methods
  19. Building data attrs in the database
  20. Building complex class heirarchies
  21. Lookup tables replacing if chains
  22. Taking advantage of polymorphism
  23. Using validation libraries
  24. Using dataclasses for cleaner data access

Impact in 5 seconds!

I’m not a big fan of the use of the word “impact” to describe how we want to influence or change things. “We want to have a big impact in society!” “How can we impact the world?” “What impact will this have on our business plan?”

Impact has quite an violent or harsh physical overtone. Hitting, kicking, punching etc. Which fits in well with the western / violent / masculine language dominant in our current culture - but it’s not a metaphor that reflects the kind of long term beauty and change we want to see.

Recently I heard “impact” described as a positive thing - in that it was how musical notes were created. As in a bell, cymbals, drums, but also guitars, woodwind instruments…

Except - that’s not how woodwind instruments work. Nor guitars.

You don’t “hit” the strings on a guitar, and the note on a woodwind instrument doesn’t change by the air “hitting” the holes that you cover.

A guitar works by introducing tension, and then releasing it.

A flute works by the air being split by the block, and creating a column of air inside the body of the flute, which you then change the length of by opening and shutting holes.

A clarinet works by setting up a vibration in the reed by pushing air past it and tensioning it in exactly the right way, and then by changing the length of the tube (with the keys), it changes the speed the vibration can happen at.

The big insight to me here is that it’s not just an external force “impacting” the instrument, but an interaction of multiple forces. Interaction and engagement, not just slap and walk away.

And that’s kind of important to me… the idea that to make real change, and make things of beauty that last (like a sustained note, not just a crash of cymbal), it requires giving of breath (life), and constant engagement with the system that you’re changing. When you play clarinet, you don’t give a constant air pressure and tension in your mouth all the time - you modulate that depending on the result you’re getting. You need the feedback loop.

I believe that’s how we can make real change.

Audio Advent Calendar

This year the Creative Writing Passion-Group on board were asked to make a series of brief reinterpretations of the Advent story for every day at lunch-time on board.

Here’s my two contributions:

Daniel (Part 1)

Phone Rings You have reached the extension of Meshack, Permanent Secretary for the office of Internal Affairs, Babylon. I’m afraid I’m unable to take your call, but if you leave a message and contact information, one of my scheduling staff will return your call. BEEP

Daniel: Mishack, this is Belteshazzar, if you could contact me please that would be great. I’ve had a bit of an odd, er, experience I’d like to talk about with you. Shalom, Click

Phone Rings You have reached the extension of Meshack, Permanent Secretary for the office of Internal Affairs, Babylon. I’m afraid I’m unable to take your call, but if you leave a message and contact information, one of my scheduling staff will return your call. BEEP

Daniel: Oh for goodness sake Mishael - answer your blasted phone! It’s me again, Daniel. Look, the dreams have been getting stranger. I swear I’ve not touched a drop of the King’s wine. So there were these beasts, coming out of the sea, all mixed up - a leopard with four wings, a lion, a bear, hideous. This wasn’t some stupid nightmare. Nightmares are way more mundane.

I can remember so vividly, like I was actually there - I’m not going to tell you every detail now… it all ended, somehow with me seeing into the thoneroom in heaven itself! And there, a “son of man”, like, how you described the fourth man in the furnace? The same! And he shows up in the throneroom, and was greeted royally, and then gets made ruler of the whole planet! An eternal kingdom, full of every kind of people, diverse and spectacular, immense and unlike anything we’ve ever seen, Mishael.

So I went and asked one of the court guards what on earth was going on - and he told me it’s all about the future, the beasts are kings who are coming, and eventually the Most High will judge the last kingdom, destroy it, and hand it all over to an eternal kingdom of His people.

Look - I honestly don’t know what it all means, brother. Or why on earth I had this dream. I thought these dreams from the Lord were supposed to be meaningful? How can I make SMART goals or an Action Plan from something like this?!

It’s terrifying, seeing the horrors of so far in the future - I know the Lord will send this Son of Man in the end - but it’s such a long way off - why tell me now? I wrote it all down - maybe you could come by to read through it. Perhaps someone else will find it encouraging. Call me. Click

Daniel (Part 2)

Featuring the Prophet Daniel (played by me) and his Life Coach (played by Dan Potter).

Read more...

Brummie's Back - maybe?

Dear Neglected Blog -

I think I should start writing again.  I’ve realised how much I miss it.

I don’t know how often I’ll manage it - but we’ll see.

Brief update for the sake of historical thingness (as Euan might say):

We’re back on the Logos Hope - 4 of us now. This time for probably 2 years.  We’ve been on board almost a year now, and are currently on break (thus finding the time for writing, and motivation to start again).

Life on the ship is spectacularly busy with 2 children.  Essentially any time that’s not work, while the kids are awake I try to spend with them.  And when they’re asleep, then with my wife.  But I’m realising I do need more introvert / me time to help make the time with kids+wife better quality.

Blogging kind of takes a back-seat - as I feel like the writing I want to be doing is all fiction, and the writing I should be doing is all email / work related.

Anyway, hopefully writing here helps me feel more inspired to write other stuff that I need to.  And also is perhaps interesting for you, dear reader.

A Few Video productions

I’ve been doing a bunch of media production recently, Some work as cameraman, some as producer, some as editor.

Here’s a few links!

Albania

I was the director and producer of this and a couple other pieces. Myself and two cameramen travelled in 3 cities in Albania, meeting the OM team there, interviewing them, and finding out a lot of what they’re up to.

The night show

Currently still unreleased, “almost done”, I was the 3D set design and animator, did all the 3D compositing, and helped with a lot of the 2D compositing and editing. I also did the sound recording and initial scratch mix for the puppeteers.

Matt’s Blog

A 12 part video blog from ‘Matthew the Tax Guy’ about the certain teacher he met who messed up his life. I’m the main actor, and also co-wrote it, and helped with editing.

OM 50 years in Poland - an unusual history

I worked as senior editor on this project, helping Moray to bring together many different interviews into a single history presentation.

Live puppets in a 3D Universe

I had the enormous privilage to speak at the Blender Conference in Amsterdam!

I was talking about the latest large project I’ve been working on together with a team from Ireland, building a full virtual 3D set for a “late night” comedy show for puppets, going through the christmas message.

It was great fun, a lot of work, and a really cool project to be part of.

Some of the 3D stuff was pretty complex to work on, and so it was interesting to show off some of how we were doing the compositing and working with the puppets and greenscreens & everything.

Story Telling (Part 3) - The Hero's Journey (aka, Story Circle).

So this is Part 3 of my seminar / workshop on Story Telling that I did with the Logos Hope On-Board events Team. Here’s Part 1, and Part 2.

There’s an interesting alternative theory called, “The Hero’s Journey” (or “Monomyth”). There’s books written about this, some really cool ideas.  A very approachable version is by Dan Harmon, the creator of Community.  Ant Webb was the guy who introduced me to both Community, and the Hero’s Journey.  We’ve been discussing it and used it as part of Matt’s Blog.

Slide16
The Hero’s Journey theory says good stories are circular. You end up back where you started. They’re a journey from home, from comfort, from the concious, down into the subconscious, uncomfortable far away place, and back eventually home again. Of course, changes happen along the way.

Slide17

The full theory has all kinds of Freudian stuff to do with being forced out of the mothers arms by the call of the father, eventually defeating the father, and returning eventually as a mother or father all that… (Seriously, Freud had issues.) Also, there’s loads of details that are reasonably important, and do make the story more compelling, but also, with much added complexity.

Slide19
So lets go look at Dan Harmon’s Story Circle instead.

Dan Harmon’s Story Circle Main
He takes the circle concept, and breaks it into 8 simple parts.

1-you
We start off at " You". This is where " you" the audience relate to the main character(s). Preferably, the character should be in a place of comfort, or at least, be connected to some kind of easy-to-relate-to “home” situation. This could be a sailor at sea on the bridge, or a little bear playing a balancing game, or Garion at Faldor’s farm, a new student enrolling at community college, etc. It’s a starting point that the audience can relate to, and feel comfortable understanding. They don’t have to dig deep emotionally to connect with the main character. It happens automatically. This is the concious, mental understanding area.

2-need
Next is the " need". Something isn’t right, or some how the stable situation will be pushed off-balance. This is pretty close to the “problem” concept from the 3-act play model. Note, we’re still basically in the stable conciousness.

3-go

So, since there’s a need, I guess we’d better " Go" do something about it. This is where the Hero decides to actually leave their safe familiar environment, and go out into the world to solve the problem. We finally dep

3-enter-unknown
art the concious, and head into the scary subconscious / unconscious. The go ing can often be the most emotional part of the story. Or at least, the most emotionally motivated or driven part. Once the Hero is actually off fighting dragons and saving maidens, they’re too busy actually doing stuff to be all soppy and emotional.

Slide27
Now that we’ve actually left, comes the big difficult part of the story, the Seek ing, or Search ing. We may not exactly know what it is we’re looking for yet - but we’ll find out. Many different avenues can be explored, different people met, etc.  This can be long, arduous, and challenging.  The main character should be growing and changing here.

Read more...

Story telling (Part 2) - Of Aristotle and Acts

This is the second part of a 3 part series, transcribing / “article-ifying” a training seminar I ran with the on-board events team on the Logos Hope.  Here’s a link to the first part.

Aristotle and a suuuper simple model

Waaay back in 350 or so BC, a clever Greek dude (Aristotle) said that he reckoned a good story (or theatrical performance) had 3 parts to it:

Yep. It’s what you’re taught in primary school creative writing. Expanding those a bit:

In some ways, the most important thing from this is that without a problem, there is no story. There has to be “something rotten in the state of Denmark”. Or else what keeps your audience more interested in the programme, than in what’s on their phones?

“3 act plays”

Taking this concept a bit further, is the traditional “3 act play”. Often our events aren’t done in acts, but the concepts are useful for thinking, “Where should I put the refreshment breaks?” and thinking how the story energy levels should map out best.  Whether or not you actually use this model, it’s still an interesting one to look at, and see if it helps you.

The 3 acts are pretty close to the “beginning, middle, end” concepts from before, but expanded.

Confusingly, sometime the 3-act-play can be broken down in to 4 parts:

3 acts, 4 parts

which progresses through the main character (and audiences’) perception of ‘The Problem’.

There’s “potential” for an interesting story - you set up the main character(s), and the problem.  But they’re not actually in conflict yet (at least, as far as this specific narrative goes.)  There’s resistance to the conflict - things get in the way, the problem isn’t fully understood yet, etc.  Finally the conflict itself, actually doing something, rather than just trying to understand the problem, and finally the outcome, and cleaning up.

I mentioned that the Main Character and the Problem may not be in actual conflict yet.  Just to note here, this is for the purposes of this narrative.  For instance, in David and Goliath, Israel and Phillistia are at war at the beginning of the story.  However, the Main Character, David, isn’t actually in personal conflict with Goliath, until much later.

So how do these 4 parts map onto a “3 act play”?

4-parts-3-acts

Act 1.

Starting off the play, you need some kind of event which introduces the reason for the story.

The children of Israel are at war with the Philistines. Jeff Winger starts at his new Community College; Darth Vader boards Princess Leia’s diplomatic space ship and takes her prisoner; The orb of Aldur is stolen; Little Bear is playing, and it’s getting late.

inciding-incident
Sometimes, this is called the ‘inciting incident’.

One thing to note is that this might not involve the main character. It’s setting the scene for the whole rest of the story, and may in fact be the cause for many different stories to happen. A murder has happened, but at least so far, the main character may not yet have been put on the case.

Read more...

We interrupt this series...

Since we’re only on the ship for a few more days (!), I thought I’d post a few photos.

balloons-smaller

It was a friend’s birthday, and so various people filled his office with balloons.  David already loves coming to visit him (Tommy), and this visit was even more fun.

theatre_bonfire-smaller

Prayer night on board.  They’d decided for a “gather around the fire” kind of set up, the evening being led by the Africans on board, so I added a few lighting touches to make it feel even more campfireish.

theatre_lighting-smaller

This is the new lighting control system.  We’ve got rid of the old, difficult-to-teach, increasingly flaky Zero88 LeapFrog Desk, and put in place a computer, with a USB->DMX interface.  The software we’re using is free, called “QLC+".  It’s got a few bugs, but is *incredibly* much more easy to teach people, and allows us to do cool things like play music from the software, with lighting cues at specific times in the music, make the moving-head lights bounce around in time, etc.  Cool cool stuff.

tennis-smaller

David enjoys playing table tennis with us.

lifejacket-smaller

Muster drill today, David got all dressed up in his lifejacket, and looked stunningly cute, in a marine kind of way.  He had fun, anyway.

rack_move-smaller

This is a project I’ve wanted to do for a while.  The equipment in this office is “AVC” (Audio-Visual Central), and the main hub for all the AV routing around the ship (sending video & audio to the dining room so people can listen to devotions while finishing breakfast, for instance.  Or displaying big programs in the theatre in the Logos Lounge as well as an over-flow venue, or as a place for ship’s company to watch, etc. etc.).

Anyway,  This whole wall of racking is quite a mess.  This office used to be the IT office, and backs on to the server room.  Things have changed now, and it’s the on-shore-events team who work here, so having 19 inch racking makes no sense.  And they need more storage space, and the IT folks need more storage space too.

So I suggested (about 2 months ago) moving the AV equipment into the far left rack, and then turning the other 3 racks into cupboards facing both ways, with plenty of space for the IT guys in the server room, and plenty for the on-shore teams in this office.  Nothing came of my suggestion, so I thought, “oh well, the carpenters are too busy.  whatever”.  But now they’ve got a couple of enthusiastic project workers on the job, and everyone’s quite excited about how much more space they’re going to get.

rack_back-smaller
Although I’m wondering if I was mad to suggest this project, as it does mean quite a lot of moving cables and equipment around…. I hope I don’t break anything.  I want to do this while I’m here though still, as none of the A/V team have any experience doing racks/patchpanels/routers/install type stuff.

Read more...

Story Telling (Part 1) - Energy

Recently I had the opportunity to do a workshop / seminar with the Logos Hope Events team about Theatre & Storytelling.  I love theatre, and am very passionate about making (especially Childrens’) events into engaging stories, rather than just variety shows with a 5 minute message tacked on the end.

This is kind of a summary of what I covered, with some of the slides I made.  There’s quite a lot of content, so I’m splitting it up into 3 posts.

Warning, guides

Storytime!

To start off, we looked at 3 of David’s books, which I brought along.

Mealtime is basically just a list of items you might find at mealtimes:

Spoon and Fork,
Brocolli,
Sippy cup,
Strawberry...

and so on. Not staggeringly inspiring. Often, however, events are organised in a similar manner. Get a list of things we want to put in (Introduction video, Korean fan dance, Refreshments, Sermon, Singing), have an MC or host link them all together (“Wow, that was amazing. Next we have…”) and suddenly you’ve got a programme.

mealtime-event-order

In terms of energy levels of the audience, it looks something like this:

Mealtime-energy-flow
Each individual item may be all right, but they’re not really connected, and nothing really keeps the attention.  And it doesn’t get more exciting, and … well. I forgot what I was … er, better check facebook.

Peekaboo Forest is quite a bit better. Each page asks a question:

‘Who is hiding behind the spruce?’

there’s then a nice crinkly page to turn over:

Peek-a-boo! It’s the Moose!

So each page has quite a nice “energy” flow:

Slide7

with good anticipation, etc. But in terms of overall story-arc, it’s very dull.

Slide8

It really doesn’t go anywhere, and often programmes are like that too. Each individual item may be great, but you don’t lead the audience anywhere, and don’t have everything tied together.

Good Night, Little Bear is much more interesting. We read this to David almost every night, and even though it doesn’t have crinkly pages, he still seems to really enjoy it. The story is (essentially) little bear not wanting to go to bed, instead he goes off to play, until eventually he watches the sunset, it gets dark, and he realises he should have listened to Mama bear, and in fact he’s lost now and can’t find his way home. But then Mama bear, assisted by Little Bear’s friends, Mouse and Squirrel, come to find Little Bear. He hears them calling him, and runs to Mama Bear’s arms. He’s now feeling tired, and goes to bed. It’s really well told, with lovely pictures, and so on.

Little bear energy

A much more complex rough energy flow chart.

So that’s the “energy flow” concept.  Reasonably simple to grasp.  If we are making an event which is a variety show / sandwhich programme, or a concert, then it’s worth thinking about this stuff, and saying “How do we want to start?  Something big and fun to grab the attention, and then we can settle down a bit, work our way up to a climax, and then slowly bring it to a close…”.

Read more...