Review – Banana Kit Kat
by jandrews on Apr.08, 2010, under Food, Reviews

Recently I went to Japan to visit my wife. While we and a few of my relatives were at “Tokyo Disney” we stopped at a convenience store called “News Day”. We were looking for chocolate, but what we found was Banana flavored Kit Kats. I decided to pick one up and give it a try. I waited until my return to the US where I opened the bar up at work and proceeded to cut it into 5 pieces to share with my co-workers. I grabbed the bar, and it started to melt where my fingers touched it. Leading me to believe the base was a white chocolate. The flavor is that of fake banana flavoring. Reminding me a lot of the flavor of banana Runts. The texture was that of a normal chocolate kit kat.
While the concept is interesting, I can’t find myself buying a whole lot of these. I prefer the original.
A funny story about a man and his gun.
by jandrews on Mar.16, 2010, under Humor
My sister was told a tale by a man at CVS. This man had been sitting at home cleaning his gun when it misfired. The bullet went straight through his hand, and then through a book, and landed in the wall next to his wife’s head as she was watching television. His wife calls 911, and wraps his hand to stop it from bleeding, and proceeded outside to wait for the ambulance. An ambulance from Templeton, MA showed up and the EMT asked him to unwrap his hand as he claimed he needed to see the wound. The said “It’s just going to start bleeding again.”, but the EMT insisted so he unwrapped. Upon seeing the blood the EMT passed out. The man then rewrapped his hand. Not much later an ambulance from Woods Ambulance Services showed up. Since the man lived on the city line 2 were dispatched, one from one town, and one from the other. At this point the 2 EMTs argued for half and hour over who was going to bring this man to the hospital. The man solved this problem by getting in one of the ambulances and proclaiming. I’m ready, let’s go!
The story gets much better. Upon leaving the hospital and returning home he goes to get his gun from the police station. He was informed by an officer on duty that the police chief wanted to pull his gun permit. The man then decided he was going to confront the police chief about this situation. He said to the police chief, “I hear you wanted to pull my permit for unlawful discharge, when it was simply an accidental discharge.” he then went on to say he had heard of some “asshole” who had shot himself in the left and had it come out his ankle. The police chief proceeded to thrust the gun into the mans chest in a paper bag and said “fuck you get out of here”. You see this “asshole” was the police chief standing in front of him.
What lessons do we learn hear. 1) Don’t unwrap your wound in front of a rookie EMT who is obviously in the wrong profession. 2) If 2 ambulances show up, just get in one. 3) Get all the gossip about the local police chief before you have to confront him.
Media Region Control destroy’s culture sharing.
by jandrews on Mar.14, 2010, under Politics, Technology
Anyone who knows me knows that I have traveled far beyond the boarders of the US. I have had the ability to experience a culture that most Americans only see through hollywood’s eyes. In most cases incorrectly. The best way to accurately experience culture of a foreign land without visiting it, is through their eyes. Whether it be books, music, or video it can more accurately depicts what that culture values.
Back in the 1980s we had the video revolution. People could go to the store and buy a VCR, rent movies from a local shop. You could go on vacation overseas and bring back movies to enjoy with your friends, or if you knew someone over seas you could even trade movies. The ability was also there to buy “import cds” from music stores. I remember as a teenager, there were many European bands that had 4-5 CDs and only 1 released in the US, so if you wanted those CDs you had to special order them.
The problem began with the Playstation. Sony’s hit video game machine that won over the heart of the video game world in the 90s. Sony had built in a protection schema to prevent people from buying video games in Japan from other countries in the world by making it so that other players couldn’t read discs from other regions. Many games that were released in Japan never made it to other countries, so if you wanted to play that “Castle of Cagliostro” game you needed a Japanese playstation.
Eventually the electronic nerds of the world figured out how to modify the play station to allow playing of any region game. At the same time they broke the copy protection schema, so that you could now copy playstation games with CDR media.
Soon there after came the DVD. The MPAA decided that it also wanted to use region protection on it’s DVDs. There are 13 regions. The US is region 1, Japan and UK are region 2. If you buy a region 2 disc from the UK it will not play in your DVD player. Destroying any fair use that you have to the media you legitimately own, and forcing you to buy a DVD player from the UK. Again soon after the nerds came to the rescue and did a couple things. Many hacked their machines to play multi region discs. DVD Jon broke the encryption schema called CSS and allowed you to copy DVDs to blank DVDs and remove the region protection.
Now we have blue ray discs. The media companies have smartened up a little though. They have internet connections and once a Discs key is broken they no longer produce discs with that key and update your blue ray player. Blue Ray keys get broken all the time, so this is also pretty ineffective.
The RIAA tried to do the same thing with DVD Audio, but since MP3s came out and took over digital audio, the DVD Audio plans fell on it’s back and have never been heard from again.
This now brings me to my point. The inclusion of region controls is bad. It prevents the people of the world from sharing their culture with one another unless an entity licenses the rights to distribute the media. While we have been lucky in the US with Japanese animation. There are other aspects of other cultures that I personally would love to see. I saw a great Korean film on a flight to Japan. Will I be able to buy it on blue ray and play it in the US? Probably not. We are stifling the ability for other cultures to understand each other. We can listen to President Obama praise or scold some foreign country, but until we have the ability to see what their people see first hand. To see what values they hold without restriction from the media conglomerates, we the people of the world miss out.
Review – W.A.S.P at Showcase Live
by jandrews on Mar.10, 2010, under Reviews
Tonight I did something I wish I had done a lot sooner. I went to see a band that has been a part of my album collection for 30 years. I first started listening to W.A.S.P. when my uncle introduced me to their debut album. Being an impressionable 10 year old I instantly fell for “School Daze”, a song that compares a child’s need to go to school to that of a person imprisoned for no reason for just being what they are and what they have no control over. With introduction W.A.S.P. seeds were sown. Seeds of free thinking, of rebellion, and of personal desire to make something of myself.
I arrived at Showcase Live at 5:15pm, early enough to grab my spot in line with my friend Laurie who had been waiting for me there. The doors opened and we were offered a place to sit. Stage right. The venue is INCREDIBLE. Being able to sit at a table, order a gourmet burger and fries, or a New York Sirloin steak to eat while watching the opening act. Having a spectacular view of the stage. It blew my mind.
The opening band was War Machine. The singer/guitarist reminded me of Dio for some reason. They had a solid sound, and were enjoyable to listen too. If I were more familiar with their music I probably would have gotten more involved in watching them. I plan on give them a fair listening too, and maybe if they are around again I’ll go and check them out.
The lights were down low. One by one the members of W.A.S.P came out onto the stage starting with their drummer, and soon the stage was set. Blackie started off the show with “On your Knees”. A classic from their first album. Starting the show off right. They ran through a series of songs from that album. The ones I influenced me as a child and drove my mother mad. Blackie though looking his age, sounded exactly as if it were straight off the CD.
Now I have to admit over the years I have lost touch with many bands I had once listened too. W.A.S.P was one of those bands. The songs I was unfamiliar with, like those from “The Crimson Idol” showed me that Blackie’s writing style had grown in a way I wouldn’t have expected. One example is the song they opened their finale with “Heaven’s Hung in Black”, which is a modified quote from Abraham Lincoln. Behind the band on a screen shown images of dead soldiers from the civil war, slowly the images moved to a more recent time period. The lyrics talking about the loneliness on the battlefield waiting to die. It was very touching, and it has been a while since a metal song has moved me so. It was highly unexpected. At the end, Blackie actually looked up to the sky and said a prayer. I don’t know what was said as he wasn’t mic-ed at the time, but he ended it with the symbol of the cross, which was equally unexpected.
The final song of the night, was also my favorite W.A.S.P song. A song about alcohol and debauchery. Blind in Texas. It was so wonderful to hear it live.
If you are a metal head and have never heard W.A.S.P. you should give them a try, they are a fun band to listen too. If you get the chance to see them live, I recommend you take it.
PHP Class – Calendar Matrix
by jandrews on Mar.08, 2010, under PHP Development
The other night I found myself needing a PHP class file that would give me calendar data. Specifically I needed something that I could build a calendar display with. The problem was I didn’t want it to write the HTML, I just wanted it to give me a multidimesional array of weeks and days. That way I could have whatever content I wanted in it. Not finding anything that didn’t write out HTML I created the CalendarMatrix class.
/**************************************************************************
Copyright 2010 James Andrews (email : contact at jamesmandrews dot com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
**************************************************************************/
class CalendarMatrix implements ArrayAccess, Iterator, Countable
{
// Define a list of the days of the week in english.
private $daysOfWeek = array( 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday','Saturday','Sunday');
private $dayCount = 0;
private $matix = array();
public function __construct($year, $month)
{
$this->dayCount = cal_days_in_month(CAL_GREGORIAN, $month, $year);
$this->generateMonthWeeksMatrix();
}
public function calendarDayHeaderArray()
{
return $this->daysOfWeek;
}
public function getMonthName($year=false, $month=false)
{
return date('F', mktime(0, 0, 0, $month, 1, $year));
}
private function firstDayOfMonth() {
return date("l", strtotime(date('m').'/01/'.date('Y').' 00:00:00'));
}
private function primeMatrix($startPos)
{
// Set up the first matrix array
$this->matrix[] = array();
for($count=0; $count < $startPos; $count++)
{
$this->matrix[(count($this->matrix)-1)][$count] = "";
}
return $matrixPos = count($this->matrix[(count($this->matrix)-1)]);
}
private function generateMonthWeeksMatrix()
{
// Get the position for the first day in the week header array.
$startPos = array_keys($this->daysOfWeek, $this->firstDayOfMonth());
// prime the matrix
$matrixPos = $this->primeMatrix($startPos[0]);
// Handle each day of the week
for($day = 0; $day < $this->dayCount; $day++)
{
// Fill in the date into the array value
$this->matrix[(count($this->matrix)-1)][] = ($day+1);
// If the current array hits a length of 7 start a new one.
if(count($this->matrix[(count($this->matrix)-1)]) == 7){
$this->matrix[] = array();
}
}
}
/*
* Below are our "implementataion functions."
*/
// We don't want to be able to change the data, so this
// function though here for compatibility does nothing.
// We'll throw an exception later.
public function offsetSet($offset, $value) {
}
public function offsetExists($offset) {
return isset($this->matrix[$offset]);
}
public function offsetUnset($offset) {
}
public function offsetGet($offset) {
return isset($this->matrix[$offset]) ? $this->matrix[$offset] : null;
}
public function rewind() {
reset($this->matrix);
}
public function current() {
return current($this->matrix);
}
public function key() {
return key($this->matrix);
}
public function next() {
return next($this->matrix);
}
public function valid() {
return $this->current() !== false;
}
public function count() {
return count($this->martrix);
}
}
The class is designed to mostly work like an array. With one exception, you can not modify an indexed value. It does how ever allow you to use for, and foreach statements to iterate through the array.
// Instantiate the matrix using the year and month in the constructor.
$matrix = new CalendarMatrix(2010, 03);
The matrix will now initialize itself with the constructor and you can use it like so.
<table>
<?php foreach($matrix as $week): ?>
<tr>
<?php foreach($week as $day): ?>
<td<>?php echo $day; ?></td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</table>
The code will now have created an calendar with the first row being Monday the last row being Sunday. There is also a function go build the day header at the top.
<table>
<tr>
<?php foreach($matrix->calendarDayHeaderArray() as $dayName): ?>
<th><?php echo $dayName; ?></th>
<?php endforeach; ?>
</tr>
<?php foreach($matrix as $week): ?>
<tr>
<?php foreach($week as $day): ?>
<td<>?php echo $day; ?></td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</table>
It is also flexible enough to be used to build a calendar out of divs simpley use both foreach calls next to each other and then put a div in the middle instead of a <td> tag.