Some things haven’t changed

Well the PS2 is now a PS4, but the famous technophobic brilliant detective is still on the airways. (https://flic.kr/p/cxwTEJ)

Watching Columbo from my sofa point of view

Summer 2018

A note to self, looking back on my last post to see what actually was achieved since.

Step 1 – “Get some tooling” – CHECK. Applied to ageing personal web stuff.

Step 2 – “Read up Jeff Patton’s User Story Mapping” – CHECK. The key catchphrases stand up no matter what: “Build the right product”, “Shared understanding” and adding my own twist “develop the greatest effect soonest”. Definitely worth a second read and reference.

Step 3 – “Play with Docker” – PARTIAL CHECK. Our lead developer has built an excellent Docker based infrastructure at work, bringing greater reliability and efficiency. My home kit isn’t compatible yet, so Vagrant will suffice until I update.

Steps 4 and 5 – We did set about using JIRA, Confluence and Bitbucket and bringing legacy projects to them

Moving on from my last employer, my next steps are to ensure I dedicate more time to:

  • Family
  • Exploring new tech – AR and VR of particular interest as it gains momentum as Oculus Go continues the process of bringing it mainstream
  • Gaining more product management experience
  • Photography – In camera, editing and restoration – creacog on Flickr
  • Tidy up this blog – so much has changed in the last 6 years

Then possibly freelance until finding the next permanent role.

New year 2018

Personally speaking, 2018 is going to be a year of getting at least some Agile and DevOps adopted at work.

Step 1 – Get some tooling… Kicked off with Vagrant and commenced updating the brain from my previous php5 use to 7. So far so good.

Step 2 – Read up Jeff Patton’s User Story Mapping- Which does seem to stand up to it’s strap-line: “Discover the whole story, build the right product”. From reading this, “Shared understanding” will be my new catchphrase for the year.

Step 3 – Have a play with Docker…. first problem… otherwise trusty old mid 2009 Mac Book Pro:

$ sysctl kern.hv_support
kern.hv_support: 0

So there’ll be no Docker practice on this machine.

Step 4 – Introduce work to some supporting tools: (JIRA, Confluence, Bitbucket)

Step 5 – Start using this stuff – Plenty of legacy work projects to migrate, and a couple of home projects.

This might be the excuse needed to justify updating my otherwise very long-lived Macs.

Long time no speak

Was 2012 really the last post from me?

In that time lots has happened in the world, especially the last few weeks! So far as this blog is concerned, I’ve been in permanent employment as a Digital Project Manager for about 4 years. So there’s neem a lot less time spent programming and nearly no time with Flash. Which, for the kind of projects I was using it for, is now truly dead. Of course niche requirements remain, and major sites still use it’s video capabilities, but much of the world is coming to the El Reg way of thinking of this and pretty much any other browser plugin.

In its place we have html5, the canvas and WebGL, ironically catching up to where flash was 4 years ago – but with a much worse language. Can’t help thinking how much more advanced browser interactivity would now be had ECMA Script 4 been adopted to advance javascript. Adobe AIR never really worked particularly well for me – especially on the phone I got for the purpose of testing. So despite investing a huge amount of time and cash in ActionScript development, it will be a rare day those skills are put to direct use in the future.

Looking back over the articles published, the one with the most traffic is the one that was most off-topic, and connected to the 1980’s tech of my teenage years: resurrected my tascam porta 05

Looking forward, since flash programming is mostly off the agenda, future subjects are likely to include:
* Photography
* Project Management
* Interactive media – websites, mobile apps, IoT etc
* General bits of tech that interests me

Mac Pro Wake from sleep, restarts instead

A couple of weeks ago my Mac Pro (Early 2008) started failing to wake properly from sleep – basically it would boot from scratch rather than awaken.

PRAM zapped and all the usual stuff you see written across various forum. Then at the point of installing a replacement backup battery, I noticed a bright red light on one of the RAM risers.

Cutting a long story short, one of the RAM modules has failed. Checking the system profile, 4Gb of installed RAM is missing. The mac has wisely ignored the failing bank of RAM, but it would have been nicer if it had also alerted me to the fact prior to looking inside.

End result: physically removed the modules on the failing bank and now sleep/wakeup works as normal again. Fingers crossed the memory supplier will replace the failing package on their lifetime warranty.

(Update: August 2018, I should have updated this at the time, but Crucial sent a replacement module very quickly and that has worked without fault ever since – the machine is still in regular use at time of writing)

Flex4.6 mobile maxChars bug/problem and workaround

Bug-note to self, and workaround while waiting for the bug-base to migrate from Adobe to Apache.

I’m using in a Flex 4.6 mobile project and found that setting the maxChars property to 512 caused exeption:

Main Thread (Suspended: ArgumentError: Error #2006: The supplied index is out of bounds.)
flash.text::StageText/set viewPort [no source]
spark.components.supportClasses::StyleableStageText/updateViewPort
spark.components.supportClasses::StyleableStageText/commitProperties
mx.core::UIComponent/validateProperties
mx.managers::LayoutManager/validateProperties
mx.managers::LayoutManager/doPhasedInstantiation
mx.managers::LayoutManager/doPhasedInstantiationCallback

However setting maxChars to something much smaller (e.g. 10) was fine. From experimentation, seems that the biggest number to which maxChars could be set without causing the problem was 481. I have no idea what that number relates to. Anyway the database field my TextInput corresponds to is 512 chars max so that’s the number I need.

The workaround:

Setting maxWidth on the TextInput seems to solve the problem. But rather than insert a constant I want the TextInput to flex to the width of it’s container, so the following seems to avoid the problem:

 

<s:TextInput
id        ="textInputId"
maxWidth  ="{skinableContainerId.width}"
maxChars  ="512" />

 

The future of Flex :

Thanks for the Macs

The passing of Steve Jobs last week, like others, caused me to reflect on his impact on my life via Apple.

I was a child of the 70s and teen of the 80s. I wanted to fly aircraft and was into science (fiction and fact) and electronic music.

Science fiction was full of computers : from Star Wars, Space 1999, BattleStar Galactica, Buck Rogers and Blake’s 7 etc

As for science fact, the first significant event I remember well – being allowed out of lessons to watch the first Space Shuttle launch on tv. Around that time the school had 3 computers. Two Commodore PETs and a ZX81. I got into trouble for not doing my homework to write a program to tie a tie. It was only ever to be a series of print statements that had to be read out for the teacher to type into the PET. I had a go at blagging it, reading from a blank page in my note-book and I was caught. Despite that fail, my interest in computing was sparked and all my savings went towards a ZX81. Followed a couple of years later by a ZX Spectrum and input of many listings from the likes of Sinclair User and Your Computer.

I gradually became aware of Apple via occasional appearances of the Apple II on the likes of the BBC Computer Programme / Micro Live. It had an immediate reputation of being a cutting edge machine but massively expensive. Similarly the original Macintosh was far beyond anything I could afford, so my next machine was to be a Sinclair QL. Although the QL was still not a GUI machine, Mac was already an influence causing me to create my A-Level computer science project on the QL, a GUI music sequencer. Admittedly it was just a graphical menu system driven by cursor keys, but this was the start of my interest in UI programming.

In my first year at University I bought my next machine – an Atari ST 512. Finally something with a GUI. A decent machine for the budget, and useful for games and as a music sequencer. It had a WYSIWYG word processor, but output looked a bit rough by the time my Epson LX-80 had printed. It was no Mac.

My 3rd year at Uni was industrial placement. I spent my year with ICI programming VAX FORTRAN on a DEC VAX 6310 cluster running VMS. All the UI work was text menu based and occasionally command-line. I was then well prepared for a career of programming in an industrial environment. However I was saving up deciding on a new machine for my final academic year where I knew I’d need to write up my final year project. I bought a number of issues of MacUser – everything about Mac oozed quality and I longed for one.

So in 1991 I managed (strangely) to get a discount on my first Mac by trading in my Sinclair QL. I was sad to see the QL go, but very happy to welcome a Macintosh LC and StyleWriter with WordPerfect for Macintosh. A really good machine which I retain to this day. Although it hasn’t been out of it’s box for a while.

WordPerfect came with student discount and a competition. I entered and won. The prize : A new Macintosh LC! Once sold, the initial net cost of my first Mac turned out to be pretty small. Other than completely underestimating how long it would take to print out my final report at full quality on the StyleWriter this machine was a good choice. While others were messing tweaking PCs, the Mac just worked and the print quality was great.

Through MacUser I was once again a lucky competition winner. The Prize: Flight to San Francisco with tickets to attend MacWorld Expo 1993. I had only been abroad once before so this was the trip of my life to that point and the exhibition at the Moscone centre was the biggest I;d ever seen. My least expensive purchase during the trip, but the most valuable, was a copy of Macintosh Human Interface Guidelines (ATL). I haven’t read it in some time but while all the examples in the book are specific to the look and feel of Mac System 7, I recall it includes reasoning and many principles which remain useful today.

By the end of it’s useful life in about 1994/1995 the LC’s memory was increased from 2Mb to 6Mb, vRAM increased from 256K to 512K, hard disc increased from 40Mb to 500Mb, an accelerator replaced the 68020 cpu with 68030, a 17inch monitor replaced the tiny 12inch original, AppleCD 150 CD-ROM drive was added and I saw QuickTime running for the first time. Ok, the drive was single speed, discs loaded via a caddy, and the video was postage-stamp size – but it felt revolutionary. Also many hours were spent in the world of MYST – CD-ROM based game.

Back in 1993 being the owner of a Mac and having an interest and knowledge of user interface principles helped me win my first job in ‘interactive media‘. A startup company formed to develop applications teaching English as a second language. We started with an empty office, my Mac LC and PhotoShop, soon replaced by a Quadra 800 and we choose MacroMind Director with which to develop our educational games.

Since then and to date I have always had a Mac as my primary machine and usually a PC to target-test. My work programming interactive media has taken me from small town small company through to London multinational PLCs and now to working freelance. I used System 6 through System 9 and Mac OS X from 10.1 to 10.7 and loved it – every improvement every step of the way.

I am no Apple fanboy. I don’t buy everything Apple produces (no iPad no iPhone). I grumble when things don’t work. I didn’t agree with everything Steve Jobs said but Macintosh in particular has been good to me every day for the past 20 years. For that I thank Steve Jobs and the teams of people he brought together to make it happen. I hope we (Apple staff and customers) all learned enough from his example to keep up the momentum. His passing has given me a kick in the pants to go and get more stuff done.

Which width? (AIR on devices)

Within the Flash APIs is there there are many similarly named properties which provide subtly different results based on their spec and the state of the application. Width and height are such properties.

Having just read of Mike Jones’ recent article: 10 Tips When Developing For Multiple Devices, and tip #1: Check screen dimension on initialisation, it includes a couple of lines of code to get the landscape height and width of the device screen using a boolean expression to determine the longest dimension. For me this begs the question, why can’t I simply get the right values directly from the API? Especially if my app.xml properties state the app should only display landscape, full screen.

The properties examined here:

Although accurately described in the reference, it isn’t necessarily easy to visualise the differences in behaviour for these properties from the documentation alone. So herewith, a simple HelloWidthHeight app to trace out the values upon initialisation. Included in that app is a class implementing logic based on Mike’s as static methods. The results of debug sessions executed on my HTC Desire are detailed for comparison in the table below.

Key app.xml <initialWindow> properties used were:

  • <visible>true</visible>
  • <aspectRatio>landscape</aspectRatio>
  • <autoOrients>false</autoOrients>
  • <fullScreen>true</fullScreen>
A B C D
stage.orientation default rotatedRight rotatedRight rotatedRight
stage.width 0 0 0 0
stage.height 0 0 0 0
stage.stageWidth 480 800 800 800
stage.stageHeight 800 480 480 480
stage.fullScreenWidth 480 480 800 480
stage.fullScreenHeight 800 800 480 800
Oriented.landscapeScreenWidth 800 800 800 800
Oriented.landscapeScreenHeight 480 480 480 480
Oriented.portraitScreenWidth 480 480 480 480
Oriented.portraitScreenHeight 800 800 800 800
  1. Screen inactive, phone held in any orientation
  2. Screen active, phone lying flat on the desk
  3. Screen active, phone held landscape, mic to the right (this is the intended orientation for the app)
  4. Screen active, phone held portrait, mic to the bottom

In conclusion, unless the application is only ever launched while the screen is active (though that would be the norm), the safe way of determining an oriented width and height is to use a boolean expression along with the fullScreenWidth and fullScreenHeight properties.

UPDATE (20-July-2011): The following table runs the same code in the BlackBerry PlayBook Simulator:

A B
stage.orientation default default
stage.width 0 0
stage.height 0 0
stage.stageWidth 1024 1024
stage.stageHeight 600 600
stage.fullScreenWidth 1024 1024
stage.fullScreenHeight 600 600
Oriented.landscapeScreenWidth 1024 1024
Oriented.landscapeScreenHeight 600 600
Oriented.portraitScreenWidth 600 600
Oriented.portraitScreenHeight 1024 1024
  1. Simulator initially landscape
  2. Simulator initially portrait

Note: Behaviour is slightly different on the PlayBook simulator in that the orientation of the application is set before the initialisation code runs. Therefore unlike on the HTC Desire, fullScreenWidth and fullScreenHeight are correctly returned as the orientation of the application expects.

If anyone else cares to run the code, I’d be interested to hear how variable other devices are in their results, or if this is showing a bug when run on HTC Desire. Running AIR 2.7 here.

Apple Cinema HD 23inch dies, then resurrects

This morning I was greeted with a blank screen and the power light flashing short-long-short, and groaned at how expensive today was about to get.

The Apple support page states that this flash pattern indicates the wrong power adaptor is being used with the display. I’m using the original 90W adaptor supplied with the screen and keep it powered via an APC UPS.

Fortunately with a bit of googling I found the ‘paper w’ solution here and on the post by jakobeon on the Apple disscusions forum. Essentially by using a strip of paper to blank off the middle of the 5 output pins from the power brick, the display is back to life.

From reading through comments made by others in both forums, and scanning over the power adaptors page, I’m forming the following conclusions. (Note: these are my guesses based only on my interpretation of other’s anecdotal evidence rather than anything authoritative).

1. I suspect the middle pin is used only to allow the monitor to sense which of the 3 Apple power-bricks is attached. If so then it seems more concerned with protecting the monitor from a low power brick, rather than from being overloaded somehow.

2. A number of people have indicated that simply replacing the brick like for like or with the higher power version makes no difference. This suggests to me that the fault is within the electronics of the monitor, when detecting the power source at switch-on, rather than in the brick.

So while this is far from an ideal solution, it is cheap, simple and quick to implement compared with trucking everything back for repair. However if in doubt, get it repaired by Apple – don’t blame me if your house burns down.

Finally using a decent mouse-surface

I’ve been using Apple Magic Mouse for some time. I love it. I’ve used loads of optical mice before it. The one thing that annoys me, even with this mouse, is that it’s accuracy depends very much on finding a decent surface.

I tried loads and loads of surfaces. More or less any surface (except transparent) will do for short stints. But for my workstation, my most used have been the cover of a hard back note-book (such as the Black n’ Red Casebound Hardback A4 Book), glossy magazine covers, other cardboard rectangles (e.g. the back of a note pad) taped to the desk. All of these surfaces tend to suffer the following problems:

  • They wear out
  • They move across the desk unless taped down
  • They are abrasive t the mouse – the tracks on my magic mouse are looking a little worn
  • They get grubby
  • They they turn to mush if coffee is spilled on them
  • Eventually the only relationship of the screen pointer to the mouse is that it moved

Now I think I’ve finally found a surface that will not wear down my mouse rails any further, so far yields extremely accurate results and will stand up to a tea spillage. Unfortunately costs a few quid, but that’s better than trying to accommodate a pointer with a mind of it’s own when on a deadline. The Razer Vespula Gaming Mat.