Wednesday, November 15, 2006
"The excellent developer and my former schoolmate Bent André Solheim just posted this great blogpost about two of my favorite refactoring techniques: Guard Clauses and Composed Methods. This is stuff that I can really recommend using. I've been using these techniques for a while and they really do make your code easy to read and maintain, and it has less bugs because of it."
posted on 11/15/2006 9:28:31 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Friday, November 03, 2006
Have you ever wanted to debug some .Net code that you have running in some other process that you just can't get into? I recently had the problem with Custom Actions in a Windows Installer. The custom action is a .Net Installer class that I wanted to debug. But I couldn't just attach the debugger to the running msiexec instance. It wouldn't hit my breakpoints.
posted on 11/3/2006 2:43:47 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Friday, September 29, 2006
I've often been thinking that, since HTML is a markup language that is marking the content with semantic meaning -- like, that some text is a <p>paragraph</p> or a <h1>headline</h1> -- that other types of semantic meaning should also be possible to mark up. but the set of tags available in HTML is quite limited.
posted on 9/29/2006 11:15:09 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]

My friend Sondre is dreaming of automating his house. Having his basement filled with racks of servers and having sensors all over the place. He wants voice recognition to help him turn the lights on and off and control his music. His music will follow him from room to room by routing it to that room's set of integrated sound system, and doors will open as he approaches.

That's kinda cool. But really, if I was to spend a lot of money automating my house I'd want it to help me with the stuff I don't mind doing myself. I just don't think its too much hassle opening the door when leaving the room, or turning the lights on. And I actually enjoy putting on music manually. But if I could have my house clean itself, though, that would be another thing alltogether. Now we're talking actual value.

If it would constantly keep the toilets shining and pleasantly fragrant, the floors swept and toys out of harms way, keep stains off my rug, ants out of my kitchen, the waste basket empty, the lawn mowed, the fridge emptied of dated goods, the car washed, my bills paid, my inbox free from spam, and dinner ready on time. Then I'd start doing the mortgage-math.

"Computer! Lights on!", my ass.

"Bjorn, your car is washed now. Would you like it waxed as well?" - That's more like it!

posted on 9/29/2006 8:27:22 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [1]

I addended the local .Net Users Group the other day. It was a good session. Mostly for the social aspect as always, but the sessions were also quite interesting.

But there was this one thing that got most of my attention: How many .Net experts does it take to get a projector working? There were two sessions; one mostly about fiddling with scrollbars on a too-low resolution projector, and one which turned out to be a live podcast with no picture at all.

I guess that projector didn't like be used for non-Microsoft stuff, because that last session was about Mono. Luckily he was a good speaker so it turned out interesting anyway.

(Does this say more about people, laptops or projectors? Seems to me this is always a problem. Why can't these things just work?)

posted on 9/29/2006 7:50:00 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [1]
 Thursday, September 14, 2006

Refactoring in Visual Studio 2005 with Web projects is incredibly slow. This helps alot!

posted on 9/14/2006 3:49:56 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Friday, September 08, 2006
"some comments can be good. But only when they provide some additional information other than just explaining what the code is doing. The code should state just fine what it is doing. What is needed of comments is things like noting when you are doing something that could seem weird"
posted on 9/8/2006 9:52:29 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
"Normally, you can't really extract this out into a method because of the differences in the parsing of the values. Some values use int.Parse(), some use new FontUnit(), others use Enum.Parse(). You'd need a separate ParseX method for every type you support. This is where the generics and anonymous delegates come to the rescue"
posted on 9/8/2006 12:16:27 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
"being at work all day with no one at home to keep the fire going, we were coming home to a freezing house. Every day I had to go fetch wood in the garage and get the fire lit. Even though I kept shoving in more wood I just couldn't get the house warm, until bedtime. And then in the morning it was cold again"
posted on 9/8/2006 10:54:45 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Friday, June 02, 2006
Using XMLHttpRequest is the new hotness in webapps today. Of course, doing background requests to the server outside of a postback can save some bandwidth and remove flickering of the page. But the real benefit here is the responsiveness. Not just that it may be faster to request the server for smaller sets of data, but that you don't have to wait for it.
posted on 6/2/2006 4:56:23 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [1]
 Friday, May 12, 2006
"the thing I am not doing - coding it - is exactly the part that is missing for the estimate to be good: knowing what trouble I'll get into while coding. Usually this trouble comes from me not thinking it through carefully enough and I'm missing something that ends up giving me trouble, or some functionality I'll be reusing doesn't work just the way I think it does, and my approach is wrong. I can't know this without coding."
posted on 5/12/2006 10:54:27 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Saturday, April 29, 2006
"What we want is some product that can mostly just keep running by itself, and it will generate some ad-based income from the traffic alone - or perhaps by subscriptions. All we'd have to do is get the service up and running, and keep it running."
posted on 4/29/2006 12:04:52 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Friday, April 28, 2006

I saw this Cheat Sheet for using Windows PowerShell (MSH / Monad) to help people who are used to cmd.exe to easily move to this new syntax.

PowerShell is really great for doing complex tasks with it's object approach to data, but there seems to be somewhat of a learning curve to this syntax. I haven't looked into it, but just from looking at these examples it looks like a confusion of cmdlets and pipes and switches, and this "$_" thingy.

So, dir is now replaced by get-childitem (dir still works though as an alias). That's ok, its a more general naming convention. But what you could do easily in cmd.exe now seems a bit more tricky. Sorting by date was "dir /ad", now it onvolves a pipe and a where statement and this $_ thing, and becomes "get-childitem | where { $_.MshIsContainer }". Quite a handful right there.

It seems a lot more general and powerful, though I'd have to read up on that syntax before I could get anything done with it.

Here's an example from the same page of a dir function that sorts by name with folders on the top:

function dir {
   get-childitem $args -force |
   sort @{e={$_.MshIsContainer}; asc=$false},
        @{e={$_.Name}; asc=$true}
}

Which is the same as "dir /OGn" in cmd.exe

posted on 4/28/2006 4:44:45 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]

I like the fact that the F1 help in Visual Studio 2005 uses online help so I don't have to install that whole huge library, and it can be updated without me installing it all over again.

But why is it so incredibly slow to open? I press F1, and first it takes a good while for the window to appear, and then it takes what seems like forever to locate the page. And in the meantime there is no indication to whether it has found the correct page, so I might end up getting help on something irrelevant.

It's actually a lot faster to just google whatever I'm looking for, even though I'm still ending up on the same msdn2.microsoft.com site. And that's a shame, because F1 is actually very useful as it can locate the help pages by the context I'm in. But I'm just ending up not using it anymore.

posted on 4/28/2006 3:50:13 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Sunday, April 23, 2006
"it's really good for my sanity to have some moments of solitude and be working on my own little projects. But now the problem is I'm getting isolated from what's going on in the rest of the house. I'm all alone on a different floor, sometimes with headphones on, and the door closed to keep the heat in"
posted on 4/23/2006 11:59:56 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [3]
 Saturday, April 15, 2006
"In the shower today, to my amazement, there was a bottle that I could actually read."
posted on 4/15/2006 7:31:48 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Thursday, March 23, 2006
"I thought I would do some research of my own to see if I could find anything interesting. Expecting to read through a lot of material with little hope of finding anything substantial, I was quite surprised to find great value from the very first paragraph."
posted on 3/23/2006 3:45:41 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [9]
 Saturday, February 18, 2006
"I am a developer, and I can tell you what motivates me. It is actually not hard to do, or even expensive. I'm largely self-motivating when I'm just allowed to be. I am a developer because I love to develop software, and if I'm not being held back I will do just that, and do it well. If developers seem unmotivated there is probably something in their way that needs to be removed. If I'm just allowed certain benefits there is no need to spend money on bonuses, I'll still be doing more than I'm paid for."
posted on 2/18/2006 2:15:07 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [10]
 Friday, February 10, 2006
"The good thing about this book is that it doesn't just state a fact, explain it like its common sense, and move on. It provides background information and references to studies and scientific experiments that actually prove that this is the case. This is about facts, not just some good ideas.
posted on 2/10/2006 2:55:00 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Tuesday, December 27, 2005
"After a while we started adding more advanced math operators. These are SQR (square), SQRT (square root), POW (power), and MOD (modulo). It was at this point we started losing players. Remember that the rule of whole numbers still apply, so SQRT(8) is not allowed."
posted on 12/27/2005 10:18:00 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Tuesday, November 15, 2005
"In this world we don't have to work within the constraints of a contract. We control all the aspects -- the quality by how we design, test and bugfix, the scope by what features we decide to include, our time of release, and our resources. We just need to find the optimal balance so we can deliver valuable features with high quality at a good speed to a reasonable cost. Otherwise we just won't be profitable."
posted on 11/15/2005 5:07:00 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Monday, August 08, 2005
"I've actually managed to grow up a little, and in the process my interests have widened. I'm still somewhat of a geek, but that's not my whole world anymore."
posted on 8/8/2005 6:16:00 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Monday, July 04, 2005
"Me and some close family were nervously waiting in the clinic's visiting room when two nurses with a stroller appeared proclaiming "Here's your baby boy!". We all rushed up to see the newborn. It was the most incredible feeling to see him and hold him for the first time."
posted on 7/4/2005 1:52:00 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Wednesday, June 22, 2005
"It can appear at the most inappropriate times. Like when you are really into a good flow - your mind is working at a racing speed, juggling huge amounts of information in short term memory at once. Local variables, program states, architecture, threads, locks, possible race conditions. Your whole problem domain is in your head. You'd just hate to lose that focus now, and spend the next fifteen minutes just regaining the overview."
posted on 6/22/2005 3:26:00 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [1]
 Friday, June 17, 2005
"The usual scientific focus on this phenomenon revolves only around the impact it has on travelling at light speed. But there are so many other activities that are far more compelling to do in such a "time-pocket". Just realize that you get to spend all the time you want without actually spending any time at all."
posted on 6/17/2005 7:20:00 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Saturday, June 04, 2005
"I must admit, I'm not very interested in the different brands of shampoo on the market. To me, it doesn't really matter much if I end up washing my hair with Dove, Naturelle or Fructis. I leave the shopping for haircare products to my wife. That also means that I don't really know much about how the different bottles look, I just want to find one that states Shampoo on the front of it. This is where the problem arises. I can't read it!"
posted on 6/4/2005 5:40:00 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Friday, May 27, 2005
"I had to have something bigger, more roomy. With the baby coming soon I'll need the space to get the stroller in the back. So I went and bough a station wagon."
posted on 5/27/2005 4:42:00 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Tuesday, May 24, 2005
"There are laws of nature. And as we know, laws of nature can't be broken. One of these laws has to do with management, and in my case that means software management."
posted on 5/24/2005 10:53:00 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [2]
"A technical document should help the reader to understand your thought process and your conclusions, the problem you are solving, how it will be solved, and why it was solved that way. Only with this information can another person really understand the technical decisions that the document describes, and implement the specification by intention and not only by letter. This kind of communication is impossible if the author of the document was simply filling in some text for all of the sections, and jammed in his class diagram."
posted on 5/24/2005 10:50:00 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
"We are used to counting with our fingers. We have been doing this from we first learned to count. This is quite useful in many circumstances, but the number of fingers are quite limited - 10 fingers in total per person. What if you want to count beyond 10? Do you start using toes? Or another person's fingers?"
posted on 5/24/2005 10:46:00 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
"Once you have, even if you didn't intend to, made public an interface - and there is even a remote chance that some funny customer with his own twisted ideas of hacking together a list of studio equipment or whatnot, would be using it - then that inteface cannot change."
posted on 5/24/2005 10:21:00 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
"This diagram shows the project lifecycle called JIT-D, Just-In-Time Development."
posted on 5/24/2005 10:15:00 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [4]

I was on this Parent Preparation Course yesterday. This nurse was showing how the baby would go upside-down and jam his head down the birth canal. Then on his way out he would have his face down, twist his shoulders, get his head out, turn the head to the side and wait for the next contraction before popping all the way out.

I hope junior was paying attention, because we won't get to practice on this before the big day...

posted on 5/24/2005 10:14:00 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
"The time it took me to browse the websites just ended up in that I just didn't take the time to read the news, and so I didn't waste time on it. Now it's so tempting to open my aggregator every now and then and piss away some minutes of my time, and losing my focus."
posted on 5/24/2005 10:13:00 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]

It's springtime, and I'm starting to wake up from my winter daze.

But I'm not the only one waking up. So are the ants. And now they are marching into my house looking to steal my stuff. So far I haven't found anything missing, but by what they said on the Discovery channel the little creeps are amazingly strong. Who knows what they'll manage to bring home to their queen.

I'm feeling quite safe about the heavier stuff like my stone coffe table, but the kitchen chairs and microwave might be more at risk. And lets just hope they can't manage to open doors. I don't want them going for my computer.

I'll have to get some poison laid out today.

posted on 5/24/2005 10:12:00 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [16]
"It's nice to be important, but it's more important to be nice."
posted on 5/24/2005 10:10:00 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]