Thursday, January 9, 2014

Usando Team Foundation Server desde Eclipse para compilar y empaquetar un proyecto Java

Pre-requisitos:
  1. TFS Build Service
  2. Java configurado (PATH & JAVA_HOME)
  3. Ant configurado (PATH & ANT_HOME)
  4. TFS Build Extensions Power Tools   
  5. Una carpeta compartida visible desde el Build Server
  6. Eclipse & Microsoft Team Explorer Everywhere 2010. 


http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=af1f5168-c0f7-47c6-be7a-2a83a6c02e57

http://visualstudiogallery.msdn.microsoft.com/2d7c8577-54b8-47ce-82a5-8649f579dcb6/

Anexo algunas pantallas para clarificar algunos de los puntos anteriores.




Como se ven en la imagen el Build Service está asociado a la colección con la que vamos a trabajar “TestCollection”.


 

No hay que confundir el plug-in para Eclipse con la Suite TFS Everywhere, por el momento el plug-in es más que suficiente.


Si es que no tiene asociado un Build Service con su código no podemos continuar, el error que marca es algo como lo siguiente:
Una vez cargado nuestro código desde el Source Control se puede acceder al menú para dar de alta un nuevo Build Definition. La siguiente imagen es de la pantalla para crear el nuevo Build Definition.

Se detalla a continuación el script de Ant que se uso para configurar el Build Definition.



 Se detalla a continuación el script de Ant que se uso para configurar el Build Definition. 









La parte importante del documento es:


Que es la forma en la que encontré como permitir que el Build Server me respete la ruta “Drop Folder”, igual y puedes olvidar esta ruta y en tu script Ant dejar copiar los archivos a donde sea necesario. Lo que provoca esta instrucción es que los JAR que generemos van a parar a la carpeta Binaries y después al “Drop Folder”


Seguir el asistente es más o menos directo. Podemos ver el archivo generado que invoca a nuestro script Ant en una ruta parecida a la siguiente
C:\Builds\1\TestBuildJava\TeamFounCIJava\BuildType\TFSBuild.proj
Note la siguiente línea en el archive .proj que importa las extensions de Ant para nuestro proyecto.

Antes de lanzar el build y después de instalar Java y Ant, reinicie los Build Services para que tomen la nueva configuración de variables de entorno.



Finalmente podrá ver los archivos versionados que se van generado para los JAR’s que se van generado.










Material , Time and Quality

I’d like to start explaining what are the facts to lead me to write about magic theory, first of all, improve my own play. But also confirm and or build through your feedback, if this approach represent any advance on magic theory. All this started when I saw an inspiring deck from a daily event in magic online here and after commented by Luis Scott-Vargas here . I'd like to know if this idea have some future (in Modern Format) or is the typical kind of funny combo to complicated and fragile to be a real contender, who is trying to win with the weakest card type, a creature. Of course I’m talking about Death’s Shadow. My theory is that this idea is perfectly playable with  the correct approach. I think we don't have yet the correct approach to it.


Basically I’m going to take some existing magic theory and try to reshape it; with an approach taken from chess, specially from the book “How life imitates chess” written by Garry Kasparov.I would like to recommend specially Section II Chapter 8 "Material, Time , Quality".  If you want, you can get the book from here or here. And read about the author carrier here. Also I would like to present my gratitude to Mike Flores, Mark Rosewater,Patrick Chapin, Steve Sadin , Adrian Sullivan and Chingsung Chang for all his work to improve MTG Theory on all this years. I’m going to be citing many of theirs works through this article. You can find a reference list at the end.



I would say that every player has reach the point where he feels that having more creatures in play and attack with them is the most secure path to win. Certainly many of us have won under this circumstances, demonstrating the inherent truth about this approach. “The fundamental block of evaluation is material” (Kasparov 2008 , p.88) and our currency is the mana to cast spells.

For many of us who have been playing from maybe 5 years,10 years,15 years,20 years ; there has been several evolution points on the game mechanics through the years. I'm not talking about changes in rules like, ‘damage in the stack’ or ‘mana burn’. I'm talking about elemental changes in the structure of the formats. I'm talking about the kind of things that shape Standard, Modern (or Extended) , and Legacy. Things like, What is the best counter spell that I can get? , What is the best creature that I can get for zero mana?, What is the best spell to draw cards?, What is the best "Wrath of God" like effect in the format?.


Maybe if you have not been playing enough time, you are not going to fell or remember anything with this questions. But I know, we can use the old quote from Heraclitus, "Change is the only constant in life". And all of this is perfect represented in the well known article from Mark Rosewater, “New World Order” (Rosewater 2011). I can tell that we are fully enrolled on this new world order, where you can win Legacy with and aggro-control (I don’t know if True-Name Nemesis is a good idea or not), Modern is something strange and new under development and we have a constant healthy Standard format, where you have the feeling that every color has its own chance.

As result of this evolution, magic theory have to grow in the same terms. Like when each of us move forward, we were winning playing Overrun to a new horizon. Don't get me wrong , I'm not saying that Overrun is an incorrect approach, is only, like in many other fields on life (Physics for example) the best that we had in certain moment of our lives. Now we have elements to win in other ways , elements to innovate. Maybe when we understand the underlying structure is the most propitious time to innovation.

On this flow of ideas we can get to the well known concept of card advantage (Sadin 11), and relate this concept to the concept of material. There isn't any doubt about the importance of card advantage and his relationship with victory. Next I'm going to introduce here the concept of quality (from Material, Time , Quality or MTQ). Have you heard about the concept of virtual card advantage? (Flores 90). Virtual card advantage means , prevent your opponent to play or use his or her cards, in some profitable way, many times only for a short period of time, because there are answers to it, example Leyline of Sanctity. I want to reshape this, what we call virtual card advantage is quality card, and due to the context, you may be able to trade this quality into material advantage or even time. And this lead me to my main topic. Our current discussion on magic theory lacks of the concept of card quality as a first order concept. And we are forgetting one of the most valuable basic rules, that we can borrow from chess. You can trade one of this elements (MTQ) for the others.



In other words you can:

  • You can spend time to improve your quality. The best way to invest your time is in improve your quality (Kasparov 2008).  For example classical tempo conception.
  • Time is not gained just by moving faster or by taking shortcuts. Time can often be bought, swapped for material assets (Kasparov 2008) . For example chump-blocking.
  • We can give up some material to get quality (Kasparov 2008). For example looting.

Are you getting my point?. We can trade any element to move our overall position in the way we want. And this theory help us in the sense that each time we are doing something we have to ponder this elements in a multidimensional decision, and help us to evaluate each element on his current dimension. Material, Time and Quality. 



Now lets go further. If this theory is valid , we must be able to trade any element for the other. But this explanation predicts that we are going to see more and more cards, to interact with this concepts on every possible direction. If this is not totally clear please allow me first to describe based on a format decision like banning. And I'm going to limit my explanation only to Modern format, only because is the format that I play the most. So is the format that I better know.

Two questions to start: Why it seems like wizards is trying to create a competitive Milling Deck? Why is Ancestral Vision banned?



First allow me to talk about time, how we have reach a point where we are pretty sure what time or tempo means. And allow me to mention something that I have red between lines over certain MTG theory. Drawing cards in your draw step is a sign that time is passing. Time is relative and is measured as the difference between our current position to our goal; in this sense at least in theory, each time we draw a card we are getting closer and closer to our goal. At least in theory. In the most general form this is true. However, immediately we can mention a bunch of cases where this effect is not present or our advance in time is reduced to zero due to other factors. But in general is pretty clear that each time when we are drawing a card (from our draw step) we are improving our overall position and therefore advancing in our plan and due to this fact time is passing in some direction (typically forward).

Ancestral memories is banned because drawing cards is the most powerful thing that you can usually do to improve your overall position (something that we already know). But this approach explains why in a different way, using our three concepts (MTQ) in a slightly different manner. By drawing a card you are changing every element on our triad (MTQ), you are winning material, improving your overall quality (at least in theory, maybe creating synergy with other previous cards) and manipulating time (typically forward as I said, in the previous explanation). Ancestral Vision is one of the few cards that allow you to do all this things. Since our current Modern format don't support to win on/or before turn four we must to keep Ancestral memories banned until we see something to balance this advantage. In this frame I think is easier to understand why investing one blue mana to get three cards is too powerful even, four turns later.

Milling is another interesting issue. It's pretty clear how you win using material. You are going to change opponent’s total life in some way, maybe putting more creatures in play, maybe burning them with Lightning Bolts. You know how to win through quality, improving turn by turn a nice Grapeshot, to create with a single card a huge effect, here you are investing time and material to maximize your quality and win with it. But How are you going to win ONLY investing to get time?. We say that time is the measure of distance between our current point and our objective, our goal. OK. But we don't have to forget that every card we draw at least in theory MUST close this gap. So the most basic time expression is drawing a card as part of your draw step. Does this make sense?. Milling is the purest expression of manipulating time to win. 

Maybe we can use a nice combo, to force our opponents to draw all his library. But I'm talking about something like the following list here. Where you spend all your material and quality to control time in the way you want. This is important because if we want a truly TOTAL format , we need something similar to this deck. Something that is trying to win only or purely manipulating time to run faster, without using other form of aggression .  My prediction is “When Modern format reaches the point where you can competitively play a totally time based milling strategy, we are going to get Ancestral Memories back”. But this theory or approach predicts his apparition as a competitive deck.

To end this section, lets explore other kinds of trades that we can do based on MTQ:

I have Material I want Time: Chump-blocking
I have Time I want Material: Entreat the Angels

I have Time I want Quality: Izzet Charm , Temple of Silence
I have Quality I want Time: Archive Trap

I have Quality I want Material: Lightning Bolt , Electrolyze
I have Material I want Quality:  Scalding Tarn , Steam Vents

Under this frame we can explain, why we have the notion of some cards that are better than other cards, this happens because this kind of cards affects more than one concept, not necessarily at the same time or in the same way. Lighting Bolt is good example. Because you can trade it for time while you are burning your opponent to zero life, reducing his time to execute his own plan. Or you can get material in the sense of killing a nice creature or planeswalker.

After this last reflection I can tell , that at least my own approach to the game has evolved since I started to play. And I want to mention how this little  things about a card game affect our vision of life every day. I remember how happy I felt when I heard Evan Erwin from the Starcitygames show, say. "We need bad things to have good things". This little reflection while he was doing his review on a new set, was like a measure of the kind of advance we have as  community, about the game, and how this affect our approach.

Looking for Grand Unified Theory Magic.


We have to keep in mind, like in the real life, ‘quality depends on context’. How good is a card?, It depends. Even powerful cards like Tarmogoyf have some sort of dependency coded in his DNA. Here we can borrow some elements again from chess. How good a position is, How good is a Bishop?. Well it depends. Even in the highest chess circles, there's discussion between if certain move is correct or not, optimal or even playable. I'm saying this because certainly we are drawing points to get to a well formed MTG Theory. 

I'd like to recommend the work from Chingsung Chang, “Exploring Grand Unified Theory Magic” (Chang 2010). I'm going to say that his Marginal Mana is a tool to dynamically define card quality. And in more general sense as he said, a tool to define the overall game state if we have perfect information. In order to understand where this idea comes from I'm going to take a extract from the work 'Stock Mana Explained' from AJ Sacher 2010. (Sacher 2010).

The Effective Cost of cards is simply putting an effect of a card up to a mental chart of baselines like a litmus test. The results can then be used to answer questions like “Why is Tarmogoyf better than Grizzly Bear if they cost the same?” According to stock mana, they are worth the same unless you apply Effective Cost to them....

Now those are the most basic of basic examples, but it shows how easy it is. A good way to do it is imagine that someone from R+D approached you and said we are making a normal set and we have something with effect. What should we make it cost to be a common? What would you say for a vanilla 3/4? What about a 1/1 Flying, haste? How about for a cantripping Shock? Use your knowledge of the game and your experience with similar effects dictate what you think cards are worth. The more experience you have in Magic (particularly Limited) the better at this you will become. Maybe sometime down the line, I will get some professional game designers who play Magic to help me compile an intricate chart for all basic effects and creature sizes. Until then, you have to practice and practice and develop a strong Intuition.

..... I don't win because my opponent took over 20 damage this turn. That's incidental! I won because I stocked 28 mana in 3 turns [from a combo]  .....

I'm going to continue here to reshape one aspect of the theory I think is very , very important. Momentum citing Chinsung Chang job about it (Chang 2012):

    To understand strategic-level deck construction, the most important thing to
  realize is that there are effectively three axes any given deck can interact on:  
  momentum (really velocity/inertia), time, and board position.

I would like here to reshape this discussion and define 'momentum' as the resulting position where you are most close to your strategic goal and therefore maybe to win, so you can drive your project to this moment using our previously mentioned concepts MTQ. So momentum is a resulting state born from MTQ. Momentum is where you card quality across time is getting maximum. In this sense maybe we can use Stock Mana or Marginal Mana to know how to move forward in our way to get momentum.

Is still relevant our archetype circle or mtg chromatic circle?




Let's try describe what are we doing with for example Combo (even if I don't agree to see combo as an strategy rather than tactical resource). Combo is investing cards(material) to generate high quality to reduce opponent time to zero. Control is trading his cards(material) to improve his quality, to play and protect a thread to reduce opponent life (time) to zero. Aggro is playing his material (creatures), improved turn by turn, ( because each creature is more dangerous (has more quality) , while your life is reaching zero), to reduce opponent life (time) to zero. Does it makes sense?. Material for quality ; quality for time. Are we doing the same things only shaped in different colorful pieces of paper?. This reminds me Patrick Chapin comment , We have to move the opponent to an state , where he is not allowed to continue to play." 


Conclusion

So, Is still relevant our archetype circle or mtg chromatic circle?, yes it is!!! , Some time ago, when the first mtg theories came with the chromatic circle, I would say that things were slightly different , but I'm not going to talk about this years, because I didn't play on them. But what I could say is, at that time, this archetype abstraction was at least relevant. Now we are fully into a New World Order (Rosewater 2011) , an in this New World Order each position (each flow of cards from a deck in certain moment) has a dynamic state (strategic moment), and we can manipulate each element (material, time and quality) in the way we want to move in our own way, through this chromatic circle. Due to this is still relevant to ask, Who's the beatdown? (Flores 99). 



Garry Kasparov
  • Kasparov2008:  How Life Imitates Chess: Making the Right Moves, from the Board to the Boardroom - 2008
Mark Rosewater
Michael Flores
Steve Sadin
AJ Sacher
Adrian Sullivan
Chingsung Chang
Other recommended works: