LINQPad – a worthy successor to Snippet Compiler

In 2009 I blogged about how Snippet Compiler allows us to test out C# code without having to create a project in Visual Studio just for that. Now there’s something better: LINQPad. Don’t be misled by its name; it’s not just for LINQ, it can run any C#, VB, or even SQL code. I particularly like its results view. A screenshot is worth a thousand words:

5 August 2011 | .NET, C#, Applications | No Comments

Problem with Transactions on Windows 64-bit Oracle Client

After upgrading to a 64-bit machine at the office, my Visual Studio 2010 unit tests that were making heavy use of transactions (i.e., hundreds of uncommitted database table insertions within a using (new TransactionScope()) statement) failed with the following error message:

ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [ktcirs:hds], [0×00F7D8078], [0×006F10BF0], [0×01B8C8078], [], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [ktcirs:hds], [0×00F7D8078], [0×006F10BF0], [0×01B8C8078], [], [], [], [], [], [], [], []
Process ID: 4084
Session ID: 125 Serial number: 369

The solution

  1. Install 64-bit Oracle Client 11.1.0.6.0 (win64_11gR1_client.zip) but do not install Oracle Services for Microsoft Transaction Server.
  2. Install only OraMTS using 64-bit Oracle Data Access Component 11.2.0.2.1 (ODAC112021Xcopy_x64.zip).

What’s the problem, BTW?

“Windows Vista and Windows Server 2008 introduce new MSDTC changes that do not interoperate with older versions of Oracle Services for MTS. Oracle Services for MTS 10.2.0.4 and higher, with the exception of 11.1.0.6, support these new changes on Windows Vista Service Pack 1 and Windows Server 2008 or higher.” Source: http://www.oracle.com/technetwork/database/windows/index-089915.html

3 August 2011 | Uncategorized | No Comments

Robocopy in lieu of rsync

Perhaps you’re a web developer familiar with Linux and SVN. Then you’ll definitely know how to copy files from your SVN working directory to a test server whilst excluding all .svn directories:

rsync -IrW --stats --exclude=.svn /path/to/project/dir/ //testsrv/whatever

If for some reason your development environment is Windows you might be tempted to use rsync on Cygwin. That’s works fine (albeit with a very noticeable performance lag), but there is actually a native Windows alternative to rsync:

robocopy \path\to\project\dir \\testsrv\whatever /MIR /XD .svn

Robocopy has long been available on NT 4.0 via the Windows Resource Kit, and is included in Vista, Windows 7, and Windows Server 2008.

1 February 2011 | LAMP, Windows | 1 Comment

Memories of the past

The past doesn’t exist, except in our minds. There is not one past, but many pasts, each belonging to a different person.

If not for memory, there would be no such thing as the past. It is literally all in the mind.

Easy enough to comprehend, but extremely difficult to internalize.

9 January 2011 | Uncategorized | 6 Comments

A fundamentally flawed argument

I believe that everyone has at least one fundamental flaw. Those who think they aren’t fundamentally flawed turn out to have three fundamental flaws: first, their fundamental flaw; second, their ignorance of their fundamental flaw; and third, their belief that they are free of fundamental flaws.

The least fundamentally flawed are those armed with full knowledge of exactly how much and in what way they are fundamentally flawed. Inhabiting unhappy middle ground would be those who are aware that they’re fundamentally flawed, but now how so.

If it is indeed possible not to be fundamentally flawed, then that would be the biggest fundamental flaw of all.

8 January 2011 | Uncategorized | No Comments