<?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 Ferdinand Raja on Medium]]></title>
        <description><![CDATA[Stories by Ferdinand Raja on Medium]]></description>
        <link>https://medium.com/@ferdinandrajaa?source=rss-082321c0efb8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*gwipYgIDhCiXWlgI</url>
            <title>Stories by Ferdinand Raja on Medium</title>
            <link>https://medium.com/@ferdinandrajaa?source=rss-082321c0efb8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 02:03:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ferdinandrajaa/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[Using JMeter to Stress Testing Project]]></title>
            <link>https://medium.com/@ferdinandrajaa/using-jmeter-to-stress-testing-project-17ce91631646?source=rss-082321c0efb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/17ce91631646</guid>
            <dc:creator><![CDATA[Ferdinand Raja]]></dc:creator>
            <pubDate>Wed, 11 Dec 2024 06:54:17 GMT</pubDate>
            <atom:updated>2024-12-11T06:54:17.510Z</atom:updated>
            <content:encoded><![CDATA[<h3>Steps to Set Up JMeter</h3><ol><li><strong>Install JMeter Using Homebrew</strong><br>The easiest way to install JMeter on macOS is through <strong>Homebrew</strong>. Open your terminal and run the following command:</li></ol><pre>brew install jmeter</pre><p><strong>2. Verify JMeter Installation</strong><br>After installation, confirm that JMeter is correctly installed by checking the version:</p><pre>jmeter -v</pre><p><strong>3. Launch JMeter</strong><br>Start JMeter by running:</p><pre>jmeter</pre><p>This will open the JMeter GUI, allowing you to configure and run your tests.</p><h4>Create a test group</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pf2KdFe8fm0e9IWYAXqdRQ.png" /></figure><ol><li>Create a test group by right clicking the test plan, choose add, thread (users), and choose thread group</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K-_uJBflrF-5v9QsMFYZgA.png" /></figure><p>2. In the thread group, choose the number of users, in this stress testing I choose 70 users (total number of Badr Interactive employee) and 1000 (to figure out for a wider scope of deployment).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_jE6RnwpVcD_erjzV9C-pQ.png" /></figure><p>3. Choose the API that want to be tested, in this case, I try to test the login API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZPqeIbbCU893AtSNGuGesA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b2LIRjb_MybKSdGF8vqRlw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ObBv4BN4Og2gB7vb7vSRfA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hl8eRlJIwBoLvELPMS810w.png" /><figcaption>The result of 70 users</figcaption></figure><p>As we can see, the result of 70 users log in does not affect the performance so much. There’s no error coming from the number of the users logged in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_YXfZ8LDex7fTabL2McQkg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ErSe3d7mcoeyke7iAczGyw.png" /></figure><p>On the other hand, the result of 1000 users logged in resulted in some error in the process. There are some solutions that can be done to mitigate this flaws. Potential solutions:</p><ul><li>Ensure that the server can handle many data. If it can’t, do some scaling to make it able to handle much data</li><li>Increase server timeout limits to allow the process to run longer</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17ce91631646" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Use ChatGPT for My Coding Journey]]></title>
            <link>https://medium.com/@ferdinandrajaa/how-i-use-chatgpt-for-my-coding-journey-83c1d7206d39?source=rss-082321c0efb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/83c1d7206d39</guid>
            <dc:creator><![CDATA[Ferdinand Raja]]></dc:creator>
            <pubDate>Tue, 10 Dec 2024 15:28:41 GMT</pubDate>
            <atom:updated>2024-12-11T02:56:34.926Z</atom:updated>
            <content:encoded><![CDATA[<p>As a student and a developer, working with new codebase can be overwhelming. There are countless languages, libraries, and frameworks to explore. In my coding journey, I’ve found ChatGPT to be a great companion. It works as a discussion partner tool for my problem.</p><p><strong>The Beginning of the ChatGPT Era in My Work</strong></p><p>When I first started using ChatGPT, I was skeptical. Could an AI really help me with my coding tasks? As I already learnt about how current AI works in my previous course such as Intro to AI and Data Science course and Design Analysis Algorithm course. I’ve known that basically AI are being built based on neural network.</p><h4>How ChatGPT Works</h4><p>This neural network concept is to transform a value into another value by using a weighted value and a bias. Then, by using this concept, we are introduced into Transformers, a further improvement of neural network, in which the single value of an object can be transformed into a set of matrices which has a sequential weighted value to understand the sequence. This transformers also has it own attention head to be more focused on a more important parts. But, because transformer works parallely not sequentially, positional encoding is added to input embeddings to inject information about the order of words. After that, the current AI will need to be scaling to a LLM such that it can process a large data quickly.</p><p>How chatGPT can code then? The answer is simple, as I deep dive the documentation that I found on the internet and by asking ChatGPT itself, the answer is by learning from the documentation of programming language. By combining the dictionary scopus it has from many programming languages and by the context understanding it has from the transformer, it can pretty helpful on code a solution</p><p><strong>How I Use ChatGPT Daily</strong></p><p>1.<strong> Debugging Code</strong><br> When I encounter an error, I paste the code snippet and the error message into ChatGPT. It analyzes the issue and suggests possible fixes. For example:<br> &gt; “I’m getting a `TypeError` in this Python code. Can you help me debug it?”</p><p>ChatGPT often explains what might be going wrong and suggests corrections or alternative approaches.</p><p>2. <strong>Learning New Concepts</strong><br> If I’m exploring a new library or framework, I ask ChatGPT to explain key concepts or write example code:<br> &gt; “Explain how Flask handles routes in Python, and give me an example of a simple app with two routes.”</p><p>The AI not only explains the concepts but provides a ready-to-run example, making learning hands-on and efficient.</p><p>3.<strong> Optimizing Existing Code</strong><br> If I have a piece of code that works but feels inefficient, I ask:<br> &gt; “Can you optimize this Python code for better performance?”</p><p>ChatGPT provides suggestions and sometimes completely refactors the code for clarity and efficiency.</p><p>4. <strong>Generating Boilerplate Code</strong><br> When starting a new project, I often ask ChatGPT for boilerplate code:<br> &gt; “Create a basic structure for a React app with a navigation bar and two pages.”</p><p>This saves me time and allows me to dive into the project’s specifics.</p><p><strong>Prompting Right: The Key to Effective Coding Help</strong></p><p>Over time, I’ve learned that the quality of ChatGPT’s output depends heavily on how I phrase my prompts. Here are some tips for crafting effective prompts:</p><p>1. <strong>Be Specific</strong><br> Instead of asking vague questions like, *“How do I sort a list?”*, I’d ask:<br> &gt; “How can I sort a list of dictionaries by a specific key in Python?”</p><p>This ensures ChatGPT understands exactly what I need.</p><p>2. <strong>Provide Context</strong><br> If the question relates to an ongoing project, I give context:<br> &gt; “I’m building a web scraper in Python using Beautiful Soup. How can I extract all the links from a webpage?”</p><p>The more context I provide, the better the output.</p><p>3. <strong>Iterate and Refine</strong><br> If the first response isn’t perfect, I refine my question:<br> &gt; “Can you make this code more efficient? Assume the list might contain millions of entries.”</p><p>ChatGPT adapts its response to my feedback.</p><p>4. <strong>Ask for Explanations</strong><br> To deepen my understanding, I often ask:<br> &gt; “Can you explain how this code works step-by-step?”</p><p>This helps me learn as I work.</p><p>5.<strong> Request Edge Case Handling</strong><br> A crucial part of coding is considering edge cases. I ask:<br> &gt; “This function works, but how can I handle empty inputs or unexpected data types?”</p><p>ChatGPT provides robust solutions, ensuring the code is production-ready.</p><p><strong>The Impact on My Workflow</strong></p><p>Using ChatGPT, I’ve not only sped up my development process but also improved the quality of my code. While sometimes it also gives unnecessary additional mark in my code such that it will not become a clean code. Sometimes, it also fails to get the context of the codebase and the library that I use, therefore I need to be more specific in giving the prompt. The real magic lies in how interactive the experience is, I can brainstorm, debug, and learn simultaneously.</p><p>As I continue my coding journey, ChatGPT remains an essential part of my toolkit. Whether I’m stuck on a bug, exploring new technology, or just experimenting, it’s always ready to help.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83c1d7206d39" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Monitoring Your Next.js Project with Sentry: A Comprehensive Guide]]></title>
            <link>https://medium.com/@ferdinandrajaa/monitoring-your-next-js-project-with-sentry-a-comprehensive-guide-4aab5fa932fb?source=rss-082321c0efb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/4aab5fa932fb</guid>
            <category><![CDATA[monitoring]]></category>
            <dc:creator><![CDATA[Ferdinand Raja]]></dc:creator>
            <pubDate>Tue, 10 Dec 2024 14:40:35 GMT</pubDate>
            <atom:updated>2024-12-10T14:40:35.610Z</atom:updated>
            <content:encoded><![CDATA[<p>In any software development project, monitoring is key to ensuring smooth operations and an exceptional user experience. I recently integrated <strong>Sentry</strong> into my <strong>Next.js</strong> project to track performance, manage errors, and gain actionable insights. Here’s how I utilized Sentry for monitoring, based on my implementation and the screenshots shared.</p><h3>Why Sentry?</h3><p>Sentry is a powerful platform for monitoring errors, performance, and application health in real time. By adding Sentry to your project, you can:</p><ul><li>Identify and resolve bugs efficiently.</li><li>Monitor API performance.</li><li>Track user interactions and understand failure trends.</li><li>Get actionable insights to improve application reliability.</li></ul><h3>Setting Up Sentry for Your Project</h3><ol><li><strong>Integration in a Next.js Project</strong><br>To integrate Sentry into your Next.js project, follow these steps:</li></ol><ul><li>Install the Sentry SDK using npx <a href="http://twitter.com/sentry/wizard">@sentry/wizard</a>@latest -i nextjs — saas — org universitas-indonesia-3t — project javascript-nextjs</li><li>Next, while installing sentry, there are many options that user can use that are given by sentry to configure the project automatically.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qomAqbfCXPQzeXr5Itjvfw.png" /></figure><ul><li>Voila, the set up is now done.</li></ul><p><strong>2. Deploy and Monitor</strong><br>Once integrated, Sentry automatically starts monitoring your project. Errors, API response times, and user sessions are logged in real-time.</p><h3>Insights from My Sentry Dashboard</h3><h4>1. Issue Tracking and Debugging</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-BLXWWtIfO9MIRVzw49p5w.png" /></figure><p>In the <strong>Issues</strong> tab, I could identify specific errors affecting my application:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RzQUgMnIWTGYq0b9zV-cTw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Mlw48WkXbpCjFsz-NGkMg.png" /><figcaption>We can see the video where the error occured, the headers, and many info of the error</figcaption></figure><ul><li><strong>AxiosError (404)</strong>: To help me to find if sentry work I purposefully create a dummy data in one model and not create the connection with other model, the project detail, therefore when I click the project detail it returs 404 error. Sentry helped me pinpoint the endpoints causing the issue, saving debugging time.</li><li><strong>API Route Errors</strong>: The error breakdown revealed unhandled exceptions in /api/sentry-example.</li></ul><p>Using this information, I addressed the misconfigured routes and handled the errors gracefully in my code.</p><h4>2. Traces for Performance Monitoring</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mvjfRGGVMImvu-VILJzG0w.png" /></figure><p>The <strong>Traces</strong> tab provided a detailed timeline of application requests and their duration:</p><ul><li>I could see the API calls, middleware executions, and static asset loads.</li><li>The most time-consuming request took <strong>2.74 minutes</strong>, which alerted me to optimize that specific flow.</li></ul><p>This granular view enabled me to reduce bottlenecks and improve overall app responsiveness.</p><h4>3. Project Dashboard</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*blk5rBfaN4EXPkq_dG7XAw.png" /></figure><p>The <strong>General Dashboard</strong> showed:</p><ul><li><strong>Number of Errors</strong>: A total of 5 errors across different endpoints.</li><li><strong>High Throughput Transactions</strong>: Monitoring POST requests and middleware processing.</li></ul><p>Having a summary of affected users, browsers, and user misery index allowed me to prioritize fixes effectively.</p><h4>4. Error Stats</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_5jiTgOsEjGLCL1ujMMagQ.png" /></figure><p>Under the <strong>Stats</strong> tab:</p><ul><li>I analyzed error trends over a 14-day period.</li><li>The accepted errors metric helped identify the scale of real issues, ruling out filtered or invalid errors.</li></ul><p>The <strong>Spike Protection</strong> feature ensured anomalies were flagged without overwhelming the monitoring process.</p><h3>Lessons Learned</h3><p>Here’s how Sentry enhanced my development workflow:</p><ol><li><strong>Real-time Error Tracking</strong>: Every issue was reported instantly, enabling faster resolution.</li><li><strong>Enhanced API Debugging</strong>: By monitoring failed API calls, I improved the backend’s reliability.</li><li><strong>User Insights</strong>: Tracking errors by browser and user session gave me an understanding of the most common failure scenarios.</li></ol><h3>Tips for Using Sentry Effectively</h3><ul><li><strong>Set Up Alerts</strong>: Configure alerts for critical issues to stay informed instantly.</li><li><strong>Organize by Environment</strong>: Use tags to distinguish between staging, development, and production environments.</li><li><strong>Optimize Performance</strong>: Focus on traces that highlight slow or failing requests.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4aab5fa932fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jest is the Best]]></title>
            <link>https://medium.com/@ferdinandrajaa/week-1-sprint-1-36745a2f64fa?source=rss-082321c0efb8------2</link>
            <guid isPermaLink="false">https://medium.com/p/36745a2f64fa</guid>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Ferdinand Raja]]></dc:creator>
            <pubDate>Fri, 20 Sep 2024 03:18:33 GMT</pubDate>
            <atom:updated>2024-09-20T09:02:05.099Z</atom:updated>
            <content:encoded><![CDATA[<p>For this week progress, I have learnt about a new TDD feature which called Jest. It is pretty challenging to find documentation to applied Jest in the backend part of the app. Most of the documentation about setting up Jest are about how to setting up Jest for Next.js Frontend and Backend. Many things differ in the dependencies for Jest in Next.js and in Express, especially most of the documentation for the dependencies in Express are using js. By trial and error, finally I can setting up Jest in Express in a pretty wellful manner. Next, is to create the test, and it’s pretty much the same with testing in other framework, we create the mock item and expect the return to be as what supposed to do. Even though I have successfully applied testing in the codebase, I still encounter an error in the testing because of import error. Until now, the error is still not debugged yet. The reason is because the import itself can be imported but the test somehow see it as an error.</p><figure><img alt="jest.config.cjs" src="https://cdn-images-1.medium.com/max/1024/1*dCtGxHpuLeiRZEY1Jeiwiw.png" /><figcaption>jest.config.cjs</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*BrRnpzThsbWSCzBg24i-FA.png" /><figcaption>jest.setup.js</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dGhW5zkApYp_tSejTpZAZg.png" /><figcaption>script dependencies on package.json</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PZ9mE_MpkcweYZIBiIuN0A.png" /><figcaption>devDependencies on package.json</figcaption></figure><p>Next, I have also learnt about eslint and what eslint do. Even though the eslint already setted up by the client, I have also learned about some dependencies of the eslint(because I encounter error when debugging).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wezRAidrARb6KYYiOEpOAw.png" /></figure><p>Lastly, I have also applied Jira to monitor our group progress and do some task assigning or re-assigning</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36745a2f64fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>