<?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"><channel><title><![CDATA[Learning in Public Begins]]></title><description><![CDATA[Join me as I share my journey of building a quiz web application while learning in public. Follow along for insights, challenges, and solutions!]]></description><link>https://learning-in-public-begins.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 10 Sep 2026 05:46:36 GMT</lastBuildDate><atom:link href="https://learning-in-public-begins.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[The Evolution of My Quiz Web Application]]></title><description><![CDATA[Learning in Public: The Evolution of My Quiz Web Application
Hey everyone! I’m back with another update on my quiz web application journey. 🚀 If you've been following along, you know the goal is to build a platform that helps students prepare for th...]]></description><link>https://learning-in-public-begins.hashnode.dev/the-evolution-of-my-quiz-web-application</link><guid isPermaLink="true">https://learning-in-public-begins.hashnode.dev/the-evolution-of-my-quiz-web-application</guid><category><![CDATA[#Project from scratch]]></category><category><![CDATA[#learning-in-public]]></category><category><![CDATA[QuizApp]]></category><category><![CDATA[Springboot]]></category><category><![CDATA[PostgreSQL]]></category><category><![CDATA[openai]]></category><category><![CDATA[huggingface]]></category><category><![CDATA[React]]></category><category><![CDATA[MVC architecture]]></category><category><![CDATA[full stack]]></category><category><![CDATA[projects]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[java development]]></category><category><![CDATA[java full stack development]]></category><dc:creator><![CDATA[Utkarsh Meshram]]></dc:creator><pubDate>Sat, 12 Oct 2024 06:23:23 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1728713908201/9fa4b7b7-8005-4b53-87d7-0635ec60db02.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-learning-in-public-the-evolution-of-my-quiz-web-application">Learning in Public: The Evolution of My Quiz Web Application</h3>
<p>Hey everyone! I’m back with another update on my quiz web application journey. 🚀 If you've been following along, you know the goal is to build a platform that helps students prepare for their interviews. What started as an experiment with AI-generated questions has now taken a new direction, and I’m here to share the reasons, the challenges I’ve faced, and the progress so far. Let’s dive in!</p>
<hr />
<h3 id="heading-initial-objective-ai-generated-questions-for-the-quiz-app">Initial Objective: AI-Generated Questions for the Quiz App</h3>
<p>Originally, my idea was to use AI services to generate quiz questions dynamically, thinking it would save time and offer a wide variety of content. I experimented with various APIs like <strong>OpenAI</strong>, <strong>Hugging Face</strong>, and <strong>Groq</strong>. Sounds futuristic, right? But things didn’t go as smoothly as planned. 😅</p>
<p>Here’s what went wrong: its the controller class for open ai api</p>
<ol>
<li><pre><code class="lang-java">  Out of Credits: OpenAI gives $<span class="hljs-number">18</span> in free credits to early adopters. After that, it’s pay-to-use. I ran out of credits quicker than I anticipated. 💸<span class="hljs-keyword">package</span> com.example.quizapp.Controller;
  <span class="hljs-keyword">import</span> org.springframework.web.bind.annotation.RestController;
  <span class="hljs-keyword">import</span> org.springframework.web.client.RestTemplate;

  <span class="hljs-keyword">import</span> com.example.quizapp.DTO.chatGPTRequest;
  <span class="hljs-keyword">import</span> com.example.quizapp.DTO.chatGPTResponse;
  <span class="hljs-keyword">import</span> org.springframework.beans.factory.annotation.Autowired;
  <span class="hljs-keyword">import</span> org.springframework.beans.factory.annotation.Value;
  <span class="hljs-keyword">import</span> org.springframework.http.HttpStatus;
  <span class="hljs-keyword">import</span> org.springframework.http.ResponseEntity;
  <span class="hljs-keyword">import</span> org.springframework.web.bind.annotation.GetMapping;
  <span class="hljs-keyword">import</span> org.springframework.web.bind.annotation.RequestMapping;
  <span class="hljs-keyword">import</span> org.springframework.web.bind.annotation.RequestParam;

  <span class="hljs-meta">@RestController</span>
  <span class="hljs-meta">@RequestMapping("/question")</span>
  <span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">QuestionControler</span> </span>{

      <span class="hljs-meta">@Autowired</span>
      <span class="hljs-keyword">private</span> RestTemplate restTemplate;

      <span class="hljs-meta">@Value(value = "${openai.api.url}")</span>
      String apiURL;
      <span class="hljs-meta">@Value(value = "${openai.model}")</span>
      String model;

      <span class="hljs-meta">@SuppressWarnings("null")</span>
      <span class="hljs-meta">@GetMapping("/allQuestions")</span>
      <span class="hljs-function"><span class="hljs-keyword">public</span> ResponseEntity&lt;String&gt; <span class="hljs-title">getAllQuestions</span><span class="hljs-params">(<span class="hljs-meta">@RequestParam</span> String topic, <span class="hljs-meta">@RequestParam</span> String level)</span> </span>{
          <span class="hljs-keyword">try</span> {
              String prompt = <span class="hljs-string">"Generate 10 "</span> + topic + <span class="hljs-string">" quiz questions having "</span> + level + <span class="hljs-string">" difficulty, each with 4 options and specify the correct option in JSON format. Each question should include the question text, an array of options, and the correct answer. The JSON format should look like this: { 'questions': [ { 'question': 'What is ...?', 'options': ['A', 'B', 'C', 'D'], 'correct_answer': 'A' } ] }"</span>;
              chatGPTRequest request = <span class="hljs-keyword">new</span> chatGPTRequest(model, prompt);

              ResponseEntity&lt;chatGPTResponse&gt; response = restTemplate.postForEntity(apiURL, request, chatGPTResponse.class);

              <span class="hljs-keyword">if</span> (response.getBody() != <span class="hljs-keyword">null</span> &amp;&amp; !response.getBody().getChoices().isEmpty()) {
                  <span class="hljs-keyword">return</span> ResponseEntity.ok(response.getBody().getChoices().get(<span class="hljs-number">0</span>).getMessage().getContent());
              } <span class="hljs-keyword">else</span> {
                  <span class="hljs-keyword">return</span> ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(<span class="hljs-string">"Failed to generate questions: Empty response from OpenAI"</span>);
              }
          } <span class="hljs-keyword">catch</span> (Exception e) {
              <span class="hljs-keyword">return</span> ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(<span class="hljs-string">"Failed to generate questions: "</span> + e.getMessage());
          }
      }
  }
</code></pre>
</li>
<li><p><strong>Unreliable Output Formats</strong>: The AI models, while great for chatbots, weren’t delivering quiz questions in a steady JSON format. Sometimes the response included extra text or string formats that weren’t directly usable. I tried tweaking the prompts, but the results were inconsistent.</p>
</li>
</ol>
<pre><code class="lang-java"><span class="hljs-keyword">package</span> com.example.quizapp.Config;

<span class="hljs-keyword">import</span> org.springframework.beans.factory.annotation.Value;
<span class="hljs-keyword">import</span> org.springframework.context.annotation.Bean;
<span class="hljs-keyword">import</span> org.springframework.context.annotation.Configuration;
<span class="hljs-keyword">import</span> org.springframework.web.client.RestTemplate;
<span class="hljs-keyword">import</span> org.springframework.http.client.ClientHttpRequestInterceptor;
<span class="hljs-keyword">import</span> org.springframework.http.client.SimpleClientHttpRequestFactory;

<span class="hljs-meta">@Configuration</span> 
<span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">OpenAIConfig</span> </span>{

    <span class="hljs-meta">@Value("${openai.api.key}")</span>
    <span class="hljs-keyword">private</span> String openApiKey;

    <span class="hljs-meta">@Bean</span>
    <span class="hljs-function"><span class="hljs-keyword">public</span> RestTemplate <span class="hljs-title">restTemplate</span><span class="hljs-params">()</span> </span>{
        RestTemplate restTemplate = <span class="hljs-keyword">new</span> RestTemplate(<span class="hljs-keyword">new</span> SimpleClientHttpRequestFactory());

        ClientHttpRequestInterceptor interceptor = (request, body, execution) -&gt; {
            request.getHeaders().add(<span class="hljs-string">"Authorization"</span>, <span class="hljs-string">"Bearer "</span> + openApiKey);
            request.getHeaders().add(<span class="hljs-string">"Content-Type"</span>, <span class="hljs-string">"application/json"</span>);
            <span class="hljs-keyword">return</span> execution.execute(request, body);
        };

        restTemplate.getInterceptors().add(interceptor);
        <span class="hljs-keyword">return</span> restTemplate;
    }
}
</code></pre>
<h3 id="heading-facing-reality-two-options">Facing Reality: Two Options</h3>
<p>At this point, I had two paths ahead:</p>
<ol>
<li><p><strong>Buy a subscription</strong> for a more reliable AI model. (Not ideal when you’re on a tight budget and learning in public. Plus, this was a side project meant to be free-to-use.)</p>
</li>
<li><p><strong>Manually feed questions into the system</strong> by adding an admin functionality. This way, I’d have full control over the quality and structure of the quiz content.</p>
</li>
</ol>
<p>As much as I loved the idea of AI doing the heavy lifting, I decided to switch to <strong>manual question input</strong> for now. It felt more realistic and manageable, especially with my self-imposed deadlines. But don’t worry—I’m not abandoning the AI option. I’ll definitely revisit it in the future. For now, I just need to get this project done!</p>
<hr />
<h3 id="heading-current-progress-manual-question-input-admin-controls">Current Progress: Manual Question Input + Admin Controls</h3>
<p>Since I decided to go with manual question/answer entry, I’ve focused on adding <strong>admin functionality</strong> to manage the questions directly. This gives me full control over the content and ensures everything is structured properly for users.</p>
<p>Here’s a quick overview of what I’ve done so far:</p>
<ol>
<li><p><strong>Admin Interface</strong>: I built an admin panel where questions can be added or updated manually.</p>
</li>
<li><p><strong>Endpoints Created</strong>: Using <strong>Spring Boot</strong> and <strong>PostgreSQL</strong>, I created several API endpoints for both normal users (to fetch quiz questions) and admins (to add or modify questions).</p>
</li>
<li><p><strong>User Interface</strong>: A basic front end is set up for users to take quizzes, with admin features accessible behind the scenes. It’s simple, but functional!</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728713739302/b67ab2ca-3ccc-4c8e-b6f2-8001c3c07e8d.png" alt class="image--center mx-auto" /></p>
<p>Here’s a sneak peek of the project so far:</p>
<h3 id="heading-whats-next">What’s Next?</h3>
<p>Even though I’ve shifted away from dynamic question generation for now, the learning has been immense. This challenge helped me get my hands dirty with:</p>
<ul>
<li><p>Working with <strong>Spring Boot</strong> for building robust APIs.</p>
</li>
<li><p>Exploring <strong>PostgreSQL</strong> for database management.</p>
</li>
<li><p>Learning about the balance between relying on external APIs and building your own solutions.</p>
</li>
</ul>
<p>I’m still planning to come back to the AI part once this project is complete, but for now, my focus is on delivering a stable, working product.</p>
<p>If you’re curious to see my code (and where I struggled), feel free to check out my GitHub repo: <a target="_blank" href="https://github.com/utkarsh125msh">https://github.com/utkarsh125msh</a><br />Follow me on X : <a target="_blank" href="https://x.com/6Meshram93984">https://x.com/6Meshram93984</a></p>
<hr />
<h3 id="heading-final-thoughts">Final Thoughts</h3>
<p>This project is teaching me a lot, and I’m loving the challenge—even if things didn’t go as originally planned. At the end of the day, that’s what learning in public is all about: adapting, growing, and sharing the journey with others.</p>
<p>Stay tuned for more updates! Until then, keep exploring and building. 💻✨</p>
<hr />
<p><strong>Tags</strong>: #LearnInPublic #QuizApp #SpringBoot #PostgreSQL #BackendDevelopment #OpenAI</p>
]]></content:encoded></item><item><title><![CDATA[My Code Adventures: Come Along for the Ride! 🚀]]></title><description><![CDATA[Kickstarting My Public Learning Journey
Hey there! 👋
Super excited to share something with you all—I'm diving into the world of learning in public and want you to be a part of it! I’ll be working on a fun project: a Quiz Web Application. But here’s ...]]></description><link>https://learning-in-public-begins.hashnode.dev/my-code-adventures-come-along-for-the-ride</link><guid isPermaLink="true">https://learning-in-public-begins.hashnode.dev/my-code-adventures-come-along-for-the-ride</guid><dc:creator><![CDATA[Utkarsh Meshram]]></dc:creator><pubDate>Wed, 02 Oct 2024 07:09:35 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1727852787299/17944dc7-c509-4762-a791-4e97d6625d3d.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Kickstarting My Public Learning Journey</strong></p>
<p>Hey there! 👋</p>
<p>Super excited to share something with you all—I'm diving into the world of <strong>learning in public</strong> and want you to be a part of it! I’ll be working on a fun project: a <strong>Quiz Web Application</strong>. But here’s the cool part—I’m not just building it behind the scenes. I’m sharing the whole process with you as I go! Yep, that means all the ups, downs, wins, and fails.</p>
<p><strong>What’s This Project All About?</strong></p>
<p>I’ll be building a <strong>Quiz Web Application</strong> where users can:</p>
<ul>
<li><p>for authentication and authorization (<strong>Log in</strong> 🛡️)</p>
</li>
<li><p>Take quizzes with different <strong>difficulty levels</strong> 🎮</p>
</li>
<li><p>Check out a <strong>leaderboard</strong> to see how they rank 🏆</p>
</li>
<li><p>And many <strong>more</strong> as we move forward</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727847923594/80c6887b-02d7-491b-9aac-47c68218c775.png" alt /></p>
<p>I’ll be using some awesome tools for this project, like a <strong>SQL</strong> database, and <strong>Spring</strong> <strong>boot</strong> for backend api, <strong>React</strong> for frontend and bunch of cool web technologies. It’s all about learning, experimenting, and sharing the journey!</p>
<p><strong>What I Already Know:</strong></p>
<p>I’ve got a decent handle on <strong>Core Java</strong> and <strong>Spring Boot</strong> (since I’ve been more of a backend guy so far). But there’s still so much to learn! As I build this quiz web app, I’ll be sharpening my existing skills and tackling new ones along the way. Whether it’s frontend, design, or handling databases, I’ll figure it out as I go—and I’ll share all of that with you!</p>
<p><strong>What You Can Expect:</strong></p>
<p>Here’s what I’ll be doing:</p>
<ul>
<li><p><strong>Building</strong> from scratch (so, you’ll see all the early-stage chaos)</p>
</li>
<li><p><strong>Posting</strong> about any challenges I face and how I get past them (bugs, errors, bad ideas, you name it)</p>
</li>
<li><p><strong>Sharing resources</strong> that help me along the way</p>
</li>
<li><p><strong>Dropping code updates</strong> on GitHub for you to follow along!</p>
</li>
</ul>
<p>Here’s the schedule:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727850374526/dce2586e-6c35-4a43-8462-600475b8592e.jpeg" alt class="image--center mx-auto" /></p>
<ul>
<li><p><strong>Monday to Thursday</strong>: I’ll be working on the project and learning new stuff.</p>
</li>
<li><p><strong>Twitter</strong>: I’ll share quick updates, wins, and maybe a few frustrations.</p>
</li>
<li><p><strong>Hashnode</strong>: I’ll write more detailed posts about what I’ve learned and how I’ve solved problems.</p>
</li>
<li><p><strong>GitHub</strong>: The source code will live here for you to explore (or laugh at) as it evolves.</p>
</li>
</ul>
<p><strong>Come Join the Fun!</strong></p>
<p>I’d love for you to tag along on this ride! Whether you're learning to code too, building your own project, or just curious about what this whole "learning in public" thing is about, you’re welcome to follow along!</p>
<ul>
<li><p><strong>Twitter</strong>: Quick updates and real-time progress—<a target="_blank" href="https://x.com/6Meshram93984">Follow me here</a> X</p>
</li>
<li><p><strong>Hashnode</strong>: For in-depth breakdowns and problem-solving—<a target="_blank" href="https://hashnode.com/@utkarsh125msh">Read my blog</a> ✍️</p>
</li>
<li><p><strong>GitHub</strong>: Want to check out the code? It’s all here—<a target="_blank" href="https://github.com/utkarsh125msh">See the repo</a> 💻</p>
</li>
</ul>
<p><strong>Why Am I Doing This?</strong></p>
<p>I’m a big believer in <strong>learning in public</strong>. By sharing this journey, I hope to:</p>
<ul>
<li><p>Keep myself motivated 💪</p>
</li>
<li><p>Help others by showing the real, messy process 🧠</p>
</li>
<li><p>Connect with other learners and developers 🤝</p>
</li>
</ul>
<p>It’s going to be a fun ride, full of trial and error, and I’m ready to dive in. Let’s see where it takes us!</p>
<p><strong>Let’s Ride Together!</strong></p>
<p>If you’re interested in coding, learning new things, or just want to see what happens, feel free to follow along! Hit me up with feedback, ideas, or just say hi—I’m always up for a chat. Let’s learn and grow together! 🚀</p>
]]></content:encoded></item></channel></rss>