Navigation

Search

Categories

On this page

Inspirational Malarkey
How good software goes bad
Top 10 List of Programming Top 10 Lists
DesignMode not working
Finding the name of your calling method

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 178
This Year: 0
This Month: 0
This Week: 0
Comments: 551

Sign In

 Thursday, March 29, 2007
Wednesday, March 28, 2007 5:08:53 PM UTC ( )

Read this on What's the next action blog and thought it was pretty cool:

"...No matter how though it gets, no matter how swamped you are in work and you have bad days with a big honkin' backog of things to do. There are, really, only two problems in your life. Want to know which one and how to deal with it?

First problem: You know what you want but you don't know how to get it.

Second problem: You don't know what you want.

Isn't that great? Think about this for a minute or so and you will see that every open loop, every issue you have, little or big, can be reduced to the above two problems. 

So, if there are only two problems, there must be only two solutions right? Right. And look at the above problems. You know what the solutions are? Make it up. And make it happen. It's that simple. You don't know how to get from A to B but you know you want to in B? Well, make up the next action. Think, brainstorm about the possible succesfull outcomes and how to get there. And then think about your Next Action.

You don't know what you want? Same thing. Is it because you can't decide? Think about the succesfull outcome and go back to your next action. Or is it because you don't have all the information yet? There is your next action. Make sure you get the info. Call, email, walk into a library, talk to someone, whatever. But make it happen.

So when you look at those two solutions, make it up and make it happen, it really boils down to the heart and soul of GTD. What's the succesfull outcome and what's the next action?"

| Trackback | # 
 Sunday, March 25, 2007
Sunday, March 25, 2007 11:42:14 AM UTC ( )

 

| Trackback | # 
Sunday, March 25, 2007 11:36:03 AM UTC ( )

Jeff Atwood over at Coding Horror provides a list of lists :)  Very thought provoking list.  If I had to break this down into my single top 10 it would be:

  1. Trying to do too much in the first version
  2. Process is no substitute for thinking
  3. Fix things that are broken rather than complaining about them being broken. Actions speak better than your complaining
  4. Don't over-think a problem
  5. Add value all the time
  6. Treat people who know less than you with respect, deference and patience
  7. The only constant in the world is change
  8. Design should be simple, encapsulated, orthogonal and re-usable
  9. Refactor out smelly code immediately.  If it looks too difficult to refactor chances are your solution is too complex
  10. Google is your friend

If there is a theme running through my list it would have to be keep it simple.

| Trackback | # 
 Tuesday, March 20, 2007
Monday, March 19, 2007 1:57:00 PM UTC ( )

Problem

Recently I've been having issues with the DesignMode property of controls within the Visual Studio 2005 designer reporting the wrong value.  Eg. It says DesignMode = False when infact, it should be True.

After investigation this is what I've found it appears to be a bug where user controls are 2 levels deep releative to the current control.

Workarounds

  1. Instead of using the DesignMode property you can use

    System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv"

    You can even go one further and override DesignMode in your forms like this:
  2. public new bool DesignMode
    {
       get
          {
             return (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv");
          }
    }

  3. If that seems to dodgy, another option is to use the LicenseManager object, as follows

    if ((LicenseManager.UsageMode) == (LicenseUsageMode.Designtime)) {}

Additional Information and how to reproduce issue

| Trackback | # 
 Thursday, March 01, 2007
Wednesday, February 28, 2007 1:04:01 PM UTC ( )

Here is a really useful article about traversing the stack to find the name of your calling method.  Geeky but useful.  You've been warned!

| Trackback | #