Today is a Sad Day
I woke up this morning to feed my fish "Blue" to discover that somehow he had jumped out of the fish tank and dried up. He must have been there at least 2 days as I didn't see him yesterday.
Definitely not ready to be a parent anytime soon. If I can't get a fish to live more than a year then I'm obviously not allowed anything bigger to play with
R.I.P Blue. (2006-07)
Skiing is for Pussies
So Katie, myself and 15 odd other peeps spent last weekend snowboarding. Tom was right, I should have been on more ski trips with them this year. Now when I say ski I really mean snowboard 'cause skiing is for pussies - thats right Tom and Dave, you heard me. Get off those planks and join the real men (and women ....Kath).


I believe a good time was had by all especially our friend Grant who was so extremely happy that he passed out allowing Katie's lipstick to accidentally fell all over his back.

Unfortunately I forgot (both days) to take my camera with me and have Dave, who by the way must have been born with skis attached to his feet, take photos. He clocked himself at 105 km/h using his fancy GPS thingy. Thankfully Ben took lots of photos which are in his Face Book Album. (A link will come when Face Book decides to stop doing maintenance. Tom also found the answer to our mild winter while. Read his blog to find out why.
More photos can be found in the YeongPyeong - Feb 07 album on kiwiot.
The Latest Kiwiot Photo Additions
Just a quick note.
I've added new photos on kiwiot under the photo albums "I live in Bundang" and "YeongPyeong - Feb 07".
More on the ski trip in the next update.
Upgrading a website without sub-domains
Found a great discussion on making upgrading a website or live testing multiple versions of a website whilst the user goes about their business unaware of the changes until "the flick of a switch."
Basically all that is involved is a few simple htaccess redirects with conditional and mod_rewrite rules.
For example I am currently making major updates to http://www.gumauctions.com including a new updated database structure, but I want run live tests as a user would see it including the correct url's but without any interruptions to normal business. A few google searches later and I found an article on WebmasterWorld.
By simply changing the file structure of a website on the server it is easy to show a version to everyone else while I work on the latest update.
How I set my file structure up:
First copy the current website files into a new sub-directory - I called the folder 1.0
Second create a new directory for the new files - Folder name 2.0
Now by using the .htaccess file in the root directory I redirect all my web traffic to the 1.0 folder, while working in the 2.0 folder with the following.
## Switch to version 1.0 ##
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$
RewriteCond $1 !^1.0/
RewriteRule ^(.*)$ /1.0/$1 [L]
## Switch to version 2.0 ##
RewriteCond $1 !^2.0/
RewriteRule ^(.*)$ /2.0/$1 [L]
Here is a break down of what is happening.
## Switch to version 1.0 ##
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$
RewriteCond $1 !^1.0/
RewriteRule ^(.*)$ /1.0/$1 [L]
The first line tells the server to check the accessing IP address. IF it doesn't match 127.0.0.1 rewrite the the file directory to show the files in the sub-directory 1.0
## Switch to version 2.0 ##
RewriteCond $1 !^2.0/
RewriteRule ^(.*)$ /2.0/$1 [L]
If my IP address matches the first condition I will be shown the files in 2.0.
When the new version of the site is ready I can now simply remove the 1.0 condition and with no site downtime everything is instantly changed over
So why bother doing this?
- No website downtime
- Seamless changeover to the customer
- No effect on the search engines as the site url's will remain the same
- Changing back to an old version is now possible with a few extra lines in the htaccess file
Points that I considered:
- Any changes to the new sites page structure need permanent redirects in the htaccess file so search engines and users do not get 404 error pages
- When changing over databases or testing with the live db make sure there is a backup. I chose to use separate databases to ensure nothing went wrong with the data being currently viewed.
The post on WebmasterWorld can be found at http://www.webmasterworld.com/apache/3144177.htm
I've always wondered what the ? is
Finally after years of php programming I now understand the use of the ? in a line of php code to define variables. It is called a tenerary operator and work like this.
QUESTION : ANSWER ? NO ANSWER
For example, in th examples, let's talk about the $normal variable that I set which will echo selected="selected" in the select menu if the user chose Normal mode in the form.
PHP Example: $normal = (($_GET['mode'] == 'normal') ? ' selected="selected"' : '' );
So in basic terms if the condition ($_GET['mode'] == 'normal') reutrns a TRUE result the variable $normal will be given the result of selected, otherwise a FALSE answer will assign $normal '' for no string.
I found this at phpfreaks while going through their excellent tutorial on building a weighted php/mysql search engine.
Sometimes its hard to be a Kiwi
Being only one of a handful of Kiwi's within our group of friends has its advantages and disadvantages.
Advantage: I'm not North American.
Disadvantage: Our country is full of sheep shaggers.
Advantage: I come from one of the most beautiful countries in the world.
Disadvantage: Our country is full of sheep shaggers.
I'm sure you can see where the list is going. However it never ceases to amaze me that with all the idiocy in the world (Fark) for some reason it's the "Kiwi's" are idiots, stupid, strange, or sheep shaggers news reports that seem to come my way the most, generally care of a Mr Yackley, Mr Erickson, or a Mr Zaczek.
For example here are exerts from the latest forward:
Cross-dressing Miss Alice guilty of contempt
A New Zealand lawyer who took to wearing an Alice in Wonderland costume in court to highlight an alleged cover-up by the army has been found guilty of contempt.
.....
Moodie, 68, found himself named by a columnist for The Times newspaper in London as winner of the world "award for bizarre conduct by a lawyer" in 2006.
He had officially changed his name to Miss Alice and began donning women's clothes in court as part of a protest against what he said was the "old boys'
network" running New Zealand's judiciary.The protest spilled over when he began fighting the contempt charge, and Moodie used the same methods to draw attention to his case and the plight of his clients, Keith and Margaret Berryman.
Moodie today said his cross-dressing days were over as he no longer needed to appear "in a 19th-Century Alice in Wonderland environment that allows pomp, self-importance and deference to the court to eclipse the truth".
He also announced that he was quitting as a practising lawyer, but vowed to continue fighting for justice for the Berrymans.
My point is. We may be a weird bunch from New Zealand, dressing up in funny costumes, finding better ways to extract semen from a bull, or have one of the most boring cities in the world..... but don't knock a sheep until you've tried one!
Search Engine Optimization & Google
It's no walk in the park thats for sure. I did find a great page that list the do's and dont's of off site and on site factors that affect google page ranking. Definitely worth a read.
Best of Jan 2007
It's worth checking out Smashing Magazines Web-Sites of the Month: The Best of January 2007 for last months best articles, references, tutorials and freebies.
Mmmmm Salmon
Well its late on a Monday night. I still haven't had time to write about my xmas trip back to the states. Typical, it's February already. For those interested I did post a bunch of pic of the trip online.
They can be found under the album New York, New York and xmas in CT.
Basically the trip was way to short but worth it. Katie's family were the best hosts as always. Now it's life as usual, or at usual as it can be in Korea. I'm still in hibernation mode due to the lack of heat outside. Not long till those trips to Muuido and Busan start again tho.
Right I'm out, Katie wants the salmon to be cooked.
The First Post of 2007
A typical computer geek first post
Hello World !