<?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 PUNETI HEMANTH KUMAR REDDY on Medium]]></title>
        <description><![CDATA[Stories by PUNETI HEMANTH KUMAR REDDY on Medium]]></description>
        <link>https://medium.com/@punetihemanth?source=rss-d986161bb241------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1YRfWLPA_uCjuckcLayRFw.jpeg</url>
            <title>Stories by PUNETI HEMANTH KUMAR REDDY on Medium</title>
            <link>https://medium.com/@punetihemanth?source=rss-d986161bb241------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 24 May 2026 04:26:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@punetihemanth/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[Feat: Shuffle Question Ordering to prevent copying]]></title>
            <link>https://medium.com/@punetihemanth/feat-shuffle-question-ordering-to-prevent-copying-c07d5b2f03e7?source=rss-d986161bb241------2</link>
            <guid isPermaLink="false">https://medium.com/p/c07d5b2f03e7</guid>
            <category><![CDATA[vuejs]]></category>
            <dc:creator><![CDATA[PUNETI HEMANTH KUMAR REDDY]]></dc:creator>
            <pubDate>Wed, 21 May 2025 07:20:58 GMT</pubDate>
            <atom:updated>2025-05-21T13:39:59.246Z</atom:updated>
            <content:encoded><![CDATA[<p>As a student, I never imagined I’d be the one implementing a feature designed to prevent cheating — but here we are!</p><p>At <strong>Avanti Fellows</strong>, I along with Surya BV recently introduced <strong>Shuffle Question Ordering</strong> in quizzes to ensure fairness in online assessments. Here’s why this matters and how it works —</p><h4>Why Shuffle Questions?</h4><p>In an online setup, students taking the same test at the same time could easily share answers if questions appeared in the same order. <strong>Randomizing the sequence</strong> makes it harder to copy, ensuring a fairer assessment.</p><p>But there’s a catch within the system - it’s not pretty staright foward:</p><ul><li>We load questions in small batches, not all at once, to keep the system fast. So we will shuffle within this small buckets( batches of size 10 default)</li></ul><p>[0,1,2,3,4…..9] =&gt; we will be randomizing in this block of questions only ensuring that question is fetched.</p><ul><li>Some quizzes have different sets of questions that get shuffled randomly, which can mix up the topics.</li><li>The order of questions must stay the same, even if a student returns to the test later.</li><li>This ensures students can navigate the questions easily and have a smooth experience.</li></ul><p><strong>Note</strong>: All the OMR assessments will have no effect as there is no need in shuffling of questions except OMR assesments we can find shuffling in all the other assessment types.</p><h3>How Does It Work?</h3><p>Instead of scrambling questions in a way that could break the test, we assign a <strong>hidden randomized order</strong> when a student starts the quiz.</p><p>Note: We will be following a 0-based indexing while accessing we use this and while displaying question-1 we go the index 0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*o6MPSF00-Rz-3Q_RvkF6vQ.png" /><figcaption>Behind-the-scenes process</figcaption></figure><h3>Example:</h3><p>Imagine a quiz with 5 questions:</p><ul><li>Normally: Q0, Q1, Q2, Q3, Q4</li><li>Shuffled: Q4, Q1, Q0, Q2, Q3</li></ul><p>Now, when the student sees:</p><ul><li><strong>“Question 1”</strong>, they’re actually seeing <strong>Q4(last question in the normal order)</strong>.</li><li><strong>“Question 2”</strong>, they’re seeing <strong>Q1(second question in the normal order)</strong>, and so on.</li></ul><p>But behind the scenes:</p><ul><li>Answers are saved in their <strong>original positions</strong> to avoid confusion.</li><li>If a student leaves and comes back, their shuffled order stays the same.</li></ul><h4><strong>Edge Case: When the size of the question set exceeds the bucket size (10)</strong></h4><p>In this scenario, the question set will be divided into smaller chunks (buckets) of size 10. If the total number of questions isn’t a multiple of 10, the last bucket will contain the remaining questions.</p><p>For example, if there are<strong><em> 25 questions </em></strong>in the question set:</p><ul><li>The questions will be grouped as <strong><em>[0–9], [10–19], and [20–24].</em></strong></li><li>Each bucket is shuffled individually.</li></ul><h3>Handling Previous Sessions Without question_order</h3><p>To address previous sessions where the question_order field was missing in the database, we added a backend script that assigns a linear ordering to the questions (from 0 to total_questions - 1). This ensures consistency across all sessions—both old and new.</p><h3>Testing to Ensure Stability</h3><p>We implemented comprehensive unit and end-to-end (E2E) tests to verify that the new functionality works as intended. These tests confirm that:</p><ul><li>The new feature correctly assigns a question order.</li><li>Existing features remain stable and unaffected.</li></ul><h3>Final Thoughts</h3><p>This has been a meaningful journey for me. There were moments when I felt it might not come together, but seeing the feature go from <strong><em>planning to development to thorough testing</em></strong> has been incredibly rewarding. Knowing that this project directly benefits students makes the experience even more fulfilling.</p><p>I’d like to express my sincere gratitude to <strong>Surya BV</strong> for his unwavering support and motivation. Without him, I might have completed the development but wouldn’t have gained such a deep understanding of the entire process.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c07d5b2f03e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up the Comprehensive Local Development Environment for AMRIT]]></title>
            <link>https://medium.com/@punetihemanth/setting-up-the-comprehensive-local-development-environment-for-amrit-331989bfc37c?source=rss-d986161bb241------2</link>
            <guid isPermaLink="false">https://medium.com/p/331989bfc37c</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[c4gt]]></category>
            <dc:creator><![CDATA[PUNETI HEMANTH KUMAR REDDY]]></dc:creator>
            <pubDate>Sun, 02 Feb 2025 19:47:52 GMT</pubDate>
            <atom:updated>2025-02-03T05:01:02.959Z</atom:updated>
            <content:encoded><![CDATA[<p>Imagine spending <strong>4–6 hours</strong> just setting up a project before you can even start coding. Frustrating, right? That’s exactly what developers faced with the <strong>AMRIT platform</strong>, an open-source healthcare project serving <strong>2.2 crore beneficiaries</strong>. But what if I told you that I helped cut this setup time to just <strong>minutes</strong>? In this blog, I’ll take you through my journey of simplifying AMRIT’s development setup using <strong>Docker</strong>, automating data loading, and configuring <strong>14 Micro services </strong>and<strong> 11 Frontend services</strong>. Whether you’re an open-source enthusiast or just curious about problem-solving in tech, this story is for you. Let’s dive in!</p><h3>Introduction</h3><p>The <strong>AMRIT platform</strong> is a revolutionary open-source project with over <strong>10+ frontend and 14 backend microservices</strong>, serving <strong>2.2 crore beneficiaries</strong> across India. As an open-source initiative, it relies on contributors to grow and improve. However, the development setup process was time-consuming, taking <strong>4–6 hours</strong>, which discouraged many developers from contributing. My role as a Community contributor was to simplify this setup, making it easier for developers to get started.</p><h3>About AMRIT</h3><p>AMRIT (Accessible Medical Records via Integrated Technology) is an open-source platform designed to streamline healthcare services. It provides a unified system for managing medical records, ensuring transparency and accessibility for millions of beneficiaries. The platform’s open-source nature encourages collaboration, but the initial setup process has been a significant barrier for developers.</p><h3>The Problem: Why Does Setting This Up Feel Like a Full-Time Job?</h3><p>The AMRIT platform consists of <strong>25+ services</strong> (14 backend and 11 frontend), each requiring specific configurations, dependencies, and data loading. Developers had to spend <strong>4–6 hours</strong> setting up the environment, which included:</p><ol><li>Installing software dependencies (MySQL, Redis, MongoDB etc)</li><li>Loading dummy data into the databases.</li><li>Configuring environment variables for each service.</li><li>Managing ports to avoid conflicts.</li></ol><p>This time-consuming process reduced the number of contributors, slowing down the platform’s growth.</p><h3>My Journey: From Confusion to Clarity</h3><h3>The First Meeting: A Reality Check!</h3><p>My journey began with a meeting with <strong>Mithun</strong>, the head of AMRIT, and the senior developers. They explained the challenges with the current setup, and we brainstormed ideas to simplify it. At first, I thought it would be a straightforward task, but Mithun warned me, <em>“It’s not straightforward; there may be speed breakers.”</em> He was right.</p><h3>Setting Up Dependencies: The Easy Part… or So I Thought</h3><p>The first step was setting up the required software dependencies. I used <strong>Docker</strong> to containerize services like <strong>MySQL, Redis, and MongoDB</strong>. This helped avoid conflicts with local setups, and everything ran smoothly at first.</p><h3>Loading Dummy Data: The Unexpected Nightmare</h3><p>Next, I had to load dummy data into the services. This turned out to be harder than I expected. There were version compatibility issues, and I spent a whole week debugging. With help from <strong>Anil</strong>, a senior developer at AMRIT, we fixed the issue by downgrading the software version.</p><h3>Debugging a Massive SQL Script: A Horror Story in 800MB</h3><p>After fixing the version issue, I faced another problem — debugging an <strong>800 MB SQL script</strong>. It was huge, and debugging it was a nightmare. Again, <strong>Anil</strong> helped me out, and after several meetings, we finally loaded the dummy data. But this process took another week.</p><h3>Setting Up Backend Services: Me vs. Java</h3><p>With the data loaded, the next step was setting up the <strong>14 backend services</strong> built on <strong>Spring Boot</strong>. I didn’t know Java, so this was tough. I spent some time learning the basics of Spring Boot and got help from <strong>Ravi</strong>, another senior developer at AMRIT. I managed to set up the main service, but it threw errors, and fixing them took another week.</p><h3>Configuring Frontend Services: The Final Stretch</h3><p>Once the backend services were running, I moved on to the <strong>11 frontend services</strong>. Each frontend service needed to be configured with the updated backend ports. This way, developers could clone the repository, run the services, and start contributing without wasting time on setup. I tested each service thoroughly, logging in and checking for errors.</p><h3>Technical Implementations: Quick Wins That Took Weeks!</h3><p>Here’s a quick look at the technical work I did:</p><ul><li><strong>Containerized MySQL, Redis, and MongoDB using Docker</strong>: This isolated the services, preventing conflicts with local setups and ensuring smooth operation.</li><li><strong>Automated dummy data loading</strong>: Optimized SQL scripts and resolved version compatibility issues to load data efficiently.</li><li><strong>Configured environment variables</strong>: Edited .env files for 14 backend and 11 frontend services to ensure seamless communication.</li><li><strong>Assigned unique ports</strong>: Managed port assignments for all services to avoid conflicts during local development.</li></ul><h3>Future Improvements: Making It Even Easier</h3><p>While the current setup is much better, there’s still room for improvement. The next step is to <strong>dockerize the entire cloning and dependency installation process</strong>. This would allow developers to run all services within minutes, so they can focus on contributing to the platform and making a difference in the healthcare sector.</p><h3>Special Thanks</h3><p>This journey wouldn’t have been possible without the help of some amazing people:</p><ul><li><strong>Mithun</strong>: My mentor and the maintainer of AMRIT, who guided me through every step, taking both my silly and complex doubts with the same wavelength — something I found truly impressive.</li><li><strong>Ravi, Anil, and Devika</strong>: The senior developers at AMRIT who were always there to help me when I got stuck.</li><li><strong>Pratham and C4GT</strong>: For giving me this incredible opportunity to contribute to such an impactful project.</li></ul><h3>Conclusion</h3><p>With this, I’m signing off from my Docker container (just kidding!). But my journey in open-source doesn’t end here. The AMRIT platform is a great example of how collaboration can make a difference, and I’m proud to have been a part of it. If you’re thinking of contributing to open-source, don’t let self-doubt stop you. Dive in, learn, and make an impact!</p><p><em>Thank you for reading! If you’re interested in contributing to AMRIT, check out the repository and get started today.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=331989bfc37c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>