22nd April 2008, 08:03 am
11 out of 12 is just tolerable
I was surprised to be reminded that it was around 8 years ago that I first came across The Joel Test, and am still shocked by the number of teams involved in the production of software that would not come close to getting any where near 12 out of 12. What am I talking about? Well, Joel Spolsky came up with 12 simple questions in 2000, published on his (highly recommended) website Joel on Software; the answers to which give a great insight into whether or not you have the environment and processes in place to develop and deliver great software. All questions require a simple ‘yes’ or ‘no’ response, and as a consequence taking the test takes no more than about three minutes. So what are you waiting for - take the ‘12 Steps to Better Code’ test!
Continue reading ‘The Great Software Test’ »
4th April 2008, 08:51 pm
In a recent technical mentoring session that we hosted, a question came up that crops up regularly, so I thought I’d post a quick summary here.
The question is “How do I retrieve the id of a newly created record in a SQL Server table from my application?”
For this example, we’ll assume that the table in question is called tutor, and has just two fields, id and name, where the id field is a primary key with an identity field. The table definition would be
CREATE TABLE tutor (id INT PRIMARY KEY IDENTITY(1,1), full_name VARCHAR(100) NOT NULL)
Firstly I’d like to warn against the common use (miss-use) of a well known system variable called @@IDENTITY. This variable gets back the value of the most recently updated identity field, which on the face of it seems perfect. However, there are two key things to watch.
Continue reading ‘New ID for record in SQL Server’ »