Wednesday, June 17, 2015

Webcams everywhere

http://www.google.co.uk/search?hl=en&q=inurl%3A%E2%80%9DCgiStart%3Fpage%3D%E2%80%9D

from here:
http://merabheja.com/tech-hacks/

Saturday, June 13, 2015

Kiting Benone - Sat 13th June 2015

Kate in the water first time - onshore, waves, small rides, struggles with board. Great evening, perfect wind, could have stayed there all night

Thursday, June 11, 2015

Kiting benone - 11 June 2015

Not good wind for being on the water, so I set Kate up to fly on the beach.

Monday, June 08, 2015

Monday, April 27, 2015

Saturday, April 25, 2015

Thursday, April 09, 2015

Good Works

The topic of ‘Good Works’ covers a huge range of topics, in fact almost all Christian activities fit within this umbrella – teaching Sunday school, preaching, cleaning the buildings, sitting on committees, leading in an organisation, helping someone with a flat tyre, sharing our faith, sharing our life with others etc, etc. I want to look at five areas relating to good works.

1)  The Origin Of Good Works

Where did good works originate? Well the first chapter of the Bible is full of God working for a day, and then proclaiming that his work is good. Every day he created more stuff, proclaiming that it was ‘good’ and on the sixth day he created mankind in his image, and looked over all he created and proclaimed that it was “very good”

2) The ULTIMATE Good Work

‘By his stripes we are healed’ – Easter time focuses our minds on the ultimate good work – Jesus death and resurrection. If you ask people what man’s biggest problem is, you will receive quite a variety of answers. The bible however is clear, the biggest problem we all face is that by nature we are objects of God’s wrath (Eph 2:3). Easter is a big solution to a big problem. It is only by this good work that we are even able to approach God, and to be part of the kingdom, and part of any fellowship.

Eph 2:8-9 “For it is by grace you have been saved, through faith—and this is not from yourselves, it is the gift of God— not by works, so that no one can boast.” We are saved by grace, through faith, and where do we get the faith? It is the free gift of God. It is the only way to remove God’s wrath from us, we were dead in our sins (Eph 2:4) and God gave us the gift of life. What do we contribute to this? Nothing. Think of Lazarus. He was dead. Jesus called him and made him alive again – this is what God does to us. We are dead, and he calls us to life. How much did Lazarus contribute to this situation? We have nothing to do with our move from death to life – it is the gift of God and the work of God. The only thing we contribute is the need for it! It is “not by works, so that no one can boast” – works come after faith, not before it.

Interestingly v10 goes on to state our purpose – “or we are God’s handiwork, created in Christ Jesus to do good works, which God prepared in advance for us to do” – we are created to do good works.

3) We Are Equipped To Do Good Works

2 Tim 3:16-17 “All Scripture is God-breathed and is useful for teaching, rebuking, correcting and training in righteousness, so that the servant of God may be thoroughly equipped for every good work.” This is why people write things like this –the scripture is full of power, just waiting to be discovered. It is much more than a book; it is God’s living word. Each time we study it we become more equipped to do the work of the Lord, and isn’t it interesting that we see that phrase again – we are fully equipped to do ‘every good work’!

4) Why Do We Do Good Works?

Eph 2:10 states that we are created to do good works. Why? Well, the ultimate reason is to give glory to God. “In the same way, let your light shine before others, that they may see your good deeds and glorify your Father in heaven.” (Matthew 5:16) . In reality our motives are unlikely to be pure, but that is what we should be aiming for. We do what we do so that others will see and give glory to God, not to us. When speaking to unbelievers it is important to point out that we are not ‘good people’ or ‘better people than others’ or whatever way they want to put it, but rather, if there is anything good, or better about us, it is not of ourselves, it is the work of God within us. If people look at us and say “those are great people” then they have missed the point. We only do what we do through the redeeming work of Jesus. We don’t boast in ourselves, only in our Saviour.

Another motivation for doing good works is that we are obeying what we are commanded in Matthew 6:20 “But store up for yourselves treasures in heaven, where moths and vermin do not destroy, and where thieves do not break in and steal.” – we are actually commanded to accumulate goodies for ourselves in the next life – God is so good that when we are doing what He says, He is actually storing up a future reward for us too! You might think that this is a bad motivation, but in actual fact, when our hearts are right, we know that God always wants the best for us, so to do what He commands in any case is ultimately doing what is best for yourself. This way God gets even more glory.

5) How Should We Do Good Works?

Col 3:17 – “And whatever you do, whether in word or deed, do it all in the name of the Lord Jesus, giving thanks to God the Father through him”. Whatever we do, we should do it in the name of Jesus, and with thankful hearts that he has given us all we need.

Summary –
We are created in God’s image, and he is the original author of good works. It is because of the ultimate good work of Easter that we are able to do any good, not through anything of ourselves, but from God. We are equipped by the power of God, through fellowship and studying the scriptures. We do good works to bring glory to God, and so that souls might be won into the Kingdom of those who bring glory to God. How? Like everything, we do it in the name of Jesus, giving thanks.






Friday, March 20, 2015

Kitesurfing - Benone - 20th March 2015

Middling forecast today, but I thought since I had the day off I'd give it a try.

Went to the beach at lunchtime, and came home, not much wind. I tried again later in the afternoon when the wind had picked up a bit at home, but there still wasn't much. However, I could see the sea was cresty, so I knew there would be wind.

It is ages since I've been out, so I hoped that I still remembered how to do everything - and that the mice hadn't taken up residence in my kites! When I unpacked it all my fears were relieved - everything was in good shape.

I set up the 12, and had a go. It was up and down, a bit light, but when it was up, it was great. There wasn't a steady enough wind to stay upwind, so I did a couple of downwinders, which were great.

Tuesday, February 24, 2015

Equality / Tolerance

I see this image popping up all over social media stating "'No gays allowed' in Northern Ireland". But, when I click, and read the link, the quote in the headline is nowhere to be found, and neither is a link to the proposal for the amendment to existing equality legislation. Coincidently, for the readers information I don't support the amendment as it stands, nor will I sign *this* petition against it. It is a poor fix to poor legislation, like putting a band-aid on a broken leg.

I wanted to reply to some of these posts on Facebook, but I don't think that would be constructive or profitable as Facebook debates usually end up in a name calling flame war, so I decided to pen my thoughts here. The title of the petition is misleading, and I hope doesn't represent the views of anyone associated with the amendment.

Oh where to start. I am not anti-anybody. I believe everyone has a right to determine right from wrong as they see fit. Everyone has the right to figure out how to live, and to live that way within the constraints of the law. 

I think it is also important to remember that most people do not arrive at any world-view or lifestyle choices lightly, most are considered thoughtfully, even painstakingly, and most are shaped over a lifetime.

It is everyone’s right to act according to the world-view they have arrived at, and live the lifestyle they choose, as long as it is in accordance with the law. Article 9 of the European Convention on Human Rights provides that “Everyone has the right to freedom of thought, conscience and religion...”[1] and I fully support that. Everyone. Not just one group, but all, to the exclusion of no one. So long as it complies with law.

Surely the whole point of freedom of conscience is that you don’t have to be complicit in some act that is acceptable by me, but not acceptable by you. For example if your company prints billboards or T-shirts and I ask you for some slogan that is in opposition to your personal ethos, or your company ethos, then you get to refuse. You are not refusing because of who I am, but because of what you believe, beliefs arrived at through your conscience. My response ought to be to tolerate* your belief, and go find someone else to give my money to.

If however you refuse me because of my political views, gender, ethnicity, religion, sexual orientation etc, then that is a different issue.

But, as I understand it, this is not the core issue in the cases that are driving this debate. The businesses are not discriminating against customers based on who they are, what they believe or how they live. In some of the cases long standing customers have asked for a product that requires someone to produce something, and lend their name to something that is against their beliefs. They have previously served the same customer many times, and have no issue with doing so in the future, the customer is not the issue, but rather their association with the product is.

We must understand that this is mutual; it works both ways, and that sometimes it will cause me a little trouble, but the other side is that I cannot be forced to do something which is against my personal conscience. This applies to the big things and the small - whether I'm asked to print a billboard, or participate in of facilitate the abortion of a baby.

The real issue comes down to one question that we all have to ask and answer: “will you tolerate* me?”

*tolerate: allow the existence, occurrence, or practice of (something that one dislikes or disagrees with) without interference

If you feel the need to comment, please do so, but if you disagree with what I've said, can I ask that rather than attacking me, you criticise my ideas, and that way we can have a constructive conversation where we all might learn, rather than just a mud slinging session?

[1] http://www.equalityhumanrights.com/sites/default/files/documents/humanrights/hrr_article_9.pdf


Wednesday, October 22, 2014

Whatever you've heard about me, it's not the whole truth - I am worse.

I've heard some things about me from various sources recently and I didn't like them. But whatever you've heard, it's not the worst.

This quote from Spurgeon sums up how to think about the charges against me:
“Brother, if any man thinks ill of you, do not be angry with him; for you are worse than he thinks you to be. If he charges you falsely on some point, yet be satisfied, for if he knew you better he might change the accusation, and you would be no gainer by the correction. If you have your moral portrait painted, and it is ugly, be satisfied; for it only needs a few blacker touches, and it would be still nearer the truth.” – Charles Spurgeon.

Depravity - The Bible makes my wickedness very clear. Genesis 6:5 says "every inclination of the thoughts of the human heart was only evil all the time". I was born with a desperately wicked heart (Psalm 51:5). I have no merit of my own. Any charge you can find to bring against me, there is worse available. Much worse.

Propitiation - my favourite word (a life saver). When God calls me to Himself with a repentant heart, in simple faith, the eternal wrath of a Holy God has been removed, He has absolutely no record of anything ever having gone wrong in my life, and I am restored to relationship with Him, and treated as a son, irreversibly, and for ever (Titus 3:7).

Praise the God of restoration, praise the God who gives, and takes away. Let me always walk through life "sorrowful, yet always rejoicing" (2 Cor 6:10). I will always have sorrows, that is a fact of life, and yet in Christ I always have much more cause for rejoicing. Praise God that through these tough times he drives me closer into fellowship with other believers, and closer to the foot of his Throne in humble dependence on Him, and Him alone.

Praise Him that he continues to work through broken vessels, like me.



http://www.vergenetwork.org/2014/10/20/practical-tools-for-exhorting-one-another/
(Spurgeon quote came from this very helpful article)

Thursday, October 09, 2014

Jehovah's Witnesses visit our home

Please note this post is descriptive, not prescriptive. I am not advising anyone to do this, I am simply describing what I did. Inviting well versed people from a cult into your home is not a safe thing to do. It could go badly wrong. But, in this case it didn't and although they said stuff I had no good answer to, I know this will only drive me deeper into the word, and into the doctrine I have come to believe. It will make my foundations more sure, and not weaken them.

Last Saturday I had a knock at the door, and it was two well dressed ladies from the local Jehovah's Witnesses. After thinking about how to deal with this encounter, and how I should prepare for it, well, here it was and I was unprepared. But, the opportunity was in front of me, so I asked them in. They said they couldn't, but they would come back another time, so I said that would be grand.

Well, last night they arrived again. It was one of the ladies, and her husband. I had done some reading, some listening, and some learning, but in my heart I really didn't want to pummel them with 2nd hand information as that seems a bit unfair. Better to deal with them as who I am, and from where I am. I am confident in my own faith, I am confident in my own theology, poor and all as my knowledge is. I know what I believe, even if I haven't got the basis for everything at hand.

So, they came in. And sat down. And we sort of looked at each other. I was expecting a pummelling with the standard JW speel, but that didn't come. So I told them that I don't think it is fair to fully form opinions on other communities without actually knowing anyone personally. So the guy started to explain some of the differences between what they believe and what 'Christians' believe.

He started with the Trinity, just giving an overview of their perceived roles of Jesus, God and the Holy Spirit. Then they told of how they don't give blood and the old testament background of that. They mentioned that they believe in Jesus, which they say surprises some people, they said they have even had people tell them they don't believe in Jesus. I do understand this as it seems they believe in a significantly different version of Jesus, but I was able to empathise with people telling me what I do or don't believe. They explained how they don't believe in hell. I listened interested, and attentively to all they had to say, asking for clarification many times throughout.

It is difficult to know where to start with something like this, but I knew Jesus talked a lot about hell, so I started by checking with them that they agreed that the entire Bible was the inspired word of God, and that it was an infallible source of information  They agreed. Phew. We talked about a few references to hell, and they explained that they believe that it is just a second death, which is final, and is an annihilation  a final end. To me this idea is quite attractive  as I think I often don't have a proper appreciation for the seriousness of sin, and the punishment it requires. Anyway, we went through a few texts, which embarrassingly they helped me to find from my poor Biblical knowledge. One by one they were knocking them down, as it was possible to read them all through the lens of annihilation  However we got to the words 'eternal fire' in Matthew 18:8 "And if your hand or your foot causes you to stumble, cut it off and throw it from you; it is better for you to enter life crippled or lame, than having two hands or two feet, to be cast into the eternal fire," The word eternal there signifies that it will be a punishment forever, not just temporary. It is not simply the fire that is eternal. Well, that was the best I could come up with, but I later found Rev 20:10 which is better: "And the devil that deceived them was cast into the lake of fire and brimstone, where the beast and the false prophet are, and shall be tormented day and night for ever and ever" not so ambiguous. Anyway, we can keep that one for next time.

Then we gradually worked our way around to works-based faith, and lack of assurance. I find it sad that their reading of the Bible cumulates in a lack of assurance, and it ends up a bit of a lottery as to whether you have done enough to please God. Anyway, i took them through various texts about the finished work of Christ, and about once for all, and so on. They brought up James, "faith without works", and I told them I agreed. But I told them that cause and effect are the other way around from what they believe. They believe that doing good works helps with their prospects of salvation. I explained that when a person is 'born again' or renewed, they repent of their old way of life (sins) and their heart and desires are changed, some instantly, some over time, but that is the actual moment of salvation. "There is now no condemnation" from that point on.

I explained this again with the old testament story of the two women who bring the baby to Solomon. He says cut it in two, and give the women half each - which causes one of the women to shout out, and say that the other could have the child. Now, here is a classic example (the best I know in fact) of an outworking of something hidden. The shout did not make the women the mother of the child. She was already the mother before that, but it wasn't possible to discern that fact visually, outwardly. The woman did not shout to become the mother of the child, she shouted because she already was the mother. She was the mother long before the dispute arose. In the same way we do not do good works to gain God's favour, but we do good works because we already have gained his favour. The works are an outward sign of an inward change that has already taken place. The JWs said they had never heard it explained like that before, and hadn't thought of it like that. For this I thank God, and pray that they will ponder this.

We also talked about true and false conversion, and how hating sin is a sign of true conversion, and about how it says that many will hear 'I never knew you'.

The conversation was gracious from both sides (I hope!) and I felt while it seemed that we agreed on some things we cam to an amicable disagreement on others. This is exactly how dialogue like this should go. Praise God.

We talked for about 2 hours in total, and covered many other topics too.

They said some interesting things, like about how little engagement they actually receive on the doorsteps. They said it was rare, and actually a bit scary to get invited into a home. They said it was unusual to meet a family (Susan and the kids were in the room for most of the time) who were devoted to and convicted by their Christian beliefs. They also said it was nice to discuss these things, rather than having people ram stuff down their throats - funny how they are scared of the same things that others fear about them!

At the end, when they left I felt it had went well. It wasn't as intimidating as I had expected  Although they clearly knew their doctrine much better than I did, they didn't know everything  and admitted it. They were just ordinary people.

I thank God for the help He gave me during this visit. He did not give me all the right texts, He did not instantly give me all the right answers, but through the faith He has given me, He helped me to show them what a genuine follower of Jesus Christ looks like, warts and all. All I can do now is pray that some of my foolishness will be turned into wisdom in their minds, by the one who created all things from nothing. I think that sounds quite feasible.


Monday, August 25, 2014

Kitesurfing - 25th August 2014

There is no kitesurfing for 6 months, and then 3 nights in less than a week. Tonight was east wind, which I'm not fond of, seemed quite strong when I got there, so I set up the 9, but it was clearly not enough, so I set up the 12.

Out on the water for a good while, mowing the lawn at the start, but working on toeside and even some powered jumps in the right to left direction.

There were almost no breaking waves, but it was odd on the way out, it was like constantly riding over a sine wave, which was actually quite tricky to do. It reminded me a bit of Magilligan point, in the mouth of the Foyle.

The best thing of all was getting to surf through the sunset, at about 8:40pm or so. Lovely.

Friday, August 22, 2014

Kitesurfing - Fri 22nd Aug 2014

Another night's kiting this week! Tonight I did a big downwinder from the mouth of the beach (Benone) to the river.

The wind was great, and the waves made better ramps than Tuesday night. I was going well, it seemed to blow up a bit as we went back up the beach to start again, and when I got back to the starting place, the wind dropped.

I tried, but I failed, the kite went down, wet, little wind, trouble relaunching, so I quit. Kite was soaked, and I was a bit disappointed. Maybe another time :/

Tuesday, August 19, 2014

Kitesurfing - Tuesday 19th August 2014

Tonight's forecast has been good, so even after a pre-6am start I decided to take a short run to the beach tonight.

It was well worth it, the wind was a good westerly direction, although the ramps weren't there as much as I'd like them to be.

I was a bit worried about the whole thing, as it is many months since I've been out, but the mice hadn't eaten my kite, I remembered where the blue and red lines went, and I also seemed to manage to kitesurf without undue amounts of falling in.

A grand evening out.

Tuesday, May 13, 2014

Marriage

I read this quote and it hit me hard: 
"I did not love my wife as Christ loves the church; instead of laying down my life for her,
 I wanted her to lay her life down for me."



Saturday, April 05, 2014

Tunnelling VNC (or anything) over ssh

To set up a tunnel to reach a vnc server running on port 5901 of remote_host, it is possible to tunnel the port over an ssh connection. Then you just connect to localhost:5901 

ssh -C -L 5901:localhost:5901 -N -f -l remote_user -p 22 remote_host

So that is:
ssh -C -L local_port:localhost:remote_host_port -N -f -l remote_user -p 22 remote_host

Friday, March 28, 2014

c# update clock display once per second

For my heating controls project I display a clock on my main screen. It is just a label which I set the time in. Previously I had used a System.Threading.Timer with an interval of 50ms to do the updates, and this works fine, but on mono on the Raspberry Pi it takes up too much CPU. Top was showing that the process was taking 8-10% of the CPU when at idle.

The problem is that if you set a timer to run every 1000ms, sometimes expirations will be slightly longer, meaning that if you watch the clock every now and then it will skip displaying a second. If you go for something like 900ms update, that doesn't work either, you get 9 short seconds and one long one.

Googling turned up this stackoverflow article, and it contains the answer that got me started, but I wanted it to be a little more versatile. I wanted a timer that I could configure to fire every 'x' ms, and I could either set it to 1000, for each second, or if that was still too CPU hungry I could set it to 60000, which would only update the clock once per minute.

In my form_load I initialise the timer.

            clockUpdateTimer = new System.Timers.Timer();
            clockUpdateTimer.Elapsed += clockTimer_Elapsed;
            clockUpdateTimer.Interval = 100;
            clockUpdateTimer.Start();

I set the initial interval to 100ms which means my clockTimer_Elapsed() method gets its first call pretty much straight away.


        private long updateMainScreenIntervalMs = 1000;

        private void clockTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            clockUpdateTimer.Stop();
            TimerCallback(sender);
            //start the timer to run until 200ms after the next clock second boundary
            long timeInMs = System.DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
            long wait = (updateMainScreenIntervalMs * (timeInMs / updateMainScreenIntervalMs + 1)) - timeInMs;
            //Debug.WriteLine("wait ms: " + wait);
            clockUpdateTimer.Interval = (int)wait + 200;
            clockUpdateTimer.Start();
        }

This method firstly stops the existing timer, and then calls my callback method to update the label (TimerCallback()). Next I get timeInMs which is the current system time in milliseconds. Then I do some maths which essentially finds the nearest full cycle of time, and subtracting the current time from this value figures out how long we have to wait until this time. 
Then I start the timer with that time. For a 1 second interval it typically waits about 750ms. 

Any improvements welcome, if it helps you please post a comment!

Kitesurfing - Friday 28th March 2014

I got to Benone just after an early exit to work, so I was there for about 4:20. It was blowing about 25 on my wind meter, so I set up the 9. However, after a couple of runs showed me that it was too small. The 12 was too big, but I'd rather be overpowered than underpowered.

It was a great session, long flats, nice waves. The only funny thing was the direction was East, which meant I was going the opposite way to normal, but it was still good practice, and it meant that I was able to ride a little toeside out over the breaking waves.

The water is still cold, and it felt even colder when I took my wetsuit socks off, feet were freezing, but at least I could feel the board. I really don't like having something on my feet, I find it very tricky.

Monday, March 24, 2014

Heating Touchscreen Screen Captures

I have made a few updates to my touchscreen client, and one of those has been a bit of work on the visual aspect. A few screenshots are posted below. (the windows are all border-less on mono, but display with borders for debugging on Windows)


Main Screen


PIN input form


Program Entry


Time entry for a specific program


System settings dialog (not themed)