Saturday, December 31, 2005

HAPPY NEW YEAR for 2006

It's a new year. Wishing everyone a happy, healthy and prosperous new year in 2006. The Sydney fireworks at 12:00 last night were amazing. I believe it was the largest display yet. I'm not sure about that heart thing on the harbour bridge, but the fireworks were just amazing. Unfortunately, I only saw them on TV. I'm going to get down there next year for sure.

New years resolutions:~
I'm not usually big on new years resolutions, but I do have a few this year. I'm going to be more healthy, drink more water, sleep more, smoke less and get more exercise. I'm going to stop spending all my spare time in front of the screen, and I'm going to have more fun. I'm also going to take up playing guitar again. I never really stopped, but I'm going to get serious again. Also no more than 3 cups of coffee a day. Some of these things I started doing a week or two ago, but I still call them new years resolutions.
The first day of 2006 here in Sydney is a real scorcher. It's 1:00 and 42 degrees centigrade, so I'm enjoying the air conditioning.

Thursday, December 29, 2005

2005 Coming To A Close

Well, it's almost the end of another year. It's been a year of turmoil around the world, but whether more so than any other year, I can't really say. For me it has also been a hectic year, and I'm sure about that. This has been my first **Serious** year of web development, and the results are reasonably pleasing. I haven't really had much of a festive season this year, as I've been trying to get some major changes finished on my main site before the end of the year. With 2 days to go, I look to be on track.
Next year I plan to focus much more on marketing and less on the infrastructure and coding of the site. It has been a years work just to get a dynamic site that is indexable and does all we need it to. There are some great shopping cart packages available out of the box, but none do the job completely in my opinion. The only way is to start with something like VP-ASP or OS-Commerce which is open source (meaning you can modify the code yourself) and chop and change it into something that fits the mould.
Of course, this is more easily said than done. A shopping cart application is complex by nature, and when you have to rip the whole thing apart, rewriting whole sections of code, it can be a challenge to end up with a good solution. The other part of the challenge is to keep the application fast, and make the changes fit into the existing application as smoothly as possible.
The other issue, is that once you have your custom, one of a kind, modified application, the next version will come out, and you can't upgrade to it because of all the changes you've made.
I face this now with VP-ASP, as I am running version 5.5, and 6.0 has come out now. I am not going to upgrade, as it is way too heavily customised now. It's interesting that some of the features I've added, are offered in the new release. I've learned ASP now, so I'll just keep building the application myself.
I'm in the process of setting up another site, using ZEN-Cart, which uses PHP, and I'm setting up some smaller, more specialized stores with it. The beauty of this, is that it runs well on Apache which is a much cheaper web hosting solution. (VP-ASP does have a version for Apache and MySQL also, but it has to be purchased separately). ZEN-Cart is totally free, and I've found it to be a good package. The only drawback is that it performs a lot of database lookups, so on a limited server with 10000+ products it may be a bit sluggish. Then again, with such a site, one would be a bit silly running it on a limited server.
On top of that, in the new year I plan to improve my health and fitness, spend less time in front of this screen (or any other screen for that matter), and generally start enjoying off-computer activities like I used to. Setting something up from nothing is always a hard slog, but hopefully things are rolling now.
One of the hardest things I find, is retaining creativity when there is so much to get done. Web design is a creative thing, and as a web designer, one is always looking for new and better ways to get information out to the user, in a way that will make them favour your site. That is hard to do when you have orders to fill, 1000+ products to put on, and all the other associated tasks.

Wednesday, December 28, 2005

IIS 301 redirects using the 404 error page

We have always used IIS for the infrastructure of our main site. There is no way I'm going to be changing it either, as it's a huge site.
IIS can be a nightmare when it comes to redirects and URL rewrites, as there is no easy way to do it. Apache has the .htaccess file, which is incredibly powerful.
There is a way with IIS. When a non-existant page is requested from an IIS server, it can be configured to silently redirect to a custom error page, and this error page can be an ASP file. When I say "silently" I mean no codes are returned (no 200, 404, nothing). If you do this, make sure you set the 404 error code in the asp error page. This is done with the following line:
Response.Status="404 Not Found"
Make sure you do this. I didn't, and when Google crawled, it thought my 404 pages were actually loading ok (thousands of them, and all with the same content - Not good)

Now, onto the redirect/rewrite thing. The URL that returned the 404 error is actually passed to your custom 404 page in a querystring (not displayed in the browser). You can use the Request.ServerVariables(QUERY_STRING) to return this url.

From there, it's as easy as using a simple if statement to determine if the page that you want to redirect from has been called. If it has, you can set a 301 or 302 status and redirect accordingly. This is the beauty of the server not setting the 404 code for you. You can basically do what you want from this file. Server.Transfer can also be used for URL rewriting, as this can send the user to another page without changing the url in the browser, and can return a 200 code for the page they originally requested.

It's definately worth testing this before implementation, as you can get some nasty endless loops when things get complicated.

It saved me by allowing me to redirect a certain .htm page with a 301 perminant code. Here is the code that sits in my custom 404 file:

dim eurl
eurl=Request.ServerVariables("QUERY_STRING")
if eurl="404;http://www.mysite.au:80/default.htm" or eurl="404;http://mysite.com.au:80/default.htm" then
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", ("http://www.mysite.com.au/")
Response.end
end if

Wednesday, December 21, 2005

Suffered a Hard Disc Crash

Every computer guy's worst nightmare happened to me the other day. I switched my computer on, only to find that my second hard drive would not spool up. I use the second drive to store data, and the first one for the operating system.
I lost a bit of data, but there was nothing on there that I need for work, just sentimental stuff from the last five years of working on computers. I had some great video clips of cars and things, photos of when I lived in Melbourne for 2 years, and some cool and funny stuff that I saved from emails over the years. It's a shame, but it's not devastating. To be honest, I have only myself to blame.
I have read that the life expectancy of a hard drive is 3 years. The 40gig IDE unit I was using was slightly older than that. It was a stand alone drive, and was not backed up.
I have now done what I should have done in the first place. My mainboard has a built in SATA dual channel RAID card, so I went out and brought 2 160gig SATA hard drives, which I will make into a RAID volume and partition to 60gig/100gig. The 60gig drive will be for the OS, and the rest for Data. The existing system drive will be reformated and installed with Linux.
I will be interested to see the improvement in performance between a single 6800RPM IDE drive and the dual 7200RPM SATA drives. It is for the extra performance that I will be using the new drives for the System drive also. It will be great to have Linux back too.

Monday, December 19, 2005

Google update "Jagger" is all over

It appears that the huge update just past has stabilized, and although results are still moving, they appear to be doing so more slowly and in smaller groups.
I'm not a Google Watcher as such, I don't have lists of data centers stuck up on the wall, and I don't spend hours testing search terms to see what comes up where. It is interesting, though to see how the results move around as they churn through their terabytes of data. It gives a little insight into how they might do things.
I believe Google is a better product due to the update, a lot of rubbish sites are gone, and they seem to be cleaning up a lot of the long-since deleted files that were hanging around as supplimental results.
Personally, the update came at a bad time, as I was in the middle of a series of major structure and design changes to my main site. It is still not completely indexed in it's new form, but is getting there. Because of the structure change, and page deletions, it may be some time before the search engines have a full map of the entire site. The said website has over 20,000 pages of good content.

Sunday, December 18, 2005

Inept State Government and Inadequate Policing Lead to Violence in Sydney

As a longtime resident of Sydney, I have a little to say on this.
The recent happenings in Cronulla and Sydney are NOT racially related. They were NOT caused by racist people being racist. (Although those with a racist axe to grind certainly took advantage of the occasion.)
They have been caused by a lack of proper policing and an inept state govenment, which over the last ten years has lead to the rise of gang culture and increasing incidents where "regular" people are subjected to abuse and intimidation in public places.
So, all world leaders take note: Have a look at Sydney, Australia. This is what happens when you stuff up law and order.
The citizens take to the streets, in an attempt to do the job of the police. Even more innocent people end up getting hurt, and you end up with what we have here now: One huge mess.
I won't be going to the beach this summer.

Thursday, December 08, 2005

Pubcon Coming to Sydney

I was excited the other day to find out that PubCon is coming to Sydney. Pubcon is a convention for webmasters with speakers from both the search and e-commerce industries. As e-commerce in Australia is quite a long way behind where it is in America, most of the cutting-edge events tend to be over there. Pubcon is organised by Brett Tabke, who is the CEO of WebMasterWorld.com, a site where I spend quite a bit of time. There is a heap of knowledge to be gained about the business on that site. A bit of questionable advice and Google bashing too, but hey, that's what forums are all about.

Friday, December 02, 2005

FireFox Web Browser

After hearing about it more and more recently, I decided to try out FireFox for the first time.

Firefox is a web browser, like Internet Explorer and Netscape. The difference is that it is open source, meaning a community ofvolunteer programmers and developers create the software, and it is available for free. It is also legal to modify or improve open source software.

So far this browser puts Internet Explorer to shame, and I am converted. I find it faster to use, and with many more useful features. It also offers more flexibility in page viewing, such as the ability to enable or disable various JavaScript functions individually. There are many plugins (called extensions), which offer added functionality.

The look and feel of Firefox is also completely customisable, icons and toolbars can be manupulated to suit the user, and various skins can be downloaded and installed. This is useful for things like putting a print icon in a prominent place on the browser I use to access my e-commerce application.

As a web developer, I still have to have IE installed (and Netscape) mainly for the purposes of testing sites to make sure they work with everything.

The only issue I have run into so far is a slight difference in how FireFox executes some JavaScript applications, specifically the HTMLArea progam (A web based WYSIWYG HTML editor). I use this program to edit text descriptions for products on one of my shopping carts. Version 1 and 2 of HTMLArea don't work at all with FireFox, and version 3 does work with it, but does some wierd things like adding blank lines and carriage returns at the end of a block of text. So unfortunately I still have to use IE to edit my products, just for the purpose of convenience. When I get the time I will find an editor that works perfectly with both browsers, as I'm sure there is one.

FireFox can be downloaded from www.getfirefox.com for free. I highly recommend it. All the extensions and documentation can be found at www.mozilla.org.