Archive for 2008/12

A Five Year Beer Project Has Come to an End

Five years ago I bought Nils Oscars Julöl (Christmas Beer). They say that this particular beer will get better with time and recommend you to age it for five years before popping it open.
At the time, five years ago, I figured that it would be interesting to not only store a bottle for five years but also see what difference it actually does.

I took the one bottle I had, this was the year 2003, and put it in a dark cabinet at home.
The year after, 2004 that is, I bought a second bottle and put it next to the other one in the cabinet. I now had a one year old beer and one that was freshly made. I kept on doing this until this year. This should have given me a total of six bottles but unfortunately I missed 2005 so I only had five.

This year it was time to try them out and compare them to one another.
I realise that the comparison isn’t perfect. The recipe has been altered a bit over the years and the ingredients can give the beer a slightly different taste each year much the same like wine where the weather will affect the final product. Despite of the above it is essentially the same beer and the basic flavours of it shouldn’t change much from year to year.

Any way, time to drink some beer.
I tried them all at the same time so the alcohol wouldn’t change the last couple of beers so I took five glasses and poured each beer it it’s own glass.

The difference between them was very easy to distinguish: the older the sweeter. The youngest beer had distinct burnt flavour, as did the one from last year but it wasn’t as raw as the first. As I tried the older beers one by one they got sweeter and with the last one, the one from 2003, the sweetness had completely taken over the burnt flavour I felt in the youngest.

My favourite was the four year old from 2004. The sweetness dominated but there was still a hint of burnt caramel somewhere in it. Lovely.
At the end I brought out some nice dark chocolate to go with the beer and that really doubled the pleasure of drinking them.

What I’ll do from this year on is to always have a four year old in the cabinet that I’ll bring out on Christmas. It’ll take me three more years to get there since all I have right now is a bottle from 2007 but it’s well worth the wait.

XBox 360 Hard Disks

With the recent anouncemnt from Microsoft that ytou can store your games on the XBox 360 HDD to reduce heat and noise while playing I started to move my games.

I have the old style Premium version that ships with a 20GB HDD and with the system itself taking about about 7GB it was filled up after only 2 games :(

I’ve spent a few hous looking for hwo to increase the space on my XBox and I’ve found two alternative  solutions.

  • I buy the 120GB HDD from Microsoft. Very expensive (~ €120)
  • I buy a 120GB 2.5″ SATA drive and replace the current disk myself. (~ €40)

The second option would save me about €80 but it would probably void the warranty and requires software that I haven’t found anywhere for download. I’m also unsure if it would be possible to mount a larger disk than 120GB if I do it myself, if it is, then the second option seems much more appealing. If you’d happen to know this I’d be happy if you let me know. What to do, what to do…

For now I’ll have a look at this video I found that shows how to replace the disk.

Internet Explorer Vulnerability

It seems Internet Explorer is in trouble.
A security flaw can make any web page malicious and according to Microsoft themselves it isn’t only version 7 of IE that’s affected but every version out there.

In short, if you are using IE, switch your browser now. At least until this has been sorted out,
http://www.mozilla.com/
http://www.google.com/chrome

More information on this topic can be found here:

http://www.microsoft.com/technet/security/advisory/961051.mspx
http://www.f-secure.com/weblog/archives/00001561.html
http://news.bbc.co.uk/1/hi/technology/7784908.stm

Random You Say! Oh, Really…

I don’t know how many times I’ve stumbled across PHP code for generating random strings and numbers that aren’t random at all.

Take this example that I just found for instance:

<?php
...
$RandomStr = md5(microtime());
...
?>

Statement from the author: “…[md5 (microtime ())] use to generate the random string…”. [source]
So very wrong… I can predict the time and hence I can predict the outcome of that piece of code. That’s not random.
If you have a look at the website where I found this you can of course argue that the above snippet would be sufficient and maybe it is enough to fool most bots but it’s still not random and that’s my point.

If you wonder about the definition of Random I think wikipedia is doing quite a good job at it.

Ever Needed an Ajax Loader Image?

I just found this website where you can generate ajax loaders gifs on the fly. They are free to use. Very handy indeed.
www.ajaxload.info

jQuery check all – Final update?

This may, or may not be, the final version of the check all function.
The main diffrence this time is that it’s accutally a jQuery function.
You simply enable it by wrapping a group of check boxes in som kind of box (fieldset, div, td, table, or anything else that feels good) and set a class on the wrapper.

<div class="checkbox-wrapper">
<input type="checkbox" name="box1" />
<input type="checkbox" name="box2" />
</div>
<script type="text/javascript">
$(document).ready(function(){
	$(".checkbox-wrapper").checkall();
});
</script>

Include this function:

/*
* jQuery function: checkall
* Description: Adds a check all box that will toggle the checkboxes within the parent element.
* Options:    text: The text that is displayed next to/the toggle box. Default is "Select/Deselect All"
*/
(function($){
$.fn.checkall = function(options){
var defaultoptions = {
text: "Select/Deselect All"
};
var options = $.extend(defaultoptions, options);
return this.each(function(){
var obj = $(this);
obj.append('<label><input type="checkbox" class="checkallselect" />&nbsp;'+options.text+'</label>');
$(obj.find('.checkallselect')).click(function()
{
obj.find('input[@type=checkbox]').attr('checked', $(this).is(':checked'));
});
});

};
})(jQuery);

Customer Support

They are probably fake but funny still :)

###############################################
Operator: “Ridge Hall, computer assistance; may I help
you?”
Caller: “Yes, well, I’m having trouble with WordPerfect.”
Operator: “What sort of trouble??”
Caller: “Well, I was just typing along, and all of a sudden the words went away.”

Operator: “Went away?”
Caller: “They disappeared”
Operator: “Hmm. So what does your screen look like now?”
Caller: “Nothing.”
Operator: “Nothing??”
Caller: “It’s blank; it won’t accept anything when I type.”
Operator: “Are you still in WordPerfect, or did you get out??”
Caller: “How do I tell?”
Operator: “Can you see the ‘C: prompt’ on the screen??”
Caller: “What’s a sea-prompt?”
Operator: “Never mind, can you move your cursor around
the screen?”

Caller: “There isn’t any cursor; I told you, it won’t accept anything I type.”

Operator: “Does your monitor have a power indicator??”
Caller: “What’s a monitor?”
Operator: “It’s the thing with the screen on it that looks like a TV. Does it have a little light that tells you when its on ?

Caller: “I don’t know.”
Operator: “Well, then look on the back of the monitor and find where the power cord goes into it. Can you see that??”

Caller: “Yes, I think so.”
Operator: “Great. Follow the cord to the plug, and tell me if it’s plugged into the wall.
Caller: “Yes, it is.”
Operator: “When you were behind the monitor, did you
notice that there were two cables plugged into the back of it,
not just one??”
Caller: “No.”
Operator: “Well, there are. I need you to look back there again and find the other cable.”

Caller: “Okay, here it is.”
Operator: “Follow it for me, and tell me if it’s plugged securely into the back of your computer.”
Caller: “I can’t reach.”
Operator: “OK. Well, can you see if it is??”
Caller: “No.”
Operator: “Even if you maybe put your knee on something
and lean way over??”
Caller: “Well, it’s not because I don’t have the
right angle — it’s because it’s dark.”
Operator: “Dark??”
Caller: “Yes – the office light is off, and the only
light I have is coming in from the window.”
Operator: “Well, turn on the office light then.”
Caller: “I can’t.”
Operator: “No? Why not??”
Caller: “Because there’s a power failure.”
Operator: “A power …. A power failure? Aha. Okay, we’ve
got it licked now. Do you still have the boxes and manuals and packing stuff that your computer came in??”
Caller: “Well, yes, I keep them in the closet.”
Operator: “Good. Go get them, and unplug your system and
pack it up just like it was when you got it. Then take it back to the store you bought it from.”

Caller: “Really? Is it that bad?”
Operator: “Yes, I’m afraid it is.”
Caller: “Well, all right then, I suppose. What do I tell them??”

Operator: “Tell them you’re too stupid to own a computer!!!”

###############################################

Customer: I have problems printing in red…
Tech support: Do you have a colour printer?
Customer: Aaaah………………..thank you.

###############################################

Customer: My keyboard is not working anymore.
Tech support: Are you sure it’s plugged into the computer?
Customer: No. I can’t get behind the computer.
Tech support: Pick up your keyboard and walk 10 paces back
Customer: OK
Tech support: Did the keyboard come with you?
Customer: Yes
Tech support: That means the keyboard is not plu gged in. Is there another keyboard?
Customer: Yes, there’s another one here. Ah…that one does work…

Summary of Chris Heilmanns Talks

As I’ve mentioned earlier Chris Heilmann from Yahoo came here last week and talked.

Last Thursday Chris talked at the GeekMeet here in Stockholm and the day after he came to the bwin Games office. He did essentially do the same talks here as he had done at the GeekMeet but I reckon the talks with us where a bit more intimate considering we were about 20 and at the GeekMeet there were about 150 in the audience.

The first talk was a high-level talk about the web. Chris hadn’t really prepared for it so he had no slides but instead he seemed very relaxed and just kept on about the the web, especially 2.0 but also what’s coming in 3.0.
He showed a lot things that’s been done recently in 2.0. Since we had business people attending the first talk he didn’t go into details, instead he showed Firefox plug-ins such as Greasemonkey.

The second talk was about performance on the web. This time he drilled further down and got technical. It was really interesting.
Basically he discussed the major pit falls in web development, especially when you are using a lot of JavaScript, and how you can work your way around them.
He also showed us a lot of useful tools such as smush.it for image optimizing, YSlow for web site load debugging and a couple of simple techniques like minifying and bundling JavaScript includes via APIs. You can find the slides here.

All in all it was two very good talks and it gave me a lot of ideas and tools that I’ll use to improve my sites in the future.

A Visit From Chris Heilmann

Chris Heilmann from Yahoo is in the office today and he’ll have three talks throughout the day out of which I plan to attend two.

He’s just finished his first talk about the future of Javascript and the web.
It was a very high-level talk without too much technical details as there were a lot of business people attending but it was very interesting still. it wasn’t so much how to do things but more what you can do and where we are going with Web3.0, sharing and integrating web applications.
The second talk will be about web performance. From what i understand he’ll show us tips & tricks, what to do, what not to do etc.

I’ll try to get my head around the talk during the weekend and summarize the two when I have digested the contents of them.

jQuery Check & Uncheck All – Update

Go here for the final verison of jQuery check/uncheck all

I had a chat with a colleague about my check/un-check all function yesterday.
He liked the idea but felt it was a bit too obtrusive so I’ve rewritten it a bit.
It doesn’t affect your DOM much at all and if you don’t have javascript enabled you won’t see the checkall option any more.

The HTML
The fieldset I’ve used in this example can be exchanged for any other container such as a div, p td or what ever suits you. You can also add what ever mark up you want around the check boxes.

<fieldset class="checkallgroup">
   <input type="checkbox" /> Box 1
   <input type="checkbox" /> Box 2
</fieldset>
$(document).ready(function()
{
	$('.checkallgroup').append('<label><input type="checkbox" class="checkallselect" />&amp;amp;amp;amp;amp;nbsp;Select/Deselect All</label>');
	$('input.checkallselect').click(function()
	{
		if($(this).data('status') === undefined || $(this).data('status') == 'true')
		{
			$(this).parent('<label>').parent('.checkallgroup').find('input[@type=checkbox]').attr('checked', 'checked');
			$(this).data('status', 'false');
		}
		else
		{
			$(this).parent('<label>').parent('.checkallgroup').find('input[@type=checkbox]').removeAttr('checked');
			$(this).data('status', 'true');
		}
	});
});
   

10 Most Recent Twits

Loading twits...