Skip to main content

Posts

Showing posts from 2009

Behind the times with NHibernate 2

I am so behind the times ... NHibernate 2.0.1 GA was released last fall and 2.1.0 Alphas are coming out. In the mean time, Hibernate.org has been subsumed by Redhat's JBoss. The url www.hibernate.org doesn't take you anywhere useful, and following the javascript menu to projects / services / hibernate still doesn't get you anywhere - pure garbage. It is clear that JBoss wants to sell you their enterprise build of Hibernate instead (that "Products" link works). I have been so busy with my day job that I haven't been keeping up. I work at a hospital, supporting Cerner Millenium - writing CCL, Perl, Python, Microsoft SQL (occasionally), and a bit of C#. Cerner CCL is a proprietary language that feels like a mash-up of Fortran IV and and an arcane dialect of SQL from 1976. The language used to run on VMS servers, but we have migrated to HP-UX, and I am OVERJOYED to have a choice of using a posix shell, ksh or csh. Also, I recently discovered that CCL al

ADDPATH NT/DOS command line script

(Yes, We say script now instead of batch ... times are changing). Here is a stupid little batch file that I have written several times. It adds a single argument to the path in your current command-line session (so it is not permanent). @echo off if "%1" == "" goto end_script set path=%path%;%1 :end_script

Iron Languages on DLR

The "Iron" languages that run on the .NET DLR (Dynamic Language Runtime) are making progress. I just noticed that IronRuby has a release on RubyForge . To be honest though, I have moved to Python as my script language of choice, with Perl as the ever-present fallback. Iron Python seems like it is coming along nicely. Iron Python 2 can even host itself . I can't wait for MonoDevelop or SharpDevelop to support IronPython on Windows.

The Castle Project will facilitate native SQL.

I just spotted this on FishEye ... an example native SQL query . You'll need source from SVN or a recent download from the build server - more recent than patch 5551 by mzywitza on 17 February 2009. This is very nice, allowing parameterized SQL without the hacks that I used (you can search here for some of my old blogs on the subject).

Search and Replace in Visual Studio 2005

I usually have to look this up, so I am posting it to my blog. Visual Studio 2005 has a "Regular Expression" option on the "search and replace" dialog. (Previous .Net editions had it as well.) I occasionally want to rewrite several lines of text without writing a macro or wearing out my fingers. Here's what I do ... If I have a file with several lines of DECLARE R1 = VC WITH CONSTANT("TEST1") DECLARE R20 = VC WITH CONSTANT("TEST2") DECLARE R31 = VC WITH CONSTANT("TEST3") DECLARE R42 = VC WITH CONSTANT("TEST4") And I would like to convert these to SET R1 = "TEST1" SET R20 = "TEST2" SET R31 = "TEST3" SET R42 = "TEST4" I would search for "declare [R|r]{.*} = .* with constant\({.*}\)" and replace with "set r\1 = \2" (don't add quotes into the search dialog). This grabs the text in curly braces and assigns it to \1 and \2, so I can re-assemble it as I wish. I