Tuesday, October 2, 2018

¿Puedo mezclar roles en Scrum? ¿SM+PO?

Algunas de las preguntas frecuentes que me han hecho en varias empresas son:

  • ¿Puede ser el Scrum Master también el Product Owner?
  • ¿Puede ser el Scrum Master también parte del equipo de desarrollo?
  • ¿Puede el Product Owner ser del equipo de desarrollo?
Antes de entrar a este tema de lleno, quisiera mostrarle la siguiente imagen:

Image result for zinedine zidane real madrid

¿Se puede imaginar cual es la conversación entre Zizu y Ronaldo?

Que tal algo como: "Mirá pues Ronaldo, la pelota no la vayas a tocar con la mano por que te marcan falta. Lo que tenés que hacer es llevar la pelota con el pie e intentar meterla en el arco del otro equipo para que te den un punto, a eso se le llama Gol." :)

¿Será algo por el estilo? Si su respuesta es "definitivamente no, Ronaldo ya sabe jugar Futbol", entonces le tengo otra pregunta: ¿Para que necesita entonces el Real Madrid un coach? Todos los jugadores saben jugar ya, ¿no?

¿Cual es el objetivo del zizu en este equipo?

Sip! Es definir la estrategia del equipo, entender como el Real puede ser cada día mejor y como enfrentarse y vencer en diferentes situaciones. 

Ahora, veamos otro tema: ¿Cuantas veces vieron que cuando el Real se acercaba a la portería del contrincante, zizu con su traje y corbata se metiera al campo para ir a meter el gol? ¿Nunca?, ¿Por que no? (aparte de que las reglas del juego lo prohiban :))

Si el entrenador se metiera al campo a jugar entonces durante este momento, su mirada se concentraría en la pelota y posiblemente en dos o tres jugadores. En este preciso momento el perdería la visión global de que es lo que esta pasando y le sería imposible definir estrategias efectivas para todo el equipo. 

¿Donde debe estar zizu? Afuera de la cancha, con una visión desde fuera, lograra ver el todo de lo que esta pasando.

Recordemos que el Scrum Master es el coach del equipo de desarrollo, si bien el equipo tiene que estar empedrado de definir sus propias estrategias, el Scrum Master necesita tener una vision desde fuera y enfocarse en ayudar a que el equipo de Scrum sea mejor. 

En cuanto un Scrum Master se vuelve parte del equipo, su mirada se volverá al problema que el como developer quiere resolver (solo verá el balón), y esto puede hacerle difícil crear una estrategia para ayudar al equipo (incluyendo la relación del Product Owner con los Stake Holders).

De la misma forma, el Product Owner es el responsable de definir e implementar las estrategias de como mejorar el producto y como hacer que se le de cada vez más valor al cliente final.

Y por último, definitivamente el Product Owner y el Scrum Master no deberían de ser la misma persona por obvio conflicto de intereses.

Así que mi recomendación es no meter a la cancha  junto con el equipo de developers a jugar ni al Product Owner ni al Scrum Master. 






Friday, February 14, 2014

PostgreSQL or MongoDB?

In recent weeks has been revived the battle between MongoDB and PostgreSQL users in what is the best DB, and above all in the address that "MongoDB ends up being a bad choice and that it is best to never use it" and developers using MongoDB defend it saying that "PostgreSQL with a huge demand the performance is not optimal and MongoDB is made to have a highly performance and to be highly scalable, but what has happened is that you have not known how well use it".

And is that we, human beings, often see us involved in this situation that describes the history of india "Blind Men and an Elephant", here is the version of the poet John Godfrey Saxe, due to the inability of we have to know the totality of reality.

But who is right?

The answer to this question is all and none (I hope you have read the illustration above), for someone a personal subjective experience may be true, but this experience can enter into contradiction with the experiences of someone else or the whole truth at a broader level.

Ok, but leaving aside the phenomenological part of the subject, which then is best MongoDB or PostgreSQL?

This is not about which is better, is which fits best to the needs. You have to choose the correct tool, lets see this with more detail:

PostgreSQL is based on relational data storage model, being its main feature to maintain the integrity and consistency of the data. Using a normalized scheme minimizes the redesign of structure when you extend the data base and avoid anomalies during modifications in the database. The developer don´t worry about the integrity of the information since PostgreSQL is responsible for that but this have an impact on performance.

MongoDB is based on the non-relational storage model, the information is stored in documents and it is not necessary to follow a scheme. Its purpose is to provide great scalability and performance while maintaining most of the functionality of a RDBMS.

In Mongo there is no joins becuase is the operation that more impact has on the performance, for this you embed data, the information gets into the same document. If you need to have several collections of data the join must be implemented and it is the duty of the developer update all collections when there is a change.

There are no constraints or transaction, only atomic operations, so you get a great freedom to adjust the database to the application but is your responsibility maintain the integrity and consistency of the data. With this properties Mongo is really good to make ad-hoc querys and get a high performance.



If I need the features of both, can I use together?

Yes! you can use a master/slave replication, PostgreSQL as database master responsible for the integrity of the data and receive write operations and MongoDB as a slave so most of read operations are carried out there. To implement this configuration you can use tools like Bucardo replication.

Remember to choose the configuration database that best fits the needs of your application.

Saturday, December 21, 2013

Happy hollidays!

The xik´ team wants to wish to our clients a merry christmas and a happy 2014!

Thank you for your trust in our company and for choosing Xik´ to build your Web applications.

Friday, December 20, 2013

Use Hudson to schedule a daily execution of Ant (therefore your test cases)

Welcome to the forth and last post about this subject. Today the Hudson settings will be done, this will allow to run the Ant Script that was done on the previous post.

First you have to install Hudson, to install it,  go where the downloaded Hudson file is, and write the following command:


Java –jar hudson-3.1.1.war --httpPort=8989


--httpPort=8989 means the Port where you want  to install Hudson.  When the Hudson setting-up is completed, go to http://localhost:8989/  there you will be able to meet the Hudson UI.


Now you have to configure Hudson, click on Configure System, and then configure the JDK  and Ant sections. You need to tell Hudson where Ant and JDK are installed.



After this you can select Create New Job and then put a name to your new Job,in this example we named "prueba".


Then, you have to go to the Build section, click in Invoke Build->Step->Invoke Ant,  make sure that on Ant Version the Ant_Default is selected. 

Now, on Targets  write the first target that will be called on the Ant Sripts.

Finally, on Build File write the address where your Ant Script is.


Hudson allows you to Schedule the execution of our script, to do this, go to the Build Triggers section and select the Build periodically option.


To select which day and time we want to execute our script, we used the following format:

Minute Hour Day Month
Minute -> (0 – 59)
Hour -> (0 – 23)
Day -> (1 - 31)
Month -> (1 – 12)

For example if you want to execute our script on December 18 at 9:30 PM you have to write:

30 21 18 12 *

Now you can execute the script, to finish click on the Build now option and you should see the Hudson console.



Congratiolations! You have now an automated testing system to be sure that your system will remain stable in the case of continuous integration.

Run your test cases using Ant.

Welcome to the third post of this subject. In the previous post, we did two test cases  using Eclipse and Selenium WebDriver. In this post we will  make an ANT script  to run the test cases.

Please notice that if you don´t need to run your test automatically in a scheduled way, you might just write the tests using Selenium WebDriver and use just the JUnit´s UI available in Eclipse or Netbeans. 

Now, if you need to automate the daily execution of the test cases you probably want to read the rest of the post :)

First you have to have Apache-Ant 1.9.2, once you have downloaded you have to set your System environment variables: a PATH and a CLASSPATH variable in which you are going to write the apache ant 1.9.2\bin address.


You have to copy the file JUnit.jar in the apache-ant-1.9.2/lib folder. The file JUnit.jar is in eclipse\plugins\org.junit_4.11.0.v201303080030\junit.jar.



To create the script in Ant you have to go to eclipse File->New-> other, this will show you the following window:


Click on the next button, you will give the name of build.xml to your file and put it in src.


To create the script in ant, you have to be sure to add the file junit.jar to the script. This file was added in apache-ant-1.9.2/lib and you also have to be able to add the files .jar of selenium, here you have the directions to do it:


   
     
       
     




Ant allows you to run your test and generate a report in HTML, a very common problem is that when you run the script and you have to generate the report you will see the next error:

BUILD FAILED
Errors while applying transformations: Fatal error during transformation

This error is because of eclipse that is using the Default of ant. To solve it you have to go to Window->Preferences and the following window will appear:


Go to Ant and select RunTime option.


Click on Ant Home and select apache-ant-1.9.2 folder.


You have to make sure that the Ant Home Entries are not as Default and contains the apache-ant-1.9.2 folder address.


Now you can do the Ant script, the next code is the script to execute the test that had been made in the previous post; this script also generates a html report of our tests.
  


  
  
  
  

 
   
   
     
   
   
 

 
  
  
 

 
    
    
    
 

 
   
     
   
 

 
    
     
     
       
   
   
     
       
     
     
   
   

  
    Main target
  

The report can be found in src->reports->html folder.


If you open the report (index.html) it should look like this:


I the next post we will use Hudson to do a scheduled execution of the ANT script.

See you there!


Develop test cases using the Selenium WebDriver

Welcome back!  Today we will make some tests using Selenium WebDriver. All you need is to download Eclipse IDE For Java EE Developers and Selenium from our previous post. 

First step: Installation and configuration

Once you have downloaded Selenium you have to decompress the downloaded file.  You will find two different files .jar with the name of selenium -java-2.35.0.jar and selenium-java-2.35.0-srcs.jar. The name can change depending of the downloaded version of the tools, these files have to be copied on the libs folder of selenium.




Now that you have copied the files in the libs folder, you can create a new project in eclipse in which you can make some basic tests with the help of selenium. First you go to eclipse then you go to File->New->Java Project.


The next window will be displayed. Here you are going to write the project’s name. In this example the name of the project is “Tests”.




Then, you click on the Next button and you go to libraries.



You will see the next window, here you click on the button that says Add External JARs, a window will appear in which you have to select all the files .jar that are in the libs folder of selenium.


Once you have selected all the .jar files of selenium, you have to click on the finish button. The new project will appear at the left side of the screen.  In the left side of the screen you will find a section that says Referenced Libraries that contains all the files that you have selected previously.



The configuration is done :)  

We can start to write the tests, hooray!


Second step: Writing the test cases

Now we will do two simple tests:

  • search a text in google 
  • obtain the title of the Google page.



To do the tests go to File->New->JUnit Test Case.


You will see a new window in which you will have to write the name of the JUnit Test Case, in this case the name is “prueba” (it means test in our native language ;) ).


Once you have created the file, you will be able to make the test, first you create the test that opens firefox, goes to the google page and search ‘Selenium WebDriver’. To do this you have to import the following libraries:

import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

To do the test you can use the following code, this test after searching  ‘selenium WebDriver’ obtains the title of the page and compare if the title of the page isSelenium WebDriver - Buscar con Google’, if the title is different the test will fail:

@Test
 public void test() throws InterruptedException {
  WebDriver firefox_driver = new FirefoxDriver();
  firefox_driver.get("https://www.google.com.gt");
  WebElement search = firefox_driver.findElement(By.name("q"));
  search.sendKeys("Selenium WebDriver");
  WebElement search_button = firefox_driver.findElement(By.id("gbqfb"));
  search_button.click();
  Thread.sleep(2000);
  System.out.println(firefox_driver.getTitle());
  if(!firefox_driver.getTitle().equals("Selenium WebDriver - Buscar con Google")){
   fail("Test Fail");
  }
 }

Now to do the test that obtains the title of the page and prints it in the console you can use the following code, this test will fail if the title of the page is not Google:

@Test
 public void title() {
  WebDriver firefox_driver = new FirefoxDriver();
  firefox_driver.get("https://www.google.com.gt");
  System.out.println(firefox_driver.getTitle());
  if(!firefox_driver.getTitle().equals("Google")){
   fail("Test Fail");
  }
 }

So that´s it for writing the tests, in the following post we will use ANT to execute them and then we will automatize the execution of our testcases using Hudson.

See you soon!