Welcome to MSDN Blogs Sign in | Join | Help

January 2007 - Posts

SYSK 277: How-To Bring Back the TrustedInstaller

Are you getting ‘Unable to save permission changes on file_name. Access is denied.’ e rror messages trying to modify a file or change permissions on a file that has TrustedInstaller as its owner? I’ve seen suggestions on the Internet recommending taking
Posted by irenak | 12 Comments

SYSK 276: Are These “Requirements” or “Desirements”?

I’m sure we all have dealt with business stakeholders that want it all in the next version... This idea was well captured in the image below copied from a presentation by Dan Rawsthorne (Net Objectives): But did you know research shows that 60% of features
Posted by irenak | 1 Comments

SYSK 275: Pagination in SQL – Easy!

Unfortunately, it’s still a common case that the pagination logic resides in UI… Why I say ‘unfortunately’? Because by making this design choice, you have: Used up bandwidth transmitting the data that may never be seen by the end user. Potentially, are
Posted by irenak | 6 Comments

SYSK 274: How to Implement a Serializable Type with Read-Only Properties

There are times when you want to assure that two or more properties are always in-sync. Common examples include a class that represents id/name pair, e.g. Status with ID and Description properties, or Product class with product id and name… The point
Posted by irenak | 0 Comments
Filed under:

SYSK 273: How to use the latest version of Visual Studio and build your project targeting earlier version of .NET framework

First, little explanation for what prompted me to write this post… It came to my attention that some teams dedicate a build server for each Visual Studio/.NET framework combination, i.e. they don’t upgrade Visual Studio (or the build tools) because they
Posted by irenak | 7 Comments

SYSK 272: Excellent 11 min video about WPF – what it is and how you can use it today in your applications!

Get an overview of WPF controls, supported layouts (StackPanels, WrapPanel, DockPanel, Grid) clearly demonstrated via easy-to-understand images, vector graphics usage and what it means, text support (fonts and much more), document support (layout, scaling,
Posted by irenak | 1 Comments
Filed under:

SYSK 271: A Better (?) NameValueCollection Class

In spite of its generic name-value collection name, the System.Collections.Specialized.NameValueCollection class only deals with string keys and string values. In most cases, a string key is just fine… but to force the value to being of string type only,
Posted by irenak | 2 Comments

SYSK 270: How to implement C++’s typedef in C#

C++’s typedef declaration creates a new name (an alias) that, within its scope, becomes a synonym for the type given by the type-declaration portion of the declaration. The syntax is as follows: typedef type_declaration synonym; For example, in C++ one
Posted by irenak | 1 Comments
Filed under:

SYSK 269: XBAP Introduction

We live in the world where if you don’t know the lingo, you’re not an equal member of the worldwide software developers’ guild. So, what is XBAP? First, make sure you know that is WPF… As a quick refresher, WPF stands for Windows Presentation Foundation
Posted by irenak | 1 Comments

SYSK 268: You Know Your Project Is Not Agile If…

While the Pete McBreen’s article is not funny as Jeff Foxworthy’s “You know you’re a redneck if…” series, in my opinion, it’s a must-read for software developers thinking about or using agile development practices. Check it out at: http://www.awprofessional.com/articles/printerfriendly.asp?p=25913&rl=1
Posted by irenak | 0 Comments

SYSK 267: How to bypass YourGenericClass<T> where T : ValueType constraint restriction

Problem statement : create a general purpose status history class that is a collection of status history items sorted by time stamp. Each status history item must include a status code, updated-by-user string and updated-on time stamp. Important : the
Posted by irenak | 0 Comments
Filed under:

SYSK 266: SOA Versioning Best Practices and on the Importance of Using Nullable Types and IExtensibleDataObject Interface in Data Contracts

“Interfaces are immutable…” Yes, we’ve heard that for years... The reality, however, is that contracts, both -- service and data, do change as more requirements are discovered, etc. Moreover, it’s not reasonable to expect that all clients of your V1 service
Posted by irenak | 1 Comments

SYSK 265: Thought Provoking Statement About Design by Douglas Martin

“Questions about whether design is necessary or affordable are quite beside the point: design is inevitable. The alternative to good design is bad design, not no design at all. Everyone makes design decisions all the time without realizing it ­ like
Posted by irenak | 0 Comments

SYSK 264: Restricting Item Types in Generic Collections

Say, you have implemented the following data class called Message in a YourCompany.DataContracts.Shared assembly (code below). When creating a collection of messages class, some may choose to implement it similar to the code below: [DataContract(Namespace
Posted by irenak | 0 Comments

SYSK 263: .NET Stored Procs Do Not Execute in Parallel using MARS

The http://msdn2.microsoft.com/en-us/library/ms345109.aspx article has the following note in the Interleaved Execution section: “Stored Procedures written in any of the .Net languages will not interleave while managed code is executing. If the inproc
Posted by irenak | 0 Comments
Filed under: ,

SYSK 262: Lowest common denominator? No – interfaces offer a superior solution!

The other day I saw some code from a vendor (who will remain unnamed) that prompted me to write this post… The aforementioned vendor has a product that works on many relational databases, including Microsoft SQL Server, Oracle, etc. The product is written
Posted by irenak | 2 Comments

SYSK 261: Investigating Blocked Processes in SQL Server

Imagine, you execute who_is_blocked stored procedure and get a list of the blocked resources, the databases involved, the requesting and the blocking session ids, and the request mode. With that information, you can choose to terminate the blocking session,
Posted by irenak | 0 Comments
Filed under:

SYSK 260: Custom Configuration Settings Just Like Ones Used in .NET Framework Classes

.NET 2.0 settings designer that generates a strongly typed class representing the applicationSetting and userSettings sections is a great improvement over the old appSettings or custom xml serialization code… But, sometimes you just need a bit more… If
Posted by irenak | 0 Comments
Filed under:

SYSK 259: Is ‘internal’ class modifier a sufficient level of protection?

So, say you have a class that you’d like to make sure that nobody outside of your company (or your product/project team) can use. As an example, I’ll use an encryption class (see below) with Encrypt and Decrypt methods: internal class Encryption { internal
Posted by irenak | 3 Comments
Filed under:

SYSK 258: dr[columnIndex] or dr[“ColumnName”]? The cost of field name lookup…

Are you still debating whether the performance benefits of dr[columnIndex] outweigh the benefits of readability and maintainability of using dr[“ColumnName”] instead? Then, read on… When using SqlDataReader class, the difference between getting data by
Posted by irenak | 8 Comments
Filed under:

SYSK 257: .NET way to analyze SQL data I/O performance

Would you like to know how many server round trips it took to retrieve your data using ADO.NET? Would about the number of bytes sent and received? Total connection time? Command execution time? Number of returned rows? Welcome to the System.Data.SqlClient.SqlStatistics
Posted by irenak | 0 Comments
Filed under: ,
 
Page view tracker