umer_a umer_a Mario be on XBOX one day.

Niner since 2008


Thread Replies Latest activity

C# Flickr Tutorial



  • ARCast.TV - Juval Lowy on Interface Based Design

    Very subject to critcism and not commonly used or recomended, C++ had the rich feature of supporting multiple inheritence so there is no need to go a step back or a step aside and yet introduce interfaces [and probably rename the language C+-].

    Any one who has ever succeeded in developing a concrete application using multiple inheritence can name a lot of drawbacks in using interfaces to acheive same functionality. Like in the case of c#, the need to define interface members (i.e. overriding functions) in every class that implements the interface.  For 100 such classes implementing an interface, 100 seperate implementations for each method, required. At least multiple inheritence can reduce the number of override(d/n) functions to ensure some code reuse. If somehow interfaces are not limited to abstract definitions,......

  • C9 Bytes: SQL Server Rank() with Stephen Forte

    A great option that must appear in SQL standard as well and perhaps thats why its not implemented by other RDBMS vendors, in an effort to keep the SQL staement set as close to the standard as possible.

    Same functionality can be introduced in most databses through a series of SQL statements or as an embeded function.

    Unless part of SQL standard, even such good additions come at a price. In a query intensive environment, where a person is likely to enter more than 5-10 rank queries per day, likt the Olympics case for instance, if the underlying database is changed to or changed from SQL server, he is likely to find himself in trouble while adopting to changes.

  • MSDN/TechNet Site Redesign: More Useful, Better Experience and Search Really Works :)

    "CHM basket" tool allowing user to add favorite articles to the basket and generate a chm file when desired.
  • Expert to Expert: Contract Oriented Programming and Spec#

    littleguru wrote:
    Still, you didn't answer the question on S_OK and S_FAIL and therefore I will tell you what they are: S_OK == 0 and S_FAIL == 1 - interesting, isn't it?

    Smiley this is platform specific code, or constants defined on a specific platform, the same constants may have different value in C/C++ compiler running on Linux/Solaris or some other platform or they might not exist at all. We were never interested in win32 or platform specific discussion, here.
  • Expert to Expert: Contract Oriented Programming and Spec#

    That was about compiler efficiency and intelligence, i.e.,  a compiler intelligent enough to assume certain conditions. You can say limiting a programmer creativity by restricting to a certain struct like bool or allowing him the choice of using bool if required.

    The code provided requires two explicit test conditions to be entered in Java/C# compilers and your question will still remain unanswered.

    if (S_OK)
    else if (S_FAIL)

    In Java/C#

    ....;  //get some value for x somehow
    if (x==S_OK)
    else if (x==S_FAIL)

    In both versions, you cannot answer unless you have some hint on constants, but at least one extra statement and two explicit test conditions due to developer in Java/C# version.
  • Expert to Expert: Contract Oriented Programming and Spec#

    Intersting Stuff. The media length looked too much but it was a short discussion at the end with many things left unaddressed.

    Handling Overloaded Function

    For overloaded function(s), there must be a single case specification, or each function must be addressed seperately.

    Moreover, Unlike Java, C# allows funtion overloading based upon return types, which When called in code, tend to confuse reader/compiler.

    For example,to multiply 2 integers, a class can include following overloaded functions:

    int mult(int, int);  // call if result is less than max (int), return int
    long mult(int, int);  // call if  max (int) <=result<=max (long), return long
    float mult(int, int);  // call if  max (long) <=result<=max (float), return float
    double mult(int, int);  // call if  max (long) <=result<=max (double), return double

    Compiler Intelligence conflicting software design principles

    This is a Programmer responsibility and Compiler responsibility case, that is, what a programmer need to specify and what a compiler must assume.

    This C/C++ code is self explanatory without any documentation/comments

    unsigned x=[some expresion];
    if (x) 

    The C/C++ compilers are intelligent enough to assume that condition will execute if x is a positive integer, and Java/ C# compilers require an explicit condition for that adding burden to programmer.

    A fun case

    As discussedm, Spec is applied on C code to catch/handle every possible case. Learning the languaage, this is the first piece of code developers eneter:

    #include <stdio.h>

    int main()
     printf("xyz"); //xyz can be any string
     return 0;

    Going deep in the language, at a stage programmer discover that printf() in fact returns a value, which is usually a positive integer but in the most rare case, it can be negative indicating an exception. Applying spec on rare cases like this, perhaps once in a lifetime sort of case...

  • Doug Hodges: The history of Visual Studio ​Extensibili​ty

    C++ RAD in IDE..

  • Carolyn Napier: Developing for Windows and Playing Pro Football

    One question missing was women playing soccer alongside men as they do work in software development. In tennis there is such a competetion and Fifa can stage Women World Champions against the World Champions, Italy.

    If Mia Hamm and Del Piero can play on the same ground, the interest count can outnumber any release of Windows or Office.


  • Marina Polishchuk: VC++ QA - The best job in the biz

    The job title, "Software Development Engineer in Test" is in fact as ambigous as overloading a function on the basis of return type, which can confuse most compilers. In formal QA,

    SDE sitting in test?
    SDE operating in test?

  • Algorithms and Data Structures: Mike Swanson - Genetic Session Scheduler

    The first part of the problem is more like a taguchi's orthognal array sort,  which can be best solved by global optimization methods, although a greedy algorithm can be sufficient for an almost-optimal solution.