Battle of Jutland

Well, this was one messy affair.

Below are just my opinions, thoughts and feelings about the Battle of Jutland. My sources are mainly a few books and some YouTube videos.  I’m not trying to be an expert or anything like that.

I’ve read the Battle of Jutland and a couple of other books on this topic about 20 times and each time I read any of them I can’t stop imagining how it would feel being stuck in one of those huge iron ships during the battle.  The idea of sitting in a steel tub in the middle of a vast ocean with projectiles the weight of cars falling all around sickens me.  Each projectile could easily turn many a man into atoms, yet that was not the only way to die at Jutland.  There were the flash fires spread by igniting cordite. There was drowning when a ship toppled over and one could not open the air tight doors to escape and of course there was options of freezing to death in the cold North Atlantic waters after surviving the sinking of a ship.

Jutland book Castles Of Steel book

These are my points of view.

Battle Plans

From the British point of view the Admiralty had had a fundamental flaw in their battle orders where a captain was expected to favor the safer option.  However, this tactic went on to produce a result where the Royal Navy controlled the seas.  The safety-first orders decreed that if given a chance to knock out an opposition ship the captain would be judged not by the fact that he was able to neutralize an enemy vessel but by ensuring he and his ship survived.  The German plans on the other hand had been to not engage in a fleet vs fleet action, but rather isolate a smaller part of the large British fleet and destroy it.  The German Navy was the aggressor as it had a point to prove.

For my part, I just can’t see how a few Admirals could control a large scale engagement.  Both sides didn’t want to face each other in full force, yet this is essentially what happened.

Communication

For me, this was the most crucial part of the whole engagement.  It stated at Doggers bank and lessons about the challenge of naval communications were not learnt. The Germans did learn a lot about compartmentalization though.  These days communication is taken for granted.  Those days (mind you this was less than 100 years ago) flags were still used.  A flag indicating an order would be hoisted and the instant it was taken down this was the sign to execute the order.  People had to identify flags from a distance and shout out when they were hoisted down.  They had to see through varying light conditions, mists, funnel smoke and the distance.  All of this plus many ships maneuvering at speed.

An error in communication could have spelled disaster at any point.  Although I don’t think that communication alone caused a major disaster for either fleet it was certainly responsible for many smaller disasters be it for the battle cruisers or destroyers.  Communication was probably the one factor that prevented brave destroyers going in for massed torpedo attack versus capital ships in a line formation.  There are many records of destroyers firing torpedoes and even a few hits being recorded, but leadership on both sides realized that a massed destroyer attack in battle conditions with little to no communication would have a little chance in materializing into something that could cause the enemy serious harm.  On the contrary it seems that whenever the destroyers or torpedo boats went in they would end up fighting their opposites in a messy engagement where each ship was on her won.

Aim and scoring hits

At Jutland the percentage of hits obtained per round fired was abysmal.  Shooting from a moving platform at a not clearly visible and moving target, at range – to me a single hit obtained is a stroke of luck.  This is how the biggest modern-time naval engagement was fought.  The British strategy was oriented towards bringing all large ships  into range and then engage in a artillery duel with the enemy.  The German strategy was different.  They wanted to get closer and increase their chances of scoring hits.  In order for the German ships not to get blown out of the water by getting in range of the large British ships, they were built with more armor and employed superior damage control systems – extra compartments and air-tight access to storage rooms.

The German ships were generally sporting guns of a smaller caliber compared to their counterparts.

During the varying destroyer battles it seems that all aim was down to the gun control because there would be so many ships moving at high speed.  It would have been impossible to tell where each shot went. The destroyers were also the one responsible for launching torpedoes and that would have been another challenge in it self.  There is an example of a German torpedo boat being hit by a torpedo launch by a British destroyer, but three different destroyers claimed the kill.

Visibility

Spotters on both sides complained how difficult it was to spot the fall of shot over  such a distance and with so many ships shooting.  Under certain conditions such as looking east into the night sky, the light conditions didn’t help. Both sides involved had a very different system for aiming.  The German system was more complex then the British, but both systems depended on visibility being good enough to actually see the target in order to calculate its speed, direction and distance.  The visibility also played havoc with the flag system still used.  People responsible for reading the flags would have had a very difficult job in reading a flag from a distance of 5 miles from a moving platform in windy conditions..

Medical

Thousands of sailors died during the battle in varying ways.  Some quickly from explosions while others slowly from sever burns.  A doctor on one of the ships spoke about how he has never seen the kind of burns the sailors were suffering from when cordite charges blew up in their vicinity.  Most ships’ medical cabinet would not have much more medication other than penicillin, disinfectant and bandages.  Injuries would have been horrific with metal which is hot and sharp ripping flash apart.  Intense heat from from fires, explosions and cordite all producing toxic smoke. I assume that one of the lessons learned from Jutland was fireproofing ships and for the crew to be equipped with fire retardant material. Although cordite is no longer used, modern ships can get hit by missiles and bombs (like in the Falkland Islands campaign) which would still inflict heinous injuries upon the crew of a stricken ship.

Processes

Naval historians are pretty sure (documentary on Youtube) that the demise of some of the British battle cruisers was down to the sailors cuttings corners in order to speed up the process of loading the guns.  Hatches being left open and cordite charges being piled up in areas susceptible to flash fires accounted for a number of ships.  This was proven belong reasonable doubt by the accounts of witnesses and decades later but the submersible that dived on the wrecks.

What a sad way for a ship to go – flash fire which travels down to the magazines and causing a devastating explosion.  None of the German ships had that happen to them, yet the British battle cruiser fleet suffered three loses put down to flash fires.  Almost four if you count the close all aboard the Lion.  Historians say that the British sailors were training to essentially race each other in who could launch more projectiles quicker.  Hence, any process governing such activity would be heavily optimized by the gun crews.  The Germans on the other hand were said to be more stricter in following the procedures for handling charges and loading the  guns.  They also had more preventative measures in place to prevent a flash fires getting into the sensitive parts of the ship – the magazines being the most sensitive. They learned that for the battle of Doggers bank where they had some problems will shells getting into the inner parts of the ships.  Based on that experience they put in place procedures and hardware to prevent flash fires from being catastrophic events for a ship.  The British didn’t have this experience and their way of thought of more projectiles per minutes the bigger the chance of scoring a hit – thus neutralizing the enemy.

Looking back at the problem of flash fires I can’t quite understand where in the design, construction or operation phases was the threat of flash fires ever bought up, addressed and then dismissed. Therefore I’ve come to the conclusion that it was only taken seriously post-Jutland. This is my list of factors which could have contributed to the ignorance of flash fires prior to Jutland.

  • cost – battle ships were extremely expensive
  • extra hardware – as in extra weight and hardware in an already tight areas.
  • the thought of having even more people per turret to help load the guns
  • more things to go wrong such as an ammunition lift failing.
  • faith in the the armor to keep projectiles out.

Fuel

The Jutland-era ships ran mainly on coal.  Coal was burned to heat water to steam which would then be used to drive the propeller.   Some ships had oil burners, but they were still in their infancy.  Depending on the size, a ship would have enough coal for just a few days of heavy usage such as going at full speed, maneuvering etc.  While cruising less coal was needed.  Coaling would be performed by the crew and was generally seen as a heavy task as the coal was packed in pages and had to be carried by hand to the hold.  This process would take hours.  At Jutland there were no coal supply ships in the rear, so all fighting ships had to be wary their usage.  The by product of coal, amongst other things, is black smoke.   The fighting ships were not concerned with what came out of their chimneys as long as it was fast.  The smoke produced by lots of ships burning coal at full capacity caused visibility problems during the numerous engagements.

Failure in Agile vs Failure in Waterfall

Failure

This word is always seen only in it’s negative form.  For example:

Lack of success:

“an economic policy that is doomed to failure”

(http://www.oxforddictionaries.com/definition/english/failure)

In the world of Agile it can actually be a good thing.  In some ways you can even say that in Agile you strive to fail as early as possible so that you know you are going down the wrong path. On the other hand if you don’t fail then you are more than likely on the right path.  What is the right path and what is not is not part of what I want to touch on here, rather I would like to talk about how failure is treated. When dealing with the unknown, Agile offers ‘failure’ as a guidance tool to make sure that you are not going down the wrong path. It works best if the failure occurs as soon as possible.  The idea behind Agile is to arrive at your end goal by way of small increments.  This indicates that you are prepared to fail, but when you do, you want to do so quickly. Failing quickly is a lot less costly both in terms of time and money. Failure can occur at any level be it as the sprint level, developer level, or worse still at the vision level.

Failure in a Waterfall approach

Failure in Waterfall is bad.  It means that all the work that has gone into planning and execution was for nothing as the final output is not what it should have been. Recovery from failure is seen as either an expense, a delay or in most cases both. This usually has a negative impact on morale and promotes negative energy within the team. While applying agile, everyone involved will fail as a team at some point, but because failures are encouraged to happen as soon as possible they can be analysed and a new direction can be organised accordingly.

Applying this way of thinking comes easily to someone that has Agile experience, but for someone coming out of a non-Agile environment it can be difficult to make the mental switch.  It all begins with management. The earlier senior management team members understand that failure is a way of life in Agile the sooner an Agile implementation will work for the subordinates.  This is not to say that all sprints should fail, nor should all stories, but there will be some of each that will fail.

The reasons can be numerous. The definition of failure can be adjusted over time to tighten a teams performance.  For example, a team has been knocking off 40 story points per sprint for a good number of sprints and the members want to try to complete 45 points.  If they fail they will know that their velocity is not quite there to handle an extra 5 points of work.  Perhaps they can attempt 42. If they hit the target and are able to maintain it for a few sprints it proves that their single sprint failure due to lack of velocity, has indeed helped to increase just that. Another example would be of a team trying to do the infamous tech stack upgrade, which has been neglected for a few years.  The team could say that in the initial sprint they will spend 2 story points worth of work to start the upgrade and see how many problems come up.  This failure to actually upgrade the tech-stack results in more stories which are more detailed.  Although, some could argue that this approach to a tech-stack upgrade is a sprint implementation detail, but at some point management would get a whiff of the fact that the tech-stack was not upgraded in the given sprint either by way of a discussion during the sprint review, planning or a Scrum-of-Scrums.  This is the daunting part for the team especially if senior management don’t understand that the failure actually resulted in more precise tasks.

Another example that comes to mind is when a team tries to use a new piece of technology that no one has a lot of experience with, but the team members have heard that using this technology solves a number of problems.  Given enough time the team will build up knowledge and experience with the technology, but if the team is asked to estimate some work based on this technology before their knowledge is good enough that will mos likely lead to a failure. Based on the failure the team will learn that their knowledge is not at a level high enough to provide reliable estimates.  Perhaps the failure will demonstrate to the team that the new technology is in fact not the right choice. Either way, the failure has to be seen positively and a slight adjustment to the project plan could be made (eg hire an expert, do some training, drop that technology altogether, workshops etc).

So far I’ve only outlined technical situations which might lead to failures. So how about something non-technical.  A PO is instructed by the stakeholders that a new feature is needed.  This feature has been identified in market research as a way of jumping ahead of a competitor in a particular area.  The PO starts drafting Epics and holds preliminary chats with some design people.  The work progresses to a point where a team is actively working on the feature, however having spent a quarter of the estimated time the competitor releases the same identical feature on their product.  This is a failure, but to what extent?  Was the development team to slow to work?  Did they over estimate? Was the design too slow? Perhaps.  Any answer to these questions does not discredit the fact that the competitor is already selling their feature. All that has happened is that the value of the new feature has just dropped, potentially, significantly.  So what does the team do next? What about the PO? Well, if there are more features, with a higher potential value then the team might as well park the now devalued feature and move onto something that promises to bring more value.  Or maybe the team should finish the feature to save some value out of it and remain on a level field with the competitor.  Essentially, what happened was non other than a failure, but again, there are positives to be taken out of it such as the need to keep a closer eye on which direction the competitor might be heading or what the team should focus on next from a value point of view.

Given either example it is clear that failure becomes part of every team members contribution all the way from an associate developer all the way through to a SVP.  The impact of a failure by a person in a partial position might have varying impact on those around them, but at the end of the day a failure should be seen as a learning curve.  And, there is nothing negative about learning, or is there?

Java – Pass by Value or Pass by Reference?

Plain and simple…

… Java is always pass by value.

However, it’s also true to say that a reference is actually a value – a memory address.  So more accurately Java is pass by value for primitives and pass by an object’s reference, which is a value.

It’s quite interesting that even in Oracle’s Java Programmer certification course it’s written that a primitive is passed by value and an object is passed by reference.  In the case of an object that ‘reference’ is actually a primitive that contains the memory address of where the object structure is held.  From a logical point of view the phrase ‘objects are pass by reference’ actually makes sense, but how would you describe what happens to primitives on a logical level?  Oracle’s wording is actually cause of the confusion.  There is an attempt at distinguishing how primitives are handled i.e primitives are passed by value, compared to objects, but it would much clearer to describe it as is.

From another point of view, this is a fantastic interview question – albeit a very simple one. It does prove if a candidate just remembered some text, or actually thought about it and is able to go into a little bit more detail.

Is Test cricket on it’s way out?

With Brendon McCullum’s retirement came news of his signing a $1.6m IPL deal. At the age of 34 – considered to be an age where batman are at their peak – he has chosen the mad dash of 20/20 over the longer form of cricket.  Good for him.  This is by no means a whinge or a moan against one of the best players NZ has ever produced both in captaincy and batting skills.  He has lifted NZ to higher levels which would probably not happen without him.  But what is the message being sent to world cricket?  Get in young, play for your national team, do well, get noticed, sign a big IPL deal, play a bit and retire. There is just too much International cricket.  Players cannot rest and are away from their homes for most of the year, which has to be a terrible thing for some.  A split of specific teams is already happening where most countries already have a one captain for the Tests team and another captain for the ODI and 20/20 teams.  Only a handful of players will play all formats.  Those are usually the ones that end up getting the big contracts.

I find it painful to hear that players are choosing IPL over Test cricket.  From a financial and career perspective I totally understand and I’m glad that cricket players can make big bucks, but where does that leave Test cricket?  National cricket boards cannot fork out the kind of money privately sponsred teams can.  Often, Test cricket is played in front of empty stands.  On the other hand every IPL game seems to be played at a stadium that is filled to the brim with fans.  I question the validity of these fans because they seem to be very excited all the time – it seems choreographed.

Lets face it – Test Cricket is dying. ODI cricket is still hanging on, where I thought that it would have died a few years after 20/20 came into the fold.  Test cricket is under attack from all fronts – empty stadiums, players not making themselves available for Tests over 20/20 and pointless 2-match series.  So can anything be done to fix this?

 Test match world cup

Martin Crowe has been vocal about having a two year Test cricket championship.  The idea presented was to have 8 teams competing against each other over the duration of the championship.  Each match up would in fact be a series of 3 Test Matches.  At the end of the second year a winner would be announced.  The interesting aspect of this approach would be that the wooden spoon team would be replaced by the winner of the ‘second decision’ championship. This would give countries like Ireland, Holland, Zimbabwe, Afghanistan, Hong Kong, Malaysia or Canada a chance to play against the top team for two years.  While the team that dropped out of the top tier would have to play the minnows and win the second tier championship to reenter the top tier.  Could that help to generate more interest in Test Cricket?

1 or 3 match Test series

Although the Test Match World Cup does look like an interesting proposal, it does comes across as a rather radical approach to increasing interest in Test Cricket.  Another solution, which would be far less radical would be to have a either a 1 or a 3 Test match on every tour.  Apart from the Ashes, which should stay as a 5 match series because of its long history. All other tours should consist of either 1 match or a 3 match series.  The one Test Match series would help emerging countries get expose to top-level cricket, while the top teams could battle it out over a series that has a much large chance of producing a result.  After all what is the point of a 2 or 4 match series?

This approach might only just increase interest a little bit.  It would be difficult to quantify how much interested has been gained by implementing a 1 or 3 match Test series through out all the Test series in the world.

Three separate business entities

Why not separate the three levels of cricket into totally separate ‘businesses’? International cricket is a business – ignoring this is quite similar to denying that the sky is blue on a cloudless day.  So why not have every cricket board spin of a 20/20, ODI and Test Match ‘decisions’ and let them organize the game starting from school level through to International level.  There would be bitter competition between the entities, but it would allow players to choose the type of cricket that suited them. Also it would cater more specifically to different fan bases.

The grounds

Bring back the grass bank, barbecues and allow people to bring their own food.  The last game I watched live was the final game for Stephen Fleming vs England in Napier. The only beer we could drink was Tui at 5 bucks for a small plastic cup.  The food at the venue was completely disgusting and expensive.   So you have to pay an entry fee, a parking fee (if you come by car), be only allowed to buy over priced and poor quality food and drinks.  I think I will stay home, stream the cricket for free and order a decent pizza.

Allowing people to bring in their own food and drinks does cause problems in cases where they bring in glass bottles etc.  Ever heard of vodka water melons?  let people bring their own beer, a BBQ, sausages, onions etc.  Spend a bit more cash on security (rather then spending lots of cash of crap quality catering) and ensure people know and understand that they are given a freedom, but if they cross the line they will get kicked out.

Remove ODIs

Yet another radical approach to generating more interest in Test cricket.  Removing ODIs would reduce the amount of cricket played thus making it simpler for fans to choose which format to follow and more importantly to attend. Players would also choose which format they want to specialize in as we have seen players do really well in one format while perfmoring poorly in another.

Reduce the length of Test cricket and introduce Night Tests

A Night test under lights has already taken place in Australia.  This is an interesting concept because it obviously allows people to come and watch the late afternoon and evening sessions.  Is this a potential answer? It does sounds like a decent solution.  Taking it a bit further why not adjust the minimum overs to be bowled in a day to say 60 or 70 and get the days play underway at 4pm?  Perhaps a combination of both is the best answer.  If a match starts on the weekend than it’s a day Test Match, while if the match is due to take place during the week then it would be a night Test Match.  The players might argue (and I think I’ve already read an article on this topic somewhere) that the conditions during the day vary so much so during the night that night Tests should have their own statistics.  Potentially some players will specialize in night games over day game. Presumably those that feast on carrots might be better candidates for the night games with their better eyes.

Re-organize the cricket calendar

It might be enough to simply organize the world cricket calendar in a such a way that series do not overlap giving the players a chance to play in high-income 20/20 tournaments between playing for the national team.  As soon as you have one successful competition others spring up. Now almost every country has it’s variant of the IPL.  If all these tournaments would be placed in the calendar then there would be little time left for other forms of cricket.

Privatize Test cricket

This post is getting outta control.  How about throwing a bit of privatization at Test cricket so that in can compete with 20/20?  If you could get all the top players to play Test cricket then would the fans turn out in force to watch them play?  Potentially.  Privatizing Test cricket would most probably inject more money into it along with a stronger drive by owners/investors to increase the amount of eye balls glued to the screen for advertising purposes.

WordPress on t2.nano

The t2.nano instance type does not come as well configured at the t2.micro, so if you want to run WordPress on one of these instances you will need to a bit more leg work.  Assuming you have chosen Amazon Linux you should be able to get everything up and running with the commands below.

Install PHP, MySql and httpd

sudo yum groupinstall -y "PHP Support" (be careful, this will only install php 5.3, which is a tad old)
sudo yum install php-mysql
sudo yum install httpd
sudo yum install php55-mysqlnd (this is needed with newer versions of php)

Delete the welcome page as it will give you trouble

sudo rm /etc/httpd/conf.d/welcome

Install WordPress

Follow the WordPress installation guide to install WordPress. If re-using a DB create a new schema in MySQL or create a new server.  The WordPress installation guide will tell you where to stick the credentials.

Install SSL:

sudo yum install mod_ssl

Run a SSL test to see what rating your server will get.  You will probably get a B because Apache by default allows SSL v3, which is dead and RC4, which is weak.  Run the test anyhow to see where your configration is at before hardening it.

https://www.ssllabs.com/ssltest/

Update ssl.config

sudo vi /etc/httpd/conf.d/ssl.conf

Remove SSL3 because it’s broken

#remove SSL v3
SSLProtocol all -SSLv2 -SSLv3

Turn on Cipher order

#turn on cipher order
SSLHonorCipherOrder on

Adjust the available ciphers (note, when copying and pasting into vi you need to get rid of the invalid space and new line chars)

#remove RC4 from cipher list 
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+ SHA256 EECDH+aRSA EECDH EDH+aRSA !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4 RC4+RSA"

And finally provide the location of the keys to be used during SSL

#location to certificate file
SSLCertificateFile /etc/pki/tls/certs/<certificate file name>.crt
SSLCertificateKeyFile /etc/pki/tls/private/<prive key file name>.key
SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crti

At this point it would pay to move the localhost.key and .cert files to a backup folder or delete them all together. Update Apache Config to redirect all traffic to HTTPS

sudo vi /etc/httpd/conf/httpd.conf

Modify the Virtual Host to redirect everything to https:

<VirtualHost *:80>
    Redirect permanent / https://<your domain>
</VirtualHost>

Add the following to the SSL Virtual Host

sudo vi /etc/httpd/conf.d/ssl.conf

Modify the HTTPS Virtual host so that it always forces SSL

<VirtualHost _default_:443>
   #force HTTPS usage.
   Header always set Strict-Transport-Security "max-age=31536000; includeSubdomains"

Restart Apache

sudo service httpd restart

Re-run the test

https://www.ssllabs.com/ssltest/

Some useful configurations

If you are missing the .htaccess file then you have to tell WordPress to download the updates explicitly, otherwise it will try to get you to update via FTP.

#to force direct update, over ftp
 define( 'FS_METHOD', 'direct' );
#increase memory for php
 define( 'WP_MEMORY_LIMIT', '64M' );

If you want image cropping (if you are seeing something like this: “There has been an error cropping your image”) then you will need something like this:

sudo yum install php<php version>-gd
#eg yum install php55-gd
sudo amazon-linux-extras install php7.2

SSH to EC2 killing consoles

sudo vi /etc/ssh/ssh_config #under Host * ServerAliveInterval 240

Make sure HTTPD starts in reboot

sudo chkconfig httpd on

Change the host name

vi /etc/sysconfig/network

https://gist.github.com/sl-digital/9838411#file-amazon-linux-ami-php55-L23

add to .htaccess Options All -Indexes    this is to prevent the display of WP directories

https://www.danielmorell.com/guides/htaccess-seo/redirects/https-www-and-trailing-slash

// disable WordPress’s Canonical URL Redirect feature
remove_filter(‘template_redirect’,’redirect_canonical’);