<?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 Radil Rupasinghe on Medium]]></title>
        <description><![CDATA[Stories by Radil Rupasinghe on Medium]]></description>
        <link>https://medium.com/@radilrupasinghe?source=rss-95e8340b526f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kOt1DL-xeJ4_x2waHAPA6g@2x.jpeg</url>
            <title>Stories by Radil Rupasinghe on Medium</title>
            <link>https://medium.com/@radilrupasinghe?source=rss-95e8340b526f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 10:28:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@radilrupasinghe/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[The Future of Fleet Management: How AI is Transforming Logistics Efficiency]]></title>
            <link>https://medium.com/@radilrupasinghe/the-future-of-fleet-management-how-ai-is-transforming-logistics-efficiency-4a3cfbbbc5ea?source=rss-95e8340b526f------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a3cfbbbc5ea</guid>
            <dc:creator><![CDATA[Radil Rupasinghe]]></dc:creator>
            <pubDate>Mon, 09 Mar 2026 11:46:19 GMT</pubDate>
            <atom:updated>2026-03-09T11:46:19.388Z</atom:updated>
            <content:encoded><![CDATA[<p>Fleet management has become a critical part of modern logistics and transportation. As businesses expand their delivery networks and supply chains grow more complex, companies are looking for smarter ways to manage vehicles, reduce fuel costs, and improve operational efficiency.</p><p>Traditional fleet management systems mainly rely on GPS tracking and manual decision-making. While these systems provide visibility into vehicle locations, they often lack the intelligence needed to optimize routes, predict delays, or reduce fuel waste. This is where AI-powered fleet management solutions are beginning to transform the industry.</p><h3>The Challenges in Traditional Fleet Management</h3><p>Many logistics companies face several common challenges when managing fleets:</p><ul><li>High fuel consumption due to inefficient route planning</li><li>Poor visibility into real-time fleet performance</li><li>Difficulty predicting traffic or port congestion</li><li>Manual decision-making that slows operations</li></ul><p>These problems can significantly increase operational costs and reduce delivery efficiency.</p><h3>How AI is Improving Fleet Operations</h3><p>Artificial Intelligence is enabling companies to move from reactive fleet management to proactive optimization. Modern fleet management platforms can analyze large volumes of operational data and provide real-time recommendations to improve efficiency.</p><p>Some of the key benefits of AI-driven fleet management include:</p><p><strong>Route Optimization</strong><br> AI can analyze traffic patterns, weather conditions, and delivery schedules to determine the most efficient routes for vehicles.</p><p><strong>Fuel Efficiency</strong><br> By optimizing routes and monitoring driving behavior, companies can significantly reduce fuel consumption.</p><p><strong>Predictive Insights</strong><br> AI can predict delays, congestion, or operational issues before they happen, allowing fleet managers to take preventive action.</p><p><strong>Real-Time Decision Making</strong><br> Fleet managers receive instant alerts and insights that help them respond quickly to operational challenges.</p><h3>The Role of Agentic Fleet Management</h3><p>A new generation of platforms is now emerging that focuses on <strong>agentic fleet management</strong>, where intelligent systems continuously analyze fleet performance and automatically suggest improvements.</p><p>For example, companies exploring advanced AI-powered fleet optimization solutions can learn more about how these systems work through platforms like <strong>AgenticFleet</strong>, which focuses on improving fleet efficiency using intelligent automation and real-time optimization.</p><p>You can explore more about AI-powered fleet optimization here:<br> <a href="https://sites.google.com/view/agenticfleet/">https://sites.google.com/view/agenticfleet</a></p><h3>Why Businesses Should Invest in Smart Fleet Management</h3><p>As logistics networks continue to grow, companies that adopt intelligent fleet management technologies will gain a significant competitive advantage. By improving operational efficiency, reducing fuel waste, and enabling smarter decision-making, AI-driven fleet platforms are helping organizations build more sustainable and cost-effective logistics systems.</p><p>Businesses that invest in modern fleet optimization tools today will be better prepared to handle the increasing complexity of global supply chains in the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a3cfbbbc5ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Still Using Fetch and Axios? Try React Query Instead]]></title>
            <link>https://medium.com/@radilrupasinghe/still-using-fetch-and-axios-try-react-query-instead-023226055b29?source=rss-95e8340b526f------2</link>
            <guid isPermaLink="false">https://medium.com/p/023226055b29</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[react-query]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Radil Rupasinghe]]></dc:creator>
            <pubDate>Sat, 17 May 2025 14:09:14 GMT</pubDate>
            <atom:updated>2025-05-17T14:09:14.252Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="React Query Logo" src="https://cdn-images-1.medium.com/max/513/1*NvNjVbjTCT_qqloPnR098w.png" /></figure><p>If you’re still handling API calls using fetch or axios, you might be missing out on a lot. I’ve been there too — until I discovered React Query. Yes, I did use fetch and axios as well. But using them alone feels so outdated with the features that React Query provides.</p><h4>Introduction</h4><p>If you have been using fetch or axios for your data fetching, you might have done one of the following</p><ul><li>Manually re-fetch the data (using a GET API call) right after doing a POST, PUT or a DELETE request OR filter/add the fetched data based on the change until another GET API call is made</li></ul><pre>const deleteItem = async (id) =&gt; {<br>  await axios.delete(`/api/items/${id}`);<br>  // Filtering out the data immediately after delete<br>  setItems((prev) =&gt; prev.filter((item) =&gt; item.id !== id));<br>}</pre><ul><li>Maintain state variables for loading, error and etc. separately to dynamically change the UI based on the state of the API call.</li></ul><pre>const [items, setItems] = useState([]);<br>const [loading, setLoading] = useState(false);<br>const [error, setError] = useState(&#39;&#39;);<br><br><br>const fetchItems = async  () =&gt; {<br>  setLoading(true);<br>  try {<br>    await axios.get(`/api/items/`);<br>    setItems(res);<br>  } catch (error) {<br>    setError(err.message || &quot;Error fetching data&quot;);<br>  }<br>};<br><br>if (loading) return &lt;p&gt;Loading...&lt;/p&gt;<br>if (error) return &lt;p&gt;{error}&lt;/p&gt;</pre><ul><li>Pass the data fetched from the server from component to component using props or by maintaining global state (Redux, Zustand)</li></ul><p>I have been there as well. Then I came across React Query which i heard was the go-to data fetching library and I was like “let’s give it a shot in my next project”, And I did.</p><p>The initial setup was quick — just a bit of configuration. And then came the magic of React Query.</p><pre>npm install @tanstack/react-query</pre><pre>import { QueryClient, QueryClientProvider } from &#39;@tanstack/react-query&#39;;<br><br>const queryClient = new QueryClient();<br><br>ReactDOM.createRoot(document.getElementById(&#39;root&#39;)).render(<br>  &lt;React.StrictMode&gt;<br>    &lt;QueryClientProvider client={queryClient}&gt;<br>      &lt;App /&gt;<br>    &lt;/QueryClientProvider&gt;<br>  &lt;/React.StrictMode&gt;<br>);</pre><p>So in this you call the API using the same fetch or axios you used back then, but what differs in this is that you have the ability to give a query key while calling the API function. What happens underneath is that under this query key it saves the fetched data in cache. Also you can define a stale time for the cached data as well.</p><pre>import { useQuery } from &#39;@tanstack/react-query&#39;;<br>import axios from &#39;axios&#39;;<br><br>const fetchItems = async () =&gt; {<br>  const res = await axios.get(&#39;/api/items&#39;);<br>  return res.data;<br>};<br><br>const Items = () =&gt; {<br>  const { data } = useQuery({<br>    queryKey: [&quot;items&quot;],<br>    queryFn: fetchItems,<br>    staleTime: 5 * 60 * 1000 // 5 minutes<br>  });<br> }</pre><p><strong><em>Q) What is a stale time?</em></strong></p><p><em>A) </em>staleTime is the amount of time (in milliseconds) that tells React Query how long the fetched data should be considered fresh.</p><p>By default, data becomes “stale” immediately after it is fetched (staleTime: 0), which means React Query will try to re-fetch it any time when</p><ul><li>The component re-mounts</li><li>The window regains focus</li><li>A background refetch is triggered</li></ul><p>But if you set a staleTime, React Query will not re-fetch the data during that time, because it will consider the cached data to still be valid or fresh.</p><h4>Automatic Data Re-Fetching</h4><p>Okay so everything up until now was fine, but this is not the fun part. It begins with doing POST, PUT and DELETE requests. When we do these requests, we have the option to invalidate the query. We can specify the query key and based on that React Query does an amazing job. Once a create, update or a delete request was made we all know that the data in the UI gets outdated. React Query does a series of actions underneath,</p><ul><li>Invalidates the query key, which signals React Query that the cached data may be outdated</li></ul><p>Because of that,</p><ul><li>If the window is focused or the component is mounted <strong>it automatically re-fetches the data</strong> and caches it.</li><li>If not, since the query key is invalid it fetches data on window focus and component re-mount.</li></ul><pre>import { useMutation, useQueryClient } from &#39;@tanstack/react-query&#39;;<br>import axios from &#39;axios&#39;;<br><br>const deleteItem = async () =&gt; {<br>  await axios.delete(&#39;/api/items/${id}&#39;);<br>};<br><br>const Items = () =&gt; {<br>  const queryClient = useQueryClient();<br><br>  const mutation = useMutation({<br>    mutationFn: deleteItem,<br>    onSuccess: () =&gt; {<br>      queryClient.invalidateQueries({queryKey: [&#39;items&#39;]});<br>    },<br>  });<br>};</pre><p>I had no idea about the automatic re-fetching feature at first, so you can imagine how amazed I was when I saw my UI update all by itself after a DELETE API call without even me writing any extra code to remove the item. React Query just took care of it!</p><p>This is just one benefit of using React Query. There is a plenty of reasons to stick to using this. Let’s go into each of them step by step.</p><h4>Global State Management</h4><p>React Query has the ability to manage global server state inside a react application. What does happen here is that you can use the same fetch function with the query key inside another component which will show the cached data under the query key or if its not cached, it will re-fetch and show the data.</p><p>This state management is not a replacement for client state management like (useState, Redux, Zustand) when it comes to UI state, this will only help to manage the data fetched from the server to be globally accessible.</p><h4>Maintain Error Handling, Loading and Retry Logic</h4><p>What we usually do for errors is that we write the API calling function inside a try-catch block and catch the error there. If we do have to retry calling the API due to an error, we would have to write the logic ourselves. To change the UI based on the errors and loading what we do is maintain useState variables right?</p><p>React Query has built in return properties for error handling(error, isError). When calling APIs isError will become true if the API call gives out an error and the error property holds the error message and the status of the error.</p><p>Also this has its own retry options which can be passed in with the API call where we can specify retry count (number of times to retry the API) and retryDelay (seconds to delay for another retry).</p><pre>import { useQuery } from &#39;@tanstack/react-query&#39;;<br>import axios from &#39;axios&#39;;<br><br>const fetchData = () =&gt; axios.get(&#39;/api/items&#39;).then(res =&gt; res.data);<br><br>export default function Items() {<br>  const { data, isLoading, isError, error } = useQuery({<br>    queryKey: [&#39;items&#39;],<br>    queryFn: fetchData,<br>    retry: 3,                <br>    retryDelay: 2000, // 2 seconds        <br>  });<br><br>  if (isLoading) return &lt;p&gt;Loading...&lt;/p&gt;;<br>  if (isError) return &lt;p&gt;Error: {error.message}&lt;/p&gt;;<br><br>  return (<br>    &lt;ul&gt;{data.map(item =&gt; &lt;li key={item.id}&gt;{item.name}&lt;/li&gt;)}&lt;/ul&gt;<br>  );<br>}</pre><p>React Query provides built-in properties like isFetching , isPendingand isLoading to help you easily detect when data is being fetched from the server</p><p><strong><em>Q) What is the difference between isFetching, isLoading and isPending?</em></strong></p><p><em>A) </em>isLoading is true during the initial load. isFetching is true during background fetches. isPending is more commonly used with mutations to track submission state.</p><p>By using React Query we can worry less about creating and maintaining state variables for errors, loading and also about the retry logic and focus more on development.</p><h4>The Developer Tools</h4><p>What if I tell you that above all these, React Query also provides a dev tool which visually represent the status of the queries, mutations and their cache. This is more like having a dashboard for the data fetching logic.</p><p><strong><em>Q) What is provided with the dev tools?</em></strong></p><p><em>A)</em></p><ul><li><em>List of active queries</em></li><li><em>Ability to re-fetch and invalidate queries manually</em></li><li><em>View cached data</em></li><li><em>Ability to clear the cache</em></li></ul><p>This is really helpful and can be used in the development environment for debugging failed queries, testing invalidations, re-fetching and etc.</p><p><a href="https://tanstack.com/query/latest/docs/framework/react/devtools">React Query Dev Tools</a></p><h4>Conclusion</h4><p>Using this felt like magic to me at first, this gets so much of the things done itself and makes us focus more on the development. Who would not like it if someone else is managing all the hard work for you huh!</p><p>React Query is now called Tanstack Query and is available for many frameworks like (Vue, Svelte, Solid as well as React). There is more to React Query than what is mentioned here. Lets call this a basic introduction to React Query.</p><p>Hope you gained some knowledge from this. If you did read it till the end and did enjoy it make sure to give this a clap 👏</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=023226055b29" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How RPA Helps Businesses Streamline Operations and Reduce Dependency on Human Resources]]></title>
            <link>https://medium.com/@radilrupasinghe/how-rpa-helps-businesses-streamline-operations-and-reduce-dependency-on-human-resources-18d027d0ef88?source=rss-95e8340b526f------2</link>
            <guid isPermaLink="false">https://medium.com/p/18d027d0ef88</guid>
            <dc:creator><![CDATA[Radil Rupasinghe]]></dc:creator>
            <pubDate>Tue, 27 Aug 2024 08:18:21 GMT</pubDate>
            <atom:updated>2024-08-27T08:36:12.658Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*KedHQhj7FHLQyezAHqojVQ.jpeg" /></figure><h3><strong>Introduction</strong></h3><p>Robotic Process Automation (RPA) is a technology that allows businesses to automate routine and repetitive tasks by using software robots, or “bots.” These bots can mimic repetitive human actions. By automating these tasks, RPA helps businesses save time, reduce errors, and free up employees to focus on more complex, value-added work. It’s like having a digital assistant that handles the boring repetitive tasks so humans can focus on more important activities.</p><p>RPA can do much more than just automate simple tasks. Here are some additional capabilities:</p><p><strong>1. Data Extraction and Processing:</strong> RPA can extract data from various sources, such as emails, PDFs, or websites, and then process it according to predefined rules.</p><p><strong>2. Integration Across Systems: </strong>RPA bots can connect and interact with different software systems that might not natively integrate, enabling smooth data transfer between them.</p><p><strong>3. Data Migration:</strong> RPA can automate the process of moving data between legacy systems and newer platforms, ensuring consistency and reducing downtime.</p><p><strong>4 Compliance and Reporting:</strong> RPA can ensure that processes adhere to regulatory requirements by automating compliance checks and generating reports.</p><p><strong>5 Payroll and HR Processes:</strong> RPA can automate payroll calculations, employee onboarding, and other HR-related tasks.</p><p><strong>6 Monitoring and Alerts:</strong> RPA can monitor systems or processes and trigger alerts or take corrective actions when certain conditions are met.</p><p>Overall, RPA can handle a wide range of business processes, especially those that are rule-based, repetitive, and time-consuming, freeing up human resources for more strategic tasks.</p><h3><strong>The Role of RPA in Business Operations</strong></h3><p>Robotic Process Automation (RPA) has emerged as a transformative technology that plays a critical role in enhancing efficiency, reducing errors, and allowing businesses to focus on higher-value activities. Here’s how RPA is making a significant impact on business operations:</p><p><strong>1. Streamlining Processes</strong></p><p>One of the most significant contributions of RPA is its ability to streamline various business processes. Whether it’s processing invoices, managing customer data, or handling payroll, RPA can automate these tasks with precision and speed. By reducing the time it takes to complete these processes, businesses can improve their overall operational efficiency. RPA bots can work continuously without fatigue, ensuring that processes are completed quickly and accurately.</p><p><strong>2. Error Reduction</strong></p><p>Human error is a common challenge in manual processes, especially when dealing with large volumes of data. RPA addresses this issue by executing tasks consistently and without deviation from predefined rules. This leads to a significant reduction in errors, which can be costly and time-consuming to rectify. For example, in financial operations, RPA can ensure that data entry and transaction processing are error-free, thereby enhancing compliance and reducing the risk of financial discrepancies.</p><p><strong>3. 24/7 Operation</strong></p><p>Unlike human employees, RPA bots can work around the clock without the need for breaks or downtime. This capability is particularly beneficial for businesses that operate in multiple time zones or require continuous operations. For instance, customer support processes can be partially automated with RPA to handle common queries outside of regular business hours, ensuring that customers receive timely responses even when human agents are unavailable.</p><p><strong>4. Integration with Existing Systems</strong></p><p>RPA tools are designed to integrate seamlessly with existing business systems, allowing organizations to automate processes without the need for extensive reengineering of their IT infrastructure. This means that businesses can quickly deploy RPA solutions and start seeing benefits almost immediately. Whether it’s an ERP system, CRM platform, or legacy application, RPA can interact with these systems just like a human would, but with greater speed and accuracy.</p><p><strong>5. Enhancing Scalability</strong></p><p>As businesses grow, the volume of tasks that need to be managed also increases. RPA provides a scalable solution that can handle this growth without the need for proportional increases in human resources. Organizations can deploy additional bots as needed to manage increased workloads, ensuring that operational efficiency is maintained even during periods of rapid expansion.</p><h3>The Ethical Consideration</h3><p>Implementing RPA in business operations raises important ethical considerations, particularly regarding job displacement. While RPA can automate many tasks, leading to cost savings and efficiency, it also poses the risk of reducing the need for certain roles traditionally filled by human employees. This can create concerns about job security and the potential for layoffs.</p><p>However, businesses can address these concerns by taking a balanced approach. Instead of replacing employees, companies can use RPA to complement their workforce, automating mundane tasks while allowing employees to focus on more creative, strategic, and customer-focused activities.</p><p>Transparency and open communication are also crucial. Businesses should engage with their workforce, explaining the benefits of RPA and how it can create opportunities for career growth. By fostering a culture of continuous learning and adaptation, organizations can mitigate the negative impacts of RPA and ensure that both the business and its employees benefit from the technology.</p><p>In summary, while RPA offers substantial advantages, it must be implemented with careful consideration of its impact on the workforce. Ethical deployment involves using RPA to enhance, rather than replace, human potential, ensuring a positive outcome for all stakeholders.</p><h3><strong>RPA use cases across various industries</strong></h3><p><strong>1. Banking and Finance:</strong></p><p><em>Automating Loan Processing:</em> Banks use RPA to automate the loan application process. Bots can extract customer data, validate documents, perform credit checks, and even approve loans based on predefined criteria, reducing processing time from days to hours.</p><p><strong>2.Healthcare:</strong></p><p><em>Patient Data Management: </em>Hospitals use RPA to update and manage patient records across different systems. This ensures accurate and timely information is available to healthcare providers.</p><p><strong>3. Retail:</strong></p><p><em>Inventory Management:</em> Retailers use RPA to automate stock management, such as monitoring inventory levels, placing orders when stock is low, and updating records across multiple locations.</p><p><strong>4. Telecommunications:</strong></p><p><em>Customer Onboarding:</em> Telecom companies use RPA to automate the customer onboarding process, from verifying documents to setting up new accounts and services.</p><p><strong>5. Manufacturing:</strong></p><p><em>Supply Chain Optimization: </em>RPA automates the procurement process, managing vendor communications, purchase orders, and invoice processing to ensure timely delivery of materials.</p><p><strong>6. Human Resources:</strong></p><p><em>Employee Onboarding:</em> HR departments use RPA to streamline the onboarding process, including generating offer letters, setting up employee profiles, and assigning training programs.</p><p><em>Payroll Processing:</em> RPA automates payroll calculations, tax deductions, and benefits administration, ensuring accurate and timely payments to employees.</p><p>These examples illustrate how RPA can be applied across various sectors to enhance efficiency, reduce costs, and improve the accuracy of business processes.</p><h3>Real-world examples</h3><p><strong>1. AT&amp;T: Enhancing Customer Service</strong></p><p>AT&amp;T, a global telecommunications giant, implemented RPA to streamline its customer service operations. By automating routine tasks such as customer data updates and billing inquiries, AT&amp;T reduced the workload on its customer service agents. This allowed the company to reassign these employees to more complex tasks that require human interaction, ultimately improving customer satisfaction and operational efficiency.</p><p>“AT&amp;T has implemented more than 3,000 automation bots. Austin says RPA has helped AT&amp;T recognize hundreds of millions of dollars in annualized value, saved 16.9 million minutes of manual effort each year, and shown a 20x return on investment.” (<a href="https://www.cio.com/profile/thor-olavsrud/">Olavsrud</a> 2022)</p><p><strong>2. Deutsche Bank: Optimizing Back-Office Operations</strong></p><p>Deutsche Bank adopted RPA to automate a wide range of back-office processes, including compliance checks, data entry, and reporting. The bank was able to reduce the manual workload by up to 50%, significantly lowering operational costs and minimizing errors. This automation also allowed Deutsche Bank to meet regulatory requirements more efficiently, with fewer human resources.</p><p><strong>3. Walmart: Streamlining Inventory Management</strong></p><p>Walmart, the world’s largest retailer, uses RPA to optimize its inventory management processes. The company implemented bots to automate tasks such as stock monitoring, order processing, and data analysis. This automation reduced the need for manual intervention, enabling Walmart to maintain accurate inventory levels, respond more quickly to demand changes, and reduce overall operational costs.</p><h3><strong>Conclusion</strong></h3><p><strong>Summary of Benefits:</strong> RPA offers substantial advantages by automating routine tasks, which reduces dependency on manual labor while enhancing operational efficiency and accuracy. Through automation, businesses can streamline their processes, minimize errors, and operate around the clock, all of which contribute to significant cost savings and improved productivity.</p><p><strong>Future Outlook: </strong>Looking ahead, RPA is poised to become an even more integral part of business operations. Companies should embrace automation as a means to enhance their efficiency and competitiveness. However, it is equally important to invest in human capital — providing employees with opportunities to develop new skills and take on more strategic roles. This balanced approach will ensure that businesses can fully leverage RPA’s benefits while fostering a dynamic and adaptable workforce.</p><h3>Call to Action</h3><p>If you’re considering implementing RPA in your business, now is the time to explore its potential benefits. Consult with experts to understand how RPA can be tailored to your specific needs and start planning your automation strategy. Embrace the future of business efficiency and innovation by integrating RPA into your operations today.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18d027d0ef88" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>