02 July, 2009

Hacking away at PHP

I got involved with a geocaching TB race being held here in South Africa. The race rules were all set up by a geocacher called cincol who is a South African living in Qatar. At first I offered to keep score with him, and then looked for a way to "publish" the scores on the web.
I contacted another geocacher, who publishes cache find scores on a web site for all the South African cachers, and he was quite happy the he would host my few pages on his site.

The previous year the race contained 16 entrants, and I thought this year it would be more or less the same. To update a few static HTML pages would not be a huge task. On the day the race started we had 47 entrants, and at one point I was hoping to break the previous years 16.

This became a huge task to maintain, so I opted to PHP-efy the pages a little. And so began my first look at PHP. I have done a few financial web sites in ASP, so thought it could not be to hard.

There were times I found it very frustrating to work with PHP, as I had no intellisense, but was quite intregued in how I could address an array in PHP (key/value pair).

Another cacher (Far-Jar-Hug) pointed me to a PHP script which could extract GPS points from a KML file, and create a small signiture item for ones Travelbugs. Link:caughtatwork

This set me on enhancing the static info of the travel bugs to include the last location of each bug. I wanted to add the GPS position as well, but this has very little meaning unloss you are seeking a cache. After a little bit of a search on the net I found GeoNames, which will give you the country, province / state, and near which town it is.

As the page loaded very slowly, I set out to optomise it a little and cache the info localy on the web server, but this does require me to log in once every morning to get the new KML and location files. But hay it works for now.

As I mainly program in C# now, I found it quite interesting how another language works. Sometimes I found PHP very primative, and not very well structured, but this could be due to my inexperence in PHP, and other times quite amazing. All in all, I am enjoying the little bit of hacking I am doin in PHP.

I was also amazed that I was able to download install and run an Apache server (MicroApache), using PHP on my windows maching and the complete download was less than 2 Meg. That is impressive! So I can code, debug, fix the pages localy on my machine, and upload to the Linux server where it is hosted. One thing I battled with though is getting the configuration just right to work. I event ran it of my USB stick for a short period.

I was put in touch with someone else who is hosting a TB race in the states. I zipped up the files and sent the web site off to him. With the questions and issues he is having, I can see it should maybe rewrite it with less hardcodeing and more configuration options. But the site did not start out to be hosted multiple instances. Maybe refactor it and then put it on source forge, if there is a small demand.

03 May, 2009

Geocaching CITO event / 350 finds.

Yesterday the 2nd May 2009, we reached 350 finds, at a geocaching CITO event. CITO stands for Cache In Trash Out, and it is the geocaching way to give a little back to nauture, for giving us such great adventures and hiding spots for this great game. The 2nd may was also international CITO day world wide, and we were one of many events that cleaned a park somewhere in the world. At my last check there were more then 1000 photos uploaded to CITO Event.

In total we were about 26 people, where of 6 were school going kids, at this the only South African event.

We arrived at the given co-ordinates, and were give some yellow plastic bags, much stronger then the black bags we use at home, tehn some instructions, and then sent into a small velt /nature reserve.

We slowly moved down the park on the southern side of the river, pickup up trash. We even found an odd tennisball, soccer ball, hocky ball, and golf ball, hit over the school fence. One guy even found a small scooter. By the time we got to the bottom of the park, the bakkie, was layden down with trash, and straps had to be used, to keep the bags from falling off.

The return path back to the top on the northern side was much quicker, and I saw a huge bee hive in one of the drains.

Once at the top we took another photo, of bakkie with trash, and and then went to a nearby lapa where we had a social get together, and a braai.

In total, I recon, we picked up more then 500 kg of trash. Not bad, if you consider that Joel, the park's person in charge of this area, sent in his guys 3 weeks, and they all returned with half a bag full each, saying the park is now clean.

I am glad that I have now completed my first ever CITO event, but would not like to do it to often. Once a year I would be happy with. I have now removed much, much more trash in weight, then I have hidden to date.

08 September, 2008

2 Years of geocaching

We have just reached our 2 year mark of geocaching.
That is 50 finds for the 1st year, and 154 finds in the second year.

That makes it an average of almost 2 caches each weekend, for the last two year (52 Weeks * 2 years * 2 caches per weekend = 208 caches).

Not bad going. There are other cachers who do a lot more caches then we do.

However something interesting I saw on the SA rankings page (SA Georanking Statistics) is that very view of the high find cachers find many TBs and coins. It seems like that we at least find almost one coin/TB for every cache we find. But this does not mean we only do caches where there are coins/bugs. On the contrary I think I spend a lot of time at events getting all the numbers from the TB's and coins. Also I have now for a while already, only loged a TB/coin as discovered if I have taken a photo of it. Just discovering it because it was on some list, I no longer do.

My log book for the 3rd year will now also include a list of all the more interesting TB's and coins we as the DamhuisClan have come across (I will include some TB's of previous years).

My current Logbooks (for year 1 and 2) can be seen here:
DamhuisClan Logbook - Year 1
DamhuisClan Logbook - Year 2

Should someone be interested in browsing through the log book I can email a low quality PDF document to them. Either leave a comment, or email me.

02 September, 2008

Legend has it....

'Legend has it', (on hearsay) that an internet financial institution's web site is a little safer after today. Hopefully I helped some little community, without them even knowing it.

It would have been nice if "they" had given me 1% of the money on what would *they* could have spent on damage control, had I not found the security risk, and had I rather gone to a newspaper then to *them* (but just as paying your TV license: It was the right thing to do [to go to *them*])......

12 July, 2008

Some stuff.

Wow, it has been 4 months since my last post. That is not good.

Some updates.

Diablo, went quite well, but at Nightmare it is much more difficult then on the other levels. And I must add I like it that way.

Bottom room is still being completed. We actually worked on it a little today, where we sealed the sealing, and touched up a few places where we need to paint. Basically the following still needs to be done:
1) Paint the walls and sealing.
2) Complete the connection of the electric point.
3) Put in the kitchen cupboards.
4) Tile the kitchen.
5) Clean everything up
6) Get someone to rent.
7) Build movable gate.
8) Build a carport.

What was a 2 or 3 months project has become almost a year project. It seems to take a lot of effort to complete. Pappa assisted with putting in the door, and although there was a kink on the left door wall, the door fits superbly.

My car's timing belt broke 2 weeks ago. Lots of money to fix it. Basically the money we had saved up for the kitchen for the granny flat, was spent on fixing the car.

Last weekend we went geocachcing with Wildbirds. Awesome day! with 14 caches done, although only 12 were new for us.

Plans for moving over seas.
We have been thinking for a while on moving overseas, and in all of our minds we were planning on going to Canada. An email from Lode, made me think about the one thing I realy dislike. Long, VERY cold days. I get headaches when I get really cold for very long times.

Rudolf has just completed LeJog, which is a bike ride (peddle bike) from the most south-west point in the England to the most Northern point in Ireland. 10 days riding, and 2 days rest. He made it, and it looks like an awesome thing to do. I thought that if I were a little fitter, I could do something similar with the kids, and UK or Europa would be the ideal place to do this.

This got me thinking again of the possibility of moving to UK again. Although the one thing would be not working in London itself. I find things in London to formal, and to fast moving. If we do move to the UK, it would need to be in a smaller town. Now moving to the UK does not seem so bad, and there are lots of extra perks. Things such as my cousins in Holland. Trish's cousin in Switzerland. All of Europe's city's are no longer that far away, and a much better chance that our parent would come visit us (more often?). Also Rudolf is in London, and could be of great assistance to us moving there. Also there are over 30,000 geocaches in the UK, which helps.

So although Canada is most definitely not out the door, I (or hopefully we) are thinking of the possibility of UK. Need to do some more homework.

29 March, 2008

Easter Weekend's Diablo game, and some geocaching

Well, we did play Diablo II over the weekend, but it was a lot slower going then I had expected. The plan for to quickly finish off the current Nightmare game and then by the end of the weekend finish the complete game again at Hell difficulty. One of the problems we had was that Glenda's character could not be found in any of the backups I had made. So Glenda took one of Trish's level 78 sorceress. Our Characters were only about level 62 when we started. The playing characters were thus 2 sorceresses, 1 Amazon (bows) and 1 Necromancer. It was a bit of a problem for us playing as we did not have someone with swards up front. We stated latish on Thursday afternoon about 6PM and played until just after 10 PM. Nightmare level was still not finished.

Saturday morning stated early at about 8AM and by night time we had finished Nightmare. We decided to try the cow level, but we were killed very quickly. We restored our characters as they were just before the cow level and started Hell. By around 10PM we had just killed "Blood Raven" in the graveyard, and decided to leave the evening there. We left the game running on Trish's machine so we could carry on the next day. Saturday we continued from around 8AM, again till about 10 PM.

Sunday morning we did not play as it was Easter-Egg-Hunt for the kids at Ouma's house. We met up with my sister and Tante Tanneke. Tante Tanneke made lovely mushrooms from eggs and tomatoes. The kids enjoyed the easter egg hunt as well. Just after 1 PM I got an SMS from the video store that we had to return the borrowed videos. Wow did not realize that it was that late already. So we left in a hurry and took back the videos. We got another one for the kids to watch that day as well, while we played Diablo.

We continued our game again at about 3 PM and the plan was to play to about 10 PM. I did not want to make it to late, as I was hopingto go geocaching around Cullinan the next morning.

10 PM arrived and we were very close to completing Act 1 on nightmare. So we all decided to just finish of Andariel and then stop. Just before 10H30 she was dead and Act 1 completed.

At this point Glenda's sorceress had not yet leveled as she was much higher then ours, but by now she had less then 10% experience to go to level. So we decided that we would play a little more until she at least leveled.
We started Act 2 in the sewers and had some amazingly good battles down there. Matt's Bones were of good use keeping back the enemy, and my Valkry also helped lots.

With just a little to go on Glenda's experience we ventured out into the dessert and down one of the tunnels and that is where the wheels came off. We all died going to level 2 in one of the tunnels. It took us to 2PM in the morning to get back our bodies and getting Glenda to level.

At this point we decided not to go geocaching in Cullinan as we had to be back by 2PM for when Neville arrived, and the house looked like a bomb had hit it. There was also a little bit more of cleaning to do in the bottom room.

Monday morning we got up at around 9AM and started cleaning the house, and taking the PCs back to their normal places. Cleaned the bottom room, as well as the rest of the house.

Neville arrived at about 3PM and luckily he wanted to go do some geocaching. We did quite a few I had already done, but there was one "Spot a Boeing" that I had not yet done. We did a few more in the west end of Edenvale as well.

Tuesday afternoon, after work, we did a few more caches in the Kempton Park area, where there was another one I had also not done.

All in all a good weekend.

Side Note: Hell level in Diablo II is a lot more difficult the the other levels. One thing that makes it more difficult is that a lot of the monsters are immune to one or other thing. But this adds a interesting twist to the game, as one can no longer just shoot bows or whatever at them, one needs to change quite often from fire to cold to poison quite often to kill them. Although it is much more difficult I like this level a lot more then the others.

17 March, 2008

Fixing the granny flat, Easter, Diablo, and geocaching

Today I stayed home from work, so we could get a tiler in to tile the kitchen and bathroom portion of the granny flat. I left home at 7AM to go find a tiler, and drove around quite a bit between CTM and Tile Africa to find one. Eventually I found someone at Tile Africa. He wanted R500.00 for the 12 m^2 but I said R400.00 which he accepted. He subcontracted the mixing of the cement out to another guy.

Very quickly he was 2 rows further down then we were on Saturday, and he also did a very good job around the washing basin, and toilet. In the morning he said he should be finished by 3 PM but in the end I took him to the taxi rank at about 6 PM. Somewhat later then he estimated, But none ever the less a job well done.

Once the kitchen is done I will use Alex again to tile the walls of the kitchen.

Next weekend is Easter, and every second year (or so) we play a game called Diablo II from start to finish. There are 5 of us playing. Trish and myself, with Jerome, and Matt and Glen. Sometimes we have vistors join us for a day or so (Rog and Nik), but they are not as hardcore as we are. We start setting up Thursday night, play 10+ hours on Friday, 10+ hours on Saturday, Sunday afternoon about 5 hours, and then 10+ hours on Monday.
The first year (2005) we completed the complete game including the cow level in the 4 days.
Last year (2007) we completed the 1st 4 chapters and only got halfway up the mountain before the end was the weekend drew our adventures to a close. Each year we play the one level up from the previous one. So this year we should be starting on Nightmare level.
Will add feedback by next weekend on how Diablo went for us.

The weekend after Easter we will start cleaning up all the building rubble. And there is quite a bit of that lying outside the new front door to the granny flat. With a bit of luck it will be rented out by the end of May, or early in June.

P.S. We reached out 140 geocache this weekend, by attending an event in western Johannesburg, and the hightlight was meeting Erik the geocache reviewer for South Africa, all the way out from the USA, who is/was here on holiday.