Thursday, November 18, 2010

Pidgin MSN Cert update

This morning pidgin was complaining about my MSN accounts and the cert coming from I seems that the cert was changed.

The fix:

Using Firefox visit:

Right-click on the page (an error page) and select page-info

Select the Security tab and click "View Certificate"

In the Details tab click export and save it in the certs dir in your .purple folder
ex:(Win XP) C:\Documents and Settings\{username}\Application Data\.purple\certificates\x509\tls_peers

(if you can's find this on your machine a simple search for tls_peers should point you in the right dir)

In Pidgin disable then enable any MSN accounts and it should connect.

For people who don't want to grab the cert themselves a helpful blogger has a link to a copy of the cert (and similar instructions) here: BUT BE WARNED that certs are the sort of things you should get from the site itself if you care about security.

Hope This Helps,

Thursday, June 17, 2010

AS3 Boolean Assignment

I came across a situation where I had a series of function calls that could alter an array of objects and I wanted to know at the end if any of them had actually made any changes. I decided to have each function return true if it had made a change and false otherwise. Then I created a boolean variable before running through the set of functions and assigned the result of each of the function calls to that variable using the following:

b = foo() || b;

I did it this way because boolean logic operators work left to right and had I done either of these:

b = b || foo();
b ||= foo();

then if b was true foo() would never have been called.

I found myself wishing that there was a way to explicitly set which direction the expressions would be checked in ( =|| instead of ||= for right to left) or even a means of indicating that you want ALL of the expressions to be validated (efficiency be damned!).

Fortunately there is a (less optimized?) way to do something similar using numerical operators. When a boolean is used in a numerical operator it gets treated as a 1 or 0. This allow you do do the following

var b:Boolean = true;
var c:Boolean; //defaults to false
var d:Boolean;

trace(b+b+c+b)// 3
trace(b+c+c+c)// 1

d = c+b+b
trace(d)// true;
d = c+c+c+b;
trace(d)// true;
d = c+c;
trace(d)// false;

d = false;
d += b // true;

This means I can do the following in my example situation:

var b:Boolean;
b += foo();
b += boo();
b += who();
b += do();

and if any of the functions return true b will become true.

Monday, May 17, 2010

First Climbing Experiance

Last Friday I was visiting a friend who invite me to go climbing with him. Having never been climbing before I jumped at the chance. I figured we would be going to an indoor wall of about 20-25 feet and have an easy day of mocking my inability to do a chin-up. This was not the case and I found myself standing at the top of a cliff becoming a little nervous.

Since I'd never rappelled before and seeing as we were already at the top of the cliff Steve thought this would be a good opportunity for me to give that a try so after explaining to me how the gear worked and showing me how to do it I leaned back over the cliff and began my decent. All in all it was pretty easy, I'm not scared of heights and you tend to be in total control of your own decent which is comforting when you're hanging 70 feet over a pile of rocks.

After we reached the bottom the fun part began. Steve explained how belaying worked and showed me the equipment that we would be using along with the basic terminology I would need to know. I can't stress enough how much I love knowing how things work, especially when these things are directly related to me and my continued state of being alive.

Steve climbed first so I could watch his route and try belaying. he scampered up the cliff face and then relied on me to regulate the speed of his decent. Next was my turn, after Steve explained some of the techniques I might need to use to make it to the top of this and the next route like smearing. The actual climbing, while strenuous, wasn't the series of chin-ups that I expected but seemed to require more focus, balance and flexibility (2/3 ain't bad). That being said I don't think my heart stopped pounding the entire time I was climbing.

After the climb I figured I would rappel down and we would move on to the next location, however I found myself with only one side of the rope and in a situation where I had absolutely 0 control over the speed of my decent. I should have realized this when I was controlling Steve during his decent but it never really occurred to me until I was leaning over the edge holding on to a rope that we essentially falling with me. Fortunately I trust Steve and he's scared of my wife so I was pretty confident that he'd take good care of me. That being said the constant sound of rope grinding over granite while you are being lowered 60 feet down will probably always raise alarms in my head.

The second route we took was about 10 feet higher and required quite a bit more thought, but was also more interesting in some of the approaches that were possible. I think Steve was a little disappointed that I didn't fall on either of the climbs (Isn't that the point) and told me I'd have greater respect/confidence in the gear if I had tested it 40 feet up and seen how solid it was. I'll take him at his word on that.

I think I'll try an rock wall indoors next and I'll certainly stick to top-rope climbing for a while before I start relying on those amazing cams as more than a guide.

All in all it was a lot of fun.

Photo set on Flickr.