Saturday, December 10, 2005

Some sun links on ZFS

ZFS is really quite amazing. My current hardware doesn't support it (well, my current hardware doesn't support solaris 10) so I haven't had a chance to actually try this new filesystem out, but from what I've read, it's tremendous.

People have talked about porting ZFS to Linux (which doesn't seem possible due to Linux's GPL licensing) and (Free/Open/Net)BSD.

Thursday, December 08, 2005

Using "keychain" for FreeBSD

Keychain is a really neat little application that makes OpenSSH's ssh-agent usable. ssh-agent (which comes with OpenSSH) is a utility program that reads your private ssh key, and stores it in memory so that it is used whenever creating an ssh connection. The problem is that you have to manually load it for it to work. And on top of that, every time that you load it, you have to enter your private passphrase.

Keychain takes care of all of that.

Keychain checks for any running ssh-agent, and attaches to it if found. Otherwise, it will execute it, and ask you for your passphrase. Now, whenever you open a new terminal, you won't have to enter your passphrase to use your private key!

This also works for the entire suite of SSH (scp, sftp, etc). So you can have a crontab entry that uses a scp call, and not have to use a key with an empty passphrase!

Below is a screenshot of keychain being setup on my FreeBSD workstation.


Once you've added your public key to your remote hosts' ".ssh" directory, you'll be able to log into your remote account without having to issue any passphrases!

Note: In the screenshot I type "killall keychain" which was wrong. I should've typed "killall ssh-agent".

Now I can log into my remote pine account by simply typing:

ssh -t username@remotehosts.com pine
Very handy.

Oh, and here's how I call keychain from my "~/.bashrc" script:

[p@bsd] ~ $ cat .bashrc
#!/usr/local/bin/bash

. /etc/profile

# start keychain
keychain id_dsa
. .keychain/bsd-sh

alias ls='ls -aFG'
alias pine='ssh -t username@remotehost.org pine'
[p@bsd] ~ $



Wednesday, November 30, 2005

Crash and Burn

Over the weekend the power supply in my main PC winked out. One minute everything was fine, the next all was silent and the smell of burned wires & hair filled the room.

After replacing the power supply, my OSs were unable to boot. I think that the power supply took out some tracks on those drives, so I'll have to wait until the X-Mas break for some time to fix them. Until then, I'm working on my P2/FreeBSD machine which is working just fine.


On a side note, here's a picture of a former co-worker and I during a debug session.

Thursday, November 24, 2005

Winnifred can write her name

The other day Winnifred asked from the other room how to spell her name. This is what she wrote down (without assistance!)



(And she's not even three yet)

Saturday, November 19, 2005

BST Assignment almost finished

My partner & I just about wrapped up the coding portion of our DataStructures/Algorithms assignment 3.

It's a C++ application, heavy on the templates. Basically it implements a Binary Search Tree, balances it and displays the differences.

Here're a few screenshot of it in action:



Monday, November 14, 2005

Sun Tech Days: Toronto

I won't be able to make it, but this event looks good.

It's too bad that they're charging $80 to attend.

Sun Download: Fatal Exception

Here's the screen that I received after trying to download the new Java Developer IDE from Sun. Nice


Wednesday, November 09, 2005

Style and elegance

http://www.alistapart.com/ is a nice site with lots of examples on CSS, design and philosophy.

Tuesday, November 08, 2005

Solaris 10 got it right

Wow-- Finally someone has implemented this feature into their userland.

[28] /bin/rm -rf /
rm of / is not allowed
[29]
Beautiful!

Saturday, November 05, 2005

Ring Ring! - New Phone

Ok, I'm on my third cell phone in six months. It's better than it sounds.. I think.

Last week I switched cell providers and received a phone upgrade and a new number. Well, today I did it again.

I'm now the new proud owner of a Motorola V551 ( VGA Camera, Video & Bluetooth ) as well as (get this) a Peterborough phone number. Ha! It's ammusing to me considering that I live in Toronto, but I spend most of my days in Peterborough attending classes at Trent University. And since my phone is primarily used for talking with my wife, it was just a lot cheaper to get a 705 area code number.

Anyhow, it's a very slick little phone. Especially for someone like myself who treats their cellphone like a toaster. If it makes/receives phone calls, then I'm happy. Everything else is icing on the cake.

Here's a link to a review if you care.

Also, I think that I'll buy a USB Bluetooth dongle so that I can get the pictures off of my phone and to play around with it a bit. After spending 2+ years co-developing a bluetooth stack for embedded devices, you'd think that I'd be sick of the stuff... guess not.

Oh, here's an awesome link to some Motorola/Linux stuff.

Thursday, November 03, 2005

Design Patterns

Well, it looks like I am learning some things at school.

In my Object Oriented Design class, we were discussing the usefulness of the singleton class. I've been doing just this before, but in a less than elegant manner.

First, a singleton is an object that can only be instantiated once. It handles this by making its construtor(s) private, and having a class method called "instance", which returns a pointer to an instantiated object. This pointer being a class attribute of the said class.

Now, the elegance of this method is that it doesn't pollute the global namespace (in C++). I've always done something along these lines:


static Whatever * instance = NULL;


Whatever * Instance(void)
{
if( instance == NULL )
instance = new Whatever();
return instance;
}


Now, in my implementation, there's a big ugly function "::Instance()" in the global namespace, which is fine for small applications, but lousy for larger ones, or libraries.

The singleton fixes this by having its initializer scoped by the class name.

Nice.

=====

Some handy links:

Surgury number 3

Findley's surgery went well. It was only a day surgury, so we were out of the hospital by 3pm(ish) which was really nice. The surgeon is letting us take care of her aftercare instead of ordering a daily visit from the nurse. We have a surgical clinic visit in about three weeks to review the recovery and healing of the surgury.

A nice thing happened while being discharged. When Findley was recovering from her 2nd surgury, her doctor/surgeon went on a two week leave and another staff surgeon took over Findley's case.

While we were being discharged by our surgeon, the replacement surgeon walked in to take care of something, and our surgeon mentioned to him who Findley was ("This is Findley Blair"). The 2nd surgeon couldn't believe Findley's progress and was just a little taken by her.

It's really nice to see (from the Doctors) that your kid isn't just a body part that needs to be fixed, but is a person and someone's child. That was really nice to see from both of them.


Halloween

Halloween came and went, and I missed the entire thing.

Had to be in Peterborough that night, and missed the fun of trick or treating with the girls. Winnifred was a lion & Findley was a mouse. I'll post some pictures as soon as I download them from the camera.

Monday, October 31, 2005

Queueing Theory

Finishing off an assignment for my Data Structures and Algorithms course and felt like posting a small snippit of my work.



The assignment is fairly straight forward, and once you've wrapped your head around the problem, everything pretty much falls into place.

Basically, the assignment is an exercise in Queueing Theory. In particular, it's a simulation of the length of the wait queue of a bank, given a certain number of tellers, the time it takes for a teller to service a customer, and the interarrival time of customers at the bank.

It's not due for another week, so I can't post any more code until it has been handed in. But I would like to explore this topic more in the future as it can be applied to a whole variety of simulations ( eg network traffic, etc. ).

Well, back to coding!

Sunday, October 30, 2005

Programming Challenge

Looks like Sun has yet another programming challenge. I think that these are great, but I can't help but laugh a little because Sun is getting a bunch of students to write software for projects that ( I assume ) don't have enough interested engineers at Sun.

The prize ( a Ultra 20 Workstation ) is an apealing prize, but you mustn't have much on your plate if you're willing to pour enough time into a project that may be profitable.

Well, good luck to those who try this one!

Wednesday, October 26, 2005

Some time at the cabin

Katharine, Winnifred, Findley & I spent a few nights away at the cabin. I have a week away from classes and it was just the excuse that we needed to get away from everything and enjoy some time to ourselves.


Attached are some random pictures taken during the trip. One picture of a large "puddle" in the road is actually the result of a beaver dam overflowing a swamp over the road. We weren't able to get any good pictures of the beaver, but he didn't seem to care that our car was idling feet away from him while he worked.














Friday, October 21, 2005

Algebra

Working on a Linear Algebra assignment and needed a bit of a break..

I'm solving systems of linear equations, and thought that Maple might be helpful, but unfortunately it doesn't show its steps, so it's not the answer to my prayers that I was hoping for.

Well, I guess that after tonight I'll be able to say that I can balance chemical equations using Gauss-Jordan elimination.

Well, I should get back to the pencil & paper method. Perhaps some tea first...

Wednesday, October 19, 2005

A first

Just setup my first blog, so here's my first entry.

Nothing to say yet, so a couple of images will have to suffice.