Hey all

 

One year has passed!!! And we are still here!!! We started back there in January 13th with 6 visits and went on to have over 1000 visits daily, From 0 RSS readers to around 900 From 0 posts to close to 200, from 0 comments to over 1800.

 

Indeed it was a great year, and we are looking forward to the next one!

 

Thanks to everyone who read, commented, and participated.

 

Here are the stats for 2008:


Continue Reading...

Lately I was working on an application that had to display a large amount of objects on screen and allow filtering. I have learned that scrolling large collections was not so simple in WPF, and I definitely did not see the problems coming.

 

Memory Consumption

 

Here is an example of a simple WPF application which randomly creates 50000 Classes of type DATA in a list and displays them in an Item control:


Continue Reading...

Getting an array length in C# is a trivial task. All we need to so is call the Length property of the Array Class:

int[] arr = new int[17];
int arrLength = arr.Length;

 

Getting an array length in C++ might be less trivial:

int arr[17];
int arrSize = sizeof(arr) / sizeof(int);

Notice that sizeof(arr) returns the array size in bytes, not its length…


Continue Reading...

We have been looking at all the parts that make a sample ASP.Net MVC application. Previously we have discussed the database schema of our application as well as implementation of the Repository Pattern with filters on that schema. If you haven’t been following this series of posts you might want to read parts 1 and 2 before continuing. Url Routing has become a very common these days. In fact, at least among the websites I visit, it has become more common than not routing urls.


Continue Reading...

Here we are talking about filtering list items again :). I got two comment suggesting the use of yield return.

James Curran said:

Don’t build a new list if you don’t have to.

private static IEnumerable EvenSlicker_FilterPositiveItems(IEnumerable t)

{

foreach(int n in t)

if (n > 0)

yield return n;

}

The advantage is if you try using the method this this:

foreach(int n in FilterPositiveItems(myList) {…}

Your way is O(2N) while mine is O(N)


Continue Reading...