<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Daniel Bueno on Medium]]></title>
        <description><![CDATA[Stories by Daniel Bueno on Medium]]></description>
        <link>https://medium.com/@daniifrankb?source=rss-3e017ddd11ea------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gNbnGQz0hqgPKtJQfYR-KQ.jpeg</url>
            <title>Stories by Daniel Bueno on Medium</title>
            <link>https://medium.com/@daniifrankb?source=rss-3e017ddd11ea------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 01:54:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@daniifrankb/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Generative AI: Foundations, Practice, and Bringing It into the Workplace]]></title>
            <link>https://medium.com/@daniifrankb/generative-ai-foundations-practice-and-bringing-it-into-the-workplace-1b68678a052c?source=rss-3e017ddd11ea------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b68678a052c</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[gen-ai-for-business]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Daniel Bueno]]></dc:creator>
            <pubDate>Mon, 10 Nov 2025 20:48:16 GMT</pubDate>
            <atom:updated>2025-11-10T20:50:13.489Z</atom:updated>
            <content:encoded><![CDATA[<p>Artificial Intelligence it’s quietly shaping how we work, learn, and create. Whether through writing assistants, recommendation systems, or data-driven tools, AI is increasingly woven into our daily workflows.</p><p>This article brings together the notes and reflections I made while completing the <a href="https://coursera.org/share/b740f9c658b19d55c86f48c8024cf1f5"><em>Generative AI Leadership Specialization</em></a> on Coursera. My goal is to turn these learnings into something useful for others starting this journey, with a structured overview of AI fundamentals, its modern approaches, and what it takes to introduce it thoughtfully into an organization.</p><h4>Core Concepts: From classic AI to Generative Models</h4><p>Artificial Intelligence (AI) refers to the development of machines that can perform tasks typically requiring human intelligence, such as reasoning, learning, or decision-making.</p><p>Before today’s data-driven systems, AI relied on what’s often called “classic AI” or symbolic AI, approaches based on logic, rules, and expert knowledge rather than learning from data. These systems used predefined rules (“if this, then that”) to mimic human reasoning. Examples include early chess programs that followed fixed strategies, medical expert systems that suggested diagnoses based on symptom checklists, or automated customer service menus that guided users through structured choices. Classic AI worked well in narrow, clearly defined situations but struggled with ambiguity, nuance, or learning new patterns on its own, limitations that led to the rise of machine learning.</p><p>Within AI, Machine Learning (ML) focuses on algorithms that learn from data rather than being explicitly programmed. It allows systems to identify patterns and improve over time. For instance, ML helps streaming platforms like Netflix or Spotify recommend shows or songs based on your previous choices and it also drives fraud detection systems in banking by learning to recognize unusual spending behavior.</p><p>Deep Learning, a subfield of ML, uses artificial neural networks with many layers to extract complex patterns from large datasets. It’s what enables image recognition, speech understanding, and the creation of human-like text. Deep learning powers technologies like facial recognition on smartphones, automatic translation tools such as Google Translate, and voice assistants that understand natural speech. It’s also behind autonomous vehicles, which interpret visual data from cameras and sensors to navigate safely.</p><p>Recent years have introduced Foundation Models: large-scale models trained on vast and diverse data. Because they capture such a broad understanding of the world, they can be adapted for a wide range of tasks with minimal additional training.</p><p>Generative AI builds upon this foundation. Rather than classifying or predicting, these systems <em>generate</em> — producing new text, images, code, or audio. Large Language Models (LLMs), such as GPT or Gemini, are the most widely used examples. They interpret and produce language, allowing us to interact with technology through natural conversation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PA3Z3MP0Wq2gThqr_2SdHQ.png" /></figure><h4>Data and machine learning</h4><p>Every AI system depends on data. Data can appear in many forms and its classified as structured or unestructed. Structured data is neatly organized and easy to search, as in a database. Unstructured data, such as text documents or images, has no fixed format and requires more advanced analysis techniques.</p><p>For any AI project, two qualities matter most: data quality (accuracy, completeness, and relevance) and data accessibility (availability and readiness for model training). Without both, even the best algorithms will underperform.</p><p>Building a machine learning solution follows a general progression:</p><ul><li><em>Data ingestion and preparation</em>: involves cleaning and transforming raw data into a usable form.</li><li>Then comes <em>model training</em>, where the algorithm learns from that data.</li><li>Once the model performs well, it moves into <em>deployment</em>, where it can be accessed by users or other systems.</li><li>Over time, <em>model management</em> ensures that performance stays consistent as new data or conditions emerge.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nUQbEBUvleIJ5VBbQDw4Ug.png" /></figure><p>Machine learning generally falls into three categories.</p><ul><li><em>Supervised learning</em><strong>: </strong>the model is trained on labeled (structured) data, learning to predict outcomes from examples. A classic example is email classification, where the model learns to label messages as <em>spam</em> or <em>not spam</em> based on thousands of pre-labeled examples. It’s also used for price prediction, such as estimating a home’s value from data like size, location, and number of rooms, or for image recognition, where a model learns to identify whether a photo shows a cat, a dog, or a car.</li><li><em>Unsupervised learning</em><strong><em>:</em></strong> the model searches for hidden structures or groupings within unlabeled data. An example of usage for this approach is customer segmentation, where businesses group clients with similar behaviors or preferences, and for topic modeling, which automatically discovers themes in large text collections.</li><li><em>Reinforcement learning:</em> teaches a model to make decisions through feedback, rewarding actions that lead to good outcomes (similar to how humans learn through experience). In the real world, reinforcement learning also supports self-driving cars, which continuously adjust their behavior (accelerating, braking, turning) based on feedback from their environment to maximize safety and efficiency.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c91efRthHuZHaje2C0UsxQ.png" /></figure><h4>Foundation Models and Generative AI in Practice</h4><p>Foundation models are what make Generative AI possible. They are trained on immense and diverse datasets, which allows them to adapt to many contexts and use cases.</p><p>This approach marks a shift from traditional machine learning, where each model had to be trained separately for one task (for example, classifying emails or predicting sales). Foundation models, in contrast, develop a broad understanding of language, vision, and reasoning, allowing them to adapt quickly to new contexts with minimal additional training, a process known as <em>fine-tuning</em>. Because they are trained on multiple types of data, foundation models can also be <em>multimodal</em>, capable of processing and generating different kinds of content simultaneously.</p><p>You can see their flexibility in tools like ChatGPT or Gemini for language, Midjourney for image generation, or GitHub Copilot for coding assistance. Each of these applications builds on a foundation model that has been fine-tuned for a specific goal (writing, visual creation, or software development).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FQLRVIzTLKNrWT0I.jpeg" /><figcaption>Traditional Machine Learning vs Foundation Models. Source: Armand Ruiz</figcaption></figure><p>As these models grew in capability, the way we interact with them became just as important as their architecture. Instead of programming them with code, we communicate through natural language instructions. This new interface, known as <em>prompting, </em>allows anyone to guide a model’s behavior and shape its output simply by writing or speaking commands.</p><p>A prompt can be a direct question, a detailed instruction, or a short example that defines what we expect the AI to produce. How a user frames that input can dramatically change the quality, tone, and usefulness of the response.</p><p>There are many effective prompting techniques. Some involve giving the model no examples (<em>zero-shot</em>), while others include one or a few examples (<em>one-shot</em> or <em>few-shot</em>) to demonstrate what a good answer looks like. You can also assign a <em>role </em>or<em> persona</em>, such as “act as a travel guide” or “be a friendly tutor,” to shape the model’s style and focus. <em>Prompt chaining</em> allows for a conversational back-and-forth, refining the output step by step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9_Xe70GCszyruP6KS9Posg.png" /></figure><h4>Grounding and Reliability in Generative AI</h4><p>While prompting helps guide a model’s reasoning and tone, it doesn’t guarantee factual accuracy. Generative models are trained to predict what <em>sounds</em> right based on patterns in data, not to verify whether something <em>is</em> right. As a result, they can sometimes produce confident but incorrect or outdated information, a behavior often called <em>hallucination</em>.</p><p>To address this, models can be <em>grounded</em> , that is, connected to reliable, external sources of truth. Grounding ensures that responses are not only well-phrased but also accurate and verifiable.</p><p>One of the most effective techniques for achieving this is <em>Retrieval-Augmented Generation (RAG)</em>. In a RAG workflow, the model doesn’t rely solely on what it already “knows” from pretraining. Instead, it supplements that knowledge in real time:</p><ol><li>Retrieval<strong>:</strong> When a user asks a question, the system searches relevant external sources, such as company databases, documentation, or the public web, to find up-to-date information.</li><li>Augmentation<strong>:</strong> The retrieved facts are inserted into the model’s prompt, giving it richer and more reliable context.</li><li>Generation<strong>:</strong> The model then uses this expanded prompt to craft a final answer that combines its language understanding with factual data.</li><li>Iteration (optional)<strong>:</strong> The process can repeat if the model needs to refine or cross-check its output.</li></ol><p>You’ve probably seen RAG in action already. When tools like ChatGPT with browsing, Notion AI, or enterprise chatbots provide detailed answers grounded in your company’s documents or recent articles, they’re using RAG under the hood.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*odoz3jX7kyQb5uxW.jpg" /><figcaption>Source: <a href="https://www.sundog-education.com/2024/11/25/rag-when-your-ai-needs-a-cheat-sheet/">https://www.sundog-education.com/2024/11/25/rag-when-your-ai-needs-a-cheat-sheet/</a></figcaption></figure><h4>Integrating Generative AI into Organizational Workflows</h4><p>Bringing generative AI into real workflows isn’t just about choosing the right model or tool. It’s about building a thoughtful strategy that combines vision, collaboration, and responsibility.</p><p>Successful adoption usually blends two perspectives. A top-down approach, where leadership defines the goals and ethical boundaries, and a bottom-up approach, where teams identify real use cases, experiment, and provide feedback.</p><p>A solid strategy focuses on a few key principles:</p><ul><li>Strategic alignment:<strong> </strong>start with clear goals. Generative AI should support existing business objectives, not distract from them.</li><li>Experimentation: encourage teams to test and learn. Early experiments often reveal unexpected opportunities.</li><li>Responsible AI: establish ethical guidelines to ensure fairness, privacy, and transparency.</li><li>Resourcing<strong>: </strong>Invest in infrastructure, data readiness, and people. Talent development is as crucial as the technology itself.</li><li>Measurement and iteration: track the impact of AI on workflows and continuously refine based on outcomes and user feedback.</li></ul><p>Before starting any project, it’s also important to assess feasibility. Consider how many users the solution will serve, how specialized it needs to be, how it will interact with sensitive data, and what level of responsiveness is expected. Balance those needs against your available resources, expertise, budget, and time.</p><p>The organizations that succeed with AI are those that see it not as a one-time initiative, but as an ongoing capability to be refined, governed, and expanded thoughtfully over time.</p><h4>Closing Thoughts</h4><p>Generative AI is changing the way we think about creativity, productivity, and decision-making. Yet, the most meaningful progress often comes from understanding the fundamentals, not just using AI tools, but learning how they work, where they fit, and how they can be used responsibly.</p><p>For individuals and organizations alike, the path forward is not about adopting every new model that appears, but about developing a sustainable approach to working <em>with</em> AI. Understanding these foundations is the first step toward that goal.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b68678a052c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DOM, Virtual DOM, and React Fiber: How UI Rendering Evolved]]></title>
            <link>https://medium.com/@daniifrankb/dom-virtual-dom-and-react-fiber-how-ui-rendering-evolved-cecf32f4ace5?source=rss-3e017ddd11ea------2</link>
            <guid isPermaLink="false">https://medium.com/p/cecf32f4ace5</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Daniel Bueno]]></dc:creator>
            <pubDate>Sat, 13 Sep 2025 16:54:35 GMT</pubDate>
            <atom:updated>2025-09-13T17:11:22.959Z</atom:updated>
            <content:encoded><![CDATA[<p>Tracing the evolution of UI rendering, from raw DOM updates to React’s modern concurrent features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kQbQpGLa1dl5YaVu" /></figure><p>When you build a web page, the browser needs a system to interpret your HTML and CSS and turn them into something visible on the screen. Understanding this system is essential for writing efficient pages and avoiding common pitfalls. In this article, we’ll walk through how web rendering has evolved, from the <strong>DOM (Document Object Model)</strong>, to React’s <strong>Virtual DOM</strong>, and finally to <strong>React Fiber</strong>.</p><h3>The Real DOM: Where It All Began</h3><p>The <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction"><strong>Document Object Model (DOM)</strong></a> is the browser’s internal representation of a webpage. Think of it as a tree:</p><ul><li>Each <strong>element</strong> (like &lt;div&gt;, &lt;p&gt;, &lt;h1&gt;) is a node.</li><li>Each <strong>attribute</strong> (like id=&quot;header&quot; or class=&quot;title&quot;) is a node attached to an element.</li><li>Even pieces of <strong>text</strong> inside elements are nodes.</li></ul><p>For example, this simple HTML:</p><pre>&lt;body&gt;<br>  &lt;h1 id=&quot;title&quot;&gt;Hello World&lt;/h1&gt;<br>  &lt;p&gt;Welcome to my page&lt;/p&gt;<br>&lt;/body&gt;</pre><p>Would be represented in the DOM as a tree:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*9Hfcc6aSvyHoSip7fIvxVA.png" /></figure><p>A DOM update happens anytime you change something in that tree using JavaScript. For example:</p><pre>document.getElementById(&quot;title&quot;).innerText = &quot;Hello React!&quot;;</pre><p>This replaces the text node &quot;Hello World&quot; with &quot;Hello React!&quot;.</p><p>What’s important to note is that even small DOM changes <em>can</em> trigger extra work for the browser. The browser goes through parts of its <strong>rendering pipeline</strong> to make sure the page looks correct on screen:</p><ol><li>Recalculate styles: The browser figures out which CSS rules apply to the changed element and its children. Example<em>:</em> if you change an element’s className, the browser must check all relevant CSS selectors again.</li><li><a href="https://developer.mozilla.org/en-US/docs/Glossary/Reflow">Reflow</a>: The browser recalculates the size and position of elements on the page. Example<em>:</em> if you change an element’s width, the browser needs to re-compute where surrounding elements should go.</li><li><a href="https://developer.mozilla.org/en-US/docs/Glossary/Repaint">Repaint</a>: Finally, the browser redraws pixels on the screen to reflect visual changes. Example<em>:</em> if you change color: red → color: blue, the layout doesn’t change, but the pixels must be repainted.</li></ol><p>If you change just one small text node, the cost is low. But if you add hundreds of elements or change layout-affecting styles, the browser may need to recompute and repaint large parts of the page. Do this too often, and the UI starts to feel <strong>janky</strong> (slow, with visible lags or flickering).</p><p>In the early days of the web, developers worked with the DOM <strong>directly</strong> — using plain JavaScript or libraries like <strong>jQuery</strong> to select, update, and animate elements. This was fine for small, interactive sites.</p><p>Even today, <strong>direct DOM manipulation is still common</strong> in certain cases, like quick scripts or small projects, adding event listeners (button.onclick = ...), and Simple animations or visual effects. However, as applications grew more complex — think dynamic dashboards, live feeds, or apps with constantly changing state — managing all those DOM updates by hand became messy and error-prone. That’s where the <strong>Virtual DOM</strong> came in.</p><h3>Enter the Virtual DOM: React’s Big Idea (2013)</h3><p>React, introduced in 2013, brought a revolutionary idea: instead of updating the DOM manually, you describe what the UI should look like in a <strong>Virtual DOM (VDOM)</strong>. Whenever the state of your app changes, React compares this virtual description to the previous one and figures out the minimal set of updates needed for the real DOM</p><p>Here’s how it works:</p><h4>Step 1: Building the Virtual DOM</h4><p>When you write JSX like this:</p><pre>function App() {<br>  return (<br>    &lt;div id=&quot;app&quot;&gt;<br>      &lt;h1&gt;Hello World&lt;/h1&gt;<br>      &lt;p&gt;Welcome to my page&lt;/p&gt;<br>    &lt;/div&gt;<br>  );<br>}</pre><p>Under the hood, <a href="https://react.dev/learn/writing-markup-with-jsx">JSX</a> compiles into plain JavaScript calls (React.createElement), which return lightweight objects. React then uses these objects to build the <strong>Virtual DOM tree</strong> that represents your UI.</p><pre>const vdom = {<br>  type: &quot;div&quot;,<br>  props: { id: &quot;app&quot; },<br>  children: [<br>    {<br>      type: &quot;h1&quot;,<br>      props: {},<br>      children: [&quot;Hello World&quot;]<br>    },<br>    {<br>      type: &quot;p&quot;,<br>      props: {},<br>      children: [&quot;Welcome to my page&quot;]<br>    }<br>  ]<br>};</pre><p>This object is <em>much cheaper</em> to create and manipulate than the browser’s DOM tree.</p><h4>Step 2: State or Props Change → New Virtual DOM</h4><p>Whenever your app’s <strong>state</strong> or <strong>props</strong> change, React re-runs the relevant components and produces a <strong>new Virtual DOM tree</strong>. For example, imagine we change the content of the previous &lt;h1&gt; based on some state:</p><pre>function App({ name }) {<br>  return (<br>    &lt;div id=&quot;app&quot;&gt;<br>      &lt;h1&gt;Hello {name}&lt;/h1&gt;<br>      &lt;p&gt;Welcome to my page&lt;/p&gt;<br>    &lt;/div&gt;<br>  );<br>}</pre><p>With name = &quot;World&quot;, the Virtual DOM looks like:</p><pre>{<br>  type: &quot;div&quot;,<br>  props: { id: &quot;app&quot; },<br>  children: [<br>    { type: &quot;h1&quot;, props: {}, children: [&quot;Hello World&quot;] },<br>    { type: &quot;p&quot;, props: {}, children: [&quot;Welcome to my page&quot;] }<br>  ]<br>}</pre><p>With name = &quot;React&quot;, React re-renders and produces a <strong>new Virtual DOM</strong>:</p><pre>{<br>  type: &quot;div&quot;,<br>  props: { id: &quot;app&quot; },<br>  children: [<br>    { type: &quot;h1&quot;, props: {}, children: [&quot;Hello React&quot;] },<br>    { type: &quot;p&quot;, props: {}, children: [&quot;Welcome to my page&quot;] }<br>  ]<br>}</pre><h4>Step 3: Diffing (Reconciliation)</h4><p>Now React has two Virtual DOM trees: the <strong>old one</strong> (with &quot;Hello World&quot;) and the <strong>new one</strong> (with &quot;Hello React&quot;). Instead of rebuilding the entire real DOM, React runs its <strong>diffing algorithm</strong>:</p><ul><li>It sees that the &lt;div&gt; is the same in both trees.</li><li>The &lt;p&gt; is unchanged, so it can be reused.</li><li>The &lt;h1&gt; is still the same element, but its <strong>text node changed</strong>.</li></ul><p>So React concludes: <em>the only thing we need to update in the real DOM is the text inside the </em><em>&lt;h1&gt;.</em></p><h4>Step 4: Commit Phase → Updating the Real DOM</h4><p>Once React knows what changed, it applies the minimal updates to the actual browser DOM in the <strong>commit phase</strong>.</p><p>In our example, React doesn’t touch the &lt;div&gt; or the &lt;p&gt; at all, because they haven’t changed. It only updates the <strong>text node</strong> inside the &lt;h1&gt;:</p><pre>document.getElementById(&quot;title&quot;).innerText = &quot;Hello React&quot;;</pre><p>So instead of tearing down and rebuilding the entire DOM tree, React updates just that single piece of text. This is what makes the Virtual DOM so efficient: no wasted operations, only the exact changes the UI needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*xkktzmPKwWnj0aZu.jpg" /></figure><h4>The Limits of the Original Reconciler</h4><p>The first version of React’s Virtual DOM worked well, but it had an important limitation: <strong>updates were synchronous and blocking</strong>.</p><p>This means that once React started reconciling the Virtual DOM tree, it had to process the entire tree from top to bottom in one go, without pausing. Why was this a problem? Imagine you have a page with a large component tree — maybe a dashboard with many widgets or a long list of items. If some state change triggered a re-render at the top of the tree:</p><ol><li><strong>React would start reconciling</strong> the tree.</li><li>It couldn’t pause until the entire diffing process was complete.</li><li>During that time, the <strong>main thread was locked</strong> by React’s work.</li></ol><p>Since the browser runs <strong>JavaScript, layout, painting, and user interactions</strong> all on the same main thread, this created bottlenecks.</p><p>For the user, this means that large updates could freeze the UI (for example, rendering a list of thousands of items could make the whole page stop responding until React was done) or a input had to wait due to React reconciling. The UI felt <strong>laggy</strong>, because React didn’t get to update the input until after finishing the big render.</p><p>For small apps and early React projects, this wasn’t a big deal. A few components re-rendering synchronously is usually fast enough. But as apps scaled the lack of interruption and prioritization became a major performance bottleneck. The user could end up with a UI that looked modern but felt unresponsive.</p><h3>React Fiber: A New Engine</h3><p>To solve the performance limits of synchronous reconciliation, the React team rewrote the reconciler from scratch. In <strong>React 16 (2017)</strong>, they introduced <strong>React Fiber</strong>.</p><p>A <strong>fiber</strong> is a data structure that represents a component and the work it needs to do. Fiber changed reconciliation into an <strong>incremental, interruptible process</strong>. Instead of locking the main thread until every update was finished, React could now:</p><ul><li><strong>Pause and resume</strong> rendering work.</li><li><strong>Prioritize updates</strong> (e.g., user typing vs. background rendering).</li><li><strong>Split work across multiple frames</strong>, keeping the UI smooth.</li></ul><p>Fiber also laid the foundation for advanced features such as error boundaries, and later Suspense.</p><p>One of Fiber’s biggest innovations is <strong>prioritized, interruptible rendering</strong>. To see this in practice, let’s compare two types of updates:</p><ul><li><strong>Urgent updates</strong> → things the user expects immediately (typing, clicking).</li><li><strong>Non-urgent updates</strong> → work that can wait a little (rendering a big list, filtering data).</li></ul><h4>The Problem Before Fiber</h4><p>Imagine a search box that updates results as the user types:</p><pre>function Search() {<br>  const [query, setQuery] = useState(&quot;&quot;);<br>  const [results, setResults] = useState([]);<br><br>  function handleChange(e) {<br>    const value = e.target.value;<br>    setQuery(value);<br>    setResults(generateBigList(value)); // expensive<br>  }<br><br>  return (<br>    &lt;div&gt;<br>      &lt;input value={query} onChange={handleChange} /&gt;<br>      &lt;ul&gt;<br>        {results.map((r) =&gt; (<br>          &lt;li key={r}&gt;{r}&lt;/li&gt;<br>        ))}<br>      &lt;/ul&gt;<br>    &lt;/div&gt;<br>  );<br>}</pre><p>Here’s what happens before Fiber:</p><ol><li>You type a letter.</li><li>React re-renders both the input and the large results list <strong>synchronously</strong>.</li><li>If the list is expensive to render, typing feels <strong>laggy</strong>.</li></ol><p>React had no way to say: <em>“Update the input right now, but take your time with the list.”</em></p><h4>Fiber + Transitions to the Rescue</h4><p>With Fiber (React 16) and Concurrent Rendering (React 18), we can mark updates as <em>non-urgent</em> using startTransition:</p><pre>import { useState, startTransition } from &quot;react&quot;;<br><br>function Search() {<br>  const [query, setQuery] = useState(&quot;&quot;);<br>  const [results, setResults] = useState([]);<br><br>  function handleChange(e) {<br>    const value = e.target.value;<br><br>    // Urgent update: update the input immediately<br>    setQuery(value);<br><br>    // Non-urgent update: render the big list later<br>    startTransition(() =&gt; {<br>      setResults(generateBigList(value));<br>    });<br>  }<br><br>  return (<br>    &lt;div&gt;<br>      &lt;input value={query} onChange={handleChange} /&gt;<br>      &lt;ul&gt;<br>        {results.map((r) =&gt; (<br>          &lt;li key={r}&gt;{r}&lt;/li&gt;<br>        ))}<br>      &lt;/ul&gt;<br>    &lt;/div&gt;<br>  );<br>}</pre><p>What happens under the hood</p><ol><li>Typing triggers an update</li></ol><ul><li>setQuery(value) → marked high priority (discrete input).</li><li>setResults(...) → wrapped in startTransition, lower priority.</li></ul><p>2. Scheduling</p><ul><li>React immediately reconciles and commits the query update, so typing feels instant.</li><li>The results update is scheduled separately in a lower-priority lane.</li></ul><p>3. Render phase (work-in-progress tree)</p><ul><li>React starts building the new tree for the results.</li><li>If the user types again, React can <strong>pause</strong> this work and handle the input first.</li></ul><p>4. Commit phase</p><ul><li>Once React finishes diffing, it applies minimal DOM updates to the results list.</li><li>This happens <em>after</em> urgent updates are already on screen.</li></ul><pre>Time →<br>------------------------------------------------------------<br><br>User types &quot;R&quot;<br> | Urgent update: setQuery(&quot;R&quot;)   [HIGH PRIORITY]<br> | React reconciles input → DOM updated instantly<br><br>Non-urgent update: setResults(...)<br> | Scheduled in a transition lane  [LOW PRIORITY]<br> | React begins rendering big list<br><br>------------------------------------------------------------<br>User types &quot;Re&quot;<br> | Urgent update: setQuery(&quot;Re&quot;)  [HIGH PRIORITY]<br> | React PAUSES list rendering<br> | Input updated instantly again<br><br>Non-urgent update: setResults(...)<br> | Old work discarded<br> | New list scheduled with query &quot;Re&quot;<br><br>------------------------------------------------------------<br>User stops typing<br> | React finishes rendering the list<br> | Commits minimal DOM updates (add/remove &lt;li&gt;)<br><br>------------------------------------------------------------<br>Final UI:<br> - Input always feels snappy<br> - List updates catch up in the background</pre><p>This scheduling model isn’t just for search boxes:</p><ul><li>Forms stay responsive while validation runs.</li><li>Animations stay smooth while data loads.</li><li>Suspense can pause UI until data is ready without blocking the rest.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*xMan8JGHtqGNiG1oO6BIbA.png" /></figure><h3>Wrapping Up</h3><p>Building user interfaces efficiently has always been about managing updates smartly:</p><ul><li>The <strong>DOM</strong> is the browser’s native representation of a page, but direct manipulation is costly and hard to scale.</li><li>The <strong>Virtual DOM</strong> (2013) introduced a lightweight, declarative way to describe UIs and let React handle the minimal updates needed.</li><li><strong>Fiber</strong> (2017) re-engineered how the Virtual DOM works under the hood, making reconciliation interruptible, incremental, and prioritized.</li></ul><p>In other words, React didn’t move <em>from</em> the Virtual DOM <em>to</em> Fiber — the two work together. The Virtual DOM still provides the declarative abstraction, while Fiber is the smart scheduling system that decides when and how those virtual updates reach the real DOM.</p><p>That’s why today, typing into an input feels instant, even while React is reconciling a large list in the background.</p><h3>References</h3><ul><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction">Introduction to the DOM - Web APIs | MDN</a></li><li><a href="https://legacy.reactjs.org/docs/faq-internals.html">Virtual DOM and Internals - React</a></li><li><a href="https://www.developerway.com/posts/reconciliation-in-react">React reconciliation: how it works and why should we care</a></li><li><a href="https://github.com/acdlite/react-fiber-architecture">GitHub - acdlite/react-fiber-architecture: A description of React&#39;s new core algorithm, React Fiber</a></li><li><a href="https://react.dev/reference/react/startTransition">startTransition - React</a></li><li><a href="https://www.geeksforgeeks.org/reactjs/what-is-react-fiber/">What is &quot;React Fiber&quot;? - GeeksforGeeks</a></li><li><a href="https://blog.logrocket.com/deep-dive-react-fiber/">A deep dive into React Fiber - LogRocket Blog</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cecf32f4ace5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing Reliable, Scalable, and Maintainable Applications]]></title>
            <link>https://medium.com/@daniifrankb/designing-reliable-scalable-and-maintainable-applications-e6f371d252e5?source=rss-3e017ddd11ea------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6f371d252e5</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[software-design]]></category>
            <category><![CDATA[sofware-engineering]]></category>
            <dc:creator><![CDATA[Daniel Bueno]]></dc:creator>
            <pubDate>Sun, 20 Jul 2025 19:07:26 GMT</pubDate>
            <atom:updated>2025-07-21T06:39:06.998Z</atom:updated>
            <content:encoded><![CDATA[<p>Notes from Chapter 1 of <a href="https://www.oreilly.com/library/view/designing-data-intensive-applications/9781491903063/">Designing Data-Intensive Applications</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*URG4eqaL0chYEGSrKr4QQQ.png" /></figure><p>Modern applications are increasingly data-intensive. As systems grow in complexity, our ability to build them effectively hinges on three core properties: <strong>reliability</strong>, <strong>scalability</strong>, and <strong>maintainability</strong>. These characteristics ensure that applications can handle real-world demands without collapsing under pressure, or becoming impossible to evolve.</p><p>Let’s dive into what each of these properties means in practice, and how we can design for them from the ground up.</p><h3>Reliability</h3><p>A system is <strong>reliable</strong> when it continues to function correctly even when things go wrong. These unexpected events are called <strong>faults</strong>, and a systems that can anticipate them are called fault-tolerant or <strong>resilient</strong>.</p><blockquote><strong>Fault ≠ Failure</strong><br> A fault occurs when a component deviates from its expected behaviour. A failure occurs when the system as a whole can no longer provide its intended service to the user. Fault-tolerance is the practice of preventing faults from escalating into failures.</blockquote><h4>Types of Faults &amp; Strategies for Tolerance</h4><ul><li><strong>Hardware Faults</strong><br><em>Examples</em>: disk crashes, faulty memory, accidental unplugging of cables. <br> <em>Strategy</em>: Add redundancy; duplicate components or use fault-tolerant hardware to reduce single points of failure.</li><li><strong>Software Faults</strong><br> <em>Examples</em>: services slowing down or becoming unresponsive, bugs causing incorrect responses, resource leaks. <br> <em>Strategy</em>: Careful design and testing, process isolation, crash-and-restart mechanisms, production monitoring.</li><li><strong>Human Errors</strong><br> <em>Examples</em>: misconfigurations, accidental deletions, incorrect assumptions. <br> <em>Strategy</em>: Use well-designed abstractions, extensive testing environments, safe sandboxes with real data, fast rollback options, and telemetry to track performance and errors.</li></ul><p>Sometimes, trade-offs must be made, like sacrificing reliability to reduce development or operational costs. The key is to make such decisions <strong>consciously</strong> and with a clear understanding of the risks involved.</p><h3>Scalability</h3><p><strong>Scalability</strong> refers to a system’s ability to handle increased <strong>load</strong>. Whether it’s more users, more data, or more requests per second, a scalable system continues to perform well as demand grows.</p><h4>Key Concepts</h4><ul><li><strong>Load Parameters</strong><br> These are quantitative metrics that describe what kind of work the system is doing. Examples include: requests per second, read/write ratio, cache hit rates, number of simultaneous users.</li><li><strong>Performance Metrics</strong><br> Typically, the most important metric in online systems is <strong>response time</strong>: the delay between sending a request and receiving a response. It encompasses network latency, processing time, and queuing delays.</li></ul><blockquote><strong>Response Time vs. Latency</strong><br> <strong>Latency </strong>is how long a request is waiting to be handled. <strong>Response Time</strong> its the time between a client sending a request and receiving a response (includes the time to process the request, network and queueing delays).</blockquote><h4>Response Time</h4><p>Response time isn’t a fixed value, it varies with each request. That’s why we measure it as a <strong>distribution</strong>, not a single number.</p><ul><li>The average (arithmetic mean) is not a very good metric if you want to know your “typical response time”, because it does not tell you how many users actually experienced the delay. Usually it is better to use <strong>percentiles</strong>. For expample the <strong>median</strong> (50th percentile): half of the users requests are served in less then the median response time, and another half take longer then the median.<br>- <strong>Tail latencies</strong> (e.g., 95th, 99th percentiles) highlight worst-case scenarios and are critical for understanding outliers.</li></ul><h4>Scaling Up vs. Scaling Out</h4><ul><li><strong>Scaling Up</strong> (Vertical Scaling): Moving to more powerful machines.</li><li><strong>Scaling Out</strong> (Horizontal Scaling): Distributing work across multiple machines.</li></ul><p>Good system design usually <strong>combines</strong> both approaches pragmatically. For example, using several moderately powerful servers might be more efficient, and simpler, than managing a large fleet of small instances.</p><p>Some systems are <strong>elastic</strong>, meaning they automatically adapt to load spikes by adding/removing resources. Others require manual scaling, often involving more planning and intervention.</p><h3>Maintainability</h3><p>A maintainable system is one that developers can understand, modify, and extend over time. Given that software constantly evolves, maintainability is vital for long-term success. We should take particular attention to three design principles:</p><ul><li><strong>Operability: </strong>Make it easy for teams to keep the system running smoothly. This involves: monitoring and visibility into internal state, clear documentation, infrastructure that’s not tightly coupled to specific machines or configurations.</li><li><strong>Simplicity: </strong>simplicity isn’t necessarily about doing less, it’s about reducing <strong>accidental complexity</strong> (complexity introduced by the implementation rather than the problem domain). Symptoms of complexity include: tight coupling between modules, messy dependencies, inconsistent naming etc. One of the best ways to manage complexity is through <strong>abstraction</strong>, which hides internal details and exposes only what’s necessary.</li><li><strong>Evolvability: </strong>The system should be easy to change and adapt to new requirements. Systems that are simple and well-understood tend to be more <strong>evolvable</strong>. Designing for change means: isolating concerns, avoiding rigid architectures, embracing refactoring as part of the development process.</li></ul><h3>Source</h3><p><a href="https://www.oreilly.com/library/view/designing-data-intensive-applications/9781491903063/">Designing Data-Intensive Applications</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6f371d252e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Testing in Frontend Development: An Overview]]></title>
            <link>https://medium.com/@daniifrankb/testing-in-frontend-development-an-overview-c58af37f4236?source=rss-3e017ddd11ea------2</link>
            <guid isPermaLink="false">https://medium.com/p/c58af37f4236</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[software-testing]]></category>
            <dc:creator><![CDATA[Daniel Bueno]]></dc:creator>
            <pubDate>Thu, 20 Apr 2023 15:12:38 GMT</pubDate>
            <atom:updated>2023-04-20T15:40:05.145Z</atom:updated>
            <content:encoded><![CDATA[<p>This short (and introductory) text tries to clarify central aspects about frontend tests in four points. It is written in the first and third person, because, after all, I am also a programmer under construction, and the goal is to leave the topic open — feel free to leave comments, corrections or improvements. In the beginning, it will discuss why we should care about such tests, consequently going through the main challenges, implementation methods and, finally, some suggestions for useful technologies.</p><ol><li><strong>Why should we test our frontend?</strong></li></ol><p>First, we can highlight that one of the main goals when we are developing an application is to make sure that its status is stable throughout the whole cycle of user interaction. That implies that we need to protect edge cases in vulnerable or critical parts of the application, and this is where front-end testing becomes relevant — <strong>they are responsible for validating UI features and flows</strong>.</p><p>On the other hand, analyzing the development process in a team with multiple developers, it cannot be a mistake to assume that no one knows about every piece of code written by other team members. And this is another point that makes testing so important — to double check that whenever someone adds a new code to the existing one (which may cause troubles elsewhere) the code is not inconsistent and the front-end functionality is intact.</p><p>To state one more good reason to have well-maintained tests, looking from a business perspective, we must remind ourselves that the last thing that a client/user wants is to find a bug, and if they find it, our efficiency to solve it counts a lot. Knowing that a clean code reduces the probability of introducing bugs and makes it easier to find and fix them when they do occur, <strong>testing should help us improve the code readability and decrease code coupling </strong>— <em>”Cleaner code is more testable, while testable code will be cleaner“.</em></p><p><strong>2. What challenges will we face?</strong></p><p>It is also crucial to point out that during the decision-making and development process, there will be many challenges regarding this topic (testing). To start, we can see that as the UI normally includes a huge set of components (which also may have hierarchy with levels of responsibility), it is of paramount importance that we <strong>prioritize the features</strong>.</p><p>For example, starting by checking that basic text and pages load easily, with fundamental elements in the expected place. Next, make sure that all functional elements are visible and respond fully to actions and requests, before finally checking that the formatting and graphics load as expected.</p><p>Besides that, the <strong>choice of the testing tools</strong>, or even <strong>keeping the testing up to date</strong> with the latest features may also be challenging tasks. For that reason, we need to make sure that it is clear what cannot be left behind.</p><p>Of course it is a tricky question, because the answer can change depending of the project that we look, but generally pointing, we should keep an eye on:</p><ul><li>Cross-browser and cross-platform functionality;</li><li>Accessibility;</li><li>End-to-end workflow;</li><li>CSS testing.</li></ul><p>From these points, another question is raised:</p><p><strong>3. Which tests should we implement?</strong></p><p>The most common and basic implementation follows the <strong>”testing pyramid”</strong>. It is a framework that sets out test types that are included in automated testing, and outlines what sequences and frequency they should follow.</p><p>The pyramid is split into three levels:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BThJLS_dd3kfie5xv5xfEA.jpeg" /><figcaption>Testing pyramid representation(credits:<a href="https://www.headspin.io/blog/the-testing-pyramid-simplified-for-one-and-all">headspin</a>)</figcaption></figure><p><strong><em>i) Unit tests</em></strong></p><p>A unit test verifies the functionality of an application’s smallest possible module or “unit” independently from other modules. Ex.: Test an isolated button.</p><p><strong><em>ii) Integration tests</em></strong></p><p>Verifies the interface between two software units or modules. It focuses on checking if modules are communicating adequately and exposing any errors between integrated units. Ex.: Test a form with a submit button that changes its state based on the form’s state.</p><p><strong><em>iii)E2E tests</em></strong></p><p>End-to-end testing is used to check and confirm that the flow of the application works as expected from start to finish. Ex.: Test a flow that when you click a submit button, opens a modal with a cancel and confirm option, and if you confirm you will be redirected to another page.</p><p>In addition to these basic methods, a well covered UI also makes <strong>cross-browser tests</strong>, <strong>visual regression tests (</strong>which compares, with screenshots, the actual/existing interface of your application with the corresponding ‘expected’ version to identify any gaps), and <strong>performance tests (</strong>that can analyze speed, stability, scalability, interoperability and responsiveness).</p><p><strong>4. Technologies and tools recommended for the tests</strong></p><p>And if you are asking yourself which tools/ technologies should you use to perform such tests in your next project, i finalize the text leaving some of the most popular ones as indication:</p><ul><li><a href="https://jestjs.io/">Jest</a>(unit and integration tests )</li><li><a href="https://www.selenium.dev/documentation/webdriver/">Selenium WebDriver</a>(cross-browser tests)</li><li><a href="https://www.cypress.io/">Cypress</a> (end-to-end tests)</li><li><a href="https://testlio.com/">Testlio</a> (visual regression tests)</li></ul><p><strong>References</strong></p><ul><li><a href="https://www.lambdatest.com/learning-hub/front-end-testing">Front End Testing Tutorial: Comprehensive Guide With Best Practices</a></li><li><a href="https://www.browserstack.com/guide/front-end-testing">Front End Testing: A Beginner&#39;s Guide | BrowserStack</a></li><li><a href="https://www.netguru.com/blog/front-end-testing">Frontend Testing: A Guide for 2022 and Beyond</a></li><li><a href="https://www.smashingmagazine.com/2021/07/frontend-testing-pitfalls/">It&#39;s A (Front-End Testing) Trap! Six Common Testing Pitfalls And How To Solve Them - Smashing Magazine</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c58af37f4236" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>