<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sin categorizar Archives - Capitole</title>
	<atom:link href="https://www.capitole-consulting.com/es/blog/category/sin-categorizar/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.capitole-consulting.com/es/blog/category/sin-categorizar/</link>
	<description></description>
	<lastBuildDate>Fri, 10 Jan 2025 12:19:55 +0000</lastBuildDate>
	<language>es</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://www.capitole-consulting.com/wp-content/uploads/2025/02/cropped-Favicon-Web-capitole-32x32.png</url>
	<title>Sin categorizar Archives - Capitole</title>
	<link>https://www.capitole-consulting.com/es/blog/category/sin-categorizar/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>JavaScript : Las características de las Higher-Order Functions</title>
		<link>https://www.capitole-consulting.com/es/blog/capitole-tech-article-higher-order-functions/</link>
		
		<dc:creator><![CDATA[Profile]]></dc:creator>
		<pubDate>Thu, 25 Aug 2022 00:00:00 +0000</pubDate>
				<category><![CDATA[Sin categorizar]]></category>
		<guid isPermaLink="false">https://capitole-web-app-service-hvcegmd5ejaagmd7.northeurope-01.azurewebsites.net/capitole-tech-article-higher-order-functions-2/</guid>

					<description><![CDATA[<p>Higher-Order Functions Estoy seguro de que en más de una ocasión han escuchado hablar de las Higher-Order Functions, pero ¿qué características tienen estas funciones? Y más importante aún ¿para qué nos sirven en nuestro día a día? Las Higher-Order Functions son cualquier función que cumpla con cualquiera de las siguientes dos características: Reciben una función ... <a title="JavaScript : Las características de las Higher-Order Functions" class="read-more" href="https://www.capitole-consulting.com/es/blog/capitole-tech-article-higher-order-functions/" aria-label="Leer más sobre JavaScript : Las características de las Higher-Order Functions">Leer más</a></p>
<p>The post <a href="https://www.capitole-consulting.com/es/blog/capitole-tech-article-higher-order-functions/">JavaScript : Las características de las Higher-Order Functions</a> appeared first on <a href="https://www.capitole-consulting.com/es/">Capitole</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1><span data-fusion-font="true" style="color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-style: var(--body_typography-font-style,normal); letter-spacing: var(--body_typography-letter-spacing); font-size: 33px; line-height: 28px;">Higher-Order Functions</span></h1>
<p><span data-fusion-font="true" style="color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-style: var(--body_typography-font-style,normal); letter-spacing: var(--body_typography-letter-spacing); font-size: 18px; line-height: 28px;">Estoy seguro de que en más de una ocasión han escuchado hablar de</span><b data-fusion-font="true" style="color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-style: var(--body_typography-font-style,normal); letter-spacing: var(--body_typography-letter-spacing); font-size: 18px; line-height: 28px;"> las Higher-Order Functions</b><span data-fusion-font="true" style="color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-style: var(--body_typography-font-style,normal); letter-spacing: var(--body_typography-letter-spacing); font-size: 18px; line-height: 28px;">, pero ¿qué características tienen estas funciones? Y más importante aún ¿para qué nos sirven en nuestro día a día?</span></p>
<p><span style="font-weight: 400; font-size: 18px; line-height: 28px;" data-fusion-font="true">Las Higher-Order Functions son cualquier función que cumpla con cualquiera de las siguientes dos características: </span></p>
<ul>
<li><span style="font-weight: 400; font-size: 18px; line-height: 28px;" data-fusion-font="true">Reciben una función como parámetro </span></li>
<li><span style="font-weight: 400; font-size: 18px; line-height: 28px;" data-fusion-font="true">Retornan una función </span></li>
</ul>
<p><span style="font-weight: 400; font-size: 18px; line-height: 28px;" data-fusion-font="true">Estas dos características le permiten a las Higher-Order Functions </span><b data-fusion-font="true" style="font-size: 18px; line-height: 28px;">generalizar un patrón de código y especializarlo por medio de las funciones que le pasamos como parámetros o de las funciones que retornamos</b><span style="font-weight: 400;"><span data-fusion-font="true" style="font-size: 18px; line-height: 28px;">, veamos un ejemplo con la función map de los arrays, nosotros sabemos que esta función nos permite aplicar una transformación sobre cada uno de los elementos de un array, pero empecemos por un caso en específico, el de multiplicar por dos cada uno de los elementos de un array</span> </span></p>
<p><span data-fusion-font="true" style="font-size: 17px; line-height: 6px;">function multiplyBy2(array) {</span></p>
<p data-fusion-font="true" style="font-size: 17px; line-height: 6px;">
<p style="padding-left: 40px; font-size: 17px; line-height: 6px;" data-fusion-font="true">const newArray =  // Crear nuevo array</p>
<p style="padding-left: 40px; font-size: 17px; line-height: 6px;" data-fusion-font="true">for(const number of array) { // Iteramos sobre el array original</p>
<p style="padding-left: 80px; font-size: 17px; line-height: 6px;" data-fusion-font="true">newArray.push(number*2) // Importante: aqui aplicamos la transformaciòn</p>
<p style="padding-left: 40px; font-size: 17px; line-height: 6px;" data-fusion-font="true">}</p>
<p style="padding-left: 40px; font-size: 17px; line-height: 6px;" data-fusion-font="true">return newArray</p>
<p><span data-fusion-font="true" style="font-size: 17px; line-height: 6px;">}</span> </p>
<p><span style="color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-size: 18px; font-style: var(--body_typography-font-style,normal); letter-spacing: var(--body_typography-letter-spacing); line-height: 28px;" data-fusion-font="true"> </span></p>
<p><span style="color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-size: 18px; font-style: var(--body_typography-font-style,normal); letter-spacing: var(--body_typography-letter-spacing); line-height: 28px;" data-fusion-font="true">Esta función trabaja bien, pero es solo un caso específico de un sin fin de transformaciones que podemos aplicar sobre un array, así que usemos las Higher-Order Functions para </span><b style="color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-size: var(--body_typography-font-size); font-style: var(--body_typography-font-style,normal); letter-spacing: var(--body_typography-letter-spacing);"><span data-fusion-font="true" style="font-size: 18px; line-height: 28px;">generalizar el algoritmo y luego especializarlo</span> </b></p>
<p style="padding-left: 40px; font-size: 17px; line-height: 0px;">
<p><span style="font-weight: 400; font-size: 17px; line-height: 24px;" data-fusion-font="true">function map(mapper, array) {</span></p>
<p><span style="color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-size: 17px; font-style: var(--body_typography-font-style,normal); font-weight: var(--body_typography-font-weight); letter-spacing: var(--body_typography-letter-spacing); line-height: 0px;" data-fusion-font="true"><span data-fusion-font="true" style="line-height: 24px;">const newArray =  // Crear nuevo array</span><br /></span></p>
<p><span style="color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-size: 17px; font-style: var(--body_typography-font-style,normal); font-weight: var(--body_typography-font-weight); letter-spacing: var(--body_typography-letter-spacing); line-height: 0px;" data-fusion-font="true"><span data-fusion-font="true" style="line-height: 6px;"><span data-fusion-font="true" style="line-height: 24px;">for(const number of array) { // Iteramos sobre el array original</span><br /></span></span><span data-fusion-font="true" style="line-height: 6px;"><span data-fusion-font="true" style="line-height: 24px;">newArray.push(mapper(number)) // usamos la funciòn mapper aplicar la transformaciòn</span><br /></span><span style="color: var(--body_typography-color); font-family: var(--body_typography-font-family); font-size: 17px; font-style: var(--body_typography-font-style,normal); font-weight: var(--body_typography-font-weight); letter-spacing: var(--body_typography-letter-spacing); line-height: 0px;" data-fusion-font="true"><span data-fusion-font="true" style="line-height: 6px;"><span data-fusion-font="true" style="line-height: 24px;">}</span><br /></span></span><span data-fusion-font="true" style="line-height: 6px;"><span data-fusion-font="true" style="line-height: 24px;">return newArray</span><br /></span><span style="font-weight: 400; font-size: 17px; line-height: 0px;" data-fusion-font="true"><span data-fusion-font="true" style="line-height: 6px;"><span data-fusion-font="true" style="line-height: 24px;">}</span><br /></span></span><span style="font-weight: 400; font-size: 17px; line-height: 0px;" data-fusion-font="true"><span data-fusion-font="true" style="line-height: 6px;"><span data-fusion-font="true" style="line-height: 24px;">// Uso</span><br /></span></span><span style="font-weight: 400; font-size: 17px; line-height: 0px;" data-fusion-font="true"><span data-fusion-font="true" style="line-height: 6px;"><span data-fusion-font="true" style="line-height: 24px;">const numbers = </span><br /></span></span><span style="font-weight: 400;"><span data-fusion-font="true" style="font-size: 17px; line-height: 24px;">map(number =&gt; number*2, numbers) // </span></span></p>
</p>
<p><span style="font-weight: 400; font-size: 18px; line-height: 28px;" data-fusion-font="true"><br /></span></p>
<p><span style="font-weight: 400; font-size: 18px; line-height: 28px;" data-fusion-font="true">Esta función map es una Higher-Order Functions porque recibe una función como parámetro, esta función map generaliza un patrón de código que es el que nos permite aplicar una transformación sobre un array y lo especializamos a nuestro caso específico de multiplicar por 2 con la función pasada por parámetro, tanto el array sobre el cual iteramos como la transformación que aplicamos puede ser cualquiera. </span></p>
<p><span style="font-weight: 400; font-size: 18px; line-height: 28px;" data-fusion-font="true">Ahora veamos otro ejemplo, imaginemos que tenemos en nuestras aplicaciones muchas funciones que hacen peticiones http y a su vez queremos que si estas fallan registrar ese error en un sistema de registro de errores, nosotros podríamos escribir un código como el siguiente:</span></p>
<p><span style="font-weight: 400; font-size: 17px; line-height: 6px;" data-fusion-font="true">async function getUsers() {</span></p>
<p style="padding-left: 40px; font-size: 17px; line-height: 6px;" data-fusion-font="true">try {</p>
<p style="padding-left: 80px; font-size: 17px; line-height: 6px;" data-fusion-font="true">const users = await fetchingLibrary.get(&#8216;/users&#8217;)</p>
<p style="padding-left: 80px; font-size: 17px; line-height: 6px;" data-fusion-font="true">return users</p>
<p style="padding-left: 40px; font-size: 17px; line-height: 6px;" data-fusion-font="true">} catch (error) {</p>
<p style="padding-left: 80px; font-size: 17px; line-height: 6px;" data-fusion-font="true">logError(error)</p>
<p style="padding-left: 80px; font-size: 17px; line-height: 6px;" data-fusion-font="true">throw error</p>
<p style="padding-left: 40px; font-size: 17px; line-height: 6px;" data-fusion-font="true">}</p>
<p><span style="font-weight: 400;"><span data-fusion-font="true" style="font-size: 17px; line-height: 6px;">}</span> </span></p>
<p><span style="font-weight: 400; font-size: 18px; line-height: 28px;" data-fusion-font="true"> </span></p>
<p><span style="font-weight: 400; font-size: 18px; line-height: 28px;" data-fusion-font="true">En este código hacemos la petición, si hay algún error hacemos log del error y hacemos throw del error para que el consumidor de la función getUsers() maneje el error como le sea conveniente, ahora imaginen hacer esto por cada una de sus funciones que manejan errores, es repetitivo y es un detalle poco relevante a la hora de hacer la petición así que usemos nuestra nueva herramienta para mejorar esto </span></p>
<p><span style="font-weight: 400; font-size: 18px; line-height: 28px;" data-fusion-font="true"> </span></p>
<p><span style="font-weight: 400; font-size: 17px; line-height: 5px;" data-fusion-font="true">function withErrorLogging(fn) {</span></p>
<p style="padding-left: 40px; font-size: 17px; line-height: 5px;" data-fusion-font="true">return async function executeOperation(&#8230;args) {</p>
<p style="padding-left: 80px; font-size: 17px; line-height: 5px;" data-fusion-font="true">try {</p>
<p style="padding-left: 120px; font-size: 17px; line-height: 5px;" data-fusion-font="true">const response = await fn(&#8230;args)</p>
<p style="padding-left: 120px; font-size: 17px; line-height: 5px;" data-fusion-font="true">return response</p>
<p style="padding-left: 80px; font-size: 17px; line-height: 5px;" data-fusion-font="true">} catch (error) {</p>
<p style="padding-left: 120px; font-size: 17px; line-height: 5px;" data-fusion-font="true">logError(error)</p>
<p style="padding-left: 120px; font-size: 17px; line-height: 5px;" data-fusion-font="true">throw error</p>
<p style="padding-left: 80px; font-size: 17px; line-height: 5px;" data-fusion-font="true">}</p>
<p style="padding-left: 40px; font-size: 17px; line-height: 5px;" data-fusion-font="true">}</p>
<p><span style="font-weight: 400; font-size: 17px; line-height: 5px;" data-fusion-font="true">} </span></p>
<p><span style="font-weight: 400; font-size: 17px; line-height: 5px;" data-fusion-font="true">// Uso </span></p>
<p><span style="font-weight: 400; font-size: 17px; line-height: 5px;" data-fusion-font="true">// Esta funciòn getUsers es equivalente a la funciòn que vimos al inicio const getUsers = withErrorLogging(() =&gt; {</span></p>
<p style="padding-left: 40px; font-size: 17px; line-height: 5px;" data-fusion-font="true">return fetchingLibrary.get(&#8216;/users&#8217;)</p>
<p><span style="font-weight: 400; font-size: 17px; line-height: 5px;" data-fusion-font="true">}) </span></p>
<p><span style="font-weight: 400; font-size: 17px; line-height: 5px;" data-fusion-font="true">// Y podemos usar getUsers para muchas otras funciones </span></p>
<p><span style="font-weight: 400; font-size: 17px; line-height: 5px;" data-fusion-font="true">const getPostByID = withErrorLogging((id) =&gt; { </span></p>
<p><span style="font-weight: 400; font-size: 17px; line-height: 5px;" data-fusion-font="true">return fetchingLibrary.get(`/product/${id}`) </span></p>
<p><span style="font-weight: 400; font-size: 17px; line-height: 5px;" data-fusion-font="true">}) </span></p>
<p><span style="font-weight: 400; font-size: 17px; line-height: 5px;" data-fusion-font="true">// Uso de getUsers </span></p>
<p><span style="font-weight: 400;"><span style="font-size: 17px; line-height: 5px;" data-fusion-font="true">const users = await getUsers()</span> </span></p>
<p><span style="font-weight: 400; font-size: 16px; line-height: 24px;" data-fusion-font="true"> </span></p>
<p><span style="font-weight: 400; font-size: 17px; line-height: 24px;" data-fusion-font="true">La función withErrorLogging recibe una función como parámetro que esperamos que retorne una promesa y retorna otra función que llamamos executeOperation que se encargara de recolectar todos los argumentos que se le pasen usando el rest operator de Javascript, ejecutara la función que pasamos como parámetro y retornara el resultado o hará el registro del error en caso de error, la ventaja de esta higher order function es que esta función withErrorLogging puede ser usada para agregarle a cualquier otra función la capacidad de registro de errores. </span></p>
<p><span style="font-weight: 400; font-size: 17px; line-height: 24px;" data-fusion-font="true"><br /></span></p>
<p><span style="font-weight: 400; font-size: 17px; line-height: 29px;" data-fusion-font="true">Espero que les haya gustado y por ultimo les comparto una serie de links que les pueden interesar</span></p>
<p><a href="https://www.npmjs.com/package/promises-fn-utils"><span style="font-weight: 400; font-size: 17px; line-height: 29px;" data-fusion-font="true">promises-fn-utils </span></a><span style="font-weight: 400; font-size: 17px; line-height: 29px;" data-fusion-font="true">Esta librería la hice yo y su idea es tener una serie de Higher-Order Functions para agregar capacidades a funciones que retornan promesas, como politicas de reintento, cache, batching y manejo de concurrencia. </span></p>
<p><a href="https://kentcdodds.com/blog/inversion-of-control"><span style="font-weight: 400; font-size: 17px; line-height: 29px;" data-fusion-font="true">Post de Kent C Dodds que habla un poco sobre este tema explicando inversiòn de</span><span data-fusion-font="true" style="font-size: 17px; line-height: 29px;"> </span><span style="font-weight: 400; font-size: 17px; line-height: 29px;" data-fusion-font="true">control</span><span data-fusion-font="true" style="font-size: 17px; line-height: 29px;"> </span></a></p>
<p><span style="font-weight: 400;"><a href="https://refactoring.guru/es/design-patterns/template-method" data-fusion-font="true" style="font-size: 17px; line-height: 29px;">Patròn de diseño templat</a><span data-fusion-font="true" style="font-size: 17px; line-height: 29px;">e</span></span><span data-fusion-font="true" style="font-size: 17px; line-height: 29px;"> </span><span style="font-weight: 400; font-size: 17px; line-height: 29px;" data-fusion-font="true">Este patrón de diseño es la contraparte de las Higher-Order Functions en el mundo de la programación orientada a objetos</span></p>
<p><span style="font-weight: 400; font-size: 17px; line-height: 29px;" data-fusion-font="true"> </span></p>
<p> Software Engineer</p>
<p>The post <a href="https://www.capitole-consulting.com/es/blog/capitole-tech-article-higher-order-functions/">JavaScript : Las características de las Higher-Order Functions</a> appeared first on <a href="https://www.capitole-consulting.com/es/">Capitole</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Automatización de pruebas de aplicaciones móviles con Appium</title>
		<link>https://www.capitole-consulting.com/es/blog/mobile-app-test-automation-with-appium-2/</link>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Tue, 18 Feb 2020 00:00:00 +0000</pubDate>
				<category><![CDATA[Sin categorizar]]></category>
		<guid isPermaLink="false">https://capitole-web-app-service-hvcegmd5ejaagmd7.northeurope-01.azurewebsites.net/mobile-app-test-automation-with-appium-2/</guid>

					<description><![CDATA[<p>Gracias Johan Cruz por compartir con la comunidad de QA tus conocimientos en la automatización de pruebas móviles con Appium. ¡Gracias a todos por asistir y nos vemos en nuestro próximo meetup!</p>
<p>The post <a href="https://www.capitole-consulting.com/es/blog/mobile-app-test-automation-with-appium-2/">Automatización de pruebas de aplicaciones móviles con Appium</a> appeared first on <a href="https://www.capitole-consulting.com/es/">Capitole</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" src="https://capitole-consulting.com/wp-content/uploads/2020/02/Appium.jpg"></p>
<p>Gracias Johan Cruz por compartir con la comunidad de QA tus conocimientos en la automatización de pruebas móviles con Appium. ¡Gracias a todos por asistir y nos vemos en nuestro próximo meetup!</p>
<p>The post <a href="https://www.capitole-consulting.com/es/blog/mobile-app-test-automation-with-appium-2/">Automatización de pruebas de aplicaciones móviles con Appium</a> appeared first on <a href="https://www.capitole-consulting.com/es/">Capitole</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Cypress.io: Marco de pruebas de extremo a extremo de JavaScript</title>
		<link>https://www.capitole-consulting.com/es/blog/cypress-io-javascript-end-to-end-testing-framework-2/</link>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Mon, 29 Jul 2019 00:00:00 +0000</pubDate>
				<category><![CDATA[Sin categorizar]]></category>
		<guid isPermaLink="false">https://capitole-web-app-service-hvcegmd5ejaagmd7.northeurope-01.azurewebsites.net/cypress-io-javascript-end-to-end-testing-framework-2/</guid>

					<description><![CDATA[<p>¡Muchas gracias a todos los que estuvieron presentes en el meetup y gracias a José por explicarnos todas las ventajas que ofrece Cypress.io! ¡Un gran equipo! ? #TogetherWeAreCapitole #JuntosSomosCapitole #QATeam</p>
<p>The post <a href="https://www.capitole-consulting.com/es/blog/cypress-io-javascript-end-to-end-testing-framework-2/">Cypress.io: Marco de pruebas de extremo a extremo de JavaScript</a> appeared first on <a href="https://www.capitole-consulting.com/es/">Capitole</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" src="https://capitole-consulting.com/wp-content/uploads/2019/07/Cypress.jpg"></p>
<p>¡Muchas gracias a todos los que estuvieron presentes en el meetup y gracias a José por explicarnos todas las ventajas que ofrece Cypress.io!</p>
<p>¡Un gran equipo! ?</p>
<p>#TogetherWeAreCapitole #JuntosSomosCapitole #QATeam</p>
<p>The post <a href="https://www.capitole-consulting.com/es/blog/cypress-io-javascript-end-to-end-testing-framework-2/">Cypress.io: Marco de pruebas de extremo a extremo de JavaScript</a> appeared first on <a href="https://www.capitole-consulting.com/es/">Capitole</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
