Wednesday, February 28, 2007

Where did the days go or the computer doth fail me

on the off chance anyone actually reads this blog I wish to apologise. I had planned, if only for my own amusement, to post a blog each day of my Japan trip. I thought this would be a good chance into blogging mindset but then technology got in the way.

On the flight over and on the trip to Kobe I had been running on the battery or to be more precise, batteries (I brought a extra battery which hooks on externally to HP laptops). By the time I reached Kobe I had maybe just over an hour left on the clock. Cool, get to the hotel and plug then thing into the mains.

You know that thing where something is so familiar you don't actually think about it. Like for instance power plugs. Will there I was with my Japanese power adaptor, wiring up the laptop, go to fit the adaptor and... well how about that the laptop power pack has a three pin plug and the adaptor only takes a two pin.

From there it all went downhill. Log in to work only to find that there were problems with my project which had to fixed. So I am madly coding coding away trying to get a solution in place before the computer dies. I must say there is nothing more relaxing then of an evening debugging code while watching your battery charge drop below 2%.  Believe it or not the problem was resolved but the laptop was dead in the water.  

For the next few days things weren't looking good. Couldn't find an adaptor anywhere. At one point I considered hacking off the power plug and hand wiring a Japanese plug to the cable. Thankfully sanity prevailed. 

On reaching Hiroshima the tech god smiled upon me. I hit the downtown shopping area and within half an hour I found CompMart, a full four/five floors of computer stuff. And there on the third floor I found it, the Road Warrior power cable which provided adaptors for both the power points and power packs. I was saved. 

Tuesday, February 20, 2007

Japan Day 2 on the Train to Kobe

I love train travel. It is something that we don't do well in Australia but here in Japan it is a hoot.

Currently I am sitting on the Shinkansen on my  way to Kobe. One could fly, which is in principle quicker,but then you have to get out to the airport, queue up to get on the plane, queue up to get off the plane and get to your final destination (since airports are rarely located in the center of town).  Catching the train on the other goes something like this:

  • rock up to Tokyo station and by ticket
  • Buy an eki bento(a lunch box) for the trip
  • Board train when it arrives (and they always leave on time)
  • Settle back and enjoy the view
  • 3 hours later your in Kobe. No muss no fuss.

May not be as quick as flying but sure is a hell of a lot less stressful. 

News Flash: Finally, having done this trip a number of times, I have seen Mt. Fuji in all it's snow capped glory.

My Japan trip Day 1 - on the plane

Well here I am on the plane flying to Japan. I've a scotch and dry, a bag of pre-shrunk bar snacks and a bloody battery for the laptop.

This is my third trip to Japan. The first two times I went was to primarily train at the Seidokaikan dojo in Osaka (though I did spend a week travelling with my wife doing the tourist thing). This time I more focused on just seeing a bit of  the country and to catch up with my friend Eigo.  To this end, after arriving in Tokyo, I am travelling down to Kobe for a day and then down to Matsuyama for a couple of days. From I'm going to Hiroshima for two days then travelling back to Tokyo to spend the rest of my time there (I didn't say it was long trip).

I love Japan. I can't say why. It is this that weird mix of chaos and order that they have achieved. Or maybe it all stems from watching the "Samuria" and "Phantom Agents" on TV as a kid. Who knows?

Sunday, February 04, 2007

HP TC4200 & Vista Drivers

For those of you who have a TC4200 tablet PC with the release version of Vista installed but are having issues with things like the wireless drivers and the like it appears that HP are not releasing drivers for the TC4200. This is a bugger there is a work-around go to the drivers page for the TC4400 and download the drivers form there. I installed the IntelPro/wireless driver and the QuikLaunch driver and it all worked fine.

Tuesday, January 02, 2007

Sunday, November 05, 2006

Thank God Clay Tablets Never Took Off

While thinking about the use of paper as an interface metaphor the thought struck me what if paper had never been developed. What if we never moved beyond clay tablets and cuneiform. Can you imagine what the printers would be like?

Tuesday, October 24, 2006

Learning to touch type

After twenty plus years of of interacting with computers i have finally knuckled down and decided to learn to touch type.

It is one of those things that i have made half-hearted attempts at before but could never commit myself to. I always got too frustrated with trying to keep my fingers in one place for any length of time. Considering i got my first typewriter when i was sixteen it is not like i have in issue with keyboards or anything. Nor am i a member of the one finger school of typing. I am one of your head down bum up, whatever finger is available, kind of typist. All verve and passion but sweet F.A. in terms of accuracy and elegance. The other thing i started realising is that because i was still in essence have to pick keys out, deciding which one to strike with which finger, my brain was always having to think about two things at once. This is decidedly not efficient. As a tablet PC user this lack of efficiency was reinforced by the ease with ideas can be expressed when writing by hand.

So for the past month i have slowly been working on my touch typing skills. From somewhere i have found the patience to persevere and gradually my fingers are being tamed. Caps are still proving problematic, the little finger has always been the least disciplined of the bunch, and i have to tackle numbers, but it is getting there.

What i am finding interesting about the process is how, as with handwriting, one starts moving away from thinking about typing as the hitting of individual keys. Instead i am finding that words are being defined as set of finger movements. I think of a word and my fingers "know" the pattern to create that word. As a former musician i shouldn't be surprised by this but at the same time it is worth remembering and perceiving these processes at work. 

Friday, May 26, 2006

Deep Clone function for .Net 2.0

This is an update to some code I originally found in CodeBox for .Net. The purpose of the function is to fully clone a given object. The object passed does need to be serialisable. If it is not the function returns Null.


Imports System.IO
Imports System.Runtime.Serialization.Formatters.Binary

Public Shared Function DeepClone(Of T )(ByVal source As T) As T
If Not source.GetType().IsSerializable Then
Return Nothing
End If

Dim target As T = Nothing
Using ms As New MemoryStream()
Dim bf As New BinaryFormatter()
bf.Serialize(ms, source)
ms.Position = 0
target = bf.Deserialize(ms)
End Using
Return target
End Function

Tuesday, May 02, 2006

Generics in VB.Net and List.Find()

One of the things i have fallen in love with in .Net 2.0 is generics. With the current project i am working on i have been making extensive use of generics, not just for stronlgy typed collections but also for creating more methods. As with all things there is always something you run up against which can fustrate you more than it should. In this particular it was the Find() function of List.

The problem with the Find() function of List is it requires an instance of System.Predicate() as a parameter which in turn requires the address of the function which it represents.

Dim
instance As New Predicate(Of T)(AddressOf HandlerMethod)

The HandlerMethod() would then contain the logic for determining which instance from the list to return. The BIG problem with this is that you can't pass any other parameters in to the method which means you have to either hardcode the search criteria into the function or if you are trying to match an existing object to one already in the List having to assign it to a global variable. In C# the solution to this is to use anonymous methods but that is not an option in VB.Net.

I spent a couple of hours wrestling with this and was about to resort to just looping through the list until i got a match when i found the following article:
http://blogs.sarkhouston.com/hdierking/archive/2006/03/26/3188.aspx

In this the writer provided a workaround so that an object could be passed in as a parameter. The solution is a little convaluted but it works. Anyway as i was looking at his could i saw an even simpler solution.

For this to work your class will need to implement the IEquatable(Of T) interface

public class MyClass

implements IEquatable(Of MyClass)
private _name as string
public Property Name() As String
Get
Return _name
End Get
Set(ByVal value As String)
_name = value
End Set
End Property

Public Function Equals1(ByVal other As Regulation_Type) As Boolean Implements System.IEquatable(Of Regulation_Type).Equals
return me._name = other._name
end function

Then in the code we can do the following:

dim myList as new List(of MyClass)
dim currentMyClass as MyClass

currentMyClass = New MyClass
currentMyClass.Name = "Bob"

if myList.contains(currentMyClass) then
currentMyClass = myList.Find(New System.Predicate(Of MyClass)(AddressOf currentMyClass.Equals1)
end if








Thursday, December 22, 2005

The first blog is always the hardest

Finally i get around to it.
I set this blog up ages ago but just never quite got around to doing anything with it.
Why? All the usual reasons i guess. Got nothing to say, to scared to to voice my opinions, etc, etc. Also, even though i subscribe to the blogs of others, there is the feeling that one is just adding to the noise. Though a direct comparison can't be drawn, blogging in some ways reminds of the when desktop publishing first became accessible to people beyond the graphic design field and we suffered the agony of a thousand fonts.
Now as we are coming to the end of 2005 (which has not been one of my better years) i have decided to explore the idea of using my blog as means of clarifying my thoughts and ideas.

One of the effects of the on-line revolution (of which blogging is a part of) is the breadth of ideas and information that can be accessed. This can be both exciting and confusing at the same time because the period between encountering new ideas has greatly deminished and consequently the time for reflection and analysis has also been reduced. For myself i have found that this has lead me to chase all so sorts of weird and wonderful concepts but inversely i have perceived a reduction in depth of knowledge.

Having thought about this issue i have decided blogging would be a way to consolidate my thinking. I am not particularly concerned if anyone reads what i write or not but by writing for an audience it forces you to think about what you are saying.

And thus it begins.