More Elixir on Windows

I am still working my way through the Programming Elixir book.

This time I am trying to get the sample issues app to work on Windows.

Elixir is fine on windows – its the HTTPoison library – it has dependencies that fail silently at compile time. Known issue

However the HTTPotion library does seem to work on windows. I have adapted the sample and have a github repo with this applied.

This is a similar problem to the Javascript/NPM world. Windows is treated as a second class citizen by some of the libraries which creates artificial constraints. Windows can be used as a development platform for more portable development (I use windows at home, ubuntu in the office and have a mac work laptop – I need portability).

Cloud Vendors Good and Bad

I work on a system that has a lot of third party vendors that provide various services for us.

This is a description of the behaviour of two of the vendors regarding changes to their api’s.

The good vendor wanted to make one of their private apis public but this would include a breaking change. They carefully identified which customers were using that api and gave them 2 months to move to the new api. Documentation for the new api was provided. Incidently we had ceased using the api by the deadline so it all went well.

The bad vendor wanted to make a breaking change to an api only available to their higher payment tier customers. They made the change overnight without any notification. The dev team noticed the change due to a failure in an end-to-end test. We identified the problem and found a work around, tested and deployed it 5 seconds after the first customer complaint arrived. The vendor has not yet acknowledged the bug. Problems in the api behaviour are typically described as functions as designed.

The first vendor is Contentful. The second vendor in another field is much more famous.

Please look after your customers…

Elixir Programming on Windows

I am working through the Programming Elixir book.

I am experimenting with a mix of OSX and Windows.

Intelij IDEA does provide a free ide that works for Elixir

However on windows some of the run commands need to be changed

mix run -e ‘Issues.CLI.run([“-h”])’

needs to be replaced with:

mix run -e “Issues.CLI.run([‘-h’])”

Constructing a Build Pipeline

Given the upcoming demise of snap-ci I have been working on finding a replacement.

Snap-ci allowed my team to work exclusively on a single master branch and have tests run on every push. From this it could be manually pushed to a series of environments in a strict order:

qa -> demo -> live

We assessed a large range of cloud hosted providers to attempt to replicate this.

Gitlab came close, but was too unreliable  (eventual consistency left a ui that was inconsistent on a single page!)

Circle-ci is our current contender. We can build everything that we need but temporarily  have resorted to Jenkins to provide our deployment pipelines. Circle-ci have promised that these will be available soon (within a few months).

Circle CI does respond very rapidly to git pushes (something that snap-ci had been rather sluggish). The integrated error log viewing is a distinct improvement  (snap made you download a tarfile containg a zip of the test reports – it was three steps to see the detailed error).

We looked at using heroku build pipelines but found it lacking in the hooks needed for pre-deploy steps. We use these to trigger our database migrations (also cdn and cms configuration ) before restarting the apps.

Keeping Java jdk working on windows

Windows development in java can be painful. This is mostly due to any new java upgrade breaking the java home setup.

To fix this I started to look for an ansible script to redeploy the jdk. However the script had a dependency on powershell. Once you are using powershell you may as well use chocolatey. There are now sone simple commands to keep java working:

Choco install jdk8

This must be run as administrator and will require a single confirmation.

However now I have the means to keep neo4j and gradle happy after a java upgrade.

 

Software Minitures

The Software Miniture is a concept that I came up with when experimenting with code generation. Its a cut down version of a larger application with a  minimal implementation of the concepts of a larger application. The idea was to perform experiments on the miniture that would be much faster than on the full application.

This idea also seems to be useful when chosing a replacement CI server.