Showing posts with label Coding Techniques. Show all posts
Showing posts with label Coding Techniques. Show all posts

Tuesday, 30 April 2013

String Interning


The most used (and misused) data-type in most applications is the String! Their properties let us leverage on many aspects of coding.

Here, we’ll discuss about the way Strings are stored in the memory and how they can be allocated efficiently!


Monday, 1 April 2013

Reference Type and Value Type Variables


It always pays to know variable-types better. Some are mutable, and some are immutable, and what not!..

Here, we’ll perform an equality test on different types of variables using the == operator, Equals function, and the ReferenceEquals functionality.


Sunday, 31 March 2013

Stringed Numbers


Doing computation over numbers stored as strings can be challenging. Finding the sum or max among all numbers stored as strings would be easy, but sorting the “string” numbers without type-casting them to integer/double is tricky.

Here, we’ll see how Anonymous methods come to the rescue for sum & max operations and Sort & OrderBy functionality for sorting “string” numbers.


Monday, 25 March 2013

Effective Data Validation


Data Validation is a very important task to ensure discrepancies don’t creep-into when you make valuable information out of them.

Here, we’ll know how to ensure the correctness of data retrieved as strings that hold numbers in them.


Monday, 18 March 2013

Thread Safety


Multi-threaded applications give a big boost to Code’s Performance and Scalability. But often times we need to be careful while using Thread-unsafe collections in these scenarios.

Here, we’ll know how to ensure proper dynamic allocation of memory to thread-unsafe collections and to perform Thread-Safe updates in them.


Sunday, 17 March 2013

Array Resizing Optimization


Optimizing your C# code is fundamental for improving your Application's Performance and Scalability.

Here, we'll know the performance optimization involved when we explicitly specify an approximate size of the C# collection during its declaration.