# Wednesday, November 10, 2004

I'm currently reading Martin Fowler's Refactoring: Refactoring: Improving the Design of Existing Code which is an interesting read given that I have started doing some of the things he describes in the book on my own. It's an interesting way of being validated and gaining an even better grasp of what is possible with the technique.

One thing I find troubling though is his section on the problems with refactoring. He himself mentions that the section is shorter than he'd like it to be and that the reason for it being that way is that the field is young and we need to gain a better understanding of it.

Great I'm with him so far but I got thinking about a potential problem with refactoring and the notion of "beautiful code". I may be missing a crucial point and I admit that I haven't read through the entire thing yet but from my point of view a critical problem with the before mentioned notion of beautiful code is that different people have different ideas of what is considered clean and beautiful code.

Now I don't know about you but I've not yet worked on a project where I was the only developer in action. One of the things Martin Fowler promotes is that you should refactor whenever you encounter something which you need to gain a better understanding of or if you are actually trying to improve in the existing design. He gives an example of using refactoring in code reviews in order to better understand what the code does.

What I see as a problem is that when different people are looking at the same code with different ideas of what beautiful code is we may end up in a situation where one person refactor another persons code, the person who wrote the code in the first place may not agree with the changes and refactor yet again, and so the story would continue without really adding any value to the overall product.

The situation which prompted this though is code review on some of my code a while back where the reviewer noted that I was using the C# one-line conditional assignment in a lot a properties, I don't actually know what it is called but an example would be

string s = ( 1 == 1 ) ? "OneEqualsOne" : "OneDoesNotEqualOne";

Now what the reviewer noted was that I should use the full blown if-construct because this would be easier to read. Here is the kicker I disagree but had he used refactoring in his code review he would have simply changed my code to use the if construct. Later I might have revisited the code and noticed those changes and went ahead and changed it back.

Of course the above example is very simple and we wouldn't keep changing that small detail back and forth but it seems to me that refactoring is very much dependent on a development team having the some idea of what constitutes clean code.

posted on Wednesday, November 10, 2004 11:28:17 AM (Romance Standard Time, UTC+01:00)  #    Comments [0] Trackback
# Tuesday, November 09, 2004

Firefox is done. You should upgrade if you are using this browser. I did some trials last week because of the Maxthon/Google Toolbar issue and found that while Firefox is a very nice browser the plugins leave at lot to be desired. They include conflicting functionality and have bugs.

Maxthon just works the way I like it and it stays for the time being my browser of choice.

Check out the Firefox release notes while you wait for the download to complete.

posted on Tuesday, November 09, 2004 10:30:01 AM (Romance Standard Time, UTC+01:00)  #    Comments [0] Trackback
Well whadda ya know, I write about Sauce Reader being slow and it promptly gets an update partly fixing the performance problem. Version 1.10 beta is much more responsive that 1.9.1 I highly suggest you upgrade if you are evaluating Sauce. Also be aware that Synop might start charging you for the software as a "Buy Now" and "Register Your Copy" menu items have shown up in the help menu.
posted on Tuesday, November 09, 2004 9:04:15 AM (Romance Standard Time, UTC+01:00)  #    Comments [2] Trackback

Went to the movies and saw The Incredibles yesterday evening, oh my what a great movie. Classic Pixar quality-wise, not so much story-wise: The story is aimed more at the adult than the child, although a child might have a few laughs of the classic goofiness of the characters.

Animation is crisp and clean, nice stylized characters and some great work done on the hair simulations though I'm no expert :)

Pixar has done a great job of getting just the right feel in the movie, actually they manage to capture the classic James Bond-feel and in a scene the feeling from the high speed speeder chase on Endor in Star Wars.

Definitely a must-see!

Favorite scene: Why super heroes shouldn't wear a cape.

I rate The Incredibles 9 super heroes out of 10.

posted on Tuesday, November 09, 2004 8:35:08 AM (Romance Standard Time, UTC+01:00)  #    Comments [0] Trackback
# Monday, November 08, 2004

Recently my copy of Maxthon stopped working with the Google Toolbar. Part of the reason of chose to go with Maxthon (MyIE2 back then) was the Google Toolbar compatibility so naturally I was a bit perplexed when the toolbar suddenly stopped working. I did the obvious reinstall of the browser thinking I might have messed something up, sadly to no avail.

Later a search in the Maxthon forum showed that an incompatibility exists between Maxthon and the latest Google Toolbar. Luckily this can easily be remedied by installing an older version of the toolbar. Not the prettiest solution but hey it works.

posted on Monday, November 08, 2004 6:35:07 PM (Romance Standard Time, UTC+01:00)  #    Comments [0] Trackback

So the posts slowed to a trickle over the past few weeks, what happened? Quite a few things actually, both personally for me and for the blogging sphere.

For me personally these past few weeks have been quite intenses. The reason? I got married that's what. I'm still getting used to the idea and actually writing about it stirs up all kinds of emotions. My girlfriend is feeling much the same. We both figured that getting married wouldn't be that big a deal when we'd already gone through the whole becoming-parents-transition but as the date got closer and closer so did the nerves and butterflies :)

I had big plans of blogging the whole experience but when we actually emerged on the other side as it were as husband and wife I was physically and emotionally wasted. Didn't get much sleep the day before the big day and running on pure adrenaline an entire day is not something I can recommend.

Also who invented the tradition that the bride and groom are not supposed to see each other the day before the wedding? That just stinks of conspiracy and making sure that the groom gets cold feet seconds before the actual wedding :)

This post is shaping up to be quite the ramble but there are so many things and experiences I would like to share from what I can only describe as being the best day of my life. Everything clicked and just worked. I am conflicted about calling my wedding day the best day of my life as it is closely rivaled by the day my son was born. I think the wedding day wins out because the day my son was born wasn't actually filled with happy moments other than the moment when he was actually born, up until then everything was confusing and more than just a little bit scary. Guess the people at the hospital felt that us knowing as little as possible was the best way to go... Not great when you are used to knowing almost everything which goes on around you but that's a whole different story.

I was very much looking forward to the day, the wedding day that is, yes we're actually back on track :) But two things kept my mind occupied the entire and weeks even before the wedding: The speech I would give and the traditional wedding dance which here in Denmark is a waltz with some very specific steps which need careful practice, especially for a guy like me who isn't big on dancing other than when I have a fair amount of alcohol in my bloodstream :)

The speech went great I'm happy to report. The guests were with me from the first paragraph and the first few laughs made me more comfortable and able to give a better speech in the end. I hadn't counted on getting quite the response I got on the speech, people laughed harder of my jokes that I'd imagined when I wrote the thing. I had people telling me how great a speech I gave weeks after the wedding which left a warm and fuzzy feeling, especially because it was people whom I have great respect for. One person told me that he'd never known that I could be so eloquent as I mentioned I have a great deal of respect for this person who is politically involved and used to making clear statements and argue his points very clearly.

Oh yes the dancing went well also. The dance floor wasn't terribly big so people weren't able to see our feet so we basically got away with some kind of pseudo dancing which seemed to satisfy everyone, I do believe that that the rather large consumption of beer and wine had more to do with our success on the dance floor rather than the 30 minutes of practice we got in advance :D

Lots of dancing ensued, inspired by our great performance on the floor I like to tell myself and loads of fun was had by one and all. At least that's the story looking at the pictures afterward tells :)

I was in for a surprise that night; my girlfriend had insisted that she give a speech for me which I of course was looking forward to as she is a very eloquent person very much in touch with her feelings. What I hadn't counted on was the content of the speech. Now a bit of background is needed in order for this story to work so here goes: As you know when people get married it is customary for the bride to take the surname of the groom and of course we had discussed this. My girlfriend had made it clear that her surname was very much a part of her identity, obviously, and she didn't want to take my surname. We talked about this on and off a couple of times and each time she would waver a bit, thinking that maybe it wouldn't be so bad to take my surname but each time she would return to her original argument against it. Of course I told her that I was fine with whatever decision she'd make but that my picture perfect family would have the same surname. I see myself as a progressive person without a great need for tradition so I can't really explain why the surname-thing means for much to me.... It just does :)
Well back to the wedding night and the story: My girlfriend is given her speech and suddenly she pulls out a small present which she hands to me with the words, "I know how much this means to you, so I took your surname as my own". Of course I was speechless and at that very moment I knew that she was willing to do anything for me. I have always known this at some deep primordial level but actually acknowledging it at a higher conscious level was just beautiful. The feelings and realizations of that very moment sums up our entire relationship and for a split second I was able catch a glimpse of our future together.

One thing I would like to warn against is not having someone to do the cleaning up the next day. Somehow we managed to only plan everything before the wedding we hadn't given afterward a lot of though which bit us on the ass the next when we had to get up and clean up. That has got to be the biggest anti climax ever; we spent 6 hours getting the place in shape again and the fun didn't stop there, no no. After that our apartment looked like a crash zone with all the gifts and stuff we had needed the day before. I think it was two weeks before we got everything sorted and our apartment looked habitable again.

If you've made it this long I congratulate you this post is an attempt to add a bit more soul to my blog as it's been pretty impersonal up until this point. I am hoping that if you as a reader will get a better experience from the posts here if you know a little about who I am and what I stand for.

 

posted on Monday, November 08, 2004 5:57:54 PM (Romance Standard Time, UTC+01:00)  #    Comments [0] Trackback

One of the things which have kept me from posting is the fact that writing a post isn't very easy ... or rather it's pretty easy but I have lost posts in the past due to the fact that I was writing them in the browser interface for dasBlog, a less than ideal solution for my post writing pattern which basically is multiple iterations over the same post until I think it is in shape for the blog.

As you may know I'm a freak for new tools to try out. Various FTP clients, web browsers, notepad replacements, and so forth have been put through the paces to find the piece of software which fits my usage behavior perfectly. Actually one of the reasons for me starting this blog was to share what I learned through these periods of trial of different pieces of software.

I went through a similar thing with blogging software never finding a piece of software which made it perfect for me to write posts off line. My demands for a posting tool include:

  • Easy posting to the blog.
  • Support for dasBlog and specifically dasBlog categories.
  • Save drafts of posts.
  • Add pictures to the post without the need for a FTP account in order to upload the picture to the server.
  • Easy formatting of the text.
  • Full control over the formatting of the text.
  • HTML formatting of .NET code.
  • Nice clean interface.
  • Free. I'm cheap :)

I thought that was quite a modest list but as it turns out nothing is ever as easy as you might think. I went through all kinds of clients never finding the one fitting my needs. Some posts in this include BlogJet, W.Bloggar the Posting Tool - NOT, Post From NewsGator, and Test From Outlook. While BlogJet came close to being my number one choice for posting it had some quirks which caused it to crash in earlier versions, the formatting of text wasn't exactly easy, and it was unable to HTML format .NET code.

The dasBlog plugin for NewsGator made life easy but it was just cumbersome to use and it didn't support categories in a nice way; you had to know the categories and type them in a comma separated style in Outlook, a nice way to get all kinds of spellings of your categories I think :)

W.Bloggar just sucked. Not so much to say about that.

None of the tools made for easy posting of pictures, they all require some kinds of FTP account which isn't an option.

I finally gave up and figured that I would pay for BlogJet at some point and be done with it. I never got around to it and before long I had started a never trial on RSS Readers. While I am fond of NewsGator and particularly of the online features which allows you to sync subscriptions and read posts between machines I wanted to know whether someone out there was doing something new. During my trial I found something unexpected: The posting tool which I was searching for earlier and a nice looking RSS reader all in one, its name? Sauce Reader. While it's slow as a dog even in the latest version it features a great blog posting tool which basically supports all my mentioned requirements except for one: HTML formatting of code. That however is easily taken care of with the handy Copy as HTML extension for Visual Studio which I talked about in a previous post. Sauce Reader sports a nice Outlook 2003-like interface which I like. The only caveat with this program is that it's slow. Not that it really matters if you choose to use it just for posting like I do.

Oh yes Sauce Reader also supports editing and deleting from the server which I guess is kind of a given but still nice features to have.

 

posted on Monday, November 08, 2004 5:08:29 PM (Romance Standard Time, UTC+01:00)  #    Comments [0] Trackback
# Wednesday, October 27, 2004

Need to show source code to other people in a nicely formatted way? The answer may be this extension for Visual Studio .NET which copies your code to the clipboard as HTML.

posted on Wednesday, October 27, 2004 10:02:32 AM (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Thursday, October 14, 2004

I am finally done with Doom3 and while the experience was above most games I had expected more. Sure the game managed an eerie setting and did get me jumping in my seat from time to time but having monsters materialize in front of you gets pretty old, more so when the same recipe is used over and over with one monster materializing in front of you and one behind you.

I got to admit that the hell level were pretty cool mostly due to the structure of the levels changing on the fly, very cool stuff. Doom3 was basiclly a pretty technology demo in my opinion and as such did a great job of showcasing the talent at id software.

I can't wait to see what other developers can do with the technology from id software, I enjoyed Call of Duty very much which as far as I recall was built on the Quake3 engine.

One question lingers on my mind: Will Doom3 have the same lasting effect as previous id games? I don't believe so most of the appeal of the previous games lie with the multiplayer and Doom3 simply doesn't have much to offer in this aspect. The maps are cramped and the areas dark, not elemets with make up a great multiplayer game. Sure Splinter Cell 2 works off of this principle but the game offers so much more in the way of team work, yet another area where I think Doom3 is lacking.

I see Doom3 as the first in a long series of first person horror games where the mood and ambience is what will drive the game. Doom3 had some great scenes but needed more in my opinion. Lets see what future games like FEAR and of course the ever looming Half Life 2 will bring to table.

posted on Thursday, October 14, 2004 10:16:38 PM (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Wednesday, October 13, 2004

I picked this up from Eric Gunnerson's blog where he writes about enabling ClearType on a desktop machine, it's not on by default which is a shame. I love ClearType so of course I have already tried this but it didn't look very good, probably due to the fact that my machine here at work is running a crappy onboard Intel graphics adapter.

What Eric did was point to a web page which takes you through a couple of steps and actually tunes your ClearType settings. Having done this ClearType looks absolutely beautiful on my machine.

You may want to check out the ClearType Tuner if you have trouble with the default ClearType settings of Windows XP. I know I will want to keep this bookmark around for sure.

posted on Wednesday, October 13, 2004 10:46:16 AM (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Tuesday, October 12, 2004

I've got 3 invites for Gmail I don't know what to do with. The first three people to leave a comment on this post will each get an invite. Remember to leave your e-mail in the comment so I know where to send the invite.

posted on Tuesday, October 12, 2004 1:16:12 PM (Romance Daylight Time, UTC+02:00)  #    Comments [5] Trackback
# Monday, October 11, 2004

While listening to last week's Dot Net Rocks! show I came across this video illustration some of the problems users face when running the Mac platform.

posted on Monday, October 11, 2004 2:41:14 PM (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback

Reading Robert Scoble's blog pointed me in the direction of a great piece of software: FavoriteSync. It basically stores your favorites on a server somewhere and keeps them synchronized across every machine you have FavoriteSync installed. I have actually started using favorites more because of because I can add a favorite anywhere and have it available at all the machines I use.

posted on Monday, October 11, 2004 12:45:56 PM (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback