Supporting Child and Adolescent Mental Health Services

Child & Adolescent Mental Health Services Poster

I’ve been setting up a WordPress site with an associated BuddyPress Forum on my Digital Ocean Linux Server during the gaps today (we have our 2 year old granddaughter staying with us this weekend). This for my daughter in law Gill, who is doing some work with Mental Health Charity MIND, and potentially with CAMHS (Child & Adolescent Mental Health Services). This to provide a much needed information and shared experience resource for Medical Professionals, Parents, Teachers and Children. The latter both the afflicted, and siblings plus others they have regular contact with.

As a former special needs teacher, she finds there’s a massive gap in training and that from speaking to medical students, she’s found they learn barely anything about mental health. She’s keen to close that off and to also give online support to all concerned wherever and whenever it’s needed.

I’m just working around a few nuances on how one particular WordPress theme queues up a newspaper style layout on the front page, and to put in some of the preventative measures to arrest the usual torrent of user & comment spam that afflicts sites like this. Once done, she becomes mission control.

Really looking forward to the result when it goes live, her other commitments permitting!

 

Indie Web Fragmention support added here

Highlighted Pen Marks in Book

I saw an excellent article on Fragmentions on Medium, written by Kevin Marks. One of the big gotchas with telling someone to go look for information on a web page is that the paragraph you want to point at is often a far distance down – so the user has to go scanning the page to find the text you reference.

Kevin proposed adding two hashes to the end of a web page URL, where you could park words to look for in the text of the page. So, for example, if I wanted to send someone to the paragraph in my recent blog post about Police Statistics where I mentioned “crimes solved”, i’d cite a URL of:

http://www.ianwaring.com/2014/04/20/so-how-do-policing-statistics-work/##crimes+solved

and off it would go to that page, scroll down to that text and highlight the location where it resides. Job done. Fortunately, he mentioned this on an Indie Web IRC channel, and Jonathan Neal duly coded it up in short order. One implementation as a Chrome Extension, so you added support for this structure to any web site you visit using Chrome. The other implementation was for a single web site, so that anyone on any browser – without any special extension added – nevertheless could get the same effect immediately. You can download this off Github here.

I’ve implemented the web based Javascript version to work all across ianwaring.com. A few examples:

http://www.ianwaring.com/2014/03/13/the-art-of-decoy-pricing/##arbitrary+coherence

http://www.ianwaring.com/2014/02/28/enterprise-it-meets-the-hall-of-marbles/##million+marbles

http://www.ianwaring.com/2014/04/17/dear-water-cooler-if-this-person-talks-please-listen-in-for-me/##Marc+Andreessen

You get the idea. It works even without the final slash character before the ## – that is just a feature of the default URLs on my blog. You can do this for any URL on my blog – so feel free to refer away!


Footnote: I’ve implemented this as a custom child theme on my WordPress network site, leaving the fragmention.js file in the parent themes Javascript subdirectory, then adding the loading code and associated CSS into a copy of the header.php file in the child theme directory, just above the call to wp_head(). I avoid calling in the Javascript if the page being rendered is an Admin/Dashboard related page:

Fragmention Code in header.php

File style.css in the child theme directory just inherits the style.css content from the parent theme:

Code in style.css in WP Child Theme

Things should get easier as there are already at least two WordPress plugins queued up for approval to do all this automagically for any WordPress site (cited here). In the meantime, my handcoded version seems to work okay. Enjoy!

Programming and my own sordid past

Austin Maestro LCP5

Someone asked me what sort of stuff i’ve programmed down my history. I don’t think i’ve ever documented it in one place, so i’m going the attempt a short summary here. I even saw that car while it was still in R&D at British Leyland! There are lots of other smaller hacks, but to give a flavour of the more sizable efforts. The end result is why I keep technically adept, even though most roles I have these days are more managerial in nature, where the main asset attainable is to be able to suss BS from a long distance.

Things like Excel, 1-2-3, Tableau Desktop Professional and latterly Google Fusion Tables are all IanW staples these days, but i’ve not counted these as real programming tools. Nor have I counted use of SQL commands to extract data from database tables directly from MySQL, or within Microsoft SQL Server Reporting Services (SSRS), which i’ve also picked up along the way. Ditto for the JavaScript based UI in front of MongoDB.

Outside of these, the projects have been as follows:

JOSS Language Interpreter (A Level Project: PAL-III Assembler). This was my tutors University project, a simple language consisting of onto 5 commands. Wrote the syntax checker and associated interpreter. Didn’t even have a “run” command; you just did a J 0 (Jump to Line Zero) to set it in motion.

Magic Square Solver (Focal-8). Managed to work out how to build a 4×4 magic square where every row, column, diagonals and centre four squares all added up to the same number. You could tap any number and it would work out the numbers for you and print it out.

Paper Tape Spooler (Basic Plus on RSTS/E). My first job at Digital (as trainee programmer) was running off the paper tape diagnostics my division shipped out with custom-built hardware options. At the time, paper tape was the universal data transfer medium for PDP-8 and PDP-11 computers. My code spooled multiple copies out, restarting from the beginning of the current copy automatically if the drive ran out of paper tape mid-way through. My code permitted the operator to input a message, which was printed out in 8×7 dot letter shapes using the 8 hole punch at the front of each tape – so the field service engineer could readily know what was on the tape.

Wirewrap Optimiser (Fortran-11 on RSX-11M). At the time my division of DEC was building custom circuit boards for customers to use on their PDP-8 and PDP-11 computers, extensive use was made of wire-wrapped backplanes into which the boards plugged into the associated OmniBus, UniBus or Q-Bus electronics. The Wirewrap program was adapted from a piece of public domain code to tell the operator (holding a wirewrap gun) which pins on a backplane to wire together and in what sequence. This was to nominally minimise the number of connections needed, and to make the end result as maintainable as possible (to avoid having too many layers of wires to unpick if a mistake was made during the build).

Budgeting Suite (Basic Plus on RSTS/E). Before we knew of this thing called a Spreadsheet (it was a year after Visicalc had first appeared on the Apple ][), I coded up a budget model for my division of DEC in Basic Plus. It was used to model the business as it migrated from doing individual custom hardware and software projects into one where we looked to routinely resell what we’d engineered to other customers. Used extensively by the Divisional board director that year to produce his budget.

Diagnostics (Far too many to mention, predominantly Macro-11 with the occasional piece of PAL-III PDP-8 Assembler, standalone code or adapted to run under DEC-X/11). After two years of pushing bits to device registers, and ensuring other bits changed in sync, it became a bit routine and I needed to get out. I needed to talk to customers … which I did on my next assignment, and then escaped to Digital Bristol.

VT31 Light Pen Driver in Macro-11 on RSX-11M. The VT31 was a bit mapped display and you could address every pixel on it individually. The guy who wrote the diagnostic code (Bob Grindley) managed to get it to draw circles using just increment and decrement instructions – no sign of any trig functions anywhere – which I thought was insanely neat. So neat, I got him to write it up on a flowchart which I still have in my files to this day. That apart, one of our OEM customers needed to fire actions off if someone pressed the pen button when the pen was pointing at a location somewhere on the screen. My RSX-11M driver responded to a $QIO request to feed back the button press event and the screen location it was pointing at when that occured, either directly, or handled as an Asynchronous System Trap (AST in PDP-11 parlance). Did the job, I think used in some aerospace radar related application.

Kongsberg Plotter Driver (Press Steel Fisher, Macro-11 on RSX-11M). Pressed Steel Fisher were the division of British Leyland in Cowley, Oxford who pressed the steel plates that made Austin and Morris branded car bodies. The Kongsberg Plotter drew full size stencils which were used to fabricate the car-size body panels; my code drove the pen on it from customers own code converted to run on a PDP-11. The main fascination personally was being walked through one workshop where a full size body of a yet announced car was sitting their complete. Called at that stage the LCP5, it was released a year later under the name of an Austin Maestro – the mid range big brother to the now largely forgotten Mini Metro.

Spanish Lottery Random Number Generator (De La Rue, Macro-11 on RSX-11M). De La Rue had a secure printing division that printed most of the cheque books used in the UK back in the 1980’s. They were contracted by the Spanish Lottery to provide a random number generator. I’m not sure if this was just to test things or if it was used for the real McCoy, but I was asked to provide one nonetheless. I wrote all the API code and unashamedly stole the well tested random generator code itself from the sources of single user, foreground/background only Operating System RT-11. A worked well, and the customer was happy with the result. I may have passed up the opportunity to become really wealthy in being so professional 🙂

VAX PC-11 Paper Tape Driver (Racal Redac, Thorn EMI Wookey Hole, others, Macro-32 on VAX/VMS). Someone from Educational Services had written a driver for the old PC11 8-hole Paper Tape Reader and Punch as an example driver. Unfortunately, if it ran out of paper tape when outputting the blank header or trailer (you had to leave enough blank tape either end to feed the reader properly), then the whole system crashed. Something of an inconvenience if it was supposed to be doing work for 100’s of other users at the same time. I cleaned up the code, fixed the bug and then added extra code to print a message on the header as i’d done earlier in my career. The result was used in several applications to drive printed circuit board, milling and other manufacturing machines which still used paper tape input at that stage.

Stealth Tester, VAX/VMS Space Invaders (British Aerospace, VAX Fortran on VAX/VMS). Not an official project, but one of our contacts at British Aerospace in Filton requested help fixing a number of bugs in his lunchtime project – to implement space invaders to work on VAX/VMS for any user on an attached VT100 terminal. The team (David Foddy, Bob Haycocks and Maurice Wilden) nearly got outed when pouring over a listing when the branch manager (Peter Shelton) walked into the office unexpectedly, though he left seemingly impressed by his employees working so hard to fix a problem with VAX Fortran “for BAE”. Unfortunately, I was the weak link a few days later; the same manager walked into the Computer Room when I was testing the debugged version, but before they’d added the code to escape quickly if the operator tapped control-C on the keyboard. When he looked over my shoulder after seeing me frantically trying to abort something, he was greeted by the Space Invaders Superleague, complete with the pseudonyms of all the testers onboard. Top of that list being Flash Gordon’s Granny (aka Maurice Wilden) and two belonging to Bob Haycocks (Gloria Stitz and Norma Snockers). Fortunately, he saw the funny side!

VMS TP Monitor Journal Restore (Birds Eye Walls, Macro-32 on VAX/VMS). We won an order to supply 17 VAX computers to Birds Eye Walls, nominally for their “Nixdorf Replacement Project”. The system was a TP Monitor that allowed hundreds of telesales agents to take orders for Birds Eye Frozen Peas, other Frozen goods and Walls Ice Cream from retailers – and play the results into their ERP system. I wrote the code that restored the databases from the database journal in the event of a system malfunction, hence minimising downtime.

VMS TP Monitor Test Suite (Birds Eye Walls, Macro-32 and VAX Cobol on VAX/VMS). Having done the database restore code, I was asked to write some test programs to do regression tests on the system as we developed the TP Monitor. Helped it all ship on time and within budget.

VMS Print Symbiont Job Logger (Birds Eye Walls, Macro-32 on VAX/VMS). One of the big scams on the previous system was the occasional double printing of a customer invoice, which doubled as a pick list for the frozen food delivery drivers. If such a thing happened inadvertently or on purpose, it was important to spot the duplicate printing and ensure the delivery driver only received one copy (otherwise they’d be likely to receive two identical pick lists, take away goods and then be tempted to lose one invoice copy; free goods). I had to modify the VMS Print Symbiont (the system print spooler) to add code to log each invoice or pick list printed – and for subsequent audit by other peoples code.

Tape Cracking Utilities (36 Various Situations, Macro-32 on VAX/VMS). After moving into Presales, the usual case was to be handed some Fortran, Cobol or other code on an 800 or 1600bpi Magnetic Tape to port over and benchmark. I ended up being the district (3 offices) expert on reading all sorts of tapes from IBM, ICL and a myriad of other manufacturers systems I built a suite of analysis tools to help work out the data structures on them, and then other Macro-32 code to read the data and put them in a format usable on VAX/VMS systems. The customer code was normally pretty easy to get running and benchmarks timed after that. The usual party trick was to then put the source code through a tool called “PME”, that took the place of the source code debugger and sampled the PC (Program Counter) 50 times per second as the program ran. Once finished, an associated program output a graph showing where the users software was spending all its time; a quick tweak in a small subroutine amongst a mountain of code, and zap – the program ran even faster. PME was productised by author Bert Beander later on, the code becoming what was then known as VAX Performance and Coverage Analyzer – PCA.

Sales Out Reporting System (Datatrieve on VAX/VMS). When drafted into look after our two industrial distributors, I wrote some code that consolidated all the weekly sales out reporting for our terminals and systems businesses (distributors down to resellers that bought through each) and mapped the sales onto the direct account team looking after each end user account that purchased the goods. They got credit for those sales as though they’d made the sales themselves, so they worked really effectively at opening the doors to the routine high volume but low order value fulfilment channels; the whole chain working together really effectively to maximise sales for the company. That allowed the End User Direct Account Teams to focus on the larger opportunities in their accounts.

Bakery Recipe Costing System (GW-Basic on MS-DOS). My father started his own bakery in Tetbury, Gloucestershire, selling up his house in Reading to buy a large 5-storey building (including shopfront) at 21, Long Street there. He then took out sizable loans to pay for an oven, associated craft bakery equipment and shop fittings. I managed to take a lot of the weight off his shoulders when he was originally seeing lots of spend before any likely income, but projecting all his cashflows in a spreadsheet. I then wrote a large GW-Basic application (the listing was longer than our combined living and dining room floors at the time) to maintain all his recipes, including ingredient costs. He then ran the business with a cash float of circa 6% annual income. If it trended higher, then he banked the excess; if it trended lower, he input the latest ingredient costs into the model, which then recalculated the markups on all his finished goods to raise his shop prices. That code, running on a DEC Rainbow PC, lasted over 20 years – after which I recoded it in Excel.

CoeliacPantry e-Commerce Site (Yolanda Cofectionery, predominantly PHP on Red Hat Linux 7.2). My wife and fathers business making bread and cakes for suffers of Coeliac Disease (allergy to the gluten found in wheat products). I built the whole shebang from scratch, learning Linux from a book, then running on a server in Rackshack (later EV1servers) datacentre in Texas, using Apache, MySQL and PHP. Bought Zend Studio to debug the code, and employed GPG to encode passwords and customer credit card details (latter maintained off the server). Over 300 sales transactions, no chargebacks until we had to close the business due to ill-health of our baker.

Volume/Value Business Line Mapping (Computacenter, VBA for Excel, MS-Windows). My Volume Sales part of the UK Software Business was accountable for all sales of software products invoiced for amount under £100,000, or where the order was for a Microsoft SELECT license; one of my peers (and his team of Business Development Managers) focussed on Microsoft Enterprise Agreements or single orders of £100,000 or more. Simple piece of Visual Basic for Applications (VBA) code that classified a software sale based on these criteria, and attributed it to the correct unit.

MongoDB Test Code (self training: Python on OS/X). I did a complete “MongoDB for Python Developers” course having never before used Python, but got to grips with it pretty quickly (it is a lovely language to learn). All my test code for the various exercises in the 6 week course were written in Python. For me, my main fascination was how MongoDB works by mapping it’s database file into the address space above it’s own code, so that the operating systems own paging mechanism does all the heavy lifting. That’s exactly how we implemented Virtual Files for the TP Monitor for Birds Eye Walls back in 1981-2. With that, i’ve come full circle.

Software Enabled (WordPress Network): My latest hack – the Ubuntu Linux Server running Apache, MySQL, PHP and the WordPress Network that you are reading words from right now. It’s based on Digital Ocean servers in Amsterdam – and part of my learning exercise to implement systems using Public Cloud servers. Part of my current exercise trying to simplify the engagement of AWS, Google Cloud Services and more in Enterprise Accounts, just like we did for DECdirect Software way back when. But that’s for another day.

 

Dear Water Cooler, if this person talks, please listen in for me

Twitter Bird Logo

Having only a small proportion of your registered users classified in your Monthly Active User (“MAU”) count is one of the surprising poor things about Twitter compared to most social media sites. However, some of the content there is absolute gold – if only there was a way to bottle it effectively.

The sort of thing that often happens is that a big announcement in the industry occurs (like Facebook taking over Virtual Reality Headset Maker Oculus, or Google buying Titan Aerospace, the manufacturer of solar powered drones that fly several miles up – above aircraft traffic – nominally as WiFi hotspots of the future where Internet Access is not yet available). There is then a collection of Venture Capitalists, Industry Analysts and folks with excellent industry backgrounds who mill around a virtual water cooler, and start bouncing views off each other on “what it means”.

Alternatively, you get someone like Marc Andreessen (@pmarca – one of the cofounders of Netscape and of VC Andreessen Horowitz, aka “A16Z”) rattling off a few observations about Venture Capital, and a myriad of people join in with views or differences of opinion. Again, another water cooler chat comes to life. The top level looked like this earlier today:

Points 1-11 of Marc Andreessen Talking about VC funding

Marc Andreessen Water Cooler points 11-15 re VC funding

I’m lucky in that when I get up, these folks on the West Coast of the USA are tweeting late into their night, so I get to see these posts at all. The one gotcha is that you have to step through each of his tweets to see the reposts and discussion around each point. When you do, it’s actually much better than a summary that a single quality journalist can put together – and bang up to date with the latest news in the industry. I waxed lyrical at this with a reply to Marc:

pmarca (Mark Andreessen) favouriting a post about Twitter water coolers

And then remembered i’d said the same thing to Kevin Marks during a Gillmor Gang podcast (on the live chat as the podcast was progressing, one Friday evening a week or two back). At the time, he suggested looking at a service called “Storify”. I did, but it hooks into Twitter based on subject matter, and not the way I thought would help. So, tweeted that as a comment back to Marc and to Kevin Marks:

Kevin Marks lays another golden nugget

And back came a reply from Kevin minutes later (he’s based in San Jose). Brilliant tip, so I went and had a look:

Aaron Swatz's Twitter Water Cooler Viewer

Bingo. Albeit it no longer works (as Kevin suggested), and we know that unfortunately, Aaron is no longer with us. So, time to go find his code and see if there’s a way to tweak it to work with the latest versions of the Twitter API, and then to lie in wait for any water cooler conversation taking place that involves one or more of a specific list of people I personally find valuable to listen to.

There are people in real life like that. You listen intently to what they say as gold nuggets keep getting brushed off their shoulders. I remember people like Tony Batchelor at Camborne School of Mines was like that (his expertise was geological and drilling for hot water far underground in Cornwall as a potential energy source, but his expertise in all sorts of related industries really fascinating to hear).

Twitter are sitting on the edge of being able to facilitate a sort of bottles of “TED Talk” quality conversations that they could farm from their own feeds. I’d even pay for those bottles – if they did a good job of keeping all eyes on those water cooler moments and could record them 24 hours/day, then deliver them to me succinctly. I fear I must miss most of them at the moment.

Coding for Young Kids: two weeks, only £10,000 to go

ScratchJr Screenshot

ScratchJr Logo

I’m one backer on Kickstarter of a project to bring the programming language Scratch to 5-7 year olds. Called ScratchJr, it’s already showing great promise on iPads in schools in Massachussetts. The project has already surpassed it’s original $25,000 goal to finish it’s development for the iPad, and last week made it over the $55,000 stretch goal to release an Android version too. With two weeks to go, we are some $15,000 short of the last remaining stretch target ($80,000) needed to fund associated curriculum and teaching notes.

The one danger of tablets is that they tend to be used in “lean back” applications, primarily as a media consumer delivery devices. Hence a fear amongst some teachers that we’re facing a “Disneyfication” of use, almost like teaching people to read, but not to write. ScratchJr will give young students their first exposure to the joy of programming; not only useful for a future in IT, but also providing logic and design skills useful for many other fields that may stimulate their interest. I thought the 7-year old kids in this video were brilliant and authoritative on what they’d achieved to date:

I opted to pledge $45 to contribute and to buy a branded project t-shirt for my 2 year old granddaughter; there are a range of other funding options:

  • $5 for an email from the ScratchJr Cat
  • $10 for your name in the credits
  • $20 for a ScratchJr Colouring Book
  • $35 for some ScratchJr Stickers
  • $40 (+$5 for outside USA delivery) ScratchJr T-Shirt (Kid or Adult sizes)
  • $50 for an invite to a post launch webinar
  • $100 for a pre-launch webinar with the 2 project leaders
  • $300 to receive a beta version ahead of the public launch
  • $500 for a post-launch workshop in the Boston, Mass area
  • $1000+ for a pre-launch workshop in the Boston, Mass area
  • $2000+ to be named as a Platinum Sponsor in the Credits
  • $5000+ for lunch for up to 4 people with the 2 Project Leaders

I once had a project earlier in my career where we managed to get branded teaching materials (about “The Internet”) professionally produced and used in over 95% of UK secondary schools for an investment of £50,000 – plus a further £10,000 to pay for individual and school prizes. In that context, the price of this program is an absolute steal, and I feel well worth every penny. Being able to use this across the full spectrum of Primary Schools in the UK would be fantastic if teachers here could take full advantage of this great work.

So, why not join the backers? Deadline for pledges is 30th April, so please be quick! If you’d like to do so, contributions can be pledged here on Kickstarter.

ScratchJr Logo

Footnote: a TED video that covers Project Leaders Mitch Resnick’s earlier work on Scratch (taught to slightly older kids) lasts 15 minutes and can be found here. Scratch is also available for the Raspberry Pi; for a 10 minute course on how to code in it, i’d recommend this from Miles Berry of Roehampton University.

Collaborating with Chinese Copycats – the Open Source Way

3D Robotics Iris Drone Copter

Last year, I bought the book Makers: The New Industrial Revolution by Chris Anderson. Previously the Editor-in-Chief of “Wired” magazine, he set up his own company making model flying drones, each containing a mobile phone “system on a chip” and most often these days including a camera. I think it was very instructive what happened when he found out someone in China was cloning his designs and translating his user manual in Chinese.

Some of the community members were shocked at this “blatant piracy” and asked Chris what he was going to do about it. His answer: Nothing. Instead of pointing legal guns at the person doing this, Chris engaged him instead – human being to human being.

A member called “Hazy” said he’d been working with some Chinese hardware cloning folks, and was the person doing the translation of the documentation into Chinese. Chris complemented him on the speed it had been done, and asked if he’d consider bringing the translation into their official manual. He agreed, so Chris gave him edit access to the project Wiki (a shared, public document editing space), and set things up so that people could switch over from English to the parallel Chinese translation if preferred.

Hazy proceeded to integrate the Chinese version of the manual seamlessly. Then he started correcting errors in the English version too. Chris could see all the commits flowing by and approved them all: they were smart, correct and written in perfect English. Then it got interesting.

Hazy started fixing bugs in the drones software code. At first, Chris thought he’d published documentation changes in the wrong folder; he checked it out, and it was code and his fix was not only correct, but properly documented. Chris thanked him for the fix, and thought little more about it.

But then the code commits kept coming. Hazy was working his way through the issues list, picking off bugs one after another that the Development team had been too busy to handle themselves. Today, Chris considers him to be one of their best Dev team members.

He turned out to be a PhD student in Peking University, who as a kid was fascinated by radio control models, and always wanted his own RC plane. When he could afford one, he and his friends learnt about Chris’s work, but found it inconvenient as it was all documented in English . So, he translated it so Chinese fans could also build on the work. He signs off saying “Thank you for the great work of DIY Drones (Chris Andersons company), and I hope it will help more people make their dreams come true”.

The DIY Drones industry has come on leaps and bounds since. I notice many of the units you can buy ready-assembled (like this Parrot one) can be operated via WiFi using an iPad, which can show the view from the onboard camera as it flies. More advanced models can, if they lose communication with the user – or are running low on fuel or charge – return automatically to the location they originally took off from.

That said, the strategy that Chris followed was “Open Source” done properly. Open things up, and let everyone learn from, then stand on the shoulders, of giants.