I’m curious as to why the insert and update commands in SQL have different syntax. So far I have been unable to find any satisfactory explanation. I personally have a gripe with the insert syntax in that the column names are separated from the inserted value. In wide tables this makes it difficult to alter existing stored procedures since you have to manually count fields or come up with a commenting scheme. Even then, you aren’t guaranteed you’ll find a bug at runtime.

I propose that in addition to the normal syntax

INSERT INTO Foo (ColumnA, ColumnB, ColumnC)
VALUES ('First', 'Second', 'Third')

SQL also support an alternate syntax such as:

ColumnA = 'First',
ColumnB = 'Second',
ColumnC = 'Third'

This syntax is easily readable and much more maintainable than the existing syntax.

MySQL has already adopted this syntax but unfortunately SQL Server has not. In the meantime I’ll continue commenting my large inserts like this:

INSERT INTO Foo (ColumnA, ColumnB, ColumnC)
'First',  -- ColumnA
'Second', -- ColumnB
'Third'   -- ColumnC

I wish C# had this Java feature

In Java there is a feature called the Catch or Specify Requirement. This feature requires that each method specify what exceptions it may throw. Any caller to that method must either include a catch block for the exceptions or specify that it can pass the exceptions up the call chain. A Java application will not compile if all exceptions are not handled.

C# does not have any similar feature. When working with unfamiliar system classes, I typically refer to MSDN to learn what exceptions they may raise. Unfortunately if I miss something, the C# compiler does not provide any warning.

C# does provide the ability to document the exceptions using the <exception> tag, but this is only used to generate documentation and provide intellisense in Visual Studio. There is a ReSharper add-in called Exceptional which warns you about uncaught exceptions. I have not tried it, but according to feedback on Stack Overflow, it generates too much noise to be useful.

My general practice is to use generic exception handling blocks at the highest level of my code so errors can at least be caught, logged, and feedback given to the user.