The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for July, 2010

Nick Hodges | The End of the Chow Line

Posted by jpluimers on 2010/07/30

From the comments on Nick’s excellent post (that instantly made me feel hungry <g>):

If you find your developers bringing in their own equipment to work then you know there is a problem.

That reminds me of this story: Read the rest of this entry »

Posted in About, Keyboards and Keyboard Shortcuts, Opinions, Personal, Power User, RSI, ThinkPad, UltraNav keyboards | Leave a Comment »

LinkedIn should send “Notifications for Requests to Join My Group” #fail

Posted by jpluimers on 2010/07/30

Right now, LinkedIn does not send Notifications for Requests to Join My Group.

They should!

Right now you need to watch the LinkedIn group very frequently, otherwise you miss the “requests to join.
Mail notification would make that much less of a burden.

–jeroen

Posted in LinkedIn, Opinions, Power User | Leave a Comment »

CodePlex: choosing a license

Posted by jpluimers on 2010/07/29

One of the toughest parts on  creating a new [Archive.isCodePlex project is choosing a license.

As Jeff Attwood wrote a couple of years ago, choosing a license – any license – is important, because if you don’t, you declare an implicit copyright without explaining how others could use your code.
In addition to that, Jeff published a list of licenses with a one-line phrase describing them, so it becomes easier to start making a choice.

Last year, ShreevastaR extended that list in his answer to this StackOverflow.com question on CodePlex licensing.
Brian Campbell did the same a few months later on  another StackOverflow question about CodePlex licensing.
There are many more StackOverflow.com threads like those 2, and they give similar results.

The reason I want to put up a CodePlex project, is to put my sample code for conferences, blog articles and course examples on-line so they are easier to share with other people.
Most is from Visual Studio or Delphi projects using languages C#, VB.NET and Delphi.
Some of it are batch-files, XSD, XSLT, or other small snippets to get stuff working. Read the rest of this entry »

Posted in .NET, Access, CodePlex, Database Development, Delphi, Development, Firebird, InterBase, Software Development, SQL Server | 4 Comments »

.NET/C#: a generic exception class

Posted by jpluimers on 2010/07/28

I want my exceptions to be bound to my business classes.
So you need your own exception class, and are expected to override the 4 constructors of the Exception class.

But I got a bit tired of writing code like this again and again:

using System;
using System.Runtime.Serialization;

namespace bo.Sandbox
{
    public class MyException : Exception
    {
        public MyException()
            : base()
        {
        }

        public MyException(string message)
            : base(message)
        {
        }

        public MyException(string message, MyException inner)
            : base(message, inner)
        {
        }

        public MyException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }
    }
}

Searching for Generic Exception Class did not reveal any generic exception classes.
So I wrote this instead: Read the rest of this entry »

Posted in .NET, C#, C# 2.0, Development, Software Development | Leave a Comment »

Visual Studio 2005/2008/2010: ContextSwitchDeadlock was detected Message (via Keith Barrows)

Posted by jpluimers on 2010/07/27

Like Keith Barrows, each time I see a message like below, I’m reminded that I forgot to change my Visual Studio 2005/2008/2010 to disable these kinds of MDA messages:

ContextSwitchDeadlock was detected
Message: The CLR has been unable to transition from COM context 0x1a7728 to COM context 0x1a75b8 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.

Steps to get rid of these messages:

  1. Start Visual Studio :-)
  2. In the menu, select “Debug”; “Exceptions…” (Ctrl-D, E)
  3. Open the “Managed Debugging Assistants” tree
  4. Uncheck the first checkbox in the “ContextSwitchDeadlock” row

Maybe I won’t forget this next time :>

–jeroen

Via: Keith Barrows : ContextSwitchDeadlock was detected Message.

Posted in .NET, Development, Software Development, Visual Studio and tools | 1 Comment »

routes.tomtom.com UI suggestion #fail

Posted by jpluimers on 2010/07/26

There is an address that I have been traveling from lately quite a bit: “Weena 505, Rotterdam, NL”.

So: routes.tomtom.com has put it in my history.

So why is it then that every time I select that address from my history, and I start planning my route, I get an additional choice of addresses to choose from this selection:

From:

  • Weena 505, Rotterdam, NL
  • Weena, Rotterdam, NL
  • Weena, Rotterdam, NL
  • The Westin Rotterdam, Rotterdam, NL

Or review your input:

  • Weena 505, Rotterdam, NL

They do this for all kinds of addresses.
It drives me nuts for two reasons:

  1. It takes an extra action from my side
  2. You cannot perform that action by keyboard (you have to use a pointing device)

Are interaction designers and UI builders ever going to learn?

–jeroen

Posted in Usability, User Experience (ux) | 1 Comment »

Batch files: Remove a trailing backslash (via Jon Kruger’s Blog » Minor batch file tricks)

Posted by jpluimers on 2010/07/23

Even when doing batch files for a long (20+ years!) time, sometimes you learn something new.

Today was such a day.
I wanted to remove a trailing backslash, so I searched with google.

The first hit was a posting by John Kruger showing this little piece of code:

SET Line=C:\Windows\
IF "%Line:~-1%"=="\" SET Line=%Line:~0,-1%
echo %Line% — will output: C:\Windows

(note: copy the code above, be careful with the code on John’s site as somehow his double quotes got mangled).

Note that a stackoverflow answer has the same solution.

–jeroen

via Jon Kruger’s Blog » Minor batch file tricks.

Posted in Power User | Leave a Comment »

Now where did I hear that “Aurora” codename again?

Posted by jpluimers on 2010/07/22

Now where did I hear that “Aurora” product codename name again?

Aurora seems to be the new product codename for Microsof’ts’ on-premises/cloud mix of Small Business Server.

But wait, wasn’t it eras ago that you could choose to run PHP on clouds for your business apps?

And isn’t Aurora/Delphi for PHP all about creating those apps?

–jeroen

via: Microsoft small-business server futures: 5 things to know | ZDNet / Aurora – a Microsoft cloud server for the small guy?.

Posted in Delphi, Delphi for PHP, Development, Opinions, Software Development | 2 Comments »

Delphi: great post by Malcolm Groves about Debugging Initialization and Finalization sections

Posted by jpluimers on 2010/07/21

Long time Delphi user Malcom Groves just posted an interesting video on Debugging Initialization and Finalization sections.

What I especially like is that he performs this trick using the DUnit unit testing framework for Delphi.
+1 for using unit testing!

The trick he uses is an old one, but I didn’t realize that few people know it, so it is good to put it in writing.

Note that the trick does not work in all cases (see further on an alternative), but for most cases it does work well:

  1. Open your .dpr (From the Delphi menu, choose “Project” followed by “View source”
  2. Put a breakpoint on the begin and end of your program code (see listing below)
  3. Run your project
    (note: for some Delphi versions: you have to F7 into your project)
  4. At the begin of your program Press F7 (“Run” – “Trace into”) in stead of F8 (“Run” – “Step over”)
  5. At the end of each initialization section, press F7 again (not F8!) to step into the next initialization section
  6. At the end of your program press F7 (not F8!) to step into the finalization section
  7. At the end of each finalization section, press F7 again (not F8!) to step into the next finalization

Easy, when you know, difficult to find out yourself (I found out by accident eras ago <g>).

Sometimes (I have not found out why yet) some Delphi versions refuse to work this way.
So you need an alternative, which is this one: Read the rest of this entry »

Posted in Delphi, Development, Software Development | 9 Comments »

Delphi and the ‘leaving’ of Nick Hodges

Posted by jpluimers on 2010/07/20

I’ve let this boil for a while before reacting on the let go by Embarcadero of  Nick Hodges from his R&D Manager position.

Reacting as a non-native English person is a tad difficult, as it is tough to express the fine aspects of the implications well.

So I’m posting this  in both the Delphi and Opinions category; reactions are more than welcome. Read the rest of this entry »

Posted in Delphi, Development, Opinions, Software Development | 1 Comment »