Copy linked files in VS

Adding linked files in visual studio makes the files take part in the build and in the vs edit but it does not actually reside in the local projects folder.

JavaScript Garden

Good resource: JavaScript Garden is a growing collection of documentation about the most quirky parts of the JavaScript programming language.

Chrome new window focus

Start Run Chrome does not focus the new window.

Remove ASP.Net and IIS headers from HTTP response

There are 4 headers that should be removed.

Foundation Sass in Visual Studio 2013

Get started with Foundation Sass in Visual Studio

VS lowercase menus

VS2012+ uses uppercase menus which is not so nice...

IIS7+ HTTP redirects

Serious UI flaw in IIS manager HTTP Redirects.

Anyone who thinks clearly can write clearly

Some thoughts on writing. Having an idea or want to create something? Writing it down is the first step to refine it and testing it.

Doing CSS a better way

I did some research and wanted to start doing styles in a better way. This is some notes on what I did. It's Sass, Compass, Sublime and Tincr.

Reset an identity column's seed to 1

Cant truncate table because of FK:s? Delete all rows. Then use this script to reset identity seed to 1.

Digital Analytics - some notes during the Google Academy course

Some notes ant thought taken during the Google Academy Digital Analytics fundamentals course.

SSMS refresh auto-complete cache

Did you ever change the schema in SSMS and the queries gets red-underlined as the syntax is errorous cause the "spell checker" does not have the altered schema information?

DKIM, SPF, SenderID, Domain Keys, ohh! SPAM DNS tricks for your sent e-mails...

Validate your DNS settings with regards to anti-spam techniques (DKIM, SPF, SenderID, Domain Keys).

DNS: how, why and its UX/performance impact

This article is a very detailed comparison between DNS hosting providers and also gives a good understanding why DNS servers matters to your sites UX/performance.

SpecFlow 1.9

Finally a new version of SpecFlow is out.

CS9 release is a Big Update for ConnectionStrings.com

A week ago the new release of ConnectionStrings.com were deployed to public. There's some exciting changes out in there.

BOM in the UTF-8 encoded Robots.txt

SYNTAX NOT UNDERSTOOD. Robots.txt is supposed to be encoded in UTF-8. Search engines might get confused by a BOM in the beginning of the file, causing incorrect disallowance behaviour.

Developing for HTTPS & SSL locally

Its not obvious how to develop and secure websites with SSL and HTTPS.

Office on Lindholmen

From the centre to the IT centre. Lindholmen.

RavenDB entity Id as string

Internal RavenDB storage treat entity Id as string like "Posts/12". This conflicts with ASP.NET MVC routing (mind the slash in URLs).

RavenDB index projections and map/reduce

Getting a grip on the different type of indexing/views options and what's going on under the Raven hood isn't that obvious.

Bye bye "MapRoute", long live Attribute Routing

In ASP.NET MVC there's basic convention based route maps by adding MapRoute calls to the RouteTable. This is counter intuitive and provides little features.

Wisdom of Crowds

Applying ranking algorithms to deliver true representations.

ASP.Net MVC Routes

Routing can be tricky when app is growing.

Lazy component injection

Ever felt it's a waste when injected components aren't used in certain execution paths?

Slice business logic into bounded contexts

Domain model objects are extended with business logic that are valid in only certain contexts.

GREEN IT with bundling, minification and CDNs

Making greener IT and more performant UX by keeping net utilization low.

How technology influences DDD

Eric Evans on How Technology Influences DDD

Validation in RavenDB

Define validation for entities and use RavenDBs IDocumentStoreListener to hook validation rules at a .SaveChanges() level.

BDD and UAT with SpecFlow and WatiN

An introduction to Acceptance Testing, Gherkin, SpecFlow and WatiN.

RavenDB exclude property

I have a document model to store in RavenDB but I don't want to store a calculated property. How do I tell RavenDB to ignore this property?

DDD - Modelling Aggregates

-Modeling of an aggregate. -How different aggregates relate to each other. -The discovery process.

Kontorsplats Göteborg Kungsgatan 4

Har just flyttat in på ett nytt kontor och har en plats för uthyrning.

Comprehensiveness is the enemy of comprehensibility

All models are wrong, some models are useful. Some parts of us tell us to fill in all the holes in a model to make it "complete". This is a natural instinct. But this is often counter productive.

Singleton Pattern

Singleton pattern with lock

Lean Priority

How to prioritize according to LEAN methodology

Kanban intro

Short intro video to Kanban (in Swedish)

IEnumerable or ICollection or IList

A list is a collection who is enumerable

Re-map an existing database user to an existing SQL Server login

After a database restore the database will have its user but the SQL Server login havent't been created. Fix the mapping by adding the SQL Server login and then map them together using sp_change_users_login sproc.

Reference vs Value in WCF

WCF turns referenced objects into value data by default. This is a behavior that can cause trouble and decrease performance. Learn how to define reference or value style navigation for your serialized data.

Use the smallest SQL Server datatypes for great performance

A lookup table with 10 records can have a PK of int or tinyint. Thats 3 bytes in difference. A 1 million record table referencing that table will then use either 4,000,000 or 1,000,000 bytes. That column will probable be part in an index. That index tree will be bigger and take more time to process, and using more RAM and CPU. Query will take longer and tables are locked a longer time. It is easy to choose a smaller datatype and you will gain much performance from doing so.

Seminar summary: .NET Software Development Best Practices

Cornerstone arranged one day seminar focusing on several aspects of software development. Continuous Integration, Aspect Oriented Programming, Maintainable Code, Behavior Driven Design, Dependency Injection patterns, Unit Testing and Test Doubles (inc mocking).

Keep SQL DML simple and free from any kind of logic

Let SQL Server be able to process data as effective as possible and do not confuse the optimizer and query plan caching mechanisms with logic in your SQL code.

ISO Week in SQL Server 2008 DATEPART fx

Finally we got it... This will make working with weeks in Europe a lot more easy.

List of strings into a comma separated string

Convert a sequence of strings into one string with a delimiter separating each projected string element.

Conditional Operator and Null-Coalescing Operator

Two "no need for if"-operators to remind of.

Time to move to EF?

With all new 4.0 releases the Entity Framework is heard to be mature enough with it's new POCO support.

Pretty syntax highlightning for online code snippets

Highlight keywords and display code on the web.

ASP.NET MVC 3 RC released; partial page output caching

Yesterday the release candidate for ASP.NET MVC 3 was released.

Convert string with integers into an int array

Comma separated list of integers converted into an int array using C# and LINQ.

Value types and Reference types

There's two type of types in C#. Value and Reference types. Too many developers miss to understand these concepts resulting in misunderstanding and logical errors when copying variables or using function parameters etc.

An MVC 2 sample implementation of Dependency Injection pattern

The Dependency Injection pattern brings huge positive effects on your design and code maintainability. But how to implement it correct?

Chrome slow on localhost

When browsing a localhost website, such as VS Development Webserver Cassini, with Chrome, requests are processed very slowly.

Left Join LINQ equivalent

A left join in L2S. Also replacing missing joined table column null values with -1 to fulfill type requirements (int can't be null).

Convert an IP address string to an integer

IP addresses are really 4 byte integers. This function converts an IP string like "192.168.0.1" into its numerical equivalent.

Transfer SQL Server Database

Transfer both schema and data using the database publishing wizard and sqlcmd. But where is the Database Publishing Wizard for SQL Server 2008. And what to do when the generated script is huge?

Remove the time portion from a datetime

Instead of converting datatypes (to varchar) back and forth, this is much faster.

Sleep in T-SQL

Make the execution of an SQL script sleep for a certain amount of time.

Comma delimited string from row values using COALESCE or FOR_XML

This is how to get a comma delimited string from row values using COALESCE or FOR_XML

Execution time and IO for SQL Statements

Display stats for individual SQL execute statements.

Request.ServerVariables Website with DDD and MVC - Repository - Service pattern

Working on a design pattern sample solution RequestServerVariables.com that's simple enough for testing some ideas and an in memory repository pattern.

Orchard database lacks referential integrity

I took a quick look at the schema of the Orchard database. There's some tables there but it seemed to lack any FK constraints.

Orchard blog module seems okay

Setting up Orchard CMS in progress.