Archive for March 25th, 2005

Priorities are Messy (Introduction and Index) by e

Priorities are messy. Even the definition of the word acknowledges the disparity between things that merit attention and things that receive attention. Merriam-Webster’s OnLine dictionary defines a Priority as

  1. a (1) : the quality or state of being prior (2) : precedence in date or position of publication — used of taxa b (1) : superiority in rank, position, or privilege (2) : legal precedence in exercise of rights over the same subject matter
  2. a preferential rating; especially : one that allocates rights to goods and services usually in limited supply <that project has top priority>
  3. something given or meriting attention before competing alternatives

Believers concur that God should be first, and most cultures and creeds pay lip-service to the concept that Family should be prioritized above Work. After that, it gets messy and situational. Jesus came to deliver us from a rigid set of rules and regulations governing our behavior, and sent the Holy Spirit to direct us. Some would therefore postulate that perhaps we’re not supposed to have a tidy priority list. Perhaps defining priorities only serves as a crutch and encourages us to attempt to serve God in our own strength rather than relying upon His strength. What did Jesus say?

Jesus provided a very short list of absolute priorities:

  1. Seek first the kingdom of God (Matthew 6:25-33, Mark 12:29-30)

There is no second priority, and we are explicitly instructed that to “not worry” about anything else (Matthew 6:25-33). Kirkegaard explains that purity of heart (that purity which enables us to see God) is to will one thing, to seek only God. Adhering in practice to this single principle is both necessary for any of our other situational priorities to be right, and sufficient to ensure that they are.

For many of us, this is unpracticed preaching, and as a result of failing to set this absolute priority, nothing else works. The first commandment, in both order and importance, has always been to remember that YHVH is the Lord our God, we are to have no other gods before him.

Relative priorities should simply be a matter of applying our absolute priority, but Jesus knows how messy life is, so He gave us some examples to demonstrate what our situational priority list will resemble after we establish our absolute priority. A few of the more explicitly stated biblical valuations that we’ll dig into over the next few weeks are:

Priorities are defined by conflict, and indeed, can not be demonstrated outside of conflict. Stating that Family is more important than Work is meaningless until those come into conflict. If there is no perceived conflict, then our priorities are not what we think they are. What do the conflicts in my life say about my priorities? Do they reflect Jesus?

March 25 2005 | Jesus Stuff | 3 Comments »

.NET Regular Expressions Reference and Samples by e

This is a handy source for .NET Regular Expressions reference information and samples, as well as a handy test tool.

RegExLib.com (Regular Expression Library)

RegExLib.com Regular Expression Cheat Sheet (.NET RegEx)

March 25 2005 | Geek Stuff | No Comments »

Getting information on a COM failure by e

Nothing terribly deep here, but after a long time without writing new code using COM, I had to remember that there’s a GetErrorInfo method. Here’s a quick reminder of how to get more information on a COM method failure.

{
  // Snippit… Assume you’ve got a pointer pCOMObject with
  // method Foo and that COM is happily initialized, etc…

  // The FAILED macro returns true if the HRESULT returned
  // by the operation is negative, indicating a failure
  if FAILED(pCOMObject->Foo())
    DisplayError();

  // Don’t forget to clean up
  pCOMObject->Release();
  CoUninitialize ();
}

DisplayError()
{
   LPERRORINFO pErrorInfo=NULL;
   // GetErrorInfo returns a pointer to the most recently set
   // IErrorInfo pointer in the current logical thread. It also
   // transfers ownership of the error object to the caller,
   // and clears the error state for the thread.

   GetErrorInfo(0,&pErrorInfo);
   BSTR strDescription, strSource;
   pErrorInfo->GetDescription (&strDescription);
   pErrorInfo->GetSource(&strSource);

   // Display or log error appropriately, not this way
   _tprintf(TEXT(“%s\n”),strDescription);
   _tprintf(TEXT(“%s\n”),strSource);

   // Clean up
   pErrorInfo->Release();
   SysFreeString(strDescription);
   SysFreeString(strSource);
}

http://blogs.msdn.com/greggm/archive/2004/11/24/269378.aspx – Debugging tips
http://blogs.msdn.com/adam_nathan/archive/2003/06/13/56713.aspx – Gotchas
http://blogs.gotdotnet.com/anathan/PermaLink.aspx/6d021f27-72c8-4420-b6ad-1c5f0690bde8 – Win32/.NET Interop tips

March 25 2005 | Geek Stuff | No Comments »