Let’s talk about context and perception

The value and importance of perspectives

Advertisements

High Cohesion, Loose Coupling

We are living in a time where businesses and the people running them often change their mind. I won’t be going into details of why is that so, let’s just say it is a given, and let’s say they are right. It gives them the competitive edge when they are flexible. It is on usContinue reading “High Cohesion, Loose Coupling”

The Story of the Modern Day Developer

Software Developer, a “Programmer” even an “Engineer” or a “Craftsman“, although there are substantial differences between these according to some people, when we say any of them we mean one thing….an organism that transforms coffee into code 🙂 so I will continue with the term “Developer” and I wouldn’t like to go into that discussionContinue reading “The Story of the Modern Day Developer”

Sql Server: datetime vs datetime2 recap

The MSDN documentation for datetime recommends using datetime2. datetime2 has larger date range, a larger default fractional precision, and optional user-specified precision. Also depending on the user-specified precision it may use less storage. Furthermore, datetime2 has a date range of “0001 / 01 / 01” through “9999 / 12 / 31” while the datetime typeContinue reading “Sql Server: datetime vs datetime2 recap”

Get all stored procedures related to a table

To get all stored procedures related to a table: Option 1: SELECT DISTINCT so.name FROM syscomments sc INNER JOIN sysobjects so ON sc.id=so.id WHERE sc.TEXT LIKE ‘%tablename%’ Option2: SELECT DISTINCT o.name, o.xtype FROM syscomments c INNER JOIN sysobjects o ON c.id=o.id WHERE c.TEXT LIKE ‘%tablename%’

Sql Server: Delete duplicate rows with CTE

Here’s a code snippet to remove duplicate rows in a table: WITH CTE (Column1, Column2, DuplicateCount) AS ( SELECT Column1,Column2, ROW_NUMBER() OVER(PARTITION BY Column1,Column2 ORDER BY Column1) AS DuplicateCount FROM TheTable ) DELETE FROM CTE WHERE DuplicateCount > 1 GO More on Common Table Expressions(CTE) can be found here: http://msdn.microsoft.com/en-us/library/ms190766(v=sql.105).aspx

Sql Server: Get all tables containing column with a specified name

A little helper query I came accross, very useful if you want to find all the tables that contain a specific column: SELECT c.name AS ColName, t.name AS TableName FROM sys.columns c JOIN sys.tables t ON c.object_id = t.object_id WHERE c.name LIKE ‘%ColumnName%’   What it basically does is that it will do a join onContinue reading “Sql Server: Get all tables containing column with a specified name”

Test Driven Development

It is pretty hard writing an article on something that so many super cool authors have written books about. But, as I said it is my own experience learning and embracing TDD that I want to share here so that maybe I can help someone out there that can relate to this. And also IContinue reading “Test Driven Development”