LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

Multithreaded FizzBuzz made easy

This week I’m trying to find all the new thing in .Net 4.0 and VS2010. One of the more exiting features in .Net 4.0 is the parallel extension. Or how to make multithreading easy. I guess we all know the Fizzbuzz test by now. Describe by Imram as the following. Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”.

Read More...

Extension manager in VS2010

One of the great new features of 2010 is the improved extensibility. And hence they added the Extension manager to manage extensions. First thing we see if we click on Tools > Extension manager. Is the Installed extensions. First thing I miss on that list is Resharper. Which is weird since Resharper does show up in the online gallery. As you can also see from the image above is the that it is hard to see which extensions are free and which aren’t.

Read More...

Calculating Fibonaci numbers with .Net 4.0’s BigInteger

In .Net 4.0 we now have a BigInteger to play with. This is how I used to do it as can be seen LTD Puzzle 5: Calculating the Fibonacci Sequence. Module Module1 Sub Main() Dim x As Double Console.WriteLine("Give the number to create") Dim input As String input = Console.ReadLine() If Double.TryParse(input, x) AndAlso x > 2 Then Dim y As Double Dim oldz As Double Dim z As Double = 0 Dim newz As Double = 1 Console.

Read More...

Debugging 64 bit SSIS packages

If you ever try to debug a script task by setting a breakpoint and the package is on a 64 bit machine it will just ignpore the breakpoint. I ran into this problem myself a while ago and this week a co-worker also ran into it and asked me how to resolve it. It is pretty simple, all you have to do is click on Project, then select Debug Properties. Under Configuration Properties, click on Debugging.

Read More...

SQL Saturday New York City recap

Yesterday was the first time I attended a SQL Saturday event. The event kicked off with a keynote about SQL Server 2008 R2 by Roger Doherty showing some of the things that are in this new release. The sessions were held in five difference rooms and sometimes it was a tough decision deciding what to attend because there were five concurrent sessions. I attended five sessions, some sessions were slides only, some were code only but the majority of the sessions were slides and code.

Read More...

Stripping rows out of file imports

Scott Stauffer (blog | twitter) asked a question on #sqlhelp a few days ago and thought I’d go into actually doing an example on the task he was trying to accomplish. Below is a snapshot of the tweet. My first thought was to throw in a script component to transformation. With each row input into the buffer the row could be parsed to validate the header. If the unique pattern in the string was found, then lock a variable and assign the value to it ## Let's get some things out of the way The script component will read every row.

Read More...

Linq to nHibernate why you should always check the sql it produces.

Today I was doing some LINQ to nHibernate and I came to this statement. Considering that I used a Person class that looks like this. ```vbnet Public Class Person Private _lastName as String Private _id as Integer … End Class``` And what I wanted was the lowest Id number for all people that were named like me. Because I am sure I will always have the lowest id. In SQL that would look something like this.

Read More...

Do you use disable index or drop index when running your ETL processes in SQL Server

There are certain operations where dropping an index, loading data and then again creating the index can speed up data loading. SQL server 2005 introduced a way to disable an index. Let’s take a look, first create this table Create table TestIndex (id int, somecol varchar(20)) Insert a little bit of data insert into TestIndex select number,CONVERT(varchar(20),getdate(),100) from master..spt_values where type = 'p' Create a nonclustered index create index ix_TestIndex on TestIndex(id,somecol) Now let’s disable this index

Read More...

There Is Never Time For ... (Part 3)

Our ticket counts are down, the systems are failing less often, and we’re reporting regular corrective actions to the business instead of just patches. Fixing issues as they occur, even root cause correction, is a process of stabilization. I’m not sure about you, but I don’t like aiming for average. This is the third article in a three part series on major gaps that we never seem to have the time to address as well as ideas on how to overcome and initiate processes for closing or reducing those gaps.

Read More...

The Measurement of Success – SQL Saturday Chicago

“If I have been of service, if I have glimpsed more of the nature and essence of ultimate good, if I am inspired to reach wider horizons of thought and action, if I am at peace with myself, it has been a successful day.“ –Alex Noble The above quote from Alex Noble could not describe how I perceive the success of SQL Saturday in Chicago enough. The day after the event I sat at my desk looking out of the window recapping the day.

Read More...