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.

A Quick Beginners Look at SEO

As technical people in a field that is expanding daily, we all run into areas that we know poorly, or haven’t been able to refresh our knowledge on this decade. For me, and I’m sure many of you, SEO is one of those topics that fell by the wayside. Sure, I remember circa-1998 tips on getting the search engines to rank your site more highly, such as making sure my meta tags are filled in, using terms frequently that you want to attach to your key search values, even trying to keep the content-to-crap ratio as high as possible.

Read More...

F# Asynchronous Workflows

Asynchronous work flows are a very powerful tool in programming. They allow your threads to do other work while you wait for results from a long running piece of work. How would you write an asynchronous work flow in C#? Logically you might consider chaining together callbacks. <span class="MT_blue">new</span> Client().Connect(settings, (c1, ex1) => { <span class="MT_green">// prepare data to send</span> c.Send(sendData1, (c2, ex2) => { c2.Receive((c3, dt1, ex3) => { <span class="MT_green">// parse data and prepare response</span> c3.

Read More...

Using schemas to maintain order as a DBA

Chaos or order? Managing objects in large and small installations of SQL Server can be a job in itself at times. In particular, for the DBA, objects we create on the instances we manage more often than not are found littered over the user and system databases. These objects more often are found in the master database in SQL Server. Really, why not put them there? We are the “masters” over the database server right?

Read More...

Calculating number of workdays between 2 dates

Today I saw someone asked a question in MSDN t-sql forums “How to calculate the number of working days between two given dates”. I found this very interesting, since we can solve this problem by using a very simple and methodical approach and by using an unorthodox approach. I will explain both the approaches. **1. By Using Auxilary Calendar Table Based on the weekdays of start date and end dates.

Read More...

SQL Server Proper Case Function

SQL Server (T-SQL specifically) is not usually the best place to write a function for modifying the case of your data. String functions are generally slow and often a bit cumbersome to implement. That being said, it’s not uncommon to have data in your tables that needs to be “cleaned up a bit”. In situations like this, it is acceptable to write and use a function like this. With SQL, it is easy to convert strings to upper case or lower case, but what about making it mixed case/title case.

Read More...

StructureMap, Windows Forms, User controls and BuildUp

For my usercontrols I tend to use the StructureMap BuildUp feature. I will leave it to the big man himself to introduce you to this feature. I use property injection in this case because the designer doesn’t like usercontrols that have constructors that are not empty, since it will try to execute the code in that constructor. So we revert to property injection and the BuildUp feature. I did say revert because I don’t think this is the best solution.

Read More...

VMWare Workstation 6.5 and the weird network problem.

I kinda like my VMWare Workstation 6.5 (soon to be 7.0). I always have at least 3 VM’s running. But I seemed to have some intermittent network problems. I use Bridged networking because that’s what I need. Most of my VM’s have a static ip so no problems there. The problem usually happens after I force a close on a VM because sometimes they crash without asking me. And then a weird thing happens.

Read More...

Table sizes

I do not know if there is already code for table sizes (as used in SQL Server 2008 reports) but what I’ve seen on the net people are using cursors and temporary tables (completely unnecessary). NOTE (added later): In order to update table sizes in sys.dm_db_partition_stats you can execute next DBCC (all tables for current database): DBCC UPDATEUSAGE (0) WITH NO_INFOMSGS, COUNT_ROWS ;WITH SpaceUsage AS ( SELECT s.Name + '.

Read More...

Mirroring: Witness misconceptions in High-Performance

Concepts in Mirroring I wanted to start writing a series of blogs on mirroring to share what I’ve learned over the years since SQL Server 2005 gave us the ability to setup mirroring for High Availabtility (HA). Before we go into that I want to go over the operating modes that we have in mirroring. We truly have two configurations for mirroring, Asynchronous and Synchronous. These are better known as operating modes High Availability, High Performance and High Protection.

Read More...

SVN and treeconflicts

Yes, I still use svn and yes perhaps I should try that Git thing people keep talking about. But anyway. Since this post is for my pleasure and my pleasure only I will post a little something to remind me how to solve those tree conflicts. Because I keep forgetting how to do it. First of all I get a message on commit saying there is a tree conflict. Than we do an update and forget to take a printscreen.

Read More...