Development
Thursday, June 21st, 2007
I upgraded from NUnit 2.2.9 to NUnit 2.4.1 and while there is all sorts of new goodness added (much of which I don’t yet use) I am quite disappointed in performance. The actual speed of each test hasn’t changed, but it takes longer than before to start running the tests and, more annoyingly, it takes ...
read more
Posted in Development | 2 Comments »
Wednesday, February 21st, 2007
As a photography enthusiast (albeit a shamefully inactive one) I am incensed by the notion of restricting photography in public places. According to Simon Taylor, there are moves afoot in the UK to do just this and so he has started a petition against it.
As it turns out, there is no actual Bill being put ...
read more
Posted in Development, Personal, Photography, Politics | No Comments »
Tuesday, February 13th, 2007
I was writing some ASP.NET authentication code last night and was trying to encrypt an authentication ticket using FormsAuthentication.Encrypt(). However, it kept returning null. I banged my head against the wall for about an hour and then went home. As so often happens, I came in in the morning and spotted the problem immediately: the ...
read more
Posted in ASP.NET, C#, Development | 1 Comment »
Monday, February 5th, 2007
I went to WebDD on Saturday. It was quite an interesting event, indeed.
I attended several interesting sessions; from HTML microformats, to Ruby on Rails, to WPF and Microsoft Expression Blend.
Scott Guthrie was the man of the day: large throngs of developers vied for seats in his sessions. His talk on WPF/E was extremely interesting. ...
read more
Posted in C#, Development, Events, WPF, WPF/E, WebDD | No Comments »
Friday, October 6th, 2006
I always forget the binding flags needed to reflect over properties in .NET. So this is mainly an aide-mémoire for myself.
PLAIN TEXT
C#:
PropertyInfo[] props = typeof(MyType).GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
I ALWAYS forget that you need to include the BindingFlags.NonPublic flag!
Posted in C#, Development | No Comments »
Tuesday, October 3rd, 2006
I read an interesting article today about Java EE dying in an SOA world. I know a lot of people complain about its complexity but I was surprised to read the claim from a senior analyst with the Burton Group that
In five years, Java EE will be the CORBA of the 21st Century.
In my opinion, ...
read more
Posted in Development | No Comments »
Thursday, August 31st, 2006
I tried to uninstall SQL Server 2005 Developer Edition today and was mortified when, halfway through the uninstallation (is that a word?), "SQL Server setup encountered an error and needs to close"! I got a sickly, sinking feeling in my stomach - my immediate future was devoid of fun. After all, I needed to re-install ...
read more
Posted in Development, SQL Server | No Comments »
Tuesday, August 29th, 2006
I was really confused this morning. I was executing a stored proc that returned a single row of data, and a return value. However, the return value was always null - even though the stored proc ALWAYS returned a return value. The code was domething like this:
PLAIN TEXT
C#:
SqlParameter retval = new SqlParameter("@RETURN_VALUE", SqlDbType.Int);
retval.Direction = ParameterDirection.ReturnValue;
command1.Parameters.Add(retval);
using ...
read more
Posted in ADO.NET, Development | No Comments »
Wednesday, August 23rd, 2006
The Enterprise Library Data Access application block offers some time-saving routines for calling stored procedures. However, they don't all work when the stored procedure is a synonym.
For example, once I have a Database object, I can get a DataReader from a stored proc called GetUser by simply calling:
PLAIN TEXT
C#:
Database db = DatabaseFactory.CreateDatabase();
IDataReader reader = db.ExecuteReader("GetUser", ...
read more
Posted in ADO.NET, Development | No Comments »
Sunday, August 13th, 2006
The project I am working on required sorting, filtering and paging of large data sets. This isn't an uncommon requirement; yet the solutions are often either fiddly or not very performant. But fortunately, using SQL Server 2005's common table expressions and the new ROW_NUMBER() function, I managed to create a stored procedure that provides sorting, ...
read more
Posted in Development | No Comments »