Thursday, 16 October 2003

Ugg...

Man oh man. I thought that I was so smart there for a second. In our 4th year project we use the Singleton pattern a lot for our code. For the data repository part we also use an interface. The things that implement the interface are singletons (and hence have a static method). Well, I tried to do a cool way to test against the interface, but alas, it cannot be so. Too bad, so sad. And I thought that I was doing a good job. There are other ways (other than cut and paste) that can be done, but we shall see about that. I don't think that I have enough brain power right now to be able to do it. Maybe tomorrow.

Today I wrote my first last midterm. First because it's the first this semister, last because this is my last semister. YAY me! ;-) And it appears that my exam schedule is again posted, and I should go done on the 12th. So that means that my count down has been revised. It looks like me missed another milestone (64 days to go), so I guess we will just have to party when there is 32 days to go. Yes, we are big nerds. ;-)

The wind has been really strong here. I am just glad that it is only rain (for like 5 days straight!) and not snow. Snow would make the driving impossible. As it was I almost got blown off the road (it felt like) at one point. I honestly don't remember ever driving in wind that strong before. It was pretty scary.

Okay, I was going to mention the thing about character sets by Joel that Ryan put in his media blog, but I am not going to. I am much too tired. ;-P
Listening to: Third Eye Blind - Semi-charmed Life


2 comments:

  1. Maybe i'm just too tired... but do you need a static method for the singleton pattern? I though you just had a private constructor, and a normal method to run to get the instance, if no instance exists, you create a new one. What's the static method for again?

    ReplyDelete
  2. You need the static method to ask the object / class to give you an instance to itself. To get to non-static methods, you need to have a reference to the object. But you can't have this if it has a private constructor.
    ;-)

    ReplyDelete