Psalm 3: Faith against Foes

 based on Psalm 3 (original)

I cry out oh Lord for help
They surround me on every side
Will you save me in my need?
Many are saying you’ll not provide.

But I know you are my shield
You will lift my head up high
I call out, and you answer me
I know, my aid, you’ll not deny.

If I lie down and fall asleep
I know I’ll wake and rise with glee
I will not fear 10,000 men
For the Lord my God, He shelters me.

Rise up my saviour and my God
Deliver me Lord from my foes
Break their jaw, shatter their teeth
Strike down them who against me rose

The Lord provides our one true hope
From Him receive all you desire
May your blessing, God, be on us all
And let us become what you admire

author: Dr David H. Akehurst

If you liked this, consider reading some of my other poems.

(I have always thought that it would be good to read a translation/interpretation of the psalms that actually read like poetry in the English language. I know that many other people have done this, however a few years back I was house bound for a few weeks and had a go at writing poetry based on them. This is one of the results.)

Psalm 2: The opposition of Nations

based on Psalm 2 (original)

Governments and presidents oppose the Lord’s anointed King.
Why do nations still conspire, their people plot in vain?
By casting off (like chains) the guidance of His holy word,
How will they win? What do they hope to gain?
He could rebuke them if they listen, with His anger and His wrath.
But the one in heaven knows they’re fools and laughs at their mistake,
He has installed a gracious King upon His holy hill
And with these words proclaims Him King, all opposed will break.
Your are my son, today I have become your Dad,
Just ask! The nations and the earth will all belong to you
Rule them with an iron fist and break them if you will
Though my grace abounds and fills you through and through”
So tremble and be wise, all you kings and rulers on the earth,
Serve and respect the Lord your God, rejoice in His chosen Son
His righteous anger may be shown, destroying all opposed.
Better to be blessed, and seek to shelter underneath the Holy One.

author: Dr David H. Akehurst

If you liked this, consider reading some of my other poems.

(I have always thought that it would be good to read a translation/interpretation of the psalms that actually read like poetry in the English language. I know that many other people have done this, however a few years back I was house bound for a few weeks and had a go at writing poetry based on them. This is one of the results.)

Fix Windows Update High Processor Usage

How to Fix Windows Update High Processor Usage?

Windows Update can sometimes cause high processor usage (50%-100%).

Option 1

A possible cause that is worth checking is if you have run low on disk space.

Ensure that there several Gb of free disc space (ie. > 5Gb).

Option 2

If windows is running as a Virtual Machine, try updating the VM host application,
e.g. check for new version of VirtualBox.

Option 3

Check out this link, and try running Windows Update troubleshooter, useful link

Creating a Software Development Support Server

Software development requires a number of server based tools to support it. This post provides a quick list of such tools and then describes how to set them up.

  • Source Code Control
    • git, svn, mercurial
  • Continuous Integration
    • Jenkins/Huson
  • Static Analysis
    • Sonar



This is probably already installed as it may come with the linux distribution (e.g. Ubuntu), else

  • sudo apt-get install git



This is optional, but enables easier access to other services by providing proxies from port 80.


  • sudo apt-get install apache2
  • sudo a2enmod proxy
  • sudo a2enmod proxy_http




This is used later to support sonar.


  • sudo apt-get install postgresql postgresql-contrib
  • sudo apt-get install pgadmin3 (you will probably use the gui admin tool at some point)
    • At the time of writing, apt-get installs v9.4 of postgresql and 1.18 of pgadmin3,
    • Although this partially works, pgadmin3 core-dumped several times at me
    • This link has instructions for installing pgadmin3 v1.20
  • sudo -u postgres psql postgres (to configure the postgres admin user)
    • password postgres (from the psql propmt: to set the postgres user password)
    • CREATE EXTENSION adminpack; (to enable pgadmin to work with psql)
    • q (to quit psql)
  • Edit the file ‘/etc/postgresql/9.4/main/pg_hba.conf ‘
    • Change the line
      # Database administrative login by Unix domain socket
      local      all         postgres            peer
      # Database administrative login by Unix domain socket
      local      all         postgres            md5

Other help:



  • wget -q -O – | sudo apt-key add –
  • sudo sh -c ‘echo deb binary/ > /etc/apt/sources.list.d/jenkins.list’
  • sudo apt-get update
  • sudo apt-get install jenkins


  • edit /etc/defaults/jenkins
  • change ‘HTTP_PORT=8080’ to define the port you wish to use for jenkins, e.g. 8180

In order to get a proxy to jenkins from port 80, e.g. http://localhost/jenkins, we must configure the default apache Virtual host.

Add the following to the end of the <VirtualHost> element in the 000-default.config file typically found in ‘/etc/apache2/sites-available’.

ProxyRequests Off
AllowEncodedSlashes NoDecode
<Proxy *>
Order deny,allow
Allow from all
ProxyPass /jenkins http://localhost:8180/jenkins
ProxyPassReverse /jenkins http://localhost:8180/jenkins

Then restart apache

  • sudo service apache2 restart (or sudo /etc/init.d/apache2 restart)



  • add ‘deb binary/’ to the end of the file ‘/etc/apt/sources.list’ (
  • sudo apt-get update
  • sudo apt-get install sonar
  • edit file /etc/opt/sonar/conf/
    • find the following section and uncomment/modify the appropriate lines
      # User credentials.
      # Permissions to create tables, indices and triggers must be granted to JDBC user.
      # The schema must be created first.
    • find the following section and uncomment/modify the appropriate line as follows
      #----- PostgreSQL 8.x/9.x
      # If you don't use the schema named "public", please refer to
    • Modify the sonar port using the following lines
      # TCP port for incoming HTTP connections. Disabled when value is -1.
    • Modify the url path/contex
      # Web context. When set, it must start with forward slash (for example /sonarqube).
      # The default value is root context (empty value).
  • Create user ‘sonar’ in posgres
    • start pgadmin3
    • add a new Login Role with name and password as written above in the file
    • add a new database named ‘sonar’ (or named as written in the file)

Other help:


  • edit /etc/defaults/sonar
  • change ‘HTTP_PORT=8080’ to define the port you wish to use for jenkins, e.g. 8280

In order to get a proxy to sonar from port 80, e.g. http://localhost/sonar, we must configure the default apache Virtual host.

Add the following to the end of the <VirtualHost> element in the 000-default.config file typically found in ‘/etc/apache2/sites-available’.

ProxyRequests Off
AllowEncodedSlashes NoDecode
<Proxy *>
Order deny,allow
Allow from all
ProxyPass /sonar http://localhost:8280/sonar
ProxyPassReverse /sonar http://localhost:8280/sonar

(Only the last two lines are required if you have the others already in the file)

Then restart apache

  • sudo service apache2 restart (or sudo /etc/init.d/apache2 restart)


Always a good idea to keep a record of what service is running on which port.

80 : apache
8080 : app server (wildfly, tomcat, etc)
5432: postgresql
8180: jenkins
8280: sonar

Developing and Managing Multiple Modules: Eclipse OSGI and Maven

Eclipse and maven do not play nicely with each other. They try, but there are some fundamental differences that make it tricky. I will first describe some of those differences. Then I will discus how I have gone about developing an managing Eclipse/OSGI bundles using maven and Eclipse.


Version numbers

  • Eclipse versions are numbered X.Y.Z.qualifier. The qualifier is optional and adds a timestamp.
  • Maven versions are also typically X.Y.Z-SNAPSHOT. The SNAPSHOT is optional and adds a timestamp.
  • These seem similar, the only difference being the use of a ‘.’ or a ‘-‘ to separate the main version number form the timestamp.
  • The problem occurs with respect to the interpretation of a qualifier/SNAPSHOT variant of a version.
    • In eclipse a qualified version is considered to be newer than a version without the qualifier.
    • In maven the SNAPSHOT version is considered a precursor, i.e. an earlier (development) version.

Dependency Scope

  • Eclipse/OSGI dependencies (defined in the MANIFEST.MF file) are not, by default, transitive.
    • I.e. if A depends on B which depends on C, then A does not, by default, have access to the definitions in C.
    • If B ‘reexports’ C, then A has access to it.
  • Maven dependencies (defined in the pom.xml file) are, by default, transitive.
    • I.e. if A depends on B which depends on C, then A does have access to the definitions in C.
    • If B makes the dependency on C ‘scope=provided’ then A will not have access to C, but to execute A, a runtime dependency on C will be needed.

Dependencies – which Version

  • Both Eclipse/OSGI and maven allow the version number of a dependency to be defined. In fact it is to be encouraged. However the class path may not be what you expect.
    • The OSGI framework/container/runtime allows for different versions of the same bundle/jar to coexist and hence  multiple different versions of the same code may be executed. I.e. Each bundle will use the version of the bundle it references at compile and runtime.
    • In maven, the class path will determined by its Dependency Mediation rules, meaning that you get the “nearest definition”. This means that at compile time you can force dependency on a particular version (by explicitly including a dependency on that version), however at runtime the class path may provide a different version of the jar.


I am a big fan of Eclipse as a Java IDE. I find it works well for me. Except, when I want to use maven to build the modules.

One easy option is to use Tycho. This solution means that a developer can essentially avoid having to understand maven. Tycho takes over maven almost completely and in my opinion using Tycho cannot be said to be ‘using maven’. Tycho-on-maven and native/original-maven are best considered to be separate things.

Tycho has many advantages, but I find that it is slow to build, and releasing/deploying p2 repositories does not seem to be as simple as the nexus/maven approach. Hence my investigation into an alternative.

One thing I particularly like about maven is its directory layout. In particular, a maven module contains the source code for the modules alongside the tests for that module, and those tests are, by default, executed as part of the build. It actively encourages module-based unit testing. The deployed jar (sensibly) does not  include the test code.

The Eclipse m2e project goes along way towards making the use of Eclipse for the development of maven modules nice and easy. Except, when those maven modules are also developed as OSGI-bundles/eclipse-plugins.

My approach to building OSGI/Eclipse bundles using maven is as follows:

Code Layout

Use the standard maven folder and file layout structure.


    • Use the org.apache.felix:maven-bundle-plugin to generate a manefest file
    • or, put a hand written manefest file in src/resources and tell maven to include it in the built jar. Using the maven-jar-plugin

In either case, tell the eclipse IDE where to find the MANEFEST.MF file using the file .settings/org.eclipse.pde.core, for each project as shown below,


(change the value of BUNDLE_ROOT_PATH to be the location of the MANEFEST.MF file)

Handling the Differences

Version numbering: This should not really be an issue provided you only release “proper” versions (i.e. non-SNAPSHOT).

Dependency Scope: Limit the scope of maven dependencies to ‘provided’ unless you want the depended on artefact to be included in the exported API of your artefact.

Dependencies – which Version: Yet to find a solution?

Dependencies to existing eclipse bundles

Eclipse has a large number of existing bundles which are usually found in the eclipse IDE installation, or via a p2 site referenced in a .target file. If we build with maven, how do we tell maven about these bundles?

Generate p2 Repository

To generate a p2 repository from maven artifacts you can use the org.reficio:p2-maven-plugin. The configuration in the pom file tells the (maven) plugin which artefacts to include in the p2 repository.

Useful Links

Cloud IDE for DSLs

I am attempting to provide a cloud based IDE for DSLs. The first question is where to start from. There are many great Cloud-IDEs out there, but they are all aimed at supporting various programming environments. For DSL support, I want to find something that is minimal, that I can subsequently add to with DSL extensions.

My requirements would be:

  • Minimal starting point (similar to creating an Eclipse RCP)
  • Plugin architecture
  • Preference for ability to use Java in plugins
  • Open Source (of course!)

I have investigated the following as possible starting points, details are in separate posts (follow the links), but a brief summary is included here:

  • Cloud 9
    • Widely used
    • Mainly Javascript
    • Potential problem with the open source licence, currently unsure if I can legally use it!
  • Eclipse-Che / Codenvy
    • GWT and Java based
    • Runs in its own tomcat (! what…ridiculous!..but I have attempted to get round this)
    • Complex to reduce to a minimal IDE
  • Eclipse-Orion
    • OSGI at the server
    • Javascript on client
    • Complex to minimise
    • not that easy to add plugins
  • Codiad
    • php based
    • simplest starting point
    • plugins are easy
    • needs a php-java bridge to execute java
    • Can run it in tomcat with a little persuasion
    • tomcat 8 requires quercus war (for php interpretation) – which has GPL licence.


Praise and Worship: Sit or Stand

Come, let us sing for joy to the Lord;
    let us shout aloud to the Rock of our salvation.
Let us come before him with thanksgiving
    and extol him with music and song. [Psalm 95:1-2]

Praising God can take many forms and singing is simply one way to express our praise. But when we praise him by singing we should be focused on God, engaging with him, freely expressing our joy and happiness that we are in his presence, and allowing our hearts to engage with him.

Having recently moved to Germany, one thing has struck me as distinctly different between church in Germany and church in Britain. In Germany, traditionally, people sit down in church when singing! Why, I am not sure. However, coming from a British church culture where I have never (or rarely) sat down whilst singing, I find it very odd and a little uncomfortable. It is of course possible to sing praise whilst sitting, but I find this much easier to do when standing.

Apparently, in Denmark, they also sit down to sing, and I agree with this author that it is not necessary to always stand when singing. There can be good reasons to sit sometimes, however, I would present an argument that, on the whole, standing is better. How do I define better? In this case I mean that one can sing more freely, i.e. one feels less constrained when standing rather than sitting and one is better able to engage fully with the act of praising our maker.

Scientifically and physiologically, good posture is obviously important. Constriction in the airways and the diaphragm would hinder singing and make it a strain on the singer. However, although most professional singers do stand when singing, there are many occurrences of professionals sitting to sing. According to a trained opera singer friend of mine, when sitting one must sit upright with straight back in order to sing properly.

Is there any biblical guidance on whether we should sit or stand when singing? There are many verses about singing as a means to praise God, the psalms are full of references about singing, and other verses in both Old and New Testament encourage us to sing and praise God. However, there is no reference I have found that says anything about sitting or standing as a posture for singing.

Various verses that state we should praise God with our whole being, spirit, mind, body, and in particular with our hearts. Praise him with all of your heart, i.e. passionately and with feeling.

…Sing and make music from your heart to the Lord. [Ephesians 5:19]

…Is anyone happy? Let them sing songs of praise. [James 5:13]

God is spirit, and his worshipers must worship in the Spirit and in truth. [John 4:24]

…I will sing praise with my spirit, but I will sing with my mind also. [1 Corinthians 14:15]

Lift up your hands in the sanctuary and praise the Lord. [Psalm 134:2]

If we look at other times when we engage with a musical event, it is quite common to see people standing waving their arms around and jumping about. Just look at any modern pop concert where the audience is ecstatic in the presence of the latest teen idol (and could be described as worshiping the singer) – they do not sit mildly in their seats. At a more reserved classical concert, or opera, people do have more of a tendency to stay in their seats, however at events such as “The Last Night of the Proms” the same joyous and highly active behaviour can also be seen. Similarly, take a football match, when your favoured team scores, do you sit and politely thinking “oh well done”, or do you jump up, wave your hands and cheer?

One of my favourite examples of someone fully praising God with all their being is that of David in 2 Samuel,

Then David danced before the Lord with all his might; and David was wearing a linen ephod. So David and all the house of Israel brought up the ark of the Lord with shouting and with the sound of the trumpet. [2 Samuel 6:14-15]

So David said …, “It was before the Lord, … Therefore I will play music before the Lord. And I will be even more undignified than this, and will be humble in my own sight. …” [2 Samuel 6:21:22]

Clearly, this was heartfelt praise and David was dancing and singing before his Lord, without worrying what other people thought of him. He was thinking only of engaging joyfully with God. So much so that he upset his wife by dancing in his underwear. Now, I don’t think I really want to turn up to church in only my underpants, however this example of praising God and not worrying about what the person next to us is thinking is certainly a good example to follow.

If we look the the psalms, as the primary biblical example of praise, clearly praising God is a joyful and noisy thing to do,

Praise him with the sounding of the trumpet,
praise him with the harp and lyre,
Praise him with timbrel and dancing,
praise him with the strings and pipe,
Praise him with the clash of cymbals,
praise him with resounding cymbals. [Psalm 150]

and again in Psalm 47

Clap your hands, all you nations;
    shout to God with cries of joy. [Psalm 47:1]

I would assert that it is natural, when freed from traditions and conventions, for people to engage in joyous praise and worship with their whole body, and this is easier if not seated. I want to praise God, singing with my voice, my body, my mind, my spirit and my heart, passionately and with joy.

– Open Bible: Verses on Singing

Examples: UML: Simple Hello World

Most programming language tutorials start with a very simple “Hello World!” program. This post discusses a very simple “Hello World!” UML model.

  1. UML is a modelling language (Unified Modelling Language). It is a graphical language that is designed for communication about software (though can and is also used for other things).
  2. A model is an abstraction of the real thing, and as such, a UML model is an abstraction of the software which it is describing.
  3. An abstraction of something hides, or simply doesn’t show, certain detail about that something. UML can be used to communicate a variety of different abstractions (views) of the software.
  4. UML is an Object-Oriented modelling languages, hence is best used to model Object-Oriented software. (Although various approaches for using UML to model non Object-Oriented software do exist.)

The Hello World program is, to quote wikipedia,

“used to illustrate to beginners the most basic syntax of a programming language. It is also used to verify that a language or system is operating correctly”

Similarly, I am using it here to illustrate some basic UML syntax. There a many different approaches to using UML. I show here an approach that I like and find to work.

First, let us look at the typical “Hello World!” program written in a number of different programming languages (many others listed here), thus helping us to form a UML abstraction that could be implemented in any of them. [The normal design process would involve constructing the UML model first, but this is not a normal design project.]

public class HelloWorldApp {
  public static void main(String[] args) {
    System.out.println("Hello World!");
int main() {
  std::cout << "Hello World!" << std::endl;
  return 0;
class HelloWorldApp {
  public static void Main(string[] args) {
    System.Console.WriteLine("Hello World!");

Once these programs have been compiled, an executable (binary) is formed and this is what the user executes in order to run the program. Our first UML model is a representation of this executable:

The different things that make up a UML model are known as “model elements”. This model element is an called Artifact and has had the stereotype <<executable>> applied to it. [Follow the links for more detail about artifacts or stereotypes.]

This is a simple model, in UML. It abstracts away all the programming detail, and simply represents the executable. I think, however, that a little more model would be useful, perhaps something that shows a bit about the program that is manifest by the executable.

An option would be to add to our model a package, containing a class, which contains a static method,


and we can show that the executable Artifact manifests this package,


However, although this is a perfectly valid UML model, there are a number things about this model that make it unsatisfactory to me,

  • It does not really form much of an abstraction from the code.
  • Neither is it a true representation of the code for each of the three programs shown above (C++, Java C#).
    • the primitive type String is named differently in each programming language
    • there is no class in the C++ version, nor does the code function require parameters

Looking back at our Hello World programs from above, these are all quite acceptable as a first HelloWorld program. However, although they are all written in Object-Oriented (OO) languages, they cannot really be said to be Object-Oriented programs.  They are all very similar to the C version of the program and thus not very Object-Oriented.

int main() {
  printf("Hello, world!n");
  return 0;

The (static) “main” procedure/method in each of the OO languages is there as an entry point to the program. If we are to execute a true OO program, this entry point procedure should be used to enter the program’s world of objects. In other words it needs to instantiate an initial (entry point) object and start the object executing.

Following this approach, the above 3 examples could be rewritten as follows:

class Greeter {
  public void start() {
    System.out.println("Hello World!");

public class HelloWorldApp {
  public static void main(String[] args) {
    Greeter greeter = new Greeter();
class Greeter {
  public: void start() {
    std::cout << "Hello World!" << std::endl;

int main() {
  Greeter greeter;
  return 0;
class Greeter {
  public void start() {
    System.Console.WriteLine("Hello, world!");

class HelloWorldApp {
  public static void Main(string[] args) {
    Greeter greeter = new Greeter();

Now all three of these follow a similar structure and a better abstraction can be formed.

We add a property to the executable Artifact which indicates the initial object that is instantiated when the program runs,

and we can now provide a class that is a better abstraction of all three programs,


This UML model is an abstraction that is only showing two aspects of the Hello World program,

  1. A view of the binary, or executable, artifact that is produced by a program compiler
  2. A class diagram that shows the class and method that is executed.

All other aspects of the program are not shown.

In a future post I will continue to use the Hello World example in order to illustrate the use of other parts of the UML.

Simple Transformations

A simple transformation is uni-directional from a source data structure to a target data structure.

SiTra is (in my biased opinion) the easiest way to write a simple uni-directional model transformation.

SiTra is a simple Java library for supporting a programming approach to writing transformations aiming to, firstly use Java for writing transformations, and secondly, to provide a minimal framework for the execution of transformations. SiTra consists of two interfaces and a class that implements a transformation algorithm. The aim is to facilitate a style of programming that incorporates the concept of transformation rules.