SlideShare una empresa de Scribd logo
1 de 24
Universos Paralelos en el
 Desarrollo del Software
Patrones de branches and merging
Quiénes somos?

Amalia
  Twitter: @amaliahern
  email: amalia@codicesoftware.com
Manu
  Twitter: @mrcatacroquer
  email: mlucio@codicesoftware.com
Hoy hablamos de…

• ¿Qué es un control de versiones?
• Universos Paralelos: Ramas
• Demuestra tus poderes con patrones
¿Qué es un control de versiones?
Si crear ramas no te asusta, ¿por
       qué no haces más?
Ramas y Universos Paralelos
Complejidad Infinita
Rama por Release
Rama por Release
Rama por Promoción
Rama por Promoción
Rama por Componente
Rama por Componente
Rama por Tarea
Rama por Tarea
¿Por qué crear Ramas?
Anti -patrones
Anti -patrones
Anti -patrones
Anti - patrones
Anti -patrones
Desarrollo Software Universos Paralelos Ramas

Más contenido relacionado

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Desarrollo Software Universos Paralelos Ramas

Notas del editor

  1. GoalMostrar Plastic SCM desde los patrones de ramas y branches. Indicarcomotrabaja Plastic Hoy venimos a hablar de codigo, de control de versiones, y de comopuedestrabajar de maneramáseficiente con tucodigoempleandolasramas, porqueporsupuestotienestodotucodigobajoconrol.AudienceDesarrolladoresprincipalmenteHow to explain itPartiendo de unabreveintroduccionteorica de cadapatrón, mostrarejemplos de uso: como Plastic resuelve y trabaja con esospatronesfrente a otros DVCS.Additional material
  2. Hoy solo estamos dos de los componentes de todo el equipo de Plastic, en el que hay8 Developers1 CEO1 Techwriter1 Build master1 Testing masterDonde Manu y yo cumplimos el papel de:1 Support/multitask master1 Multitaskwoman
  3. ¿Qué es una rama?Cuando necesitas hacer por ejemplo el mantenimiento de un documento para dos clientes, de manera natural te sale hacer dos copias de ese documento y llevar lineas independientes de mantenimiento.Este es el concepto de rama, una línea de desarrollo que existe de manera independiente a otra, pero que comparten historia común.Una rama siempre comienza su vida como copia de algo, y se mueve hacia adelante, creando su propia historia.Dos preguntas:Si nunca has creado una rama, ?no crees que estás desaprovechando todo el potencial de tu control de versiones?Y si crear ramas no te asusta, por que no haces mas?Muchas veces el concepto de rama no se entiende bien, porque en realidad cuando revisas los sistemas de control de versiones no ves que los desarrolladores creen tantas ramas, a pesar que la creación de ramas como el versioneado forman el corazon de un sistema de control de versiones.
  4. Problemas…..Fácil de crearpasa a sercomplejidadinfinita. Aunque las ramas te ofrecen la seductora posibilidad de ser infinitas con poco riesgo, traen también consigo las menos deseable: complejidad infinita.En Marvel la complejidad nacia de cual era el pasado de SuperMan: tuvieron que crearle uno, al principio no volaba. O de Batman y Robin , eternamente jovenes.Entonces a parte de mundos paralelos crearon MultiUniversos, pero eso obligaba a realizar demasiados juegos malabares a la vez para pode controlar todo.Ramascomounabestiacompleja….->En la mayoría de los sistemas de Control de versiones, puedes crear cientos de ramas sin problemas de rendimiento de ningún tipo. Es la sobrecarga mental que mantiene el track de todas las ramas que necesitas y sobre las que realmente estas preocupado. El cerebro de los desarrolladores no se puede actualizar del mismo modo que el sistema de control de versiones así, que hay un serio problema.SolucionPatrones de Ramas!!
  5. Branch por Release:Una de las estrategias más comunes de ramificación es alinear las ramas con las Release de productos Una rama contiene todos los activos de desarrollo de software para una sola Release. Las ramas mueren cuando la Release se retiran, dejan de tener soporte. En ocasiones, las actualizaciones deben ser mergeadas de una versión a otra.Base de Branch per Release:Contexto:Durante el desarrollode un producto siempre se hacen varias releases de lanzamiento del software. Las releases de trabajo se organizan en torno a las fechas de entrega y sobre sus hitos.Las ramas se tienes que adecuar a esta organización de manera que todo el equipo de desarrollo esté centrado en el objetivo común de sacar cada release.Problema: Como quedaríai esto en el arbol de ramas de releases del proyecto?Que debo hacer:
  6. .Base de Branch per Release:Contexto:Durante el desarrollode un producto siempre se hacen varias releases de lanzamiento del software. Las releases de trabajo se organizan en torno a las fechas de entrega y sobre sus hitos.Las ramas se tienes que adecuar a esta organización de manera que todo el equipo de desarrollo esté centrado en el objetivo común de sacar cada release.Problema: Como quedaríai esto en el arbol de ramas de releases del proyecto?Que debo hacer:• Sin duda, las etiquetas se utilizan para etiquetar configuraciones estables listas para el lanzamiento. Pero las baselines no son suficientes para ayudar a crer un flujo de trabajo para una versión específica.• Se hacen Liberaciónes de releases de mayor y menor, así como parches para arreglar bugs. Hay mantenimientos y tareas de desarrollo que se producen simultáneamente, en paralelo entre sí.• La integración, es esencial para verificar y validar que una release para ser lanzado es apto para el envío a los clientes, pero puede resultar una tarea muy pesada, al contener por ejemplo releases muy grandes.Soluciones: Para cada entrega prevista (mayor, menor, y los parches), utilizar ramas independientes para organizar los esfuerzos puestos en cada release.Por ejemplo: rama para la V1,1, rama para la V1.2, etc.Planteamiento:Earlybranche: se crea una rama, tan pronto como haya algo para salir.Deferredbranches: solo se hace una nueva rama, cuando los cambios de ese version están todos completos.Por ejemplo, una corrección de errores podría ser necesaria tanto para la release 1.1 como para la 2.0. Con ramificación temprana, de corrección de errores que entraría en tanto el 1,1 y el 2,0 Con Deferred , si el 2,0-line aún existe, la bug-fix entraría en el 1.1-única línea y la creación de la línea 2.0 se aplazaría hasta que se iniciaron los esfuerzos para añadir alguna feature única para la 2.0 donde se metería ese parche.
  7. Branch por Promoción: cada nivel es una rama permanente. Cuando los cambios estancompletos y estan testeados, entonces empiezan a pasar el nivel de calidad y se promocionan como merges a ramas superiores
  8. Branch por PromociónContexto: Cadanivelesunaramaindependiente y permante: desarrollo, test, diseñoProblemas: Decidircuandounaramaestálistaparaserpromocionada: porejemplotodos los test creados y funcionando.Esfuerzoparasacaruna release: necesitastodaslasramas perfectas e irpasandoporlasdistintasfases: test, integracion, pase a produccionSoluciones:Con estepatrónpuedesirrealizandoesfuerzos en paralelo: Desarrolloestá en la versión n+2Testeo en la version n+1Mantenimiento en la version nRama porpromociónsignifica mas ramas, mas merges, y másprecisión en la historiateniendoaisladaslastareas. Esnecesariotener un mayor control de tuentorno de desarrollo y de comoestáconfigurado.
  9. Branch por componente: cada componente nuevo de la arquitectura es una rama independiente. Los componentes nuevos se integran cuando la rama están completos
  10. Branch por componente: Tambien se puede cambiar componente por subsitema, producto, moduloEl dueño del componente se hace responsible de de tener a puntotodos los elementosrelacionados con un componente: archivos, modulos, subsistemas, etc. Después de un tiempotrabajando se veclaroqueesnecesario el desarrollo en paraleloparacadauno de estoselementos y queportanto la propiedadunica del componentequedaexpuesta a queotros la modifiquen.Problema: comomantener los beneficions de tucomponentesitodospuedentocarlo?Problemas:Si todo el mundoes responsible, nadiees responsibleSi no se puedetocar el codigoinicial, no se llevaránacabonimejoras, ni fixesTener al equipopendiente de quealguienapruebe los cambios o lasmejoras lo quehacees meter retrasos, especialmente en tareascriticas.Solucion:Hacerunalinea de desarrollo principal y crearramasparacadauno de los subsitemas a desarrollar. El propietario con permisos, decide laspoliticas de integracion y merge de estasramas
  11. Branch por tarea: cada desarrollador hace un rama nueva por cada tarea que va a lanzar. Las tareas se integran en la rama principal cuando se acaban.
  12. Branch por tarea:Cada desarrollo es una nueva tarea, independiente. Dentro de tareas hablamos de nuevas features, de bugs, El problema podría venir de que siempre necesitamos integrar el desarrollo realizado con la nueva funcionalidad. El problema no sería hacer tanto ramas, como los merges que debo realizar.Problema: ¿cómo se puede trabajar con multiples (en teoria) superposiciones de codigo que van a mi linea principal de desarrollo sin comprometer su integridad y consistencia.?Esto se puede traducir en :Lock excesivos, que provocan esperas largas y ralentinan el trabajo de desarrollo, pudiendo llegar a matar el trabajo en paralelo.Merges, cambios concurrentes que tienen que ser integrados con cuidado para no provocar inconsistencias del codigo.Solucion:Bifurcacionesseparadasparacadatarea. Unavezque la tareaestácompleta: desarrollo, tests, pruebas, validaciones.. se integradentro de la rama principal. Cadadesarrolladortrabaja de maneraaislada en surama, en paralelo. Es el propietario de esarama, puedeaplicarsuspropiaspoliticas, no interfiere con nadie mas. No propagaerrores. RAMA POR TAREA (HACER DEMO)
  13. Si hemos llegado hasta aquí, también nos hemos dado cuenta de que podemos abusar de las ramas.Igual que hay patrones de ramas, hay antipatrones.“Merge-Paranoia” :Evitas hacer Merges a toda costa, por el miedo que tienes a las consecuencias. Post: http://arialdomartini.wordpress.com/2011/11/02/help-me-because-i-think-martin-fowler-has-a-merge-paranoia/“Help me because Martin Fowler has a Merge Paranoia”“Merge-Mania”Cuando el equipo pasa su tiempo mergeando en vez de desarrollar¿Recordais los merges con SVN? ¿Desde que revisionteniamos que hacerlo?“Big-Bang-Merge”El Merge se retrasa hasta el final de desarrollo, y se intenta mergear todas las ramas de manera simultanea “Never Ending-Merge”Nuncaterminas de mergear,parecequesiempre hay algomás “Wrong-Way-Merge”Cuando se integra la version actual con la versión anterior  “Branch-Mania”a situation where branches are created often and for no apparent reason. “Cascading-Branches”a situation where branches are never merged back to the mainline. “Mysterious-Branches”a situation where the purpose of a branch is unknown. “Temporary-Branches”a situation where the purpose of a branch keeps changing and effectively serves as a permanent “temporary workspace”. “Volatile-Branches”a situation where a branch with “unstable” software assets is shared by other branches or merged into another branch. “Development-Freeze”a situation where all development activities are stopped during branching, merging and building new baselines. “Berlin-Wall”A situation where branches are used to divide the development team members, rather than divide the work they are performing.Branches are volatile most of the time while they exist as independent branches, that is the point of having them. The difference is that they should not be shared or merged while they are in an unstable state.----- Notas de la reunión (04/12/12 12:11) -----Haces los mismo merge trabajando en la misma rama
  14. Si hemos llegado hasta aquí, también nos hemos dado cuenta de que podemos abusar de las ramas.Igual que hay patrones de ramas, hay antipatrones.“Merge-Mania”Cuando el equipo pasa su tiempo mergeando en vez de desarrollar¿Recordais los merges con SVN? ¿Desde que revisionteniamos que hacerlo?“Big-Bang-Merge”El Merge se retrasa hasta el final de desarrollo, y se intenta mergear todas las ramas de manera simultanea “Never Ending-Merge”Nuncaterminas de mergear,parecequesiempre hay algomás “Wrong-Way-Merge”Cuando se integra la version actual con la versión anterior  “Branch-Mania”a situation where branches are created often and for no apparent reason. “Cascading-Branches”a situation where branches are never merged back to the mainline. “Mysterious-Branches”a situation where the purpose of a branch is unknown. “Temporary-Branches”a situation where the purpose of a branch keeps changing and effectively serves as a permanent “temporary workspace”. “Volatile-Branches”a situation where a branch with “unstable” software assets is shared by other branches or merged into another branch. “Development-Freeze”a situation where all development activities are stopped during branching, merging and building new baselines. “Berlin-Wall”A situation where branches are used to divide the development team members, rather than divide the work they are performing.Branches are volatile most of the time while they exist as independent branches, that is the point of having them. The difference is that they should not be shared or merged while they are in an unstable state.
  15. Si hemos llegado hasta aquí, también nos hemos dado cuenta de que podemos abusar de las ramas.Igual que hay patrones de ramas, hay antipatrones.“Big-Bang-Merge”El Merge se retrasa hasta el final de desarrollo, y se intenta mergear todas las ramas de manera simultanea “Never Ending-Merge”Nuncaterminas de mergear,parecequesiempre hay algomás “Wrong-Way-Merge”Cuando se integra la version actual con la versión anterior  “Branch-Mania”a situation where branches are created often and for no apparent reason. “Cascading-Branches”a situation where branches are never merged back to the mainline. “Mysterious-Branches”a situation where the purpose of a branch is unknown. “Temporary-Branches”a situation where the purpose of a branch keeps changing and effectively serves as a permanent “temporary workspace”. “Volatile-Branches”a situation where a branch with “unstable” software assets is shared by other branches or merged into another branch. “Development-Freeze”a situation where all development activities are stopped during branching, merging and building new baselines. “Berlin-Wall”A situation where branches are used to divide the development team members, rather than divide the work they are performing.Branches are volatile most of the time while they exist as independent branches, that is the point of having them. The difference is that they should not be shared or merged while they are in an unstable state.
  16. Si hemos llegado hasta aquí, también nos hemos dado cuenta de que podemos abusar de las ramas.Igual que hay patrones de ramas, hay antipatrones. “Never Ending-Merge”Nuncaterminas de mergear,parecequesiempre hay algomás “Wrong-Way-Merge”Cuando se integra la version actual con la versión anterior  “Branch-Mania”a situation where branches are created often and for no apparent reason. “Cascading-Branches”a situation where branches are never merged back to the mainline. “Mysterious-Branches”a situation where the purpose of a branch is unknown. “Temporary-Branches”a situation where the purpose of a branch keeps changing and effectively serves as a permanent “temporary workspace”. “Volatile-Branches”a situation where a branch with “unstable” software assets is shared by other branches or merged into another branch. “Development-Freeze”a situation where all development activities are stopped during branching, merging and building new baselines. “Berlin-Wall”A situation where branches are used to divide the development team members, rather than divide the work they are performing.Branches are volatile most of the time while they exist as independent branches, that is the point of having them. The difference is that they should not be shared or merged while they are in an unstable state.
  17. Si hemos llegado hasta aquí, también nos hemos dado cuenta de que podemos abusar de las ramas.Igual que hay patrones de ramas, hay antipatrones. “Wrong-Way-Merge”Cuando se integra la versión actual con la versión anterior  “Branch-Mania”a situation where branches are created often and for no apparent reason. “Cascading-Branches”a situation where branches are never merged back to the mainline. “Mysterious-Branches”a situation where the purpose of a branch is unknown. “Temporary-Branches”a situation where the purpose of a branch keeps changing and effectively serves as a permanent “temporary workspace”. “Volatile-Branches”a situation where a branch with “unstable” software assets is shared by other branches or merged into another branch. “Development-Freeze”a situation where all development activities are stopped during branching, merging and building new baselines. “Berlin-Wall”A situation where branches are used to divide the development team members, rather than divide the work they are performing.Branches are volatile most of the time while they exist as independent branches, that is the point of having them. The difference is that they should not be shared or merged while they are in an unstable state.