an agile adoption

Tai Chi Statues

My approach to agile* adoptions is based quite a bit around Tai Chi and Taoist philosophy which I won’t go in to as you can search about that on the net. There are a few principles worth noting from these:

To the mind that is still, the whole universe surrenders ~ Lao Tzu – 6th century, BCE

Empty your mind. Be formless, shapeless. Like water. You put water into a bottle and it becomes the bottle. You put in a teapot, it becomes the teapot. Water can flow, or it can crash. Be water, my friend! ~ Bruce Lee, 1971**

which are a good philosophical summary of my approach to agile adoptions (well, actually life in general ;)

This series of posts is not directly about philosophy, it’s about the day-to-day progress of an agile adoption: The Good, The Bad and The Interesting.

So stay tuned, check back and drop in if you’re interested as this is just the beginning…


* In this series I’ll use the term agile with a lower-case ‘a’ to indicate “real ‘good’ agile” which I’ll explain as we go, compared to “Industrial Agile”, “Consulting Agile” and “Corrupted Agile” which start with an upper-case ‘A’

**

Swift to Objective C to C

ObjC swift COne of the things Swift promised was interoperability with Objective-C and C/C++. Well, it’s now here – relatively easily…

asciitrek asciiIf you follow me on Twitter (@RiczWest) then you’ll know I was working on an iOS game called ASCIItrek which is derived from Super Star Trek that was written in C. I’ll eventually do a complete rewrite in Swift, but before that I’m taking the existing code and integrating it in to an iOS interface. In order to do this I’ll need to call C code from Swift. The Architect in me however wants to cleanly separate things and use Objective-C as a “bridge”, which as you’ll see later is probably a pretty good idea.

It’s always been “theoretically possible” to do this in earlier releases of Xcode prior to 6.3, but the whole process seems fraught with potential errors and I could never get it fully working. With the recent release of Xcode 6.3 I thought I’d give it a go and am glad I did as it seems to work relatively easily as I’ll describe.

Note: In this post I’ll assume that you’re relatively familiar with coding in Xcode

Firstly, you’ll need to create a project, which is no-brainer – just create a Swift one which we’ll adjust as we go… At the highest level we’ll have some code which acts as a test harness which I just added:
SwiftHarness

where chopper (tribute to American Chopper :) is an Objective-C method and c_chop is a c one which is invoked from Objective-C. First, the Objective-C one which is relatively simple:

OCC

if you just look at the chopper method where I’m basically doing a string concatenation – we’ll get on to the c_chop method  after we’ve examined the C code:

chop

which has one basic method/function called chop that like the Objective-C one just prepends the parameter which is obviously more complex in C. The one thing that worries me slightly is the fact that I’m mallocing memory which is passed to Objective-C which I’m kind of assuming will be deallocated – I’ll probably revisit this later…

If you go back to the Objective-C code above for c_chop you’ll see there is a bit of complexity, which is why I think it’s better to wrap a C call in Objective-C. The stringWithFormat: method is just a concatenation, but notice that you have to convert the Objective-C/Swift string to UTF8Sting before passing and then convert the result back with stringWithUTF8String. To me, this is enough reason to have an Objective-C layer interposed between your Swift and C layers.

Hopefully this post has made it easier for anyone else who is on the same path – the code is on GitHub at https://github.com/RiczWest/swocc – feel free to mail me if you have any questions. Later, I’ll be doing another post on C to Objective-C to Swift (which I also need)

PS Having HUGE problems with syncing GIT, which I have just checked and they are a BUG – I will attempt to fix later…

The End of the Apple Honeymoon?

Note: If you think I’m some kind of “Apple Hater”, read My History with Apple at the bottom

Apple seems to be suffering an all-round lack of quality in their software and some would say hardware – what to do? Before we get in to this, let me tell you my tale of woe…

FlamingHoneymoonThis post has been 6 months or more in the making, but has culminated with the problems I’ve been having with my iPad Air 2 over the past months. It all started so innocently – I was happily using iOS 7 and I’d installed a new App which said “In order to use this, you must use iOS8″. Fine, I thought – it’s been out for a while and there have been a few incremental updates (something like 8.0.3) so I upgraded. From memory, this one was OK, so when 8.1.2 or 3 came out I didn’t really think much and just upgraded, and that’s when my problems started.

Apple Horror MovieIt was a bit like a horror movie – you know, everything is fine, the sun is shining – living the good life (on iOS 8.0.3 :). Then, one day (some time in 8.1), something a bit out of place happened – I was finding it hard to close browser tabs – didn’t really think much of it. Unfortunately over the next few days, things got worse! Typing started either not getting the characters or doing multiple characters and it just got worse and Worse and WORSE! Basically, my iPad was bricked. “Luckily”, 8.2.2 had been out for a while so I upgraded, after checking the forums as some people reported it solving the problem.

Groundhog DayThen, like a groundhog day, all started coming back with the same pathology – first, an error here or there and after a few days – bricked again. 8.2.3 came out so I went to this – same thing – worked for a while, then bricked. I was at the end of my tether and was at the stage of buying a cheap Android tablet to use at work until Apple fixed things on the iPad. Again, as luck would have it, 8.3 is out and I’ve just upgraded today. I’m not holding my breath though as I know that this bug can surface after days or weeks…

 What’s the Problem?

My experience is not unique. In fact, I’m one of the “Lucky Ones” who didn’t have problems with iOS 7. Just Google “iOS problem” and you’ll find there are 194M pages!!! I know there are even more hits for Android (564M) and Windows Mobile problems (264M), but is that really something to compare to? Especially when both those platforms are on a wide range of uncontrolled hardware, whereas Apple is a “closed ecosystem” where they’ve designed every Apple Phone ever made. As a long-time (over 30 years – I started with an Apple II) Apple user I’ve seen an increase in the quality of their software, until the last few years. A bit like my touch problem, they surfaced occasionally, but were not of significance, but now we’re talking about many, releases with the same or worse problems – where will it end? Don’t think iOS 9 will necessarily fix everything as as iOS 8 was supposed to fix the problems of iOS 7!

What’s even worse, the “Crappy Quality Virus” seems to of infected the Mighty OS X. Touch wood and 3 Hail Mary’s I’m actually OK – running Yosemite 10.10.3 and no problems. Again, Googling “OS X problem” gives 264M hits – more than iOS! For both OS’s, there’s now a huge industry around documenting and fixing the various problems – all on platforms that Apple has total control over – THERE IS NO EXCUSE!

What’s the Solution?

As I mentioned at the beginning, I’m not an Apple Hater. In fact, I’m an Apple Lover – I used to have the attitude of buying Apple for anything personal. Unfortunately, I’m now in the situation where if this doesn’t improve I’ll be replacing my iMac with one of the many all-in-one PC’s, and my Tablet with an Android or Windows one. I already have an Android phone as I was about to get a 5, but the company I was working for got pre-release devices and they kept (physically) breaking.

Apple JobsTo the solution: I believe this malaise set in with the passing of Steve Jobs. For all his faults, the amazing thing about Jobs was that he got understood the Business, Design, Hardware and Software of making “Insanely Great Products”.

What have we now? We have Tim Cook who’s background is in Sales and Manufacturing and Jony Ive, the reclusive yet internally influential and widely acknowledged design genius (although I do question the “new blue folders” on Yosemite and the Apple Watch). What’s missing?

        Hardware & Software

Name the people associated with those… There’s a hardware guy who we see in their videos, but I can’t find him on Google. For software, there’s Craig Federighi and I must admit I thought Phil Schiller was until I looked up Google and found he’s VP of Marketing! Therein lies the problem – there’s no outstanding person across Hardware and Software. Although the ideal would of been to find another Jobs to replace them all, I don’t think that would ever happen. What is needed is someone responsible for “Integrated Design” who can work with Ive, ensure the highest standard of hardware and software is produced to go in to the Objects of Desire that Apple makes and has the same visibility as Cook and Ive.

Why did I write this?

Probably mostly to get all this off my chest and also as a warning of what may happen to Apple if they don’t get back on track. We’ve seen so many companies like IBM and Microsoft fall so far when they lost their way, it would be a pity to see the same happen with Apple…

Finally, I have the tiny hope that someone at Apple sees and relates to it – I’d love to continue the conversation…


original-apple-logoMy History with Apple

As mentioned at the beginning, before anyone thinks of criticising this piece (which you’re free to do after you’ve read this :) here’s a brief history of my (hopefully ongoing) time with Apple products:

  • Started with an Apple II
  • Used a Lisa – a rich friend had one when I was in my senior school years
  • Got caught up in the “PC Revolution”
  • Shipped some of the early NeXTs* to Australia, did the Australian product launch, taught NeXT programming, created software for NeXT, attended most NeXTworlds and met Steve Jobs
  • Got caught up in the “Java Revolution”
  • Employed by a company in the 90’s who used Apple gear, got my own and went to a few WWDCs (before they were hip)
  • Have continuously bought Apple products again since the 90’s
  • Currently have an iMac, Mac Mini, iPad 2, iPad Air, two Apple iPods and an Apple TV

* For you young’ns, NeXT was what Jobs created after Apple fired him and NeXTstep was the operating system which became Cocoa – all those NS prefixed classes stand for NextStep

The 100 (93) Brands at Baselworld

HYT_SkullGreenEyeAnyone who knows me, knows I’m an Amateur (cheap ;) Horologist. At the moment, Baselworld, which is one of the most exclusive watch events in the world, is on. There are many resources out there (which I’ll include in another post) but a key one which I’ll be using is the “100 Brands at Baselworld” by watchpro.com. Although it’s a great watch site, technically it’s not a great site as the search is broken and it’s clear the pages were  manually made rather than generated from a database. As a result of this, there’s no index for the 100 Brands! :-(

With a bit of “site: Googling” I’ve captured all this in to a spreadsheet which I then sorted and tidied. Below is an index for the 93 Brands at Baselworld – I don’t know why, but there are a few missing. Enjoy :-)

Note: Some links just go to pictures and others to a short article

What’s your favourite, most intersting etc..? Please post in comments below…

1 – Blancpain … 32 – Breitling … 63 – HYT
2 – Auguste Reymond … 33 – Storm London … 64 – Bentley …
3 – Ball Watch … 34 – Wolf 65 – Luminox – WatchPro
4 – Breguet 35 – Nixon 66 – Ebel
5 – Longines … 36 – Ice-Watch … 67 – Juicy Couture …
6 – Aviator 37 – Oris 68 – Bomberg …
7 – Ernest Borel … 38 – Linde Werdelin … 69 – Le Rhone …
8 – Claude Meylan … 39 – Guess Watches … 70 – Caravelle NY …
9 – Mido 40 – Bulova Accutron … 71 – U-Boat
10 – Speake Marin … 41 – Girard-Perregaux … 72 – Hublot
11 – Victorinox … 42 – Salvatore Ferragamo … 73 – Junghans …
12: Cuervo y Sobrinos … 43 – Mühle-Glashütte … 74 – Cat Watches …
13 – GUCCI 44 – Versus 75 – Artya
14 – Tissot 45 – de Grisogono … 76 – Bering
15 – Chopard … 46 – Bell & Ross … 77 – Sarpaneva …
16 – TAG Heuer … 47 – Swarovski … 78 – N.O.A
17 – Movado … 48 – Gc 79 – Eterna
18 – Harry Winston … 49 – Superdry … 80 – MCT Watches …
19 – Maurice Lacroix … 50 – Karen Millen … 81 – Mauron Musy …
20 – NOMOS Glashutte 51-Tonino Lamborghini 84 – Festina …
21 – Bausele … 52 – Swiss Military … 88 – Tom Carter …
22 – Alpina 53 – Roamer … 89 – Clerc
23 – Burberry … 54 – Versace … 90 – Albert Riele …
24 – JeanRichard … 55 – Raidillon Watches … 91 – Kairos
25 – Frederique Constant … 56 – Rado 92 – Junkers …
26 – Citizen 57 – Hamilton … 93 – Zeppelin …
27 – Georg Jensen … 58 – Dreyfuss & Co … 94 – Meccaniche Veloci
28 – Mondaine … 59 – Omega … 95 – Rosenthal …
29 – Zenith 60 – Bremont … 96 – Swatch …
30 – Emporio Armani … 61 – Pierre DeRoche … 97 – Patek Philippe …
31 – Christophe Claret … 62 – Calvin Klein … 98 – Faberge …

 

Apple, where for art thou?

Apple where for art thou?I was “doing stuff” on my iMac and got a Notification saying “Why not try the new Memory efficient and Fast Safari?”. Fine – I thought – I’ve just upgraded to Yosemite, so why not give it a go?

Boy, was that a mistake..! The first hint was Safari “Not Responding”

safari - Not Responding

Well that’s probably OK as it’s the first time Safari is staring up in my account, so it’s probably doing a few things…

safari - getting Memory

That’s a bit of a worry – a browser, which should be 2-300M in memory is not only consuming 3G Virtual Memory (I only have 4G real), but it’s now causing other programs like DropBox to “Not Respond”. That’s a serious load on the system!

safari - Memory Pressure

and it peaked at 5G memory consumption – that’s for a browser!!! The Yosemite image comes on less than that! There is a serious memory allocation bug here, however it’s leveled out, so I decided to just let it run… No difference though, it just stayed at 5G so I had to kill it (after about 10 mins)safari - kill

and of course everything went back to normal. To be fair, when I restarted it, Sarari, it was consuming less than Mozilla

safari - Normal

but there’s only 69M difference… Hmm… What to choose? A stable browser I’ve used for many years, or a “psycho browser” that chewed up 5G of memory on a whim? The choice is obvious!

Anyone who knows about the Broken Windows Theory of Software Development will realise that this is not a good sign. I’m not talking about some obscure utility that I had a problem with, this is the System Browser!

If I was Apple, I’d be worried about it… and I’d posit to say that if Steve Jobs was at the helm, this would of never happened. Unfortunately, the two people that seem to be “running” the company are Tim Cook (who is a classic Delivery Manager) and Jonathan Ives (Absolute Design Legend) don’t seem to understand one critical component to the whole “i-experience” – Software!

Yes, Jobs was a tyrant (I’ve met him and seen him meter justice to others for no good reason) but he did have an understanding of Software Quality, which is something that is sadly lacking with the current management…

This is just a small example of Apple “losing the plot” and anyone who has “upgraded” to the various bad versions of iOS or OS X will know what I’m talking about…

Why did I write this? Because I love Apple products! I’ve been using and programming them since before they were “cool” (2002 – actually 1993 if you count NeXT) and don’t think it’s too late! Apple are starting to go down a slippery slope… If they pick up their game they can still produce “Insanely Excellent” products, but that’s to be determined. If they don’t, then people like me will switch to Windows (which is becoming “not that bad”) or Linux (which I can handle) and everyone else will switch to something else about 5y after…

PS For those who don’t know me, this was written on an iMac and I have an iPad 2 Air, so I’m not an “Apple Basher” ;-)

PPS Another “broken windows” tip – who wants a calculator that has a translucent background on the display???

apple Calculator

what if I had a light background behind it? That’s just crazy… Again, broken windows

Review of the BMW i3

BMW i3Now I’ve got back in to the “blogging habit”, I have a ton of stuff that piled up over the past 4-5 months while I commuted (YUCK!) on the M20 & M25 to work. For those outside the UK, these are two major motorways that often have traffic problems. The worst experience I had was when my 1-1:15h commute took over 4 hours! At one stage, I did consider getting another car for this as we have a Renault Megane Coupet Cabriolet, but it guzzles the gas. Being a fan of electric / hybrid cars I did some investigation and realised that hybrids like the Lexus, Prius and whatever else are pretty much a waste of money as their efficiency is about the same as a modern petrol engine. The only thing that made sense was an electric with a range-extender which is basically a petrol powered generator which can charge the battery.

After quite a bit of research, the car which appealed to me most (and which I fell in love with as soon as I sat in it) was the i3. With a range of around 200 miles, a 120 mile round trip should be easy. Luckily I decided to do a test drive for a day and found out that all is not quite what it seems as you’d only get anywhere near that range if you did 55mph, which is not really what you’d want to do when the speed limit here is 70mph. The end result was that I had to stop for fuel on the way back – I may of just made it on one tank (which only holds 9l – huh?) but didn’t want to find out… Even if so, this would mean that I would have to fully recharge and refuel the car every day – that’s a bit too much effort.

BMW InteriorWith all the cons out the way, what are the pros? Well, a lot!

If you did shorter commutes or lived in a major city, this would be a very viable option as the interior is amazing – this shot doesn’t do it justice, but it all just feels so open. Add on to that the amazing acceleration of an electric vehicle and a top speed of just over 90mph, it can definitely hold it’s own in cities, towns and motorways.

Then, there’s a large list of features which really are quite innovative and show BMW’s commitment to creating a future full of electric cars:

  • Active Cruise Control – either cruises at your set speed or the speed of the traffic in your lane and will (safely) slow down if someone cuts in front of you
  • Traffic Jam Assist – will drive the car at speeds of up to 24mph on the motorway – this is absolutely amazing and eerie! You do have to keep a finger on the wheel so it knows you can take over if necessary
  • Parking Assist – if you never mastered parallel parking, don’t worry – this will do it for you
  • Connected Drive Services – assistance with anything – it connects you with a call centre that can answer any question and download routes to your car. It doesn’t stop there though, the navigation can show you public transport information and incorporate that in to your journey!
  • A Remote App – lets you monitor your car and even heat it up before you get in it – great for winter
  • Connected Drive Your car can connect to the internet and act as a hotspot, with no data restrictions – great for a long drive, if you could do it ;-) Along with that you can get Online Entertainment and Speech recognition for emails and messaging
  • Usage of other BMW’s – for the times when you need a petrol car, you can loan one from BMW – I’m sure I read this, but can’t find a reference now – I think this was at a ‘reduced rate’ or something. A great idea that acknowledges we’re not there yet with electric cars.

All in all, it’s a pretty amazing car, which I would of bought (well, probably leased) if only it had the range. It’s really quite revolutionary with its carbon-fiber chassis and other innovations so I look forward to the time (hopefully only a year or so) when they have a version that has more range by just increasing the size of the petrol tank.

Postscript – when researching this, I found a statement that BMW anticipate fully automated driving on European motorways by 2020 – can’t wait – that’s only 5 years away!

DIY Oil Spill Simulation

Croatia Oil SpillI’m currently looking for a contract (hint :) but today was not my normal day where I wake up, have a coffee, watch a bit of TV, then start looking for something… Because part of my start is checking out Social Media, where I came across this piece The only oil that goes with a Croatian bikini is olive! by teresafritschi via @JenniferSertl, one of the great global connectors. I’d encourage you to read the piece first, not only for the context of why I did this, but as to why you should be concerned that the oil industry and politicians will probably wreck the Adriatic in the next decade!

 

 

20101020 gulf oil spill mapNow to the graphic – how did I do it and what is it’s validity? In short, I used PowerPoint to strip out backgrounds and scale things correctly so I could transpose the BP Oil Spill graphic (from One-fifth of juvenile Atlantic bluefin tuna killed by BP oil spill) on to Google Maps. All you have to do is “go” to New Orleans and adjust the scale on your Google Map so it’s the same scale as as the graphic’s one:

 

BP Oil SpillOnce you have this, you can go to anywhere in the world (e.g. Croatia) and just underlay that graphic in to the sea – how do we do that?

First, you use a clever little feature that PowerPoint has called “Remove Background”. Firstly, you use it on the Oil Spill to remove the “Background”, which PPT thinks is the faintest part, so on that graphic it’s the map – Voila!

 

Oil Spill BackgroundNow you have that, set the transparent colour and you can rotate and transpose it to your hearts content so it fits under your map graphic

Croatia Oil Spill Underlay

There’s a bit of Art and Science in doing this – the key things I did for Croatia were align it with the coast and ‘reflect’ it so you have the same phenomena as on the top-right of the original Oil Spill because it’s in a sheltered area and so is the Adriatic. Just in case anyone questions this, I’ve been deliberately conservative as I actually think an oil spill could be even worse in the Adriatic as it’s effectively a confined space!

Croatia-TransparentOnce you have your underlay, how do you put it under the map? That’s where we go back to our friend from PPT, “Remove Background” – you’ll probably have to play about with it a bit this time (as the contrast between sea and land is not as obvious). You can now put together your final image as shown below by simply setting the layer order correctly.

All up, this probably took about an hour as it’s a bit of a fiddly process, but for a cause like Saving the Adriatic, it was well worthwhile.

Furthermore, if anyone’s drilling just off your coast, you can now do your own visualisation of what the impact may be on yourself and neighbouring countries ;-)

CroatiaLayers