RSS Feed Icon The WebDevil - Jeremy Lindblom

WebDevilAZ

The Portfolio & Blog
of Jeremy Lindblom

Winners of the WebDevilAZ Grand Opening Gift Card Contest

April 2, 2009 at 11:48 am

First of all, thanks to everyone who has signed up on the blog and has left comments, I hope that you will continue to read and leave comments in the future. I want it to feel social, and I want to blog about interesting, useful, and fun things.

The contest is over and we have some winners. The winners were selected randomly by a computer program, and everyone who signed up on the website through Google FriendConnect and left a comment on the blog before midnight on March 31st were eligible to win. Without any further ado, the winners are…

Winners:

1st Place: Tanner and Chaya Allen $25 Gift Card to restaurant of their choice
2nd Place: Eric and Holly Komenda $10 Gift Card to restaurant of their choice and some leftover mounting tape
3rd Place: Joe and Maren Christiansen $10 Gift Card to restaurant of their choice
Honorable Mention: Bradley and Raylene Bowles A Zebra pen, a hug and some M&M’S
Pity Prize: Alan Hogan An awkward stare, a hi-five and a pack of gum

Congratulations to all of you! I hope that you all enjoy your prizes. Will all the winners please contact me privately (through email or Facebook) to give me your phone numbers, so I can coordinate the award-givings? I definitely want them to be photo opportunities. Especially the “awkward stare”, Alan.

If anyone is interested in the program I used to select the winner, I’ll post it below. I wrote it just for this event, and it is as randomly weird as possible. Basically, it randomly sorts the list of eligible contestants and assigns each of them a random number between zero and another random number. It then takes the 7 contestants with the highest number, randomly sorts them, removes 2 of them, and then randomly sorts again. These 5 constitute the 5 winners. However, the program generates 25 such sets of these winners. Six of these sets are assigned 1 of 6 different colors. One of those colors is selected as the winning group. Lost? Me too. Anyways, here’s PHP portion of the program:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
$contestants = array(...);
 
$colors = array('red', 'green', 'blue', 'yellow', 'aqua', 'fuchsia');
$color_of_the_day = $colors[rand(0,5)];
$numbers = array();
foreach ($colors as $color)
{
	$ok = false;
	while (!$ok)
	{
		$random = rand(1,25);
		$ok = !in_array($random, $numbers);
	}
	$numbers[$color] = $random;
}
$classes = array();
foreach ($numbers as $color => $number)
	$classes[$color] = '.t' . $number;
 
for ($i=1; $i<=25; $i++)
{
	// Randomize: Slice, flip, and shuffle - It's the newest dance move!
	$peoples = $contestants;
	shuffle($peoples);
	$peoples = array_flip($peoples);
	$max = rand(67, 113);
	foreach ($peoples as $name => $index)
		$peoples[$name] = rand(0,$max);
	$peoples = array_flip($peoples);
	krsort($peoples);
	$peoples = array_slice($peoples, 0, 6);
	shuffle($peoples);
	$peoples = array_slice($peoples, 1, 5);
	shuffle($peoples);
 
	// Print a Combination
	$winningest_person = ($i==$numbers[$color_of_the_day]);
	if ($winningest_person)
	{
		echo '<div class="trial t'.$i.' winner">';
		echo '<h2>Trial '.$i.'</h2>';
		echo '<ol>';
		echo '<li><strong>1st Place:</strong>&ensp;'.$peoples[0].' &ndash; $25 Gift Card to restaurant of their choice</li>';
		echo '<li><strong>2nd Place:</strong>&ensp;'.$peoples[1].' &ndash; $10 Gift Card to restaurant of their choice and some leftover mounting tape</li>';
		echo '<li><strong>3rd Place:</strong>&ensp;'.$peoples[2].' &ndash; $10 Gift Card to restaurant of their choice</li>';
		echo '<li><strong>Honorable Mention:</strong>&ensp;'.$peoples[3].' &ndash; A Zebra pen, a hug and some M&amp;M&rsquo;S</li>';
		echo '<li><strong>Pity Prize:</strong>&ensp;'.$peoples[4].' &ndash; An awkward stare, a hi-five and a pack of gum</li>';
		echo '</ol>';
		echo '</div>';
	}
	else
	{
		echo '<div class="trial t'.$i.'">';
		echo '<h2>Trial '.$i.'</h2>';
		echo '<ol>';
		for ($j=0; $j<count($peoples); $j++)
			echo '<li>'.$peoples[$j].'</li>';
		echo '</ol>';
		echo '</div>';
	}
}
?>
Share This Post:
  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • TwitThis
  • Reddit
  • MySpace
  • LinkedIn
  • Mixx
  • Design Float
  • Slashdot
  • Yahoo! Buzz
  • Sphinn
  • Technorati
  • Google
Category: Announcements, Friends
Tags: , , , ,


Comments






Clicky Web Analytics

©2008-2009 Jeremy Cole Lindblom. All rights reserved. Design and development by Jeremy Lindblom.

WebDevilAZ is proudly powered by Wordpress and Panels960. Subscribe to my RSS feed.