Thursday, 21 April 2011

Carjacked Honeymoon

I guess most of you already know what happened to us in brief. I thought it would be a good opportunity to write down the current situation as it's too long for a facebook status.

Anyway, this is what happened. We arrived in Naples on April 18 in the evening, about 20:35. We picked up the hire car, a basic Fiat Panda without SatNav. It took us 90minutes and I had to get an overdraft extension just to be able to pay for the excess which hadn't been specified on the form. And then we started to try and navigate our way out of Naples in dark.

Except it just wasn't easy at all - the main highway to the A3 which would take us to Sorento was blocked so we ended up going round half of Naples and in and out of the airport for thirty minutes before we found a street which sign posted a turning for the autostrada.

While we were trying to figure out whether the turning would take us in the right direction a motorbike pulled up on our left; the back passenger got off and came up to the car. I can't remember too clearly what happened next as it was a bit of a blur. The guy was gesticulating and shouting and when I expressed my confusion I saw he had pulled out a pistol and cocked it into position (by pulling the top section back, it was an automatic).

I got out of the car and wandered over to the other side of the motorbike; I saw the other guy get in as Helen got out and the first guy started pointing at my wedding ring (a fairtrade gold ring, one of the first that could be bought that way) and when I refused put his hand in his pocket to pull out a gun...

but before he could do anything a car appeared round the corner and they both sped off, leaving us without our car, clothes, money, cards, Kindle, passports etc. They took everything except the clothes we were standing in; our rings and mobile phones, only one of which had any power.

So then we spent the rest of the night stuck with the police. The incident took place just outside a house, and the occupants let us in after they saw Helen calling for help. With the help of Yahoo Babelfish we were able to explain something of what happened; they called the police (5 officers arrived); and after 90minutes where precious few details were taken we went to the main police station to take down a statement, but just ended up waiting so long we were then escorted to a hotel for the night (pre-paid for by Helen's friend Mary), where eventually the hotel managers let us in (they wanted to see our documents... which of course we didn't have).

Mostly we've been spending the rest of the honeymoon trying to get enough things into place, but it's all so terribly involved. It took a whole morning to get a fairly simple statement down. We now have some changes of clothes, a temporary passport and a little money and we've spent 2 nights in our hotel. We have yet to sort out what happened to the car and other things it's probably not best to go into details with on this blog.

However, we are completely unhurt, we must emphasize that. Many people have been very helpful, we'd like to thank the British Consulate in Naples for their extended help along with the kind support of the staff at our hotel as well as other sympathetic individuals. Thanks for all the support from all our friends, I hope this blog helps you know where we're up to.

Much love from julz and Helen

Monday, 6 December 2010

Televisors!


This is just a short - scruffy post about Televisors. A friend of mine pointed me to the MUTR website which is selling minature Televisors and it set me thinking about variations on the theme. But first some information on the Televisor frame format.

Frame Format

There are variations on the Televisor format, but here's a summary of the MUTR one.

Frame rate is 12.5Hz.
There's 32 vertical scans so each scan is 400Hz.
The original doc specifying the minature Televisor specc'd the pixels frequency at 80 pixels per scan, so each pixel is at 25.6KHz.
Voltages are similar to composite TV: 1V peak-to-peak is normal. Sync is at 0V, black is at 0.3V, white is at 1.0V.
Frame sync is the entire 32nd scan - so the 32nd hole on the disc is used to check frame sync.
Line sync (here vertical sync) uses the bottom 7.5% of each scan, the bottom 6 pixels. So, there are 74 video pixels available.

That about sums it up, now for the ideas:

Visorpong

It should be possible, just using nearly the lowest MCU available ( e.g a PIC 12F509) running at 4MHz to implement pong, producing televisor video output. Here the PIC generates up to 78 pixels per scan; that's 32 clocks/pixel with 5.8 sync pixels. I worked out a basic output routine:

btfcc TMR0,0 ;(btfcs for odd pixels).
goto .-1
movf gGpio,w
btfsc 0x10+(pix/8),7-(pix&7)
addlw 1 ;bit 0=video signal.
movwf GPIO

Which takes 6+3n where n is the number of wait loops, so we have up to 26 c for computation; about 1872 overall. There's up to 10% jitter on pixel output. There's also 196 cycles available during sync.


Digital Televisor

Similarly a more highly-specced MCU, e.g. an AtTiny25 should be able to sample incoming Televisor video and control a real Televisor disc and output video onto it. This would greatly reduce the part count and the MCU would also be able to do automatic line and frame sync.

Televisor Simulation

You don't need a 75MHz Pentium to simulate a Televisor - a ZX Spectrum with an analog in would (just) be able to keep up with converting Televisor input onto its screen, my draft routine uses 75% of CPU converting samples into dithered bitmaps, here's the core of it:

in a,(sampler) ;10c?

out (sampleTrig),a ;start next sample (data is irrelevant). 21

add a

ld e,a

ld a,(de) ;first conversion sample.

inc e

ld (hl),a

inc h

ld a,(de) ;second conv sample.

ld (hl),a

inc h


I've been trying to think about how a VIC-20 could keep pace; running it in 16 chars x 20 lines with 4x2 VIC-20 pixels per real pixel, but my best basic routine so far would take 38cycles, about 20% too slow.

Monday, 20 September 2010

NSXMLParserDelegate fix for different iPhone iOS versions

This is a short blog providing a better fix than I've yet seen for supporting consistent NSXMLParserDelegate code across different versions of iOS.

The problem occurs because the NSXMLParser class was changed between iOS 3.0 and 4.0. Originally it informally declared some delegate methods and this was turned into a formal delegate protocol: NSXMLParserDelegate.

This means that you'd need to fake the delegate class with:

@protocol NSXMLParserDelegate
@end


if you're compiling for a iOS 3.0 target, but this will generate a duplicate @protocol declaration warning if you then compile for after 4.x. So, really you want the protocol declaration only for versions of iOS below 4.0.

The easiest way to do this is simply to wrap the protocol declaration with:

#ifndef __iphone_4_0
@protocol nsxmlparserdelegate
@end
endif


That's how you test for the current SDK version - in any particular sdk there's a #define for each version up until the current version, so version 4.1 has __IPHONE_

-cheers from julz

Friday, 27 August 2010

British Christian Doctors aren't killing enough patients


In one of the strangest BBC articles I've seen in ages, the BMA has complained that Christians are more likely to prolong the life of their patients by suggesting pallative care - and that's a BAD thing, because everyone should be a functional Atheist at work.

In this weird and rambling article, the BBC claims (conflictingly) both that Christian doctors should leave their principles at the surgery door, and work in a purely dispassionate, objective way and also that they should have their patients interests at heart.

I thought doctors were supposed to be following the hypocratic oath, which is primarily concerned with doing good and at the least, not harming the patient.

This does rather all smack of secular propaganda, for example, it's an article attacking religious people, but no viewpoints of Christians are offered, so there's no balance. It does however put forward 'Dying with dignity' agenda across, a pro-euthanasia organisation. It also uses the way in which the secular industry's pro-death media campaign has shifted public opinion over the decades (by publicizing a number of cases of people who want to die) to then put the pressure on Christian doctors.

The reality is that one's beliefs (or lack of them) actually do influence a person's professional conduct, because they influence one's ideas and goals. This is true for religious people and secular people. There's no neutral setting and defining oneself as being neutral doesn't change that.

Sunday, 15 August 2010

Climate Change Weather Index

One of the biggest issues with assessing climate change is how we link climate with weather. We know that climate change ought to produce a corresponding change in weather patterns, but we can't demonstrate that individual weather events are a product of climate change and in the minds of most people weather is what we see (natch), not climate.


Global Heat anomoly So, although the Russian president attributed the recent heatwave to climate change, even New Scientist are far more cautious in doing so.

I think the way to resolve this is not to look for demonstrations of extreme events, but to relate all weather events to climate change. This is how:

Essentially, if climate change is being driven by global warming then what we're saying is that there's more energy present in the earth's system, because heat is a measure of energy and temperature is: ÂșC = J/(Kg * SpecificHeatCapacityOfAtmosphere).

Extreme weather events are powered by the extra energy in the system. So in a sense all we have to do to relate weather events to climate change is calculate (even roughly) the energy in any particular weather event and add it all up. We can then provide a total and a probability that this total thus far lies within the natural variance. We make these two figures part of normal weather forecasts.

This technique will work well for relatively local weather as well as global weather and as weather events add up to a convincing argument for climate change people will want to see the Climate Change Weather Index falling - they'll want to do what it takes to reduce flooding, heatstrokes, air-conditioning and blizzards.

Friday, 4 June 2010

Death Throes In The Arctic


Be prepared to be shocked, the Arctic is seriously likely to reach a record-breaking low extent this summer. I thought I'd write a short blog on why; and why I think the arctic is in its death throws.

This year's Arctic record low will be easy to understand. We're predicted to have a record-breaking ground and sea temperature; we've had record breaking increases in CO2 (3ppm in a year, during a recession I might add); the ice volume anomaly has already broken records by about 100% (compared with 2007). The ice-extent itself declined from a near 1979-2000 average in early April to below the record low for this time of the year (which occured in 2006) so if it tracks at the same rate it'll take until July at the earliest before 2007 catches up. However, it will almost certainly accelerate.

So far so bad, but actually it's much worse. Climate Scientists have been predicting imminent new record lows since 2007, because the 2008 and onwards Winter ice has been thin and therefore prone to melting - so the ice extent over the past few years has been deceptive. In fact summer 2008 and 2009 were almost as bad as 2007 and it should have been newsworthy even though it wasn't terribly surprising.

The real killer though isn't the thin ice, but that so much of the Arctic ice is no longer solid, but broken regions of ice held together by refreezing - rotten ice. There are numerous first hand reports confirming this; that is, detailed satellite picture analysis and fly overs. I think we should now consider the Arctic to really be basically a mass of loosely connected ice-floes primed to float south at the slightest provocation. This 'ice-mass' is moving quickly as some Arctic explorers recently found out.

That's the problem - the Arctic ice no longer even needs to melt as such, it can just drift into oblivion.

Tuesday, 4 May 2010

Someone beat us to it!


Did anyone ever tell you what happened to the great ancient library of Alexandria? It was like a major wonder of the world and held so many classic texts that its destruction precipitated the half-millenium long Dark Ages. I've spent roughly 22 years under the unhappy impression a mob of brutal, ignorant Christians burnt it to the ground for the crime of being heretical. It turns out someone beat us to it.

By centuries.

You can read the entire story here. The point of this blog isn't really to shift the blame though, but my story of this story - how I kept coming across this myth and how different & more complex a more accurate history is.

This is how it goes. In my middle childhood to mid-teens I embraced Atheism, consciously understanding what it was about and genuinely valuing how science and reason had helped humanity progress beyond religion (as I understood it then). Part of this meant I was really into popular science literature and this is where I came across the story via the otherwise brilliant book Connections by James Burke. I've summarised it above, but the basic idea is that the late 4th century Christians, being opposed to reason and knowledge burnt it down in a riotous act of wanton vandalism, because esp, the Librarian was female.

At the time that made sense to me and I guess I internalised its point, but by the time I was doing my PGCE in 1990/1991 I'd become a Christian and forgotten it all; so I was quite shaken when a rather angry Atheist on my course launched into a tirade on the concrete walkways of UEA, using this an a prime example of why he really couldn't stand Christianity and Christians.

OK I thought, well Christians are perfectly capable of messing up badly. So the (indirect) shame stuck with me for about 10 years until I found myself on the Anvil Workshop course in 2001. Here I got a slightly different version of the story where the riot was caused because the female Librarian had moved the Library to a pagan temple (which the Christians wouldn't visit).

And that's still pretty bad and yet on this course I learned a few things that didn't quite add up. Firstly, many of the early Christian leaders had had their theological training at Alexandria and so were well versed in Classic literature. Secondly, the Septuagint (an ancient Greek translation of the Old Testament often quoted from by the writers of the New Testament) was translated at Alexandria too
. It doesn't make quite so much sense for these types of people to want to burn it all down.

I should have started questioning the story a few years later when I found out that the Christianisation of Ireland beginning with St. Patrick (a real person, who never drank Guiness ;-) ) resulted in generations of Irish Christians who made the acquisition, preservation (and reading) of ancient literature a high priority. These amazing people were responsible for maintaining the majority of all such texts Europe had access to until the influx of books from the middle east after the Crusades.

I kinda just assumed they'd got them from elsewhere. It turns out that the history is both simpler and more subtly complex. To put it simply: Christians didn't burn the Library, it's a myth. More subtly, they couldn't have, because Alexandria had multiple libraries.

It's actually a conflation of stories. Alexandria had been burned down in ancient times, but not by Christians - Julius Caesar had accidentally done it in 48BC during an attack on the port. What the Christians did burn in AD391 were the Pagan temples by decree of Emperor Theodosius and although one of the temples had been used as part of a library there's no record of whether there were any books left in it by then.

So, our predecessors appear to be innocent on this particular count - jolly good :-) ! So what happened to all its books during the Dark Ages? Come to think of it, what happened to the Dark Ages? - I've heard contemporary historians figure that's a myth too ;-)