2009

There's a common issue people are experiencing when they upgrade their Mac to Snow Leopard (10.6) with forbidden issues whilst accessing websites created through Apache's virtual hosts. The problem is simple, the new httpd.conf file in Snow Leopard is a bit more strict, and so it should be, simply follow the steps below to fix the problem.

Assuming you have Apache2 running and you have your vhost file setup and working. Open your vhost file and make the following modifications:

sudo vi /etc/apache2/extra/httpd-vhosts.conf

Opens your httpd-vhosts.conf file with vi

   <Directory /path/to/your/website>
      Options FollowSymLinks
      AllowOverride All
      Order Allow,Deny
      Allow from all
   </Directory>

Add the block above within your tags, save the file, and restart apache (sudo apachectl restart).

That's it, you simply need to tell Apache to allow access from all. If you want to secure this further you may Allow from your own computer only (127.0.0.1).

A full list of countries in a CSV file.

Full Country List (CSV) - Zip Archive

Developing websites today requires interaction with users and 'something' to keep users coming back. Creating a website is no longer simply throwing up images, copy, and hope your site achieves everything you desire.

Adobe Flash used to be widely used to achieve a rich user experience with websites, but JavaScript has made a reappearance and taken charge of creating the desired user experiences. Once a website has been launched, you simply can't help it but enhance it - and don't be shamed, it's worth it. But often we add too much way too quickly and everyone may not have a super fast Internet connection like you do.

Whilst writing JavaScript or CSS, it's good practice to keep your files separate, but when a user downloads all your files, it's all the initial server requests for each file that are slowing down the page the most. You could develop all your JavaScript and CSS in two files, but you can easily go over 5000 lines before you know it - which makes it extremely difficult to develop more, test and debug.

Unfortunately, the more you add to a website the slower it becomes to download and view. Fortunately, there are a million methods or probably just 20 (I haven't counted) to enhance the speed of your website.

Firstly, install YSlow from Yahoo, it also requires Firebug. YSlow offers suggestions for improving the page's performance, summarises the page's components, displays statistics about the page, and provides tools for performance analysis, including Smush.itâ„¢ and JSLint.

Read through each suggestion YSlow supplies and you will find your site's download and viewing speeds increase with every change. As to speeding up the JavaScript and CSS files, I recommend Minify to combine the multiple CSS or Javascript files, remove unnecessary whitespace and comments, and serve them with gzip encoding and optimal client-side cache headers.

By using Minify, you can reduce the time taken to download your site by over 300% simply reducing the number of files to download.

If you have Linux server with shared folders or drives on your network, and you have Microsoft Windows machines accessing these folders, chances are you will have Thumbs.db files all over the shop. Easy to fix with this simple Cron setup.

# crontab -e

First you will need to access your Cron jobs

0 0 * * * find /location/of/your/shared/folder(s)/ -name
 "Thumbs.db" -delete

Insert the above Cron job on one line and make changes wherever necessary. This script will remove the Thumbs.db files every day at midnight.

Save the file (":x") and walla you're done.

auDA Logo

auDA terminated Bottle Domains accreditation to sell .AU domains and Bottle Domains took legal proceedings in the Supreme Court today and won, which could see its reinstatement as early as tomorrow. auDA could have avoided the legal action taken by Bottle Domains, but they are now left with huge legal costs and possibility of paying damages.

Well done Bottle and Nick. This was always going to happen. auDA should have ensured that their actions were proportionate and minimised negative impacts to domain name holders. The chaos and confusion continues. I've said it before, how on earth is this situation a better outcome than auDA maintaining Bottle's accreditation whilst the matter is resolved between them? Bottle may or may not have breached their Accreditation Agreement, but by taking the action they did, auDA have precipitated an expensive legal battle with the domain name owners they sought to protect in the middle. Larry Bloch - CEO NetRegistry

After terminating Bottle Domain's accreditation, auDA issued advice to Bottle Domain's customers to shift to another registrar which is going to cost auDA quite a lot in damages, and any .au domain holders. auDA will most likely have to increase prices to cope with the expenses.

Resources
* BREAKING NEWS: Bottle Domains wins injunction against auDA
* Bottle Domains given the boot by auDA

On the 10th of March 2009, Hitwise released a report showing an year-over-year increase of 8% to Google in the U.S. based search queries. The report shows Google Search Market totals 72.11 % of all U.S. searches.

Domain Feb-08 Jan-09 Feb-09 Year-Over-Year Percentage Change
www.google.com 66.47% 72.09% 72.11% 8%
search.yahoo.com 20.60% 17.81% 17.04% -17%
search.msn.com 6.95% 5.44% 5.56% -20%
www.ask.com 4.16% 3.31% 3.74% -10%

(more...)

A small comic of the Bradz meeting their neighbour.

the_bradz_wifi_small

Switch off your lights for Earth Hour

March 28th 8:30PM - 9:30PM

http://earthhour.org/voteearth

Before I begin, I was able to experience what it is like to be a teacher in the year 2007 and from my own experience, it was hard work. The hours are long, especially during marking periods, and there are a lot of 'assumed' on the spot expectations - although I did enjoy teaching, watching people learn from the knowledge I was able to pass on.

Unfortunately, teachers have guidelines they 'must' follow and the assignments, tutorials, and exams must match these guidelines or at least be equivalent to the guideline. I'm sure other states in Australia and even other countries will have the same opinion about the guidelines - they are never up to date, and they are based on topics which really don't matter in the real world. To make it simple, it's like W3C to the Web Industry; they are never up to date and they focus on some of the least important things.

I really would have loved to teach the students some really cool things however I knew that if I distract them or taught them too much, then their main assessments would either a) never get completed or b) lack any enthusiasm. So to my student's disadvantage, I taught them what the guidelines told me to teach them.

For some teachers, their lacking in knowledge of the real world is a big issue. I understand quite well why a lot of them are missing any real world knowledge quite easily: do a 12 hour day of marking, conversing with students, organising assignments, following up on missed calls, helping students and more and then try put in some time to learn something for yourself. It isn’t going to happen.

I do believe teachers need time to educate themselves through personal projects and social networking with other teachers in the same field. Exactly how universities and colleges designate a day to professors to work on their personal projects, this would benefit teachers at TAFE and schools if they could have the same privileges.

Somewhat related article
A clear example of lacking of real world knowledge is shown in this post about a teacher whom confiscated a student's Linux CDs, thinking it was piracy. And that article gets better.

If you're looking for some AJAX loading animations then use this AJAX Loading GIF Generator to create your own style. It has different animations to choose from, and color settings (foreground and background) to pick.

So you graphically challenged Web 2.0 geeks can have some cool personalised loading animations whilst you're loading content.

Some examples:-

Loading Animation

Loading Animation

Loading Animation

A young man struggles against the pressure to Twitter his life away.

This is a frequent question for most IIS users on how to get permalinks to work in Wordpress, it's fairly simple really once you know how of course. So the problems are, you're using IIS so using mod_rewrite won't work, you're on a shared server so installing a mod_rewrite alternative for IIS is not available either. You can have URLs with a index.php in them (for example http://www.yourdomain.com/index.php/2009/03/17/getting-permalinks-working-in-wordpress-on-iis) but they're pretty ugly looking and doesn't fit into the URL standards (in other words, it's just nasty).

Wordpress Codex has a very useful page about working with permalinks, there's one solution that uses 404 error pages, however when you look at what it does it's very slow and again very nasty. The 404 error solution makes the server try to find the page, it doesn't exist so the server directs the user to the 404 error page, the 404 error page then does it's own working out to figure out where the user should be going, and then it would make it's own HTTP to the correct URL.

This example would work great if only it didn't make a HTTP, so what can we do with this example to make it more efficient.

<?php
   $qs = $_SERVER['QUERY_STRING'];
   $pos = strrpos($qs, '://');
   $pos = strpos($qs, '/', $pos + 4);
   $_SERVER['REQUEST_URI'] = substr($qs, $pos);
   $_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'];
   include('index.php');
?>

* Put the above 404 error script in the base of your Wordpress directory.

* Set your site's 404 Error Page to the file above

* Setup your permalinks in Wordpress -> Options -> Permalinks

Because it's including the index.php file into the script, it's utilising the functionality that is already present in Wordpress.

Resources
* Pretty Wordpress Permalinks on IIS
* Wordpress Codex Permalinks
* 404 Error Solution

@ryancarson from Think Vitamin has created this list of the Top 40 Web Developers to Follow on Twitter. Very useful list especially if you're a Web Developer new to Twitter, some very influential people on that list that I would highly recommend.

Here’s a list of the top web developers on Twitter (in no particular order). I’ll also be publishing lists for web designers, entrepreneurs and ‘generally interesting’ people. Ryan Carson Think Vitamin Mar 2, 2009

Don't forget to follow me as well (@DallasClark).

That's because "09" is an invalid number, in octal.

The parseInt() funciton acutally has 2 arguments that most people are not aware of, first is the string to parse and then a radix (which is optional). The radix value allows you to convert a binary (base 2), hexadecimal (base 16) or other base string to a decimal integer.

Example: parseInt("FF", 16); returns 255

The problem is that if you leave the radix argument off the function doesn't necessarily assume you want a decimal (base 10) conversion. Instead it checks the input string (the first argument) and if it starts with "0x" it assumes it's a hexadecimal value. If it starts with "0" - not followed by an "x" - it takes it as an octal value. This follows the JavaScript convention for numeric constants.

If you code

var x = 0x18;
alert(x);

it will display 24 which is the decimal equivalent of the hex number "18". Likewise,

var x = 014;
alert(x);

displays 12 which is the decimal value of the octal number "14".

Resource: FAQTs

Hexadecimal uses the numbers 0 to 9 and the letters A to F, 16 in all. You would normally see hexadecimal values used for colors (Orange: #FF9C00, White: #FFFFFF, or Red: #FF0000). Octal is base 8, so only the numbers 0-7 are valid. Hence, "09" is not a valid octal number and the function returns 0. Just as it would for "abc" in decimal ... it's not a valid number.

To avoid this, get into the habit of always adding the second argument, in this case ...

parseInt("09", 10);

returns 9 (decimal), as desired.

Resources
* FAQTs

That's because "09" is an invalid number, in octal.

The parseInt() funciton acutally has 2 arguments that most people are not aware of, first is the string to parse and then a radix (which is optional). The radix value allows you to convert a binary (base 2), hexadecimal (base 16) or other base string to a decimal integer.

Example: parseInt("FF", 16); returns 255

The problem is that if you leave the radix argument off the function doesn't necessarily assume you want a decimal (base 10) conversion. Instead it checks the input string (the first argument) and if it starts with "0x" it assumes it's a hexadecimal value. If it starts with "0" - not followed by an "x" - it takes it as an octal value. This follows the JavaScript convention for numeric constants.

If you code

var x = 0x18;
alert(x);

it will display 24 which is the decimal equivalent of the hex number "18". Likewise,

var x = 014;
alert(x);

displays 12 which is the decimal value of the octal number "14".

Resource: FAQTs

Hexadecimal uses the numbers 0 to 9 and the letters A to F, 16 in all. You would normally see hexadecimal values used for colors (Orange: #FF9C00, White: #FFFFFF, or Red: #FF0000). Octal is base 8, so only the numbers 0-7 are valid. Hence, "09" is not a valid octal number and the function returns 0. Just as it would for "abc" in decimal ... it's not a valid number.

To avoid this, get into the habit of always adding the second argument, in this case ...

parseInt("09", 10);

returns 9 (decimal), as desired.

Resources
* FAQTs