<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Gerardo Antonio Gerónimo Vasconcelos</title>
    <description>The latest articles on Forem by Gerardo Antonio Gerónimo Vasconcelos (@gajaguar).</description>
    <link>https://forem.com/gajaguar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F805419%2Ff0c586a2-d3d8-4863-8bb2-1df909ad897f.png</url>
      <title>Forem: Gerardo Antonio Gerónimo Vasconcelos</title>
      <link>https://forem.com/gajaguar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/gajaguar"/>
    <language>en</language>
    <item>
      <title>Improve your app by using validations</title>
      <dc:creator>Gerardo Antonio Gerónimo Vasconcelos</dc:creator>
      <pubDate>Tue, 04 Jul 2023 15:22:12 +0000</pubDate>
      <link>https://forem.com/gajaguar/improve-your-app-by-using-validations-2mem</link>
      <guid>https://forem.com/gajaguar/improve-your-app-by-using-validations-2mem</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;They're akin to bouncers at a nightclub, ensuring adherence to age, dress code, and proper conduct before granting entrance.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We can depict validations as a series of rules applied to data in transit to or from an application.&lt;/p&gt;

&lt;p&gt;The paramount objective of these rules is to uphold the quality, security, and consistency of the data. Thus, it is highly advisable to devise interfaces with validations, as they, among other benefits, assist us to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deter security breaches.&lt;/li&gt;
&lt;li&gt;Enhance user interaction.&lt;/li&gt;
&lt;li&gt;Facilitate maintenance and scalability.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are assorted methods and degrees of implementing these validations, as well as a broad spectrum of tools that adapt according to the complexity and format of the data. Some of the most prevalent approaches encompass verifying:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The content types in the request (Content-type).&lt;/li&gt;
&lt;li&gt;The parameters and bodies of the requests.&lt;/li&gt;
&lt;li&gt;The headers and response codes.&lt;/li&gt;
&lt;li&gt;The formats and structures of the data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even if you're merely consuming an API, embedding validations into your application will yield substantial value, as you'll be providing &lt;a href="https://dev.to/gajaguar/optimistic-ui-and-the-balance-between-speed-and-precision-19jl"&gt;immediate feedback&lt;/a&gt; while averting unnecessary requests.&lt;/p&gt;




&lt;p&gt;The application of data validations in APIs is a highly commendable practice that considerably augments the quality of applications and instills confidence in the users.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>api</category>
      <category>security</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Mejora tu aplicación usando validaciones</title>
      <dc:creator>Gerardo Antonio Gerónimo Vasconcelos</dc:creator>
      <pubDate>Tue, 04 Jul 2023 15:11:21 +0000</pubDate>
      <link>https://forem.com/gajaguar/mejora-tu-aplicacion-usando-validaciones-db6</link>
      <guid>https://forem.com/gajaguar/mejora-tu-aplicacion-usando-validaciones-db6</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Son como gorilas en un club, verifican que se tenga la edad, el código de vestimenta y la actitud correctos antes de dejar entrar.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Podemos definir las validaciones como un conjunto de reglas que se aplican a los datos que viajan hacia o desde una aplicación.&lt;/p&gt;

&lt;p&gt;El objetivo principal de estas reglas es garantizar la calidad, seguridad y consistencia de los datos. Por lo tanto, es altamente recomendable crear interfaces con validaciones, ya que, entre otras cosas, nos ayudan a:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prevenir ataques de seguridad.&lt;/li&gt;
&lt;li&gt;Mejorar la experiencia de usuario.&lt;/li&gt;
&lt;li&gt;Facilitar el mantenimiento y la escalabilidad.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Existen diversas formas y niveles de implementación de estas validaciones, así como una amplia variedad de herramientas que se adaptan según la complejidad y el formato de los datos. Algunos de los enfoques más comunes incluyen verificar:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Los tipos de contenido en la solicitud (Content-type).&lt;/li&gt;
&lt;li&gt;Los parámetros y los cuerpos de las solicitudes.&lt;/li&gt;
&lt;li&gt;Las cabeceras y los códigos de respuesta.&lt;/li&gt;
&lt;li&gt;Los formatos y las estructuras de los datos.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Incluso si solo estás consumiendo una API, agregar validaciones en tu aplicación aportará un gran valor, ya que proporcionarás &lt;a href="https://dev.to/gajaguar/optimistic-ui-y-el-equilibrio-entre-rapidez-y-precision-4cio"&gt;retroalimentación inmediata&lt;/a&gt; al tiempo que evitarás realizar solicitudes innecesarias.&lt;/p&gt;




&lt;p&gt;El uso de validaciones de datos en las APIs es una práctica altamente recomendable que mejora considerablemente la calidad de las aplicaciones y genera confianza en los usuarios.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>api</category>
      <category>security</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Optimistic UI and the balance between speed and precision</title>
      <dc:creator>Gerardo Antonio Gerónimo Vasconcelos</dc:creator>
      <pubDate>Tue, 27 Jun 2023 02:12:02 +0000</pubDate>
      <link>https://forem.com/gajaguar/optimistic-ui-and-the-balance-between-speed-and-precision-19jl</link>
      <guid>https://forem.com/gajaguar/optimistic-ui-and-the-balance-between-speed-and-precision-19jl</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Just as in life, always assuming everything will be alright may not be the healthiest, no matter what kitten posters say.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A concept that has been in vogue for a couple of years now is the Optimistic User Interface. It's a design technique that enhances the user experience by showing immediate changes in the interface, before receiving confirmation from the server.&lt;/p&gt;

&lt;p&gt;The initial phrase alludes to the fact that in a world where everything goes fast, we want to give our users a sense of speed and fluidity. But sometimes, this can cause us trouble.&lt;/p&gt;

&lt;p&gt;One of the risks of using this technique is provoking a &lt;em&gt;race condition&lt;/em&gt;, which occurs when two or more processes access the same resource at the same time.&lt;/p&gt;

&lt;p&gt;How could something like this happen? Imagine a home delivery pizza application, which connects to an API. It allows you to save your ingredient preferences, but today you feel like swapping the cheese for ham; so you save the changes and place the order, and you get the message that in 10 minutes you'll have your pizza at home.&lt;/p&gt;

&lt;p&gt;The thing is, the API received the change in preferences and the order at the same time. And the order was made with the previous preferences, before they were updated. Imagine your face when you see your pizza with cheese!&lt;/p&gt;

&lt;p&gt;While it's possible this is due to poor architecture, these types of changes are usually harder and more costly to make. A simpler solution would have been to wait for the change in preferences to be confirmed before placing the order.&lt;/p&gt;




&lt;p&gt;An Optimistic UI can enhance the experience by showing immediate changes. However, it's important to keep in mind the risks and take measures to prevent issues. By balancing speed and accuracy, we can offer an optimal experience.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>webdev</category>
      <category>design</category>
      <category>ux</category>
    </item>
    <item>
      <title>Optimistic UI y el equilibrio entre rapidez y precisión</title>
      <dc:creator>Gerardo Antonio Gerónimo Vasconcelos</dc:creator>
      <pubDate>Tue, 27 Jun 2023 01:59:03 +0000</pubDate>
      <link>https://forem.com/gajaguar/optimistic-ui-y-el-equilibrio-entre-rapidez-y-precision-4cio</link>
      <guid>https://forem.com/gajaguar/optimistic-ui-y-el-equilibrio-entre-rapidez-y-precision-4cio</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Así como en la vida, asumir siempre que todo estará bien puede no ser lo más saludable, sin importar lo que digan los carteles con gatitos.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Un concepto que se ha puesto de moda desde hace un par de años es la interfaz de usuario optimista. Se trata de una técnica de diseño que mejora la experiencia del usuario al mostrar cambios inmediatos en la interfaz, antes de recibir la confirmación del servidor.&lt;/p&gt;

&lt;p&gt;La frase inicial hace alusión a que en un mundo donde todo va rápido, queremos dar una sensación de rapidez y fluidez a nuestros usuarios. Pero a veces, eso puede traernos problemas.&lt;/p&gt;

&lt;p&gt;Uno de los riesgos de usar esta técnica es provocar una condición de carrera, que se da cuando dos o más procesos acceden a un mismo recurso al mismo tiempo.&lt;/p&gt;

&lt;p&gt;¿Cómo podría ocurrir algo así? Imagina una aplicación para pedir pizza a domicilio, que se conecta a una API. Ésta te permite guardar tus preferencias de ingredientes, pero hoy te apetece cambiar el queso por el jamón; así que guardas los cambios y haces el pedido, y te aparece el mensaje de que en 10 minutos tendrás tu pizza en casa.&lt;/p&gt;

&lt;p&gt;Lo que pasa es que la API recibió al mismo tiempo el cambio en las preferencias y el pedido. Y el pedido se hizo con las preferencias anteriores, antes de que se actualizaran. ¡Imagina tu cara al ver tu pizza con queso!&lt;/p&gt;

&lt;p&gt;Aunque es posible que esto se deba a una mala arquitectura, este tipo de cambios suelen ser más difíciles y costosos de hacer. Una solución más sencilla habría sido esperar a que se confirmara el cambio en las preferencias antes de hacer el pedido.&lt;/p&gt;




&lt;p&gt;Una Interfaz de Usuario Optimista puede mejorar la experiencia al mostrar cambios inmediatos. Sin embargo, es importante tener en cuenta los riesgos y tomar medidas para evitar problemas. Al equilibrar velocidad y precisión, podemos ofrecer una experiencia óptima.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>webdev</category>
      <category>design</category>
      <category>ux</category>
    </item>
    <item>
      <title>Laziness at work: How to harness it without getting fired</title>
      <dc:creator>Gerardo Antonio Gerónimo Vasconcelos</dc:creator>
      <pubDate>Sun, 18 Jun 2023 20:07:44 +0000</pubDate>
      <link>https://forem.com/gajaguar/laziness-at-work-how-to-harness-it-without-getting-fired-550i</link>
      <guid>https://forem.com/gajaguar/laziness-at-work-how-to-harness-it-without-getting-fired-550i</guid>
      <description>&lt;p&gt;In &lt;a href="https://dev.to/gajaguar/harnessing-the-power-of-laziness-in-software-development-5ged"&gt;a previous post&lt;/a&gt;, I mentioned how being "lazy" could contribute a lot to our work, as well as avoiding unnecessary errors. Sounds great, right?&lt;/p&gt;

&lt;p&gt;However, indiscriminate use of laziness can bring more problems than benefits. Lazy operations often make our code harder to understand, debug, and test. Sometimes, you might not even know when or how an expression is evaluated, or what side effects it could have. And if not careful, we could end up with a huge expression that was never evaluated or, even worse, cause a stack overflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  With great power comes great responsibility
&lt;/h2&gt;

&lt;p&gt;Some of the considerations we can keep in mind regarding the use of lazy loads or evaluations are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use them only when it makes sense. We shouldn't be lazy just for the sake of it; if an expression is cheap to compute, or its value is needed immediately, simply execute it.&lt;/li&gt;
&lt;li&gt;Be aware of the trade-offs. Can it improve performance and modularity? Yes, but it can also introduce complexity and unpredictability; so we must make sure we understand the benefits and costs of using it in a specific context.&lt;/li&gt;
&lt;li&gt;Test the code thoroughly. It is very likely that it will be more prone to failures and errors, so we must make sure to test it with different inputs and scenarios, and thus verify if there are unexpected behaviors or results.&lt;/li&gt;
&lt;li&gt;Document everything, well... Not everything. Lazy operations can make the code less readable and maintainable; so it's advisable to make sure we clearly document and explain why and how they were used.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Developing with a lazy focus is a powerful tool that can help us write better software. But like any tool, it can also be misused or abused. Use laziness carefully and cautiously to make the most of its benefits without falling into its possible pitfalls.&lt;/p&gt;

&lt;p&gt;Remember, don't let laziness take over you!&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>programming</category>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>La pereza en el trabajo: Cómo aprovecharla sin ser despedido</title>
      <dc:creator>Gerardo Antonio Gerónimo Vasconcelos</dc:creator>
      <pubDate>Sun, 18 Jun 2023 19:58:43 +0000</pubDate>
      <link>https://forem.com/gajaguar/-la-pereza-en-el-trabajo-como-aprovecharla-sin-ser-despedido-43l7</link>
      <guid>https://forem.com/gajaguar/-la-pereza-en-el-trabajo-como-aprovecharla-sin-ser-despedido-43l7</guid>
      <description>&lt;p&gt;En &lt;a href="https://dev.to/gajaguar/aprovechar-el-poder-de-la-pereza-en-el-desarrollo-de-software-bhf"&gt;una publicación anterior&lt;/a&gt;, mencioné como ser "perezoso" podía aportar mucho a nuestro trabajo, así como a evitar errores innecesarios. ¡Suena genial! ¿Cierto?&lt;/p&gt;

&lt;p&gt;Sin embargo el uso indiscriminado de la pereza puede traer más problemas que beneficios. Las operaciones perezosas suelen hacer que nuestro código sea más difícil de entender, depurar y probar. A veces, es posible que ni siquiera se sepa cuándo o cómo se evalúa una expresión, o qué efectos secundarios podría tener. Y si no se tiene cuidado, podríamos terminar con una expresión enorme que nunca se evaluó o peor aún, provocar un desbordamiento de la pila de tareas.&lt;/p&gt;

&lt;h2&gt;
  
  
  Todo gran poder conlleva una gran responsabilidad
&lt;/h2&gt;

&lt;p&gt;Algunas de las consideraciones que podemos tener en cuenta ante el uso de las cargas o evaluaciones perezosas son:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Utilizarlas sólo cuando tenga sentido. No hay que ser perezosos por el simple hecho de serlo, si una expresión es barata de calcular, o se necesita su valor de inmediato simplemente hay que ejecutarla y ya.&lt;/li&gt;
&lt;li&gt;Ser consciente de las compensaciones. ¿Se puede mejorar el rendimiento y la modularidad? Sí, pero también se puede introducir complejidad e imprevisibilidad; entonces hay que asegurarnos de comprender los beneficios y costos de su uso en un contexto específico.&lt;/li&gt;
&lt;li&gt;Probar el código a fondo. Es muy probable que éste sea más propenso a fallas y errores por ello debemos asegúrenos de probarlo con diferentes entradas y escenarios, y así verificar si hay comportamientos o resultados inesperados.&lt;/li&gt;
&lt;li&gt;Documentar todo, bueno... No todo. Las operaciones perezosas pueden hacer el código sea menos legible y mantenible; entonces es recomendable asegurarnos de documentar claramente y explicar por qué y cómo se usaron.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;El desarrollo con un enfoque perezoso es una herramienta poderosa que puede ayudarnos a escribir un mejor software. Pero como cualquier herramienta, también puede ser mal utilizada o abusada. Usa la pereza con cuidado y precaución para aprovechar al máximo sus beneficios sin caer en sus posibles problemas.&lt;/p&gt;

&lt;p&gt;Recuerda ¡No dejes que la pereza se apodere de ti!&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>programming</category>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Harnessing the power of laziness in software development</title>
      <dc:creator>Gerardo Antonio Gerónimo Vasconcelos</dc:creator>
      <pubDate>Wed, 14 Jun 2023 01:05:15 +0000</pubDate>
      <link>https://forem.com/gajaguar/harnessing-the-power-of-laziness-in-software-development-5ged</link>
      <guid>https://forem.com/gajaguar/harnessing-the-power-of-laziness-in-software-development-5ged</guid>
      <description>&lt;p&gt;You are at a buffet dinner, with a plate in your hand and a table full of delicious dishes. Would you choose to bring to your table everything you can carry, or would you simply take a small portion and come back for more if you wish?&lt;/p&gt;

&lt;p&gt;If you chose the second option, Great! You're like Sid (a little reference to Ice Age) But don't worry, the truth is that in software development this is a widely accepted and beneficial strategy.&lt;/p&gt;

&lt;p&gt;In this context, we refer to a couple of techniques known as &lt;em&gt;lazy evaluation&lt;/em&gt; or &lt;em&gt;lazy loading&lt;/em&gt;, which are ways to use resources efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lazy evaluation
&lt;/h2&gt;

&lt;p&gt;You don't throw all the meat on the grill at once, you better wait for the diners to request it.&lt;/p&gt;

&lt;p&gt;In technical terms, lazy evaluation consists of postponing the evaluation of an expression until the results are needed, similar to an on-demand service.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lazy loading
&lt;/h2&gt;

&lt;p&gt;This technique is very similar to the previous one, but in this case, the creation or initialization of objects is delayed.&lt;/p&gt;

&lt;p&gt;If an event starts at 6 in the evening, there is no reason for you to start getting ready at 6 in the morning.&lt;/p&gt;




&lt;p&gt;In summary, being "lazy" in software development involves making smart decisions about how and when to use resources, avoiding unnecessary expenses and optimizing performance. It is a strategy that can lead to more efficient code and better use of available resources.&lt;/p&gt;

&lt;p&gt;As in our life, it is completely valid to avoid unnecessary efforts in order to concentrate our physical and mental resources on those tasks that really interest us.&lt;/p&gt;

</description>
      <category>softwareengineering</category>
      <category>programming</category>
      <category>concepts</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Aprovechar el poder de la pereza en el desarrollo de software</title>
      <dc:creator>Gerardo Antonio Gerónimo Vasconcelos</dc:creator>
      <pubDate>Wed, 14 Jun 2023 00:59:56 +0000</pubDate>
      <link>https://forem.com/gajaguar/aprovechar-el-poder-de-la-pereza-en-el-desarrollo-de-software-bhf</link>
      <guid>https://forem.com/gajaguar/aprovechar-el-poder-de-la-pereza-en-el-desarrollo-de-software-bhf</guid>
      <description>&lt;p&gt;Te encuentras en una cena buffet, con un plato en la mano y una mesa llena de deliciosos platillos. ¿Optarías por llevar a tu mesa todo lo que puedas cargar,  o simplemente tomarías una pequeña porción y volverías por más si así lo deseas?&lt;/p&gt;

&lt;p&gt;Si elegiste la segunda opción, ¡Genial! Eres como Sid (una pequeña referencia a La Era de Hielo) Pero no te preocupes, lo cierto es que en el desarrollo de software es una estrategia ampliamente aceptada y beneficiosa.&lt;/p&gt;

&lt;p&gt;En este contexto, nos referimos a un par de técnicas conocidas como &lt;em&gt;evaluación perezosa&lt;/em&gt; o &lt;em&gt;carga perezosa&lt;/em&gt;, las cuales son formas de aprovechar los recursos de manera eficiente.&lt;/p&gt;

&lt;h2&gt;
  
  
  Evaluación perezosa
&lt;/h2&gt;

&lt;p&gt;No echas toda la carne al asador, mejor esperas a que los comensales lo soliciten.&lt;/p&gt;

&lt;p&gt;En términos técnicos, la evaluación perezosa consiste en posponer la evaluación de una expresión hasta el momento en que se necesiten los resultados, similar a un servicio bajo demanda.&lt;/p&gt;

&lt;h2&gt;
  
  
  Carga perezosa
&lt;/h2&gt;

&lt;p&gt;Esta técnica es muy similar a la anterior, pero en este caso, se retrasa la creación o inicialización de los objetos.&lt;/p&gt;

&lt;p&gt;Si un evento comienza a las 6 de la tarde, no tendrías por qué comenzar a alistarte desde las 6 de la mañana.&lt;/p&gt;




&lt;p&gt;En resumen, ser "perezoso" en el desarrollo de software implica tomar decisiones inteligentes sobre cómo y cuándo utilizar los recursos, evitando gastos innecesarios y optimizando el rendimiento. Es una estrategia que puede conducir a un código más eficiente y a un mejor aprovechamiento de los recursos disponibles.&lt;/p&gt;

&lt;p&gt;Al igual que en nuestra vida es completamente válido evitar los esfuerzos innecesarios para así poder concentrar nuestros recursos físicos y mentales en aquellas tareas que realmente nos interesan.&lt;/p&gt;

</description>
      <category>softwareengineering</category>
      <category>programming</category>
      <category>concepts</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
