Tuesday, May 26, 2009

Plum Colored Bathroom Walls

DSL with C # / * 2 ยบ Part * /

Well up here we have entered minimally in the world of DSL, now see a little more in depth this fascinating subject.
If you think about it in the examples above we can clearly see that one of the important aspects of DSL is the understanding of the context. Just as in the past examples of people using the jargon of a particular language, those terms very particular that only had meaning for those familiar with that particular field, clearly comprehended the ideas they wished to convey, and they had a full knowledge of context so the DSL can avail of these properties and thus will be more like a code language human.
Now consider the following code, which corresponds to an order of pizza



   1:              static     void     Main    (    string    []     args    )   

   2:              {   

   3:                  pizza Pizza     =     new     pizza    ();   

   4:                  Pizza    .    size   =     pizza.   pizzaSize  .     girl;  

  5: Pizza    .   tomato     = true  ;  

  6: Pizza    .   olives   = false    ;  

  7:}    



This code can clearly see that the way to order a pizza in our code is very different from we can use our common language. DSL will allow us to use our knowledge of the context code. One of the important things you can get to involve the use of a reduced and more perished sintaxys the colloquial speech may be the elimination of noise or interference caused by the code that lies at the APIs that we invoke.
Well before seeing a bit of code, and returning to quote Martin Fowler, there are two types of internal and external DSLs. The internal DSLs are little languages \u200b\u200bdeveloped on top of other languages \u200b\u200b(most extensive in terms of the contexts that span). LINQ is a good example of an internal DSL because for example the LINQ syntax we use is a valid C # syntax, but represents an extended syntax for a domain and more specific. An external DSL describes a language created a lexicon and an interpreter determind where we create our own syntax. SQL is a good example of an external DSL, someone has written for SQL grammar and how to interpret the grammar in other executable code. Parsers and lexers are issues largely beyond the intention of this post. That's why we focus on the fascinating world of internal DSL for now. FLUENT

INTERFACES
A Fluent interface (or "fluent interface?, Certainly not if the translation is applied and did not see or hear the term in English yet), it is only common or regular code written in a way that remove the extra syntax and create sentences. In standard languages, standard 'means here that humans speak, a sentence or phrase or sentence (English sentence) is a complete unit of thought. A fluen interface, try to generate the same result by more sophisticated use of the syntax of a programming language.
For example, consider a different version of the code earlier pizza order


   1:              static     void     Main    (    string    []     args    )   

   2:              {   

   3:                  pizza p     =   

   4:                      pizza    .    describedAs   

   5:                      . Size     (    pizza.   pizzaSize  .  large   )  

  6:  . Tomato    

  7:  .   Olives  ;  

  8:  }  


This version is almost as concise as you can order pizza in English or any language normal, and so is still code C # valid, with some creativity. We can see as well as the attempt to create a Fluent Interface Unit of thought. In the above example we can only see the end of the use of the object code when it changes to another object of some kind, in contrast to the fluent interface version we get a complete unit of thought. While in ordinary language the dot indicates a complete unit of thought in the fluent interfaces use the semicolon (;) to finish a complete unit of thought.
The question that may arise to see this different way of writing the code, is why create a fluent interface eat this? If after all the first version of the code was very clear to any developer, but for any other person other than a developer of software and learn the syntax of C # first form can be a little more costoza to read and interpret than the second. As an example I will cite the example quoted by Neal Ford's article on which you base me to write this post, Neal tells us that in some occasion to work on a project about leasing rail cars, had test cases which had to setear complex objects with complex properties as well as the rail industry has elaborate rules about the use of certain types of cars, to check that they were testing the right characteristics of these cars are business analysts showed the code as follows:


   1:                  ICar car    =    new     Car    ();   

   2:                  IMarketingDescription desc    =    new     MarketingDescription    ();    

   3:                  desc    .    Type    =    "Box"    ;   

   4:                  desc    .    SubType    =    "Insulated"    ;   

   5:                  desc    .    Lenght    =    50    ;   

   6:                  desc    .    Ladder    =    true    ;   

  7:     desc.   LinningType   =   LinningType  . CORK    ;  

  8:     car. Description     desc =    ;  

  9:  



While this code is perfectly readable for us developers a long time analysts were trying to ignore the noise introduced by artifacts necesria of code. It was then decided to re write the code in an interface with fluen order to make the code more readable for analysts. This result can be seen here:


  1:    iCar car Car  =    .   describedAs  

   2:                      .    Box   

   3:                      .    Insulated   

   4:                      .    Length    (    50    )   

   5:                      .    Includes    (    Equipment    .    LADDER    )   

   6:                      .    Has    (    Lining    .    CORK    )  



The result was satisfactory, it is said in the article above. The slots in the fluent interfaces is not to make the code can be written by non-technical, but if you can read the code, it meant one less level of disengagement between developers and other people.
To conclude this first contact with DSLs, in my opinion it can be said that in essence mean a lot more than re-write our code with a different indentation, how powerful this form of writing code I think, lies in its concept, which will Beyond making the code more readable, and that gives us the opportunity to write our code so that this reflects A more natural way our thinking, as well as normal speech does with our ideas. This way of writing code more "natural" is one of the things that most attracts me personally the concept of DSLs. At the end of this post I'll paste the full code of the fluent interface pizza order to see how you can build in C #. For an upcoming post
leave the implementation of a complete example in C # from a fluen interface, to address the details of implementation so that implies.
(A code then order pizza) using
 
System;
using System. Collections . Generic ;
using System. Linq ;
using System. Text ;

namespace ConsoleApplication1

{public class pizza

{public enum pizzaSize { girl , large, medium
static} public pizza describedAs
{
get
{
return new pizza ();
}
}
public pizza Size ( pizzaSize sizeValue )
{
size = sizeValue ;
return this ;
}

public pizza Tomate
{
get
{
tomate = true ;
return this ;
}
}

public pizza Aceitunas
{
get
{
aceitunas = true ;
return this ;
}
}

public pizzaSize size { get ; private set ; }
public bool tomate { get ; private set ; }
public bool aceitunas { get ; private set ; }
}
}



  
[ TestMethod ]
public void TestMethod1 ()
{
ConsoleApplication1 . pizza p = ConsoleApplication1 . pizza . describedAs
. Aceitunas
. Tomate
. Size ( ConsoleApplication1 . pizza . pizzaSize . grande );

Assert . IsTrue ( p . aceitunas );
Assert . IsTrue (p . tomato );
Assert . AreEqual (p . size , ConsoleApplication1 . pizza . pizzaSize . great );}




Friday, May 22, 2009

How To Get Cheats For Gpsphone Pokemon Shiny Gold

DSL with C # / * 1 Introduction * No Party /

Domain Specific Languages (DSL) with C #.
When we hear something about insurance DSLs will be surprised to hear the merits of this, for now call programming technique, we shall see what we mean time, we hear something not right We understand that it is new and that seems to solve all our problems so you can even pay our mortgage, let us now that lurks behind all this. Recently reading an excellent article in the journal written by CODE Neal Ford, article inspired me to share this with you, the author made light on an issue that perhaps because of its novelty even keep some mystery. Let's see what the focus of the article about DSL.
During our recent (?) history of software developers modeled differently abstractions, irrelevant to a long history of this, but simply concluded that since about 20 years to the present day use objects, such as primary abstraction mechanism. This has been useful in the design theory of object-oriented software and tools derived have allowed us to build effective Menare software. While objects "work very well in almost all our problems," we are still adapting solutions for those cases in which objects and their hierarchical world can not live, this is the case for example of the consultations relational databases, so that we can not "fit" correctly the object-oriented paradigama. Looking
latter case in particular, LINQ provides an elegant solution to this problem. Precisely the latter is an example of DSL, ie a domain specific language, in this case to queries in a friendly manner say in C #.
From here we can find a first definition about DSL, then we can say that
language is limited to a very specific domain
. In essence DSL is another abstraction mechanism that allows very concise representations of complex data.
Let's see now some definitions that will be useful to better understand the theoretical concept behind DSL.

DSL and idioms DSLs
uses language as an abstraction mechanism in the way they use objects hierarchy. Now think a moment in the language we use to communicate, in this case English, both ends of the communication system should speak the same language, which is obvious, but if we go a few steps further we can see how to make communication be more flexible (and more efficient as a result), however, the flexibility of communication between sender and receiver can think that can be strongly influenced by the knowledge of both on a particular issue, when this knowledge includes specific terms that participants the communication recognize unequivocally and thus simplifies the process. What makes efficient DSL will see is the degree of parallelism is a technique of human communication we have tried to illustrate above and which we call jergua. For example:

  • A 5-3-1-1 arrangement is more defense than a 4-3-1-2.
  • little cannon, vigilantes and croissants.

Well now, what language is this?, English of course, but anyone who speaks English will understand the same? If we add to an athlete and an office both have the same idea of \u200b\u200bwhat to put with these phrases.
Well in the first case, we refer to a type of tactics provisions of players in a game of football (soccer). In the second case we refer to a type of food, this is a popular name these foods take Latin American countries like mine to Argentina.
However, in the first case if we have never played or seen a game of football (soccer) is very likely mean we understand that each of the numbers or because the first set of numbers indicates that it is more "defensive" than dispocicion second, it is likely that without concerted anything about this sport it is meaningless to us. And that's really the point, people create slang as a shorthand to convey in a few words of language, larger quantities of information. In the second case it is likely that if I go to a restaurant and ask for a coffee with 2 croissants outside of Argentina or a country that use this definition for this type of food, the waiter does not know that we are talking horns. Consider the following regarding the last example if you tell the waiter a set of instructions so that you can convey this to the cook and can cook my croissant to serve what I ordered, we may be too long and probably throw me out of the restaurant and me send to a shrink. All these examples represent jargon, common techniques for using a shorthand language so that people understand the talk and include more information in small sentences or less effort and more effectively. We consider these jargons Domain Specific Languages \u200b\u200b(after all we are using for a domain specific language).
Martin Fowler gives us a definition:
DSL is a limited form of a programming language designed for a special class of problems.

He adds to this another useful definition of "programming with object-oriented languages \u200b\u200bis a general style of development which operates about the idea of \u200b\u200bbuilding software around a set of DSLs.
With these definitions in mind and with the examples discharges, will be discussed in next post we get into the world of DSL.
wrote back to me a lot.
Greetings all, do not miss the end of the 5th season of LOST!

How Much Is A Citrine Worth

personal Apostille Section

Personally, I'll post a few lines to apologize for the long absence, personal problems and other obstacles, made in these long months could not include even a few lines in this blog. I'm back with a lot of information to share. Greetings to everyone.

Friday, May 8, 2009

Soul Eater Love And Power Foll Color

What is Biodiesel?

The Biodiesel is an organic fuel obtained from vegetable oils and animal fats. Commonly used and some sunflower seeds or grains. Since it is obtained from renewable sources and decrease domestic dependence on oil to create fuel, resulting in less CO2 emissions.

Its properties are virtually the same as regular diesel. Biodiesel can be used in any diesel engine and since it is biodegradable and nontoxic, is a good alternative to diesel common. Another advantage is that biodiesel reduces engine wear and longer if life.

Since Biodiesel is more viscous, it can be used directly in engines, which is usually mixed with other substances to reduce its viscosity. For

summarize the Biodiesel is one of the best alternatives in addition to ethanol to replace petroleum fuels. Some of its most important advantages are: * It is biodegradable


* is less volatile than common diesel, which makes it safer to transport
* is obtained from renewable sources
* Non-toxic and reduces CO2 emissions



soon be writing about the methods of manufacture of biodiesel, for now I hope this information is helpful, and do not forget to comment and leave your suggestions and questions.

Can Wearing Tight Underwear Make Penis Smaller

Renewable Energy and the Economic Crisis


We are all aware of the economic crisis that now affects everyone, some countries more than others, but affects everyone in some way. It makes me wonder if this crisis affect investment in renewable energy projects.

I began to investigate the matter and found that not long ago following the March 5 to be exact, the New Energy Finance reported that due to the crisis, investment in developing cleaner energy types has been greatly reduced and stopped be a major concern in the agenda of governments.

the New Energy Finance also said that investments in clean energy rose between 2004 and 2008 of 34,000 million to 150,000 and it was estimated that by 2020 would be 500,000 million dollars, but the reality that is facing right now will not happen indicates that the 350,000 million, which is over 20% less estimated.

Source: Blue Planet

Sunday, May 3, 2009

Military Tortur Electro

The Eco House of Panasonic


Panasonic has submitted the idea of \u200b\u200ban eco-housing & You Eco House. You can visit the Panasonic Center in Tokyo Tech, and according to the company this apartment is 70% more efficient than a similar conventional. How have they achieved?.

Besides using low-energy lighting, appliances used efficient and low consumption (some developed with novel ideas such as a washer with a tilted drum that allows a saving of 30% in water consumption, or a shower that sprayed water) insulation systems have generation and counting photovoltaic panels, among others, the house is "fed" town gas and hydrogen.

city gas fed boiler for hot water and heating, but also-and here comes the new-uses heat to produce hydrogen. Then, using a hydrogen fuel cell is used to generate electricity. Combined with photovoltaics, the house generates 80% of its energy needs.

Panasonic, as well as electronics manufacturer, is that a builder of manufactured homes and expects to sell these eco-housing from 2010 for 600,000 euros (about $ 800,000), excluding the ground.

Source: The atmosphere in the middle

Friday, May 1, 2009

Kate Nash Foundations Piano Partition

How are Solar Panels [Video]

I am posting a video on how solar panels are made.