Whistler Backcountry
By dave | January 3, 2008
There is a good blog entry on the Whistler SAR blog about “Where not to go in Whistler“. If you’re going to Whistler and planning to do some backcountry riding I suggest you read it! We’ve got some guided bacckountry riding booked with Whistler Alpine Guides in Febuary. A report of that trip will appear here or on Ruth’s Blog shortly afterwards.
Be careful out there!
Tags: whistler, backcountry, snowboarding
Topics: /Snowboarding | No Comments »
Sun Dog
By dave | December 12, 2007
We were lucky enough to see a quite spectacular Sun Dog on Sunday afternoon. The photo doesn’t really capture how spectacular it really was. I wanted to stop all the people skiing by who were missing it (you wouldn’t have seen it unless you’d looked back up the hill).
Tags: sun dog, whistler
Topics: /Snowboarding | No Comments »
Snowboarding Lessons
By dave | December 12, 2007
We had another excellent lesson at the weekend and we were chatting to the instructor about why snowboarders tend to stop having lessons as soon as they can turn. It’s interesting since skiers tend to have more instruction every time they go on a trip.
My boarding lesson history is pretty chequered…
I learnt on the toothbrush at Yeovil Alpine Village with my friend Stuart, I think we had around 5 lessons (in hard boots!) before our first trip to the alps. The lessons consisted of the ‘instructor’ saying ‘this is how you heel edge’ and then disappearing to the bar, the second lesson was similar ‘this is how you toe edge’… However by the end of 5 lessons we could both almost do something you could almost consider a turn. I’m sure their instruction is better now, this was 10 years ago.
My second set of lessons was much more productive but with a similar level of actual instruction. We arrived in Meribel for our first ever snowboarding trip and decided we weren’t beginners (we could almost turn after all) so we signed up for the intermediate lessons. We spent our first day falling over in the rain before our lessons started the following day. When we arrived at the meeting point we started chatting to the other people in our group. Much to our horror we discovered most of them had several weeks snowboarding under their belts (we had several hours at best), we were starting to suspect we may be a little out of our depth. This fear was quickly confirmed when the instructor showed up and took us straight to the top of the mountain and down a red run. Somehow we survived and ‘improved’ fairly rapidly, at this point kick turns were the only way…
The third bout of instruction came several years later when we discovered McNab we signed up for their Advanced Technique Clinic where we were taught to snowboard ‘properly’. The instruction was mostly excellent (especially from Tom (RIP)) and consisted of starting again from scratch and building up from J turns back up to carving thinking much more about weight distribution and boarding from the feet up rather than kicking turns and using our upper bodies to initiate the turn. It took me a long time to break all the bad habits I’d picked up and really get to grips with this way of snowboarding, in a lot of ways it felt like a big step backwards.
Following on from our McNab trips we had a number of lessons with Tom and Rob from RTM which were always worth while (and a bargain too), I highly recomend you check them out if you find yourself in the Three Valleys (Meribel, Val Thorens or Courcheval)
Recently we’ve been taking advantage of the various season ticket promotions and the Discover Whistler Days (40% off lessons). So far the quality of instruction has been superb!
Reasons to take lessons
- You can cut the lift lines (not to be underestimated on a powder day)
- Your riding will almost certainly improve
- You’re probably not as good as you think you are
- You’ll discover new places to find powder
- It works, the people I know who take lessons have progressed further and quicker than those who haven’t
Problems
- Finding quality instruction isn’t always easy (although I think North America/Canada have a much higher average standard)
- It can be expensive
We’re certainly going to have more lessons as the season progresses, we’re thinking about doing a freestyle camp (2 days)…
Do you take lessons? If not why not? If you do, any recomendations??
Tags: none
Topics: /Snowboarding | 3 Comments »
SSHTools (j2ssh) - Java SSH/SFTP Library
By dave | November 27, 2007
This post is partly for my benefit (so I can find it next time I need it) but mainly because there seems to be a severe lack of information about SFTP/SSH libraries for Java.
I found myself needing to perform the simple (looking) task of sending a file to an FTP site, after writing the code using the org.apache.commons.net.ftp library I quickly discovered I needed to use SFTP rather than FTP. “Simple” I thought, “there must be something like this on the apache site”. Hmmm nothing there, lets try Google.
Commercial
- Loads of options but at $1500+ for a company license a little more than we wanted to pay
Free
- JSch - http://www.jcraft.com/jsch/
- SSHTools - http://sourceforge.net/projects/sshtools/ (used to be j2ssh
Hacky
- Use the psftp.exe program that ships with Putty (I really didn’t want to have to do this)
I took a look at the JSch code and was fairly horrified at the code quality and the random dependencies on Swing and AWT, SSHTools looked a much better option in that the code seems of a far higher quality and well designed, the only downside was it seemed to have been neglected for around 3 years but it’s been recently revived by Chris Thomas and there have been a couple of releases this year.
Anyway after reading the doco (pretty good all in all) I came up with the following snippet
SshClient ssh = new SshClient();
ssh.connect(host, port);
//Authenticate
PasswordAuthenticationClient passwordAuthenticationClient = new PasswordAuthenticationClient();
passwordAuthenticationClient.setUsername(userName);
passwordAuthenticationClient.setPassword(password);
int result = ssh.authenticate(passwordAuthenticationClient);
if(result != AuthenticationProtocolState.COMPLETE){
throw new FTPException("Login to " + host + ":" + port + " " + userName + "/" + password + " failed");
}
//Open the SFTP channel
SftpClient client = ssh.openSftpClient();
//Send the file
client.put(filePath);
//disconnect
client.quit();
ssh.disconnect();
Nice and simple, just the way I like it!
Tags: none
Topics: /Technology | 25 Comments »
Four player online cooperative play in Halo 3
By dave | August 1, 2007
I’m sold! Bungie are reporting that there will be four player online co-op in Halo 3. I really enjoyed playing Halo 1 and I finally gor around to completing the single player campaign recently (I got side tracked my online multiplayer). Co-op play on Doom 2 was superb fun and I think Halo 3 will be great. I’m certainly going to be getting an Xbox360 this winter! All I need to do is find 3 suggestible friends to play with (I don’t know anybody with a 360 at the moment)!
Tags: none
Topics: /Technology | 5 Comments »
Garmin Rock!
By dave | July 13, 2007
I’ve been attempting to install City Select Europe v6 on my Vista PC and I’ve been running into all sorts of issues so I sent them an email. After receiving their prompt response and trying the suggestions I called their customer service number. It seems I should have a Setup CD, CD 1 of 2 and CD 2 of 2. Well it turns out I’ve misplaced the Setup CD (not sure why there is a setup.exe on CD1) and they are sending me a new one for free no questions asked. I’m very impressed with their customer service!
Tags: none
Topics: /Technology | No Comments »
Use a Mac, it’s more secure
By dave | July 12, 2007
Run Windows on it with Bootcamp and Parrallels
Hmmm…
Apart from the obvious fact it’s not more secure. If your primary reason for moving to the Mac is it’s more secure than Windows (and that is a reason for a whole lot of people) why then do so many people run Windows on it?
Tags: mac, windows, security
Topics: /Rants, /Technology | No Comments »
Gliffy - Web diagrams
By dave | July 6, 2007
I needed to draw a quick diagram for my earlier post on by value and by reference variables in C#. The obvious choice is Visio but I don’t use it frequently enough to make it worth buying (cheapskate aren’t I). The next thing I looked at was MSPaint and Photoshop, while both of these are fine for drawing simple pictures and/or editing photos neither are any good for drawing diagrams.
A quick web search later turned up Gliffy which allows you to draw Visio like diagrams in a browser. It’s actually amazingly usable and you can create 5 diagrams for free before you have to start paying them.
I have to say I can’t think of any reason you’d want to store all your diagrams on the web but it’s a very cool little tool and a great example of what is possible in a browser.
Tags: none
Topics: /Technology | 1 Comment »
Microsoft Canada Development Centre in Vancouver!
By dave | July 5, 2007
Microsoft have announced a new development centre in Vancouver due to open this Autumn (still can’t bring myself to say Fall). I think this is really good news for IT in Vancouver, especially Microsoft focused development. I’d also really like to work for Microsoft one day. Will certainly be keeping my eyes peeled for more news on this.
Tags: none
Topics: /Stuff, /Technology | No Comments »
Reference & Value types - Pass by Value, Pass by Reference (.NET)
By dave | June 28, 2007
A colleague of mine is learning C# and was asking me some questions about the difference between Reference and Value types in C#. We then went on to discuss the different semantics of passing Reference and Value types by reference or by value.
Firstly a few definitions
- Value Type = Any structure (struct in C#), all of the primitive types eg. int, double, DateTime etc (not including string).
- Reference Type = Anything inheriting from object, this means anything defined as a class.
- Pointer = The location of a reference type (which is what you have when you have a Reference Type variable)
- Mutable = If an object is mutable it’s internal state can be changed byt calling methods and/or properties, for example neither String nor DateTime are mutable since any method/property that would change state returns a new String or DateTime.
There are a number of seperate cases you need to consider, I’m going to create a Swapper class to demonstrate.
using System;public static class Swapper
{
[STAThread]
static void Main()
{
SwapperTests();
}public static void SwapperTests()
{
object leftRef = "left";
object rightRef = "right";
int leftIntVal = 1;
int rightIntVal = 2;
double leftDoubleVal = 1;
double rightDoubleVal = 2; Swap(leftRef, rightRef); // Passing Reference Types By Value
Swap(ref leftRef, ref rightRef); // Passing Reference Types By Reference Swap(leftIntVal, rightIntVal); // Passing Value Types By Value
Swap(ref leftIntVal, ref rightIntVal); // Passing Value Types By Reference SwapGeneric(leftDoubleVal, rightDoubleVal); // Passing Value Types By Value (boxed)
SwapGeneric(ref leftDoubleVal, ref rightDoubleVal); // Passing Value Types By Reference (boxed)
}public static void Swap(object left, object right)
{
object temp = left;
left = right;
right = temp;
}public static void Swap(ref object left, ref object right)
{
object temp = left;
left = right;
right = temp;
}public static void Swap(int left, int right)
{
int temp = left;
left = right;
right = temp;
}public static void Swap(ref int left, ref int right)
{
int temp = left;
left = right;
right = temp;
}public static void SwapGeneric
{
T temp = left;
left = right;
right = temp;
}public static void SwapGeneric
{
T temp = left;
left = right;
right = temp;
}
}
Taking each of these in turn there are 2 things to consider
- Will the swap work as expected?
- If the parameters are mutable will changes be reflected outside of the method
- Swap(leftRef, rightRef); // Passing Reference Types By Value
- No, when the Swap method is called the runtime creates two new reference types (left and right) and sets them to the same address as leftRef and rightRef, when the swap is carried out only the local references are changed (so left now points to “right” and right points to “left” but leftRef and rightRef are unchanged).
- Yes, this could catch you out! Since left and right are both valid pointers to objects any mutable objects could be changed by the method and the changes WOULD be seen in the calling method.
- Swap(ref leftRef, ref rightRef); // Passing Reference Types By Reference
- Yes, this is in fact the correct way to define this method, leftRef and rightRef are passed into the Swap method so they can be changed, no copies are made!
- Yes, again as long as you have a pointer to a mutable object you can change it’s state.
- Swap(leftIntVal, rightIntVal); // Passing Value Types By Value
- No, similarly to the object version this won’t work. Two new ints are created and passed into Swap. This means you are onhly working on copies of leftIntVal and rightIntVal so the changes are not seen outside the method
- No, this is different to how objects behave, with objects only the pointer is copied but with value types all the data is copied so NO changes are seen outside the method.
- Swap(ref leftIntVal, ref rightIntVal); // Passing Value Types By Reference
- Yes, in this case the actual leftIntVal and leftIntVal variables are passed into the swap function so any changes are seen outside
- Yes, in this case the actual leftIntVal and leftIntVal variables are passed into the swap function so any changes are seen outside
In .NET v2.0 you would define the two methods as shown in SwapGeneric, these methods will correctly infer the types of variable being passed in and will behave as described above depending on what is passed in.
Or pictorially
Tags: none
Topics: /Technology | 2 Comments »
« Previous Entries









