Banner Zenit, Scientific & ICT Services

16-June-2006

Correcting the programmer
Corrigiendo al programador

Javier Gutiérrez Chamorro (Guti) in  Bitácora de Guti writes that after his article  Bucles invertidos  (Invested loops) he was surprised to see that the Visual C++ v 7.1 (2003) optimizer converts the code:

    unsigned int I;

    for (I=0; I<100; i++)

    {
    }

into "nothing". Even more surprising is that it converts:

    unsigned int i;
    for (i=0; i<100; i++)
    {
    }
    return(i);

into

    mov     eax, 100
    ret

which is the equivalent in C++ of:

      return(100);

So the optimizer has detected code that is poorly written and corrected it. We should see the new class of compilers that are coming on the market, such as GCC 4 , Visual C++ 2005 , and Intel C++ 9 being even more intelligent..

ARP and the strategy of the ViewLocator pattern
ARP y La estrategia del patrón ViewLocator

Carlos Rovira in carlosrovira.com writes on the ARP ( Open-Source Best-Practices Pattern-Based Rich Internet Application (RIA) Framework) and demonsrates how to use ViewLocator.

Return to Extracts from Planeta Código

TrickyDicky


© 2005-6

Home

[Image]