The REAL Battle Of Mobile Bay

From Wikipedia, the free encyclopedia… Enjoy ;-)
Battle of Mobile Bay
Part of the American Civil War
Bataille de la baie de Mobile par Louis Prang (1824-1909).jpg
Battle of Mobile Bay, by Louis Prang.
Date August 2, 1864–August 23, 1864
Location Mobile Bay, Alabama
Result Union victory
United States United States (Union) Confederate States of America CSA (Confederacy)
Commanders and leaders
David Farragut (Navy)
United States Gordon Granger (Army)
Confederate States of America Franklin Buchanan (Navy)
Confederate States of America Richard L. Page (Army)
12 wooden ships
2 gunboats
4 ironclad monitors
5,500 men
3 gunboats
1 ironclad
1,500 men
1,000 Samsung Galaxy Note 7‘s
Casualties and losses
151 killed
177 wounded
1 ironclad sunk
13 killed
22 wounded
1,587 captured
1 gunboat captured
1 gunboat destroyed
1 ironclad captured


The Battle of Mobile Bay of August 5, 1864 was an engagement of the American Civil War in which a Federal fleet commanded by Rear Admiral David G. Farragut, assisted by a contingent of soldiers, attacked a smaller Confederate fleet led by Admiral Franklin Buchanan and three forts that guarded the entrance to Mobile Bay that was a central Confederate storage area for their mobile phones which were essential for communication amongst the Confederate forces.

The battle was marked by Farragut’s seemingly rash but successful run through a minefield that had just claimed one of his Stainless Steel, Single Block monitors, built with the help of the British genius Sir Jonathan Ive, enabling his fleet to get beyond the range of the shore-based guns. This was followed by a reduction of the Confederate fleet to a single vessel, ironclad CSS Tennessee.

css tennessee engages the unionTennessee did not then retire, but engaged the entire Northern fleet. Tennessees armor enabled her to inflict more injury than she received, but she could not overcome the imbalance in numbers and the Samsung Galaxy Note 7‘s which were being lobbed on to her deck. She was eventually reduced to a motionless hulk and surrendered, ending the battle. With no Navy to support them, the three forts also surrendered within days. Complete control of lower Mobile Bay thus passed to the Union forces.

Mobile had been the last important port on the Gulf of Mexico east of the Mississippi River remaining in Confederate possession with a supply of Mobile Phones – mainly Apple, with some of the more recently introduced Google Pixel phones, so its closure was the final step in completing the blockade in that region and severely reducing the Confederates capability to communicate.

This Union victory, together with the capture of Atlanta, was extensively covered by Union newspapers and was a significant boost for Abraham Lincoln’s bid for re-election three months after the battle.

Tennessee being bombarded by Samsung Galaxy Note 7‘s

This lead to one of Lincoln’s most memorable quotes:

“I Destroy my Enemies when I make them Friends, and give them a Samsung Galaxy Note 7

Abraham Lincoln Galaxy Note 7

Abraham Lincoln posing with a Samsung Galaxy Note 7 which he fondly remembered as “The Union Buster” after the Battle Of Mobile Bay.


funcjureI’ll soon be starting a new permanent job, and in preparation I’m making it clear what is my prior intellectual property. In this case, it’s not so I can make “oodles of money” in the future, but it’s actually so I can release it as Open Source.

So what I’ll be explaining here is not something I’ve finished, but an idea which I’ve actually been playing around with for a year or so, but never gotten around to fully implementing. This will also help bring together my thinking on this and hopefully inspire me to really get going on this project :-)


What is funcjure?

funcjure is a “functional syntax wrapper” around Clojure. What do I mean by that? Well, Clojure is a great language, especially if you’re either used to or prepared to adapt to prefix notation. ie instead of typing 1+1, you type (+ 1 1) which although relatively easy to understand, can get a bit harder as things get more complex, like 9+5*7/4+62/6 which would translate as (+ 9 (*5 7) (/ 62 6) etc…

The logical question is Why? (do I have to type prefix notation) The Clojure and Lisp people will say “well, that’s the way it is, so just get used to it”, which I’m fine with as I wrote my first Lisp program over 3 decades go. Even still, I would prefer to use infix notation (which is what we’re taught for maths) and see no reason why we shouldn’t as computers are great at doing the sort of rote translation required to convert infix to prefix notations.

Clojure is a great language, which also has a fantastic ecosystem and community, and is written in Java which has a HUGE ecosystem. Furthermore, Clojure can call Java code, which has helped tremendously by giving Clojure “out of the box” access to so many libraries and products. Finally, because Clojure is a Lisp, its strong point is Symbolic Manipulation which is exactly what is required for translating infix to prefix structures in order to implement funcjure!

What would this look like? Let’s take some typical Clojure and then show what it would look like in funcjure:

"Hello World!"            ; Minimal "Hello World!"
; "Hello World!"

(println "Hello World!" ) ; Standard "Hello World!"
; println("Hello World!)
; Clojure((println "Hello World")) ; Execute some Clojure code
(def a "test")            ; Define a variable
; a="test"

(def mylist '(1 2 4 5 6)) ; Define a variable list
; mylist='(1 2 3 4 5 6)

(println a mylist)        ; Print our variables
; println(a mylist)

(first (rest '(1 2 3 )))  ; Get the 2nd element of the list
; first(rest('(1 2 3)))

(.println System/out "Hello World from Java!")
; System.out.println("Hello World from Java!")
; or Java(System.out.println("Hello World from Java!"))

(defn factorial           ; Now let's do the classic Factorial function
  ([n]                    ; when only one argument is passed in
    (factorial n 1))
  ([n acc]                ; when two arguments are passed in, with recursion
    (if  (= n 0)  acc
    (recur (dec n) (* acc n)))))
(factorial 6)             ; And test it
; factorial(n) = factorial(n 1)
; factorial(n, acc) = if((n==0), acc, recur(dec(n), n*acc))
; factorial(6)

The overall purpose is to make code much more accessible and ‘natural’ to write as we’re essentially taught infix notation as our “second language” when we study even the most basic mathematics. None of this is really new – in the beginning, things look like our old friend BASIC, with direct assignment and loose typing, which easily map to Clojure. You’ll also notice that access to Clojure and Java is provided by the respective functions. Speaking of functions, these are written similar to Prolog and other languages (eg Erlang) which allow for “pattern matching” in function definitions. In the beginning, the capabilities would be mapped directly to Clojure (as shown above), but eventually it would be nice to go to a full Prolog style, so the factorial function could be written like

factorial(0) = 1                ; The base termination case
factorial(n) = n*factorial(n-1) ; Iteration by recursion

which I think is way more elegant.

That’s about it for this post, as this really contains the base concepts for what I’d like to do. There’s obviously a lot more scope and subtlety to this, some of which I’m aware of and probably a lot more which I’m not, but I personally would much prefer to use a language like this and have access to Clojure and Java when needed for efficiency or easy code porting.

What do you think? All comments / suggestions / critiques would be gratefully accepted as I haven’t really done much more work than this, other than having a 1/2 working translator for this syntax which I’m going to (hopefully) get to work on in the next few weeks before I start my job.

Watched Over By Machines Of Evil

Machines Of Evil

I dread to think (but
cannot help!)
of a cybernetic dystopia
where mammals rule computers rule mammals
living in a sad world with no humanity
algorithms polluting
our water
and our sky.

I dread to think (but
cannot help!)
of a cybernetic garbage dump
filled with dross and electronics
where deer are killed
by protective drones
as if they were objects
with no remorse.

I dread to think (but
cannot help!)
of a cybernetic boot
stomping for continual labor
detached from nature,
detached from mammal
brothers and sisters,
and all watched over
by machines of evil.

The above is the exact opposite of “All Watched Over By Machines Of Loving Grace” by Richard Brautigan. And no, I don’t actually think of that as our future, but more of a warning of where it could go if certain human dynamics in our world system are left unchecked ;-)

Star Trek Beyond – BRILLIANT!


NOTE: Spoiler Free Review :-)

Before going to see Star Trek Beyond (in VMax & 3D at Crown Cinemas in Melbourne) I just happened to see one review which was rather negative, so I thought I’d write this one as my (and IMDB & Rotten Tomatoes) experience was pretty much the opposite. The film is GREAT! It’s probably the best of the Abrams reboots (at least as good as the first, and better than the second in my opinion).

With the price of movies (and Popcorn!) these days I’m pretty picky about what I see at the cinema, but the Abrams Star Trek movies need to be seen on a large screen in 3D. Speaking of 3D, I think they got it right as some films have given me a bit of a headache – this one was fine.

As this is a spoiler free review, there’s a lot I won’t cover, except what is revealed in the trailer – the Baddie (Krall) and his force are great, and there’s a clever twist at the end. Jayla is a great new character and hopefully we’ll see more of her. As to the ‘old gang’, well, they’re the crew of the Enterprise and all seem to get pretty even exposure throughout the movie.

Some of the highlights for me were:

  • The graphics in general – no more lens flares ;-)
  • “Gravity Scenes” – obviously a lot of thought put in to them
  • The view of warp from the outside – such a great new visualisation
  • The “Super Star Base” (York Town)
  • There’s a Gay character – obviously not groundbreaking in movies, but at least for Star Trek – and it’s handled well in that it’s “no biggie”, but “just the way it is”

Any Cons? Not really… this movie is not perfect, but it’s very good and moves along at a reasonable pace. You have to “suspend disbelief” to be in the “Star Trek Universe” – I can’t comment on what this film would be like for an “objective person” (who I presume would of never seen anything Star Trek in their life ;) as I literally grew up with Star Trek (my early first memories of TV were Star Trek as it was very (on the edge) scary to me at the time). There was some criticism of “dark scenes”, but there’s only a few really dark ones and it’s used effectively to dictate the mood.

Overall, I think they’ve now got a really good “tone” to Star Trek Beyond (thanks in part also Justin Lim’s (Fast and Furious) direction) which sets things up very nicely for the next movie – seems like they’ve really found their feet. As I mentioned earlier, this is a movie to see on a large screen and 3D. It’s also a movie I’d definitely see again (on DVD) as I’m sure there’s some bits I missed.

Back in Australia


WOW! I just realised that it’s been a year since I did a blog post. I knew it had been a while, but I figured around 6 months max… Well, I suppose I needed it, and the good news is that I’M BACK!

I’m not going to go in to what has transpired over the past year since an agile adoption, as it’s quite involved and will come out in some successive posts, but will focus on where I am now and what my Posting Plans are.

Near the end of last year we started planning a return to Australia after almost a decade in the UK – what a BLAST! So many lovely experiences, people, places and new friends :-) Eventually though, it was time to return to Australia as it really is my home and although I may have a few gripes about it, Australia really is an amazing place and as the old cliche goes: I now really appreciate how lucky I am to live in this country after being away so long. That shot above is from my local beach which is 3 mins drive, and I can get in to the city (in the distance) in around 1/2h with a walk and public transport – that’s a pretty good lifestyle.

So what’s in the pipe? A much more varied mix than when I started out doing just “software stuff”:

  • Reflections on life in the UK and Europe
  • Observations on life in Australia now I’m back
  • Reviews of gadgets
  • Travelogues as I explore my own country – now I’ve probably seen more of Europe than I have of Australia, so it’s time to correct that
  • Process  – yes, I’m still on the agile path
  • Architecture – looks like that will be my primary area of work still
  • Software – which I’m gradually getting back in to, with the current focus being Clojure
  • Probably the odd bit of music or photography to round things out
  • Anything else anyone would like me to write about…


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:

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:


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:


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 – 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…