gsnedders

As long as Unicode isn't 16-bit (which it hasn't been since Unicode 1.0) and US-ASCII isn't 8-bit (which it has never been), I'll be happy.

Geoffers' 1.1

Tags: February 8, 2005 (3 comments)

So, I've finally finished it, so, basically, the question is: "What do people think of it?"

History

  • Images come online - 1st February (Evening)
  • I think about what to do - 1st February until 6th February
  • I show a couple of people an early beta version - 6th February (Evening)
  • Post at CF to eliminate final bug - 6th February (Night)
  • Read the post at CF, then apply the changes to the CSS - 7th February (Evening)
  • Tidy up the CSS - 7th February (Evening)
  • Version 1.1 becomes Golden Master - 7th February (Evening)

The forgotten command: switch

Tags: February 4, 2005 (15 comments)

Everyday, I see lots of people using code looking something like this:

<?php $rand = mt_rand(1,10); if ($rand == 1) {echo 'What ever you want to do if $rand == 1';} elseif ($rand == 2) {echo 'What ever you want to do if $rand == 2';} elseif ($rand == 3) {echo 'What ever you want to do if $rand == 3';} elseif ($rand == 4) {echo 'What ever you want to do if $rand == 4';} elseif ($rand == 5) {echo 'What ever you want to do if $rand == 5';} elseif ($rand == 6) {echo 'What ever you want to do if $rand == 6';} elseif ($rand == 7) {echo 'What ever you want to do if $rand == 7';} elseif ($rand == 8) {echo 'What ever you want to do if $rand == 8';} elseif ($rand == 9) {echo 'What ever you want to do if $rand == 9';} elseif ($rand == 10) {echo 'What ever you want to do if $rand == 10';} ?>

When, surely, it is easier to use the switch command, which will require less code (although more whitespace is common) and will be more readable, it'd look something like this:

<?php $rand = mt_rand(1,10); switch ($rand) { case 1:echo 'What ever you want to do if $rand == 1';break; case 2:echo 'What ever you want to do if $rand == 2';break; case 3:echo 'What ever you want to do if $rand == 3';break; case 4:echo 'What ever you want to do if $rand == 4';break; case 5:echo 'What ever you want to do if $rand == 5';break; case 6:echo 'What ever you want to do if $rand == 6';break; case 7:echo 'What ever you want to do if $rand == 7';break; case 8:echo 'What ever you want to do if $rand == 8';break; case 9:echo 'What ever you want to do if $rand == 9';break; case 10:echo 'What ever you want to do if $rand == 10';break; } ?>

Of course, use of switch is not limited to number generated by the mt_rand command, it's just what I've chosen to use in my example here, partly because I've been using mt_rand quite a lot recently...

Relevent PHP Manual Pages:

Imaged by popular demand

Tags: February 2, 2005 (2 comments)

After many people have complained about the lack of images, I've finally given in, and here they are. There are 8 6 images, randomly chosen by the server on every page, hope you like them :)

I've put all the images onto the next page...

[Edit]New design, images aren't online anymore[/Edit]

Admin Area Frames

Tags: January 14, 2005 (5 comments)

As many of you are aware, some software, like phpBB and IPB, use frames in their admin areas, I'm wondering what people feel about the use of frames in admins areas...

I'm not trying to turn this into a blog purely in existance to ask questions, but some like this, just need to be asked, and be approached for discussion :D

Personally, I often use frames, as a time saving device, as it makes it easy to create an admin page, and just add a link to it in the navigation bar frame, and you'll find this in many scripts I have created, my wishlist included :P ... I am, however, under no circumstances, saying frames should be used outside of an admin panel, very few people are going to see the admin panel, and thus, it is less of a problem to use frames, although you see shouldn't... unlike me :P

Post Dates

Tags: January 9, 2005 (3 comments)

I know that they all say "Geoffrey Sneddon at 8:58PM GMT on the 31st December 1969," however, it is not my fault... It's a bug in the latest WP nighly... I hope it get's fixed shortly...

Page:  1 … 29 30 31