Page Layout Settings and Headers/Footers in EA Virtual Documents

When trying to generate a document using the virtual document generation facility in Enterprise Architect, I’ve been struggling to get the formatting to match the template for my client.

It appears when generating the virtual document, the page setup/layout parameters (i.e. margins) are derived not from the first template used in the virtual document, as I would have assumed, but from the last!

Clearly, unless you apply section breaks to the templates, each template called overwrites certain parameters (including the margins) for the overall document.

While I can understand why this might be the case, it does seem much more intuitive that these details would come from the first template in any section, rather than the last, since you would usually have a fairly specific first template for any particular document type.

I also note that the same is true for headers and footers. If you have headers and footers in a cover sheet, as they are in a separate section in the created document, the headers and footers are retained, and propagate to the whole document (assuming you don’t have other headers and footers defined).

However, if the header and footers are in the in a standard document template etc., they are overwritten by the last template in the virtual document, even if there is no header/footer defined in that there not being any header/footer defined.


The Truth is like a Maypole Dance

I have listened to many people who have claimed to have The Truth. To be honest, when I was younger, in my arrogance I thought I knew “The truth”, when others had missed it.

However, I now think truth is quite a difficult thing to pun down. The precise definition of truth is dependant on where you are now, and where you are headed.

The picture I use is a maypole dance. Accepted that this is a pagan fertility symbol, but it still has something to teach us.

Let us assume that the maypole is the absolute undisputable truth – God’s peculiar knowledge – then we are the dancers, each holding a ribbon. While we dance, we slowly get closer to the absolute truth, but never looking directly at the truth, or moving directly towards it.

We have our personal and social perspectives, that prevent us seeing the objective truth, only the subjective. However, when we continue with life’s dance, we move around and see from different perspectives, and gradually, the ribbon plaits and we get closer and closer to the absolute truth together.

However, when one of life’s dancers insists where they know the absolute truth where they are and stands still, it breaks the dance, and nobody is able to get any closer to the pole of absolute truth, and instead the ribbons start to get tangled around the person who stands still.

Just as scientist depart from science, when they claim to know anything as Truth, so all of us must retain the humility of seeing through a glass darkly, and continue to seek enlightenment. When we insist know the absolute truth now, we simply demonstrate our folly, and cause others to get tangled too.

The Advantages of a Broad Church

“What kind of Christian are you?”

I have no real idea how to answer that. I’m just not sure where to pitch myself. I used to be an evangelical. I still think of myself as being so, but I’m not sure everyone would agree.

You could describe me as Progressive, and I definitely agree a lot more closely with a lot of “Progressive” doctrines than “Conservative” evangelicals, especially those in US. I believe evolution happens, and that the world is billions of years old.

I’m a member of an Anglican church, but I’m not sure that helps to identify me.

The Anglican Church is a broad church, and that is a good thing.

It is necessary to question progressive change, with an eye to the Bible and the church’s traditions, so as to ensure that progressive ideals do not depart from Christ centred Christianity. Tradition acts as a break that prevents us moving too fast to be able to see the perhaps unintended impacts of good intentions.

However, it is equally necessary to have progressives challenging the traditional interpretation of Scripture and sacrament, as was demonstrated by Wilberforce et al., when the Abolitionists questioned the “scriptural” defence of slavery that was prevalent at the time.

It would seem like the response to people of alternate sexuality demonstrates this tension. The conservatives strongly disapprove, quoting bible verses to justify their position. The progressives say that it’s not an issue and quote different verses to justify their position. In the meantime, the church looks very foolish to those outside, and fails to carry out its mission because it spends a lot of its energy in-fighting.

The challenge to progressives, and traditionalists both, is to learn to value each other’s contribution to the Church, rather than to see the other as “the problem”. That way we can, between us, discern God’s will for to care for each other, the world, and show God’s love to everyone without discrimination.

The Serpent and the Source of Original Sin?

The concept of original sin is quite controversial in the modern world, and yet is a core part of the theological background that we have inherited.

The idea that people are inherently sinful, as a product of their birth, which when you see cute little babies, it’s hard to accept.

However, when you look at the state of the world it’s a lot easier to accept.

It is clear, that humanity has the capability to be noble, generous, kind, and altogether very positive. However, it does seem without a conscious decision towards “good behavior”, a number of negative behaviours do seem to creep in, and take over. Even St. Paul says “For what I want to do I do not do, but what I hate I do.”

Having had a conversation about the multiple layers “evolutionary” layers within our brains, it occurred to me that perhaps “original sin” is actually located within our “lizard brain” – the most primitive remnant of our brains – the “basal ganglia”, which is believed to be responsible for “species typical instinctual behaviours involved in aggression, dominance, territoriality and ritual display” (Wikipedia).

That would explain why Darwinian “survival” mechanisms seem to take over, if we either feel threatened, or abdicate our “higher” functions, such as in mob-mentality, or just when we choose to stop thinking for ourselves.

While this is wild conjecture, and I’m sure both theologians and neuroscientists would have lots to say that this is hugely oversimplifying and probably heretical, it strikes me as having a certain resonance with my own life and behaviour, and provides me a psychologically plausible explanation.

However, if this is the source of our sinful nature, then that goes to show how incredibly perceptive the writer of Genesis 3 was. Humankind is tempted into sin by the whispering of a serpent – maybe not an external serpent – but the “reptile brain” within humanity itself.

The Bible Tells Me So – A Review

I have just completed another of the exciting books I bought in order to give away, but this one I’ve read first, since I didn’t dare give it to anyone before having read it first.

“The Bible Tells Me So…” by Peter Enns.

The purpose of this book is to suggest how to read the bible without being bound to treating it either as a 21st century history textbook, or as a legal textbook.

The author goes about challenging a specific event in the Old Testament’s accounts of Israel’s history, and in so doing, challenging the 21st Century athiest’s interpretation that the God of Israel is a monster, and thus cannot be true.

Interestingly, while the author references “The God Delusion” by Richard Dawkins (which I will review in another post), there is a slightly bizarre similarity in the structure of the two books.

Another similarity I noted while reading this, was that at some points in the book, it was almost like reading “The Da Vinci Code”, and that an almighty conspiracy was being revealed. Thankfully, the writing style is a lot better…

Given all that, the book finishes what it set out to do, and the author is (given what he’s trying to do) extremely reverent for what he considers the Bible to be – a Holy Scripture – but not a factual history or a book of clear and consistent rules.

The final result of me reading this, is that the Bible has just moved up to the top my (long) list of books to read!

Kissing Fish – A Review

Someone, just before Christmas, suggested that a small group to which I belong, should all get Christmas presents for one-another. What I really needed was some extra stress finding yet more presents for people.

My wife, suggested I should buy them all books, and made some suggestions. I’m never good at giving books I haven’t read myself, so I ordered a few for my kindle and proceeded to try and read them all before giving them away. Sadly, I just don’t read fast enought for that.

Nevertheless, this is how I ended up reading a book called Kissing Fish (Christianity for those who don’t like Christianity) by Roger Wolsey.

I have personally done a lot of thinking over the last few years, and my faith has changed as a result.

This book sets out to be a systematic theology for “Progressive Christianity”, and reading it, I find that a lot of the ways in which my thinking has lead me resonates with progressive Christianity.

The author tries to be very clear as to what “many progressive Christians” believe, and offers a broad spectrum upon which many would find themselves. He then sometimes offers a personal reflection about where on the spectrum he falls.

Some of the ideas described I would consider bordering on Christian atheism, or extreme liberalism (if that’s not an oxymoron), and go beyond my personal “comfort” zone. However, it is always useful to see the ends of the spectrum when trying to places oneself upon it.

What is interesting is how centred on the teachings and acts of Jesus, and of the behaviour of the early church progressive Christianity is, given the previous paragraph, and that the focus is largely about embodying Christian values of love and grate towards everyone.

This is a fascinating book, which has helped me to see that I am not alone in a lot of my thinking. I would strongly recommend reading it if you have any concerns around the “traditional” or “evangelical” Christianity

Migrating CentOS5 VMWare images with LVM to KVM

I’ve decided that using VMWare Server has been a useful and worthwhile experience, but I want to do stuff which would involve upgrading to one of the paid-for versions of VMWare and I don’t want to pay.

So, I’ve set up a new server to host my VMs on Fedora 14, and am migrating to using KVM instead.

I had expected that I’d have to backup the image and then recover it, but no, it seems that the open source community has done everything I need. I started here and noted the slightly scary caveat that LVM using images didn’t work.

I tried anyway, and sure enough, I got a message saying

Volume group "VolGroup00" not found
Unable to access resume device (/dev/VolGroup00/LogVol01)
mount: could not find filesystem '/dev/root'

It had to be possible. I asked at, and the reply led me to look at virt-p2v, which was a possible fallback option, but rather scary since there aren’t any hosted pre-build iso files any more.

However, reading some of the blurb on the author’s blog about manual p2v he mentioned possibly having to edit the fstab file to point the mounts in the right direction following virtualisation.

I had loaded the converted qcow2 image, using Virtual Machine Manager. When I looked at the setup I noticed that the disk setup looked like this:

Properties page for VirtIO disk.

I Googled VirtIO and found that it was a para-virtualised disk type, which meant that it had to be supported by the guest OS. This would explain why the Fedora 14 rescue disk could see the LVM but not the actual operating system.

I deleted the disk entry and replaced it with this:

Properties page for new IDE drive

Now, I started the guest, and it booted!

Text from successful boot image.

Upon booting, the X-window display didn’t work, but the automatic rescue process worked, and I got a gnome login screen. The next problem was that the mouse didn’t work properly. The Virtual Machine Manager does suggest that you add a tablet to the machine to ensure that the mouse matches the VNC mouse, but it still didn’t work after doing that. However, yet again, someone had done the work first, and I found the answer here. Slightly messy editing the xorg.conf file, but it worked.

The Disadvantages of not Keeping Current

I have been requested by a client to produce data extracts from an old bespoke system, which has been knocking about for many years and been left without upgrades for several years. A nice piece of work for me, but it’s got me thinking about the whole upgrade lifecycle issues and bespoke vs packaged solutions in general.

The reasons it’s not been upgraded are that “it ain’t broke – don’t fix it”, and that nobody wants to pay the costs to keep regression testing new upgrades.

However, there are disadvantages to letting a system continue on old techonolgy for a long period of time. Maintenance gets more difficult as fewer people are available who remember the older technology. The world moves on and the system doesn’t, so it looks antiquated, and leads users to feel irritated by the inadequate user-interface.

The net result is that a new proprietary packaged system is going to be deployed replacing the creaking bespoke system, at considerable cost. However, as with all packaged solutions, the “out of the box” fit with the business requirement is good, but not perfect. Ok, the bespoke system doesn’t fit with the business 100% either, since the business has moved on and it hasn’t, but I can’t help thinking that had the bespoke system been periodically upgraded to use the latest (or at least more recent) technologies, and the changes to the requirements, that the requirements fit could have been better and the overall cost less than the new replacement system.

A final disadvantage of remaining on older techonolgy, comes when carrying out the extract of data for migration, you realise that “that approach doesn’t work on that version, you need the next one”. Realising that several approaches aren’t possible due to the features I’m now used to being for more recent versions, it becomes frustrating to have to rethink each time.

Decimal keypad in iPhone SDK – Well Done Apple!

A few days ago I was trying to find how to get a decimal point in the number pad for an app I was writing. Having reviewed a number of discussions on the subject which suggested subclassing the keypad or adding extra buttons and all sorts of scary things, I finally resorted to the manual.

In the list of available keypad types, it turns out that there is actually a new one in SDK 4.1. Unfortunately, at present, they haven’t updated Interface Builder with the new values, so you can’t select the new values directly but you can programatically, like this:

textField.keyboardType = UIKeyboardTypeNumberPad;

so clearly they have listened to the needs expressed in these various articles, but unfortunately, this is rather well hidden in the documentation, and until it appears in the keyboard type picklist in Interface Builder, will remain so.

So well done Apple for adding UIKeyboardTypeNumberPad, but please can you add it to Interface Builder too!

Paging Enabled peculiarity in UIScrollView

Whilst developing an iPhone app, I have come some very odd behaviour in UIScrollView. Ok, I’ll admit what I was doing was somewhat unusual, but I think the issue could occur in less unusual circumstances.

The effect appeared to be that the UIScrollView was remembering the last user scroll page position, despite my changing the frame, contentSize and contentOffset of the view manually. If the user touched the scroll view after my programmatic changes, the view would immediately scroll back to the page that had last been user scrolled to.

Consider the following situation: we start with the scrollview (and content) looking like

[1 2 3 4] 5 6 7 8

where the brackets denote the visible page area. I manually scroll to show the second page:

1 2 3 4 [5 6 7 8] 

which works fine. I then change to “selected” mode programmatically, and the display now shows:

1 2 3 4 5 6 [7] 8

again, which works fine.
However, if I now tap on the UIScrollView it immediately scrolls to

1 2 3 4 [5] 6 7 8

for no apparent reason.

This was going to be a complete show stopper for me, so I spent quite a long time delving into the mysteries of UIScrollView, and to cut a long story short, I think I’ve found a bug. I’ve opened a bug report with and submitted a test case, but not heard anything yet, so I’ll update this post as and when they confirm or refute it.

However, the good news is that while investigating what was causing the problem, having guessed at the cause, which I think is a rounding error between two different member variables, responsible for handling the paging enabled mode, a workaround idea presented itself.

What I discovered was, that if the content view width was integer divisible by the number of pages (which in this case was 2 or 8 pages wide), the problem didn’t happen, whereas if the content size divided by the number of pages resulted in a fraction, the issue occurred. Thankfully, this was a fairly easy workaround to implement, and perhaps explains why it hasn’t shown up often enough for apple to have found it previously.