Author: Ben Taylor

Editorials

Retrieving Random Records

Random record selection is a rather involved topic. You can use random number generators when creating data, and use the randomly created values for selection. You can select records at runtime, randomly assign a value, and select a few meeting your criteria. You can also purchase third party tools that optimize and automate the process for you. And much more. […]

Editorials

What is a Correlated Sub Select?

What is a correlated Sub Select? Historically, when it comes to performance, it was a dirty word. Let me give you an example as it will more easily explain what a correlated sub select is. SELECT Customer.Id ,Customer.Name ,Customer.Region — Here Comes the Sub Select ,(SELECT SUM(TotalAmount) FROM Sales WHERE Sales.CustomerId = Customer.Id ) AS TotalSales — Back to the […]

Editorials

Entity Framework With Real SQL

Often when we use tools like Entity Framework we use it as it is designed out of the box, forgetting that you can optimize certain aspects of the underlying SQL engine through the use of our own SQL. You can interact with the database directly through SQL Queries, Queries with Parameters, Stored procedures…basically any valid SQL. What I find even […]

Editorials

Exception/Error Handling

Today I am going into territory where I find I still have much to learn. That is the topic of actually capturing and handling errors. Previously we talked about tracking and notification of errors. Today, we are transitioning to when and how to capture exceptions and errors. I’d say different kinds of programs have different needs. A Service, or long […]

Editorials

Error Handling for All

Continuing on the topic of error handling, I thought I would change the direction today, and talk more about error and exception handling as a philosophy, instead of focusing on syntax, etc. There are many purposes for error handling. Two stand out to me as very significant. If something bad happens, disrupting the user’s experience, error handling should tell me, […]

Editorials

Error Handling

Today I want to start a short series of editorials on the topic of Exception, or error handling. I thought I would start out with SQL Server errors, and then move on later into the topic at large. SQL Server 2005 introduced a Try/Catch error handling syntax allowing us to easily capture errors are perform appropriate actions such as COMMIT […]

Editorials

Learn About Locks

If you work with SQL Server for very long, you will probably find yourself looking into how it locks data. Data locks are one of the biggest causes of slow performing queries. There are things you can do to optimize your database performance if you first understand how longing is performed. Here are some high level features of locking to […]

Editorials

Rolling Window Data Storage

A common database problem is the management of large amounts of data occurring and deprecated over time. For example, we often have data we maintain for a period of days, weeks, months, years, etc. When the data becomes obsolete we want to remove it quickly. When we start a new time segment for data, we want to generate that quickly, […]

Editorials

Anonymous Email

I received a response to my editorial last week about the skills of individuals applying for software developer positions. Because the email came through a non-traditional source I don’t have the name of the author for attribution. Our email reads: I agree that Unit Testing and maybe even testing in general has suffered as we migrate into a new generation […]

Editorials

Where Has Unit Testing Gone?

Recently I have been working with and interviewing a lot of young developers. One thing they all have had in common is that they do not know how to Unit Test. This experience prompts me to ask a few questions. I’d like to see what you think as well, so your comments will be appreciated. Am I out of touch […]