<?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>DEV Community: Moises Marques da Silva</title>
    <description>The latest articles on DEV Community by Moises Marques da Silva (@moisesmarques).</description>
    <link>https://dev.to/moisesmarques</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%2F1136687%2F2b41af54-3f9b-4d3a-a631-fa8ce3db6ac9.jpeg</url>
      <title>DEV Community: Moises Marques da Silva</title>
      <link>https://dev.to/moisesmarques</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/moisesmarques"/>
    <language>en</language>
    <item>
      <title>React 18 - useTransition hook</title>
      <dc:creator>Moises Marques da Silva</dc:creator>
      <pubDate>Wed, 07 Feb 2024 19:50:38 +0000</pubDate>
      <link>https://dev.to/moisesmarques/react-18-usetransition-hook-3efj</link>
      <guid>https://dev.to/moisesmarques/react-18-usetransition-hook-3efj</guid>
      <description>&lt;p&gt;In March 2022 React 18 was launched with some new interesting features, in this article we'll talk about the one of the 5 new hooks on React, the useTransition hook.&lt;/p&gt;

&lt;h2&gt;
  
  
  useTransition
&lt;/h2&gt;

&lt;p&gt;This hook is used to control the timing of state changes that could occur based on user interactions. Simply put, useTransition hook enables state updates to occur in a way that is less blocking for user inputs resulting in a smoother user experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of useTransition
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Improved User Experience:&lt;/strong&gt; By using useTransition, developers can ensure that the application remains responsive and interactive during resource-intensive tasks, leading to a better overall user experience.&lt;br&gt;
Smooth Animations: With useTransition, you can create smooth animations that run seamlessly, without blocking the user interface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Better Performance:&lt;/strong&gt; By deferring rendering and updates, the useTransition hook helps prevent unnecessary re-renders and optimizes performance.&lt;br&gt;
Enhanced Code Maintainability: useTransition simplifies the management of complex animations and transitions, making the codebase cleaner and more maintainable.&lt;/p&gt;
&lt;h2&gt;
  
  
  Example: Infinite Scrolling with useTransition
&lt;/h2&gt;

&lt;p&gt;Imagine you have a web application that displays a list of items retrieved from an API. As the user scrolls down, the application fetches additional data to load more items dynamically.&lt;/p&gt;

&lt;p&gt;To provide a smooth user experience, you want to use the useTransition hook to handle the loading state and animations during data fetching.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Create the app&lt;/p&gt;

&lt;p&gt;Open &lt;a href="https://code.visualstudio.com/download" rel="noopener noreferrer"&gt;VS Code&lt;/a&gt; and run the command bellow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app infinity-scroll-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Write the following code on App.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState, useEffect, useTransition, useCallback } from "react";
import "./App.css";
import dummyData from "./dummyData"; // Assuming the file path is correct

function App() {
  const [items, setItems] = useState([]);
  const [page, setPage] = useState(1);
  const [isFetching, setIsFetching] = useState(false);
  const [isPending, startTransition] = useTransition();

  const getItemsFromPage = (currentPage) =&amp;gt; {
    const itemsPerPage = 10; // You can adjust the number of items per page
    const startIndex = (currentPage - 1) * itemsPerPage;
    const endIndex = startIndex + itemsPerPage;
    return dummyData.slice(startIndex, endIndex);
  };

  const fetchMoreData = useCallback(() =&amp;gt; {
    startTransition(() =&amp;gt; {
      setItems((prevItems) =&amp;gt; [...prevItems, ...getItemsFromPage(page)]);
      setIsFetching(false);
    });
  }, [page, startTransition]);

  useEffect(() =&amp;gt; {
    if (isFetching) {
      fetchMoreData();
    }
  }, [fetchMoreData, isFetching]);

  const handleScroll = () =&amp;gt; {
    const windowHeight = window.innerHeight;
    const documentHeight = document.documentElement.scrollHeight;
    const scrollTop = window.scrollY;

    if (scrollTop + windowHeight &amp;gt;= documentHeight) {
      setIsFetching(true);
      setPage((prevPage) =&amp;gt; prevPage + 1);
    }
  };

  useEffect(() =&amp;gt; {
    fetchMoreData();
    window.addEventListener("scroll", handleScroll);
    return () =&amp;gt; window.removeEventListener("scroll", handleScroll);
  }, [fetchMoreData]);

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;table className="table"&amp;gt;
        &amp;lt;thead&amp;gt;
          &amp;lt;tr&amp;gt;
            &amp;lt;th&amp;gt;Name&amp;lt;/th&amp;gt;
            &amp;lt;th&amp;gt;Age&amp;lt;/th&amp;gt;
            &amp;lt;th&amp;gt;Country&amp;lt;/th&amp;gt;
          &amp;lt;/tr&amp;gt;
        &amp;lt;/thead&amp;gt;
        &amp;lt;tbody&amp;gt;
          {items.map((item, index) =&amp;gt; (
            &amp;lt;tr key={item._id}&amp;gt;
              &amp;lt;td&amp;gt;{item.name}&amp;lt;/td&amp;gt;
              &amp;lt;td&amp;gt;{item.age}&amp;lt;/td&amp;gt;
              &amp;lt;td&amp;gt;{item.country}&amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
          ))}
        &amp;lt;/tbody&amp;gt;
      &amp;lt;/table&amp;gt;
      {isPending &amp;amp;&amp;amp; &amp;lt;div&amp;gt;Loading more items...&amp;lt;/div&amp;gt;}
    &amp;lt;/div&amp;gt;
  );
}

export default App;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>My Favorite Microservices Courses</title>
      <dc:creator>Moises Marques da Silva</dc:creator>
      <pubDate>Wed, 17 Jan 2024 12:10:51 +0000</pubDate>
      <link>https://dev.to/moisesmarques/my-favorite-microservices-courses-1n9o</link>
      <guid>https://dev.to/moisesmarques/my-favorite-microservices-courses-1n9o</guid>
      <description>&lt;p&gt;&lt;strong&gt;Microservices Foundations&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/learning/microservices-foundations" rel="noopener noreferrer"&gt;https://www.linkedin.com/learning/microservices-foundations&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Microservices Design Patterns&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/learning/microservices-design-patterns" rel="noopener noreferrer"&gt;https://www.linkedin.com/learning/microservices-design-patterns&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DevOps Foundations: Microservices&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/learning/devops-foundations-microservices" rel="noopener noreferrer"&gt;https://www.linkedin.com/learning/devops-foundations-microservices&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Microservices Security&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/learning/microservices-security/securing-microservices" rel="noopener noreferrer"&gt;https://www.linkedin.com/learning/microservices-security/securing-microservices&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Microservices Asynchronous Messaging&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/learning/microservices-asynchronous-messaging" rel="noopener noreferrer"&gt;https://www.linkedin.com/learning/microservices-asynchronous-messaging&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Software Architecture: Breaking a Monolith into Microservices&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/learning/software-architecture-breaking-a-monolith-into-microservices" rel="noopener noreferrer"&gt;https://www.linkedin.com/learning/software-architecture-breaking-a-monolith-into-microservices&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The Age of AI: Three disruptive SaaS Ideas for your AI business</title>
      <dc:creator>Moises Marques da Silva</dc:creator>
      <pubDate>Thu, 10 Aug 2023 15:43:49 +0000</pubDate>
      <link>https://dev.to/moisesmarques/the-age-of-ai-three-disruptive-saas-ideas-for-your-ai-business-1lof</link>
      <guid>https://dev.to/moisesmarques/the-age-of-ai-three-disruptive-saas-ideas-for-your-ai-business-1lof</guid>
      <description>&lt;p&gt;As the development of AIs becomes more and more prominent, it is necessary to update and think of new ways to generate revenue using this new technology.&lt;/p&gt;

&lt;p&gt;Here are some disruptive ideas:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Psychotherapy: A portal where people can consult and get help for psychological treatment, taking advantage of generative AI resources and teaching it to serve people. Don't forget to keep the user in control of their information, an RSA + AES encryption would come in handy here.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Legal advice: There are several areas of law that can be explored in order to provide legal advice, clients can even use an APP on their smartphones that uses information such as location and voice recording to provide insight into their actions and understand what to avoid in order not to fall into a trap for example. Web3 concepts will also apply here, as nobody wants their data exposed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Medical Report: Once you went to a clinic and did several tests, from a simple glucose index to an Electrocardiogram (ECG), you must present them to a doctor so that he can carry out the report and in case of a disease recommends a treatment or medicine, logically it is not possible to issue a medical report without a doctor "yet".&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;How about adding to the tool the possibility of doctors being able to validate the report generated by the AI?&lt;/p&gt;

&lt;p&gt;Are we talking about the Uber of doctors?&lt;/p&gt;

&lt;p&gt;Perhaps...&lt;/p&gt;

</description>
    </item>
    <item>
      <title>AI Developer - The future of software development</title>
      <dc:creator>Moises Marques da Silva</dc:creator>
      <pubDate>Thu, 10 Aug 2023 13:37:47 +0000</pubDate>
      <link>https://dev.to/moisesmarques/ai-developer-the-future-of-software-development-326d</link>
      <guid>https://dev.to/moisesmarques/ai-developer-the-future-of-software-development-326d</guid>
      <description>&lt;p&gt;As AI tools improve to aid software development, it is increasingly noticeable how language-specific semantics and syntax become obsolete, as well as libraries and frameworks. Tools like Github Copilot and Amazon's Code Whisperer translate intent from the developer and deliver the block or algorithm done, with few or no adjustments it is possible to have entire code pages working.&lt;/p&gt;

&lt;p&gt;A possible collision and intersection of all languages and frameworks for a single development package is expected for the future, probably as machine-optimized as possible, since we will only interact with AI to develop our systems.&lt;/p&gt;

&lt;p&gt;In DevOps we can already find tools like AWS Copilot, a tool capable of automatically creating deployment flows, based on the best configurations made by specialists over the years.&lt;/p&gt;

&lt;p&gt;To say that a person has a better capacity to validate an algorithm than an AI is a contentious statement, it would take several years of study for someone to be able to beat a machine that already has all this information, however it is necessary to take some care so that the instructions are provided appropriately.&lt;/p&gt;

&lt;p&gt;The AI Developer will be at the forefront of decision-making with the business that is intended to be served, he will have to develop skills much more similar to that of a salesperson than a technician, he will need to understand the business in order to deliver the best solution, he will practically configure the solution intended by the customer.&lt;/p&gt;

&lt;p&gt;Obviously, this all sounds simple in words, but those who have already taken the AWS, Azure or GCP certifications know that there are countless possibilities to solve the same problem, and that from the point of view of business, budget and customer needs.&lt;/p&gt;

&lt;p&gt;Conclusion:&lt;/p&gt;

&lt;p&gt;In my view, highly technical people will continue to work behind AI tools for a long time, as there is a need to code them, until one day they can solve their own limitations and upgrade themselves.&lt;/p&gt;

&lt;p&gt;The current developer, who is not working with AI development needs to start thinking more like an architect and salesperson and look to solve real world problems with the help of AI, as the software developer will not exist in a few years, but to do maintenance or migrating existing code bases. Why not create tools to migrate codes or systems?&lt;/p&gt;

&lt;p&gt;Despite everything read above, the future looks promising, in all my career I met few people really dedicated to technology, many used it only as a business or a means to an end, from now on, I begin to realize that the market will need extremely technical people (scientists) while the rest will look more like business consultants to meet market needs.&lt;/p&gt;

</description>
      <category>ai</category>
    </item>
  </channel>
</rss>
