|
Tuesday, January 19, 2010
I finally got a setup at work which I’m really satisfied with. The short version: - 3 24-inch monitors (HP LA2405wg with two Display Ports)
- Desktop computer (HP Z600) 2.26gHz with 6 GB RAM running Windows 7 x64 - using 2 of 3 screens
- Laptop (nothing exciting - HP Compaq 6910p with Win 7 x64 – for mobility) – using the 3rd screen
- Synergy to share a single mouse and keyboard between desktop computer and laptop
(the two screens on the left is the desktop computer, the one on the right is the laptop. Couldn’t take a picture further away because I have a wall just behind me ) What’s really nice about this setup is that I don’t really notice I have two computers running, because of the way Synergy “abstract” the other computer away. Setting up Synergy (the long version) - Install Synergy on both computers
- Setup the computer that’s connected to the mouse/keyboard as “server”
- Select “Share this computer’s keyboard and mouse (server)”
- Click Configure…
- Under Screens click + to add a new screen (actually it’s a computer you’re adding and not a screen)
- Set the Screen Name to the name of your computer (yes, it has to be the hostname of your computer in order for Synergy to communicate with other clients) and click OK
- Do the same for the other computers (the clients)
- Under links you set how the screens are in relation to each other (based on my screen setup above):
- Highlight your “server” under Screens
- Under Links ([New Link]) enter:
0 to 100 % of the left of YOUR_CLIENT goes to 0 to 100 % of YOUR_SERVER - Click +
- 0 to 100 % of the right of YOUR_SERVER goes to 0 to 100 % of YOUR_CLIENT
- Note: Synergy does not implicitly understand that if server is left of client, the client is right of server, so you need to define that explicitly, hence #4
- Click OK
- Click Start (consider setting up AutoStart)
On my server it looks like this:
- Setup the client
- On the client computer select “Use another computer’s shared keyboard and mouse (client)
- Enter the name of YOUR_SERVER
- Click Start (consider setting up AutoStart)
- That’s it. Test by moving your mouse from the left most monitor to the right most monitor! Cool!
Saturday, May 16, 2009
This is a non technical post to add even more pressure on myself than the actual investment of my new bike and associated equipment. I found it was about time to add some physical fitness to my life other than moving from the computer to get coffee or to and from the car on my way to work  So this is a promise to myself (and now to the rest of the world I guess) that I will ride my new racing bike to and from work whenever the weather permits (read not snow or ice). However, I might need a few weeks of training to actually physically be able to get to work on a bike 
Thursday, January 15, 2009
Wednesday, December 10, 2008
After working for CMA Contiki for almost 6 years I’ve now accepted a job offer from Frende Forsikring. Working at Contiki has been great and still is. I’ve learned a lot about the development process, the technologies we’ve used and how an ISV company should work effectively to deliver great products to happy customers. I also feel I’ve accomplished quite a bit while working here. Especially the introduction of Agile/Scrum/XP is something I’m proud of. Not to be the one that introduced it to Contiki, but how our teams have adopted the process and how we have continually improved it. I’ve also enjoyed my role as architect for many years and being R&D Manager the last year or so. You may ask why I want to quit the company I’m so happy with? Good question It’s mostly because I’m constantly seeking new challenges and though Contiki is a great company it’s still quite small. We basically have one product. Though a great one it means that the technical areas we focus on is quite narrow. I feel that by working in Frende I will get many new challenges on many new areas, which I know I will enjoy. Also Frende is a brand new insurance company with many great new ideas, motivated people, new internal products in development and the latest of Microsoft technologies, which made them very attractive for me. The hardest part about leaving Contiki is all the good friends I “leave behind". Some of them, like Torbjørn, I’ve known since we used diapers. We went to the same schools, coded small apps on Amiga together and are now working in the enterprise creating cool apps Actually I was responsible for hiring him to Contiki. Working together with one of your closest friends is really cool. I will defiantly miss that. I will also miss the great social atmosphere we have in Contiki and all the great conversations during lunch. And not to forget all the great fussball matches we’ve had! To all of you in Contiki; I hope our paths will cross again, lets keep in touch and I know you will keep coding the best Enterprise Contract Management system on earth! But I’m not out of Contiki yet I will be working 1,5 month still and will start working for Frende 1st of February. I still have a lot I want to get done before I leave, so there’s no time for relaxation! 
Wednesday, June 18, 2008
Wednesday, June 04, 2008
At Contiki we have a lot of fun. Both with programming and other things. One of the activities we do a lot of is fußball (aka. table football). Fußball has become such an integrated part of almost everyone's day that if someone don't play at least once during the day, something got to be wrong. It's a really a nice game for breaks. One game takes from 5-10 minutes. Programmers (and others too I guess) often tend to work for long periods of time in front of the computer, without taking a break. Research has showed that taking frequent breaks improves productivity and lessens the risk of injuries. There's probably a lot of writing about this topic, but one interesting article I found was this: Take a Break and Refresh Your Productivity. Fußball is a great way of having this small break once in a while. So that was the excuses, now to the fun stuff!  Last week we finished a 10 month long league. Torbjørn (our Web lead) has created a great app for entering and keeping track of scores. During these 10 months I've played 350 games, some played more others less. Take a look at Torbjørn's blog for more about the app (in Norwegian). Now however, he's extended the app to support a Contiki league and I'm looking forward to a great season of fußball!  I don't know how big fußball is in Bergen or Norway in general, but I would really like to know. Do your company have a fußball table? Let me know! I like to think we've been quite good at it and it would be fun to challenge another company in a game. Anyone up for it? I also have a plan to do some fußball stuff through NNUG, but I'll blog about that later.
 Our table |  THE table we would kill to get |  Our glass fußball room in the middle of the working place |  Worlds biggest fußball table | And to end this off, here are some inspiring fußball videos:
Friday, April 18, 2008
Today I had a problem. At work we had a SCSI Raid controller that failed and we lost a logical device. Man I was pissed off! On top of this the raid was RAID 0 (striped), meaning there was no chance of getting any data back. This was the drive(s) hosting the OS which we had to reinstall :-( Anyway, this resulted in me having to spend quite some time in a freezing and noisy server room fixing the problems. While doing stuff like this (reinstalling OS, software and a pointless effort of restoring data) there is a bit of waiting time, so I figured I might as well work on our new server waiting to get TFS 2008 up and running. A brand new server (see spec below) dedicated to protect the heart of our company; the source code! So I started digging around for the TFS 2008 DVD, knowing it should be on my desk with the MSDN subscription we get through the Microsoft Gold Partner program, but it was nowhere to be found. After a call to MSDN it turns out that the DVD's are now being shipped to our headquarters in Oslo, which was the case for TFS 2008 as well, but they couldn't find it. The guy who knew was of course away that day. You might wonder why not download? Well, you can't. TFS versions available on MSDN subscription is only Workgroup and trial editions. My last attempt before giving the whole thing up was calling my friend John from NNUG and ask if they had a DVD I could use. He had a much better idea: "Just use the trial and upgrade with your key at a later time". Dooh! Why didn't I think of that. Check out Brian Harry's blog for more details: http://blogs.msdn.com/bharry/archive/2007/11/22/2008-installation-questions.aspx Server spec: - HP ProLiant DL380 G5 Intel® Xeon® E5440 Quad Core Processor 2.83 GHz 12MB 2GB 1P Rack Server
- HP 4 GB PC2 5300 DDR2 DIMM Memory
- 6 HP 72GB 2.5 inch 15K rpm Hot Plug DP SAS Hard Drives
- 2 HP 146GB 2.5 inch 10K rpm Hot Plug DP SAS Hard Drives
I think this should keep our source code safe for a while...
Monday, March 24, 2008
At Contiki we started doing Scrum in November 2006 and I wanted to post an update on how we're doing, and at the same time look back and see what we have accomplished. Quite a few things have happened since I held my presentation about how Contiki is doing Scrum in February 07 at NNUG. After skimming through my emails from the last 2 years I was able to find an interesting progress on what and when we have introduced the different aspects of Scrum: - Daily stand-ups/Daily Scrum (Oct 06)
- Daily Scrum in Campfire to improve communication with our offshore team (Nov 06)
- Started using ScrumWorks (basic) as our Scrum management tool (Dec 06)
- Started our first test sprint (Jan 07)
- Read Mike Cohn's book, Agile Estimating and Planning, which I've used as a guideline from that day (Jan 07)
- Started sprinting for real including all meetings (planning meeting, review meeting and retrospective meeting) (Feb 07)
- I got certified as Scrum Master (March 07)
- Started using Planning Poker and www.planningpoker.com (March 07)
- The word Scrum became a buzz word in our company (April 07)
- Our current dev team at the time got split into 3 Scrum teams because the team had grown to big (Nov 07)
- Started having fixed lengths on all sprints to get an accurate velocity (Nov 07)
- Started using release planning for long term planning (Nov 07)
- Started calculating cost based on number of sprints and team resources (Jan 08)
- Our Product Owner got certified (March 08)
It's taken time and we're still not quite there, but I feel we have achieved a lot. Not only that, I also think (and are quite confident) that we have improved our development process enormously. If you look at the list above we can shorten it down to: We started with Daily Scrum, continued with Sprints and "ended" with Release Planning. For me this have been a very logical approach to introduce Scrum to our organization. The easy part was getting the development team to adapt Scrum. You might argue that we spent a long time doing so, but the process has evolved over time (for us that is) and we've adapted the different aspects of Scrum as we felt ready for it. It also has to do with the team getting more and more mature and gaining new knowledge about the process which increases the willingness to adapt new things. I also feel that we did right in not pushing everything at once. We could for instance have started with Release Planning earlier, but we had several good reasons for not doing this. It's also about letting the whole organization getting used to Scrum and it's way of doing things. Getting used to communicating with User Stories and Story Points instead of features, use cases, days, gant charts etc. The development team hasn't changed how they do Scrum for quite some time, but the rest of the organization has needed this time to adapt. The time spent also reflect our learning curve as we have moved forward. The most important thing of all is that the Scrum initiative came from the developers themselves, and not from management, and there was a mutual agreement for us to try this out. In addition to focusing on the development process of Scrum, we have also adapted many things from XP. As you probably know Scrum does not say much about how a developer should adapt to the agile way of working. Scrum is a management process is my eyes. XP however are very practical and fits nicely with Scrum. You might ask why we decided to do Scrum and not XP? The answer is coincidence. At the time when we started looking at a new process, Scrum had a lot of attention and it was Scrum I started to read and learn about first. Later I found that XP is not as extreme as one might think. The hard part for us (developers) has been to be effective with TDD or Unit Testing in general. Actually not only effective, but to get "acceptance" from all the developers to spend time on writing tests instead of being "effective" with coding. We have a lot of legacy code (as defined by Michael Feathers; legacy code is code without tests), and making major changes to our application for the sake of automated testing was just not an option. The cost would be to high and our ability to deliver new functionality would have decreased to much. Sometimes I really envy the consultants out there that get to work with new products more often than not. We are however aiming for improving our existing code with tests as we touch the code fixing bugs or creating new features, but this is a long running process.
Tuesday, February 26, 2008
You might argue both, but that's beyond the point I've been thinking lately about how different programmers get their work done. If you look over the shoulders to 3 programmers, none of them is working the same way. The first difference I tend to notice is the use of keyboard shortcuts. Personally I've always been a fan of shortcuts, especially in development environments like Visual Studio, but also general shortcuts in Windows or other applications. For instance I never do File -> Open. I always use ctrl -> O and it always annoys me when a program does not support the most common shortcuts. However, I still feel I can learn and use more of them. We can divide developers into three groups related to the above: - Love the mouse and rarely use shortcuts
- Use mouse often, but use shortcuts for the most common actions
- Use the mouse only when there's no shortcut for the action.
I think I can put myself in category 2 and I'm not sure if I want to or are able to be in category 3. One important aspect to consider before I dig myself to deep into this, is that you don't necessarily produce better software by using a lots of shortcuts (obviously). However I'm quite sure that a developer in group 3 produce code faster than a group 1 developer. But one can argue (if you're a bit extreme) that the quality of the code produced by group 1 is better, because they get more time to think But seriously you can't use this type of groupings for defining developers, but in general I think many developers could benefit from using more shortcuts. Here are the most common shortcuts in Visual Studio 2005 as I see it:
| Builds | | | Ctrl+B, Ctrl+S | Build | BuildSelection | Ctrl+Shift+B | Build | BuildSolution | Ctrl+Break | Build | Cancel | | | | | | Debugging | | | | F5 | Debug | Start | | Ctrl+F5 | Debug | StartWithoutDebugging | | Shift+F5 | Debug | StopDebugging | | F10 | Debug | StepOver | | F11 | Debug | StepInto | | Ctrl+F10 | Debug | RunToCursor | | Shift+F11 | Debug | StepOut | Ctrl+Shift+F10 | Debug | SetNextStatement | F9 | Debug | ToggleBreakpoint | | Ctrl+Shift+F9 | Debug | DeleteAllBreakpoints | | | | | | Navigation | | | | F12 | Edit | GoToDefinition | Ctrl+F12 | Edit | GoToDeclaration | | | | | | Other | | | | Shift+Alt+Enter | View | FullScreen | | Ctrl+Shift+F12 | View | NextError | | Ctrl+Alt+P | Tools | AttachtoProcess | | Shift+Alt+A | Project | AddExistingItem | | Ctrl+K, Ctrl+M | Edit | GenerateMethodStub | You probably know where and how already, but if you go to Tools -> Options -> Keyboard in Visual Studio you can define your own shortcuts. This is a great feature of Visual Studio that let you create custom shortcuts for almost every action you can do with a mouse. You can either change an existing shortcut or define new ones. Here's a screenshot of the shortcut dialog in VS: Commands are displayed alphabetically after some type of menu structure (e.g. Edit.Copy), though there a many more commands than you can find in the menu. This list is of course populated dynamically which means you'll find commands for 3rd party VS plugins like e.g. ReSharper. One thing to be aware of though is existing shortcuts. If you for instance want to have the shortcut Ctrl+V, Ctrl+A, you will override the Ctrl+V command for Paste, which is probably not what you want.
Monday, January 28, 2008
 Somehow I got reminded about an old support incident I had in the first company I did development for. On a regular basis we sent out disks with text files containing data that our system should import into its database. Embedded with the disk was an explanation of how to import the files into our system. Here's how I remember it: - Open the command windows (DOS) (Somehow all our customers knew how to do this)
- Write A: followed by Enter (Return)
- Write install.bat followed by Enter (Return)
One day I got a call from one of our customers:
| Customer: | "The instructions you sent me do not work" |
Me:
| "Ok, what seems to be the problem?" |
| Customer: | "The install.bat thing does not work. None of the data is getting imported into our system."
| | Me: | "Do you get any error messages?" | | Customer: | "I don't know. I just followed your instructions."
| | Me: | "Could you walk me trough it on the phone?"
| | Customer: | "Sure"
| | Me: | "Have you opened the DOS window"
| | Customer: | "Yes" | | Me: | "Then enter A: followed by Enter. Does it now say A:\ in your window?" | | Customer: | "No. It says NOT READY READING DRIVE A:" | | Me: | "Have you put the disk in?"
| Customer:
| "No, your note didn't say anything about that!" |
Sunday, October 14, 2007
A not so
long time ago the company I work for initiated Management by
Objectives (MBO). MBO is divided into 3 groups of objectives: company
objectives, department objectives and individual objectives. MBO is also
linked to a bonus. I’ll get a 100% bonus if the company reaches its goals, my team
reaches their goals and I reach my goals. On each of these (company,
department, individual) there is a weighting.
Let’s say I
sit down with my boss in December to agree on my personal goals for Q1 (January-March).
Before going into this meeting I’ve thought of some objectives. My boss also
has some suggestions. Together we come up with 4 objectives, divided over the 3
months. One of the goals has to be achieved within 3 weeks from now, but the
others are closer to the end of the quarter. As time passes I reach my first
goal after 3 weeks, and I’m starting to focus on the other 3. But as it turns
out, the objectives we clearly visualized one month ago are no longer valid,
because of some unforeseen changes that have occurred. Since we’re doing agile
development this change was handled nicely, but for the MBO’s this is not the
case. So I now have two choices; do what I have to do to reach my objectives anyway
or don’t do them and loose my bonus.
Let’s
backtrack a bit. Why do companies use MBO? It’s to steer company objectives by
motivation. In this case the primary motivation is money and maybe the satisfaction
of reaching your objectives. So what happens when the objectives change? Well,
it’s no longer in the company best interest for you to complete your
objectives, so we need to change the MBO as well, right? But this sounds like a
lot of MBO management, and we don’t want that.
For now I’ve mostly talked about individual
objectives. Relating this to agile development you might want to ask another question:
do we need individual objectives at all? What if we removed the individual
objectives and only used the company and department objectives. This way we can
work together to achieve the department objectives instead of focusing on your
own objectives. This is also a much better philosophy related to agile
development, where you always work as a team and not as an individual. But this
will not solve all the problems. You’re still stuck with the same issues when
things start to change. However, it’s easier to change the team objectives than
change all individual objectives, so MBO management will be easier. I’m also
much more fond of a team working together to achieve a common goal, than each individual
working towards their own personal goals. It’s just better for the team.
Tuesday, February 06, 2007
My team has just finished our first iteration (Sprint
in Scrum).
One of the problems we encountered at the end was what to do when the tasks run
out? Not that it’s a “real” problem, because there is always something to do
(outside the Sprint), but it feels bad. Is there a recommended Agile approach?
For us bugs was the solution, because somehow they’re always there. But when I
say bugs I’m thinking of the kind of bugs we already know about before starting
the sprint, not having high enough priority to be included.
My first thought was that the end of the Sprint would be a
great opportunity to make sure that the implemented features was truly finished.
Do an extra check and maybe some refactoring of the code. I was hoping that
this “extra” time would make the quality of our product better and we would
avoid the previous unavoidable: Rushing on to the next task without making sure
that everything works and ending up fixing and finding all the bugs at the end,
resulting in breaking the deadline because there are too many bugs.
One of the reasons for running in to this issue (running out
of tasks) was a mistake about our testers. We didn’t include them on the first
Sprint. Several reasons for that which I’m not going into now, but we soon
found out it was a bad idea. Ideally the testers should have started testing
functionality as soon as something was marked finished. This would have resulted
in some new bugs, which would have kept the Team busy and made the features
closer to the real completed state we were looking for.
So if any of my readers have anything to contribute with
here, now’s the time. Would love hearing from you. I know some of you are so Agile
that you probably don’t even read this bit because you’ve already started your
comment…
Thursday, February 01, 2007
 | | An office with a view... |
I have moved myself into an office, away from the
development team! Me and the Team are not physically connected anymore. If they
shout my name, I will not hear them… If I call for them, I’ll be met by a
drumming nothing.
Here are some of the questions that went through my mind before
I moved into my own office:
How will I know what’s going on
with the Team? How will I get hold of the ideas and suggestions that spring to
life from thin air while the Team’s working? How can I continue to work and
still be influenced by the Team when I’m not there? Will I become more
efficient working from an office? Will anybody come to visit? Will I now become
that sad looking guy that people say “hi” to without ever getting an answer?
Will I gradually lose my motivation, start making other plans and ending up as
a consultant again? Will my company now raise my salary to the same level as
the guy who previously had this office? And the most important question… Will
the Team lose my respect now that I’ve decided to become one of “them” (the
suits)?
As you can probably tell this was not an easy decision for
me. I have done this in the name of science and with an open mind willing to be
convinced of something I don’t believe in. This is an experiment and here is a
glimpse of what I’ve experienced these last two weeks.
On my first day I wrote a note
saying: “I’m so bored, I’m so f#¤&%g bored. No one to talk to, no one to
bother… How am I going to work in these conditions?” And in huge letters at the
bottom it said: “Be strong!” In the upper left corner there was a very personal
note that I’m not going to tell you.
I used most of the day to get
comfortable in my new surroundings. Since I’m an architect I can’t live without
a whiteboard, so I found one and smashed it on the wall. I then removed some
drawings left behind by the previous owner’s children (nice, but I’m not quite
there yet). When I was about ready to start my day, it was over. I went home
and complained to my girlfriend.
I used the next few days to send
email to people letting them know I was sitting in this office. I hadn’t seen
many people since I moved, so I though this email would help. It didn’t. I just
had to admit to myself that I’ll be stuck here for myself for a while. I then
started to look at the current and upcoming Sprints (ref. Scrum) and
started to work. And the next thing I remember is that the lights went out. The
time was 6.30 pm and I was the only guy left. Wow! Where did the time go? I
went home.
By now I’ve started to notice
that the days are getting shorter. I don’t know how it happened, but this
office is in another time zone. I’m still looking for the knob on the wall to
slow things down, but it’s not to be found. I’ve screamed out loud “Beam me up, Scotty”
a couple of times, but nothing has happened so far. Even the hourly sessions of
fussball has been
reduced to once a day (at least I have one social activity). During a day I
have more visits to the zone, than I
usually have in a week.
So am I saying that having your own office is nothing but
good? Have I found Mecca? Have I just been playing around for the last 10
years? Yes, I have. It’s been fun, but
now it’s over. Time to grow up and become a responsible human being! Or is
there something more to this?
I’m an extrovert person (according to this guy) and I like being around
other people. If I’m alone for too long I get restless. This also means that I
like talking to people, being part of and contribute to conversations. This
makes a group of developers an ideal setting for me. So my problem is that I don’t WANT my own office, but I think I need
one. Based on my experience described above I think you understand why.
What about the rest of the Team? Should they have their own
offices to? First of all I think people
who like being more by them self and are not as extrovert, have more to gain of
being part of a team than I have. Why? I think they very often have better ability
to concentrate on what they’re doing, getting into the zone and still be able
to respond whenever their neighbor ask them questions or what not. And even
more important, they are able to get back into the zone again very fast. So
what do they gain from being part of the Team? One guy told me that sitting
with the Team is just more fun! It’s
motivating and you learn quite a bit just by being there. And if your team is
doing Agile stuff, I think it’s mandatory in order to get the team spirit you
need to be successful at Agile development.
One last thing about my role in the Team is that I’m not
very often working on stuff that the Team is working on. I do a lot of
research, specifications, talking to others about ideas and having my own
whiteboard discussions. In fact when I think of it I might be a disturbing
element for the Team, so they’re probably glad they finally got rid of me.
To conclude this rather long tale, I’m willing
to change my mind and admit that for me having an office is a good thing.
However, I still think that for a developing Team to have success they need to
be grouped together. Not necessarily the whole Team, but at least in smaller
groups.
Wednesday, January 17, 2007
Last year I was in Stavanger speaking for NNUG. After the
meeting some of the guys went out to have a beer and invited me with them.
While we were sitting there and talking about stuff we’re only aloud to in
circumstances like these, joined by fellow .Net mates (as appose to when we’re
out with <normal/> people), we came across the subject of Scrum. I
mentioned we were going to adopt Scrum, and in next sentence started talking
about how we had grouped our office landscape. Not using cubicles but having
all tables in the centre of the room, all looking in. One of the guys
interrupted me and said: “You’re not suggesting that Scrum has anything to do
with how you organize your landscape do you?” I responded; “Of course not!” and
continued.
 | In this room we are 12 developers sitting around this “table”. We love it! (Thanks Torbjørn for the picture)
|
After doing some more studying on Scrum and having practiced
it for a few weeks, this somehow came back to me. If I had that same
conversation today I would have answered; “I sure do. Don’t you?“
Scrum is all about Team communication. Letting a team being
a team, performing as a team, talking as a team, making decisions as a team and
so on. Very often Scrum starts out as a desperate solution for a team that
keeps failing. They adopt Scrum and the team starts having success again,
together, as a team. Why is that? I think it’s mainly because scrum (if
properly adopted) focus on team communication. How do you communicate best with
your team mate? If you turn your head and talk to him or if you have to climb
over a wall (or maybe two, three…) to make contact?
This is a topic that has been widely discussed
by many. I know one guy in particular who disagree with me on this; Joel Spolsky
( Joel on Software). I must admit that
he has done a great job getting me to doubt if we’re doing the “right” thing.
Joel says that if you get interrupted in your work, you lose concentration and
focus. It will then take you about 15 minutes before you’re back on track.
I think this has a lot to do with who you are as a person, if
you’re working on the same functionality (same problem domain) or actually in which
country you live. Some people communicate well, others don’t. Some like talking,
some don’t. If you’re working on the same problem as the guy next to you I think
that could be really beneficial. If you live in Norway (like I do) we usually don’t
sit in cubicles. We usually sit in an open landscape communicating freely. It might
be a European thing, I don’t know…
Anyway, I am a strong believer of Scrum and I think
it’s easier to adopt if your team is sitting in a landscape. Do you?
Wednesday, January 10, 2007
Everyone who knows me knows that I have a special interest for memory leaks in .Net. At the company where I work we have solved a lot of these issues and I’ve also had talks about this at Norwegian .Net User Group (NNUG) in Bergen and Stavanger. One of our biggest problems was memory leaks related to events. Rico Mariani (MS performance guru) has set focus on this in his blog today by this blog post, so go check it out!
He focuses on the issue related to event generators, but there are other areas where you can get into trouble as well. I’ll try to explain our scenario: -
We have a graphical engine responsible for creating graphical components (user controls) dynamically by using reflection.
- All of these user controls inherit from the same class which exposes a lot of events.
- When our graphical engine creates new instances of these user controls it hooks up these events.
This model is created to have loose coupling between the user controls, the engine and other components we have in our app. The engine has a lot of knowledge about other components and services in our app, which sometimes our user controls wants to communicate with. This communication is done through these events. Here’s an example:
I have a user control that wants to tell a service that he have made some changes the service should know about. For this we have created a special event on the user control that the engine listens to. So I trigger this event on the user control, the engine receives it and tells the service about it.
These event hookups caused us a lot of pain at some point. Our solution was the first that Rico mentioned in his blog post (IDisposable), which I personally would prefer. In addition to this we added some reflection code which found events and removed them. You’ll find more info about this here: http://channel9vip.orcsweb.com/ShowPost.aspx?PostID=180985
Before I end I want to recommend two tools you can use to find memory leaks in .net. The first one which we use is called .Net Memory Profiler. The other one which I’ve not personally used but I’ve heard others are using is the ANTS Profiler. So go find your leaks. Happy hunting!
Wednesday, October 04, 2006
After a long disagreement with our IT manager I finally ended up with a HP Compaq nc8430. The detailed spec is still a surprise (for me that is). I first asked for (or rather demanded) a new Dell. I have owned and used dell laptops daily since 2001 and have been very satisfied, especially with the screen, resolution, and the simplicity of changing components (hard disks, memory etc.). Basically I’ve never had any problems with my Dell laptops (even though I know others have), so therefore I wanted to go for what I knew was good, safe and was comfortable with. But at my great surprise our IT manager refused. At first I thought he was kidding. He told me we only buy HP. Well, I didn’t really care what “WE” buy; “I” wanted a Dell. His reasons where:
- If something goes wrong with the computer, he knows where and how to send it to get it fixed.
- If I need replacement parts he knows exactly what and where to get them.
- If I get a Dell all the others want one to.
- And others that I don’t remember…
For the first point I must admit my previous laptops had a few problems. I remember one time I had a hard disk crash (can’t blame that on Dell though…). And what did I do? Sent it to my IT manager to get it fixed? No, of course not, that would take to long. I’m a developer, computer freak and nerd! I’m too proud not to fix it my self. I got a new disk, installed it, and problem solved.
When it comes to replacement parts, I have no problem ordering it my self. I know where to send the bill. Actually we’re still a quite small company, so this is no problem. I order stuff all the time.
The last point I’m not even sure I want to address, but since I put it there I guess I have to. Well, maybe if “everybody” else wants Dell, we should consider using Dell instead of HP ;) (I might regret this comment, but what the heck…)
The last issue I want to address is you reading this and are probably thinking one of two/three things. 1. I work for a ridicules company. 2. I’m a spoiled little brat. 3. Or even that my IT manager is a dork.
Well, my company is actually a great company to work for and even my IT manager is a great guy. We only disagree on this specific issue (I hope. I might have created another posting this.). Am I a spoiled little brat? I guess I am, usually I get what I want! Only not this time… And when I don’t get it I usually tell somebody. Only this time I told everybody…
|
| |
|
|
|
|
| |
| August, 2010 (2) |
| June, 2010 (3) |
| April, 2010 (2) |
| March, 2010 (2) |
| February, 2010 (3) |
| January, 2010 (4) |
| December, 2009 (1) |
| August, 2009 (4) |
| July, 2009 (4) |
| June, 2009 (2) |
| May, 2009 (4) |
| April, 2009 (7) |
| March, 2009 (7) |
| February, 2009 (4) |
| January, 2009 (4) |
| December, 2008 (7) |
| November, 2008 (1) |
| October, 2008 (6) |
| September, 2008 (7) |
| August, 2008 (4) |
| July, 2008 (3) |
| June, 2008 (7) |
| May, 2008 (7) |
| April, 2008 (5) |
| March, 2008 (3) |
| February, 2008 (9) |
| January, 2008 (3) |
| December, 2007 (4) |
| November, 2007 (10) |
| October, 2007 (10) |
| September, 2007 (2) |
| August, 2007 (6) |
| July, 2007 (6) |
| June, 2007 (3) |
| May, 2007 (2) |
| April, 2007 (8) |
| March, 2007 (6) |
| February, 2007 (5) |
| January, 2007 (10) |
| December, 2006 (9) |
| November, 2006 (5) |
| October, 2006 (8) |
| September, 2006 (5) |
|
|
 |
 |
|
|