<?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 Riski Midi Wardana on Medium]]></title>
        <description><![CDATA[Stories by Riski Midi Wardana on Medium]]></description>
        <link>https://medium.com/@riskimidiw?source=rss-268abc1147a4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Riski Midi Wardana on Medium</title>
            <link>https://medium.com/@riskimidiw?source=rss-268abc1147a4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 21:58:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@riskimidiw/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[Vibe Coding: What I’ve Learned So Far]]></title>
            <link>https://medium.com/@riskimidiw/vibe-coding-what-ive-learned-so-far-2a313f3d5d87?source=rss-268abc1147a4------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a313f3d5d87</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <dc:creator><![CDATA[Riski Midi Wardana]]></dc:creator>
            <pubDate>Tue, 29 Apr 2025 15:58:58 GMT</pubDate>
            <atom:updated>2025-05-15T13:55:31.805Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Sharing my key takeaways about it and what we should focus on in the future as a human</blockquote><p>In 2025, there is a hype about <a href="https://en.wikipedia.org/wiki/Vibe_coding">vibe coding</a> introduced by Andrej Karpathy (Co-Founder of OpenAI), which changed how we write software, where we are highly dependent on the AI to do the tasks that human usually does. It is as simple as you give context and tasks to a <a href="https://en.wikipedia.org/wiki/Large_language_model">Large Language Model (LLM)</a> and let it handle the rest, like generating code, running the program, or even debugging for you.</p><h3>Hands-On Experience 💻</h3><p>Recently, I created a simple project called koran-teknologi (<a href="https://github.com/riskimidiw/koran-teknologi">https://github.com/riskimidiw/koran-teknologi</a>) to try vibe coding using GitHub Copilot in VS Code. I want to name it blogman, like a postman but for blogs, unfortunately, it’s already used. “Koran Teknologi” is an Indonesian word that means “Tech Newsletter”.</p><p>In this project, quality is not a priority. Being able to run it without error is more than enough haha, and here is the summary of what it does</p><blockquote>Scrap multiple engineering blog websites and periodically deliver them to Telegram channel</blockquote><h4>Step 1 — Brainstorming</h4><p>This is the first step before working on the project, I start with these questions:</p><ol><li>What’s the current pain point?</li><li>What are the existing solutions, and what can we do better?</li><li>How can we implement it? Are there any alternative approaches?</li></ol><p>I used both Gemini Flash 2.0 and GPT-4o, and all of them are already performing well based on my expectations, hence I didn’t try other models like Claude or DeepSeek. Once I had finalised the solution, the next step is to give the first task for AI.</p><h4>Step 2 — First task for AI</h4><p>When using GitHub Copilot agent mode in VS Code, we can give it context using an instruction file (ref: <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot">https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot</a>) to give AI guidance on how we should generate the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*9UwfmPfeZvqAtZCyKP06PA.png" /></figure><p>We can put info like the project overview, tech stacks, coding style, folder structure, scopes, etc, that can be useful for AI. In my case, I only define:</p><ul><li>Project Overview</li><li>Features</li><li>Tech Stacks</li><li>Folder Structure</li></ul><p>Copilot Instruction: <a href="https://github.com/riskimidiw/koran-teknologi/blob/main/.github/copilot.instruction.md">https://github.com/riskimidiw/koran-teknologi/blob/main/.github/copilot.instruction.md</a></p><p>With that information, we can just ask AI using a simple command like</p><pre>Generate code based on the copilot instruction file</pre><p>and it will generate all of the necessary codes for you. To be honest, I was surprised by the Claude 3.5 Sonnet model for agentic and code generation purposes. So far, this model is still the best compared to GPT or Gemini in my task.</p><p>With the agentic mode, Copilot can perform the task step by step, starting from scanning the folder, generating code, adding tests, running the program via terminal, and debugging the code. So, you only need to wait and complain (AI won’t be angry with you, don’t do it if you’re working with a human, haha).</p><h4>Step 3— Complain, Complain, and Complain in a Clear Way</h4><p>The first generated code might not satisfy our expectations, and it mostly causes some errors when we run it for the first time.</p><blockquote>As a human we can ack as a Supervisor to AI. Stop them if they become crazy by writing unecessary codes. Guide them when they don’t have much context to solve the problem.</blockquote><p>AI generated a bunch of codes for me, and tried to verify it by running the code, got an error, tried to fix it again, and once everything is done, this is the time for us to try to test it, and boom 🔥, program can run, but functionality was not working properly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DJwwiIBu8JiqAwOTPLGx2Q.png" /></figure><p>The first complaint that I raised to AI was that it generated unnecessary code. I don’t even need Docker support or a fancy bash script. I just want to start with a simple one. I also asked it to remove the unit tests, haha.</p><p>I asked AI to solve the issue, but it was not performing well in my case. So I checked the code and realized that AI was struggling to scrape the targeted website because it lacked context, so here is what I did to solve it:</p><ul><li>I tried to inspect the element and see the HTML schema, and I found that most of them are using a random CSS class name, for example:</li></ul><pre>&lt;a data-baseweb=&quot;card&quot; aria-label=&quot;Migrating Uber&#39;s Compute Platform to Kubernetes: A Technical Journey&quot; href=&quot;https://www.uber.com/en-ID/blog/migrating-ubers-compute-platform-to-kubernetes-a-technical-journey/?uclick_id=38450eb1-0ac8-4060-a960-fbec8195dd8b&quot; class=&quot;dc dd de bg if ig ih bh ii ij ik bi il im in io ip ak bd ed cm c8 ej iq ir is it&quot; data-uclick-id=&quot;38450eb1–0ac8–4060-a960-fbec8195dd8b&quot;&gt;…&lt;/a&gt;</pre><ul><li>Complained to AI, gave it targeted HTML content, and asked it to fix. We don’t need to think about how to solve, let AI do this for us. There are multiple workarounds to handle this, like using other attributes or pattern matching with the targeted value (URL / datetime, etc).</li><li>Run it again, and it solved in one run.</li><li>Another issue was due to some of the web added pop-up scripts before letting the user open the page, hence we need to close the pop-up first to get the full HTML data.</li><li>Once again, complained to AI, just gave HTML content, and it was solved by using <a href="https://www.selenium.dev/">Selenium</a> for web automation tools.</li></ul><p>This is the most important task, our prompting skill will be tested here. And how long you will debug the issue is also determined based on the previous prompt. In this phase, I’d suggest always committing our existing code before asking AI to generate new code so that you can easily go back to the previous state if it messes up.</p><h4>Step 4— Give Kudos to AI (Optional)</h4><p>After becoming the top complainers, it finally worked as expected, I’m able to receive daily blog updates 👏.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*BVOcUsOftCm4FQJtBQe4Zw.png" /></figure><h3>My Final Thoughts…</h3><p>Nowadays LLM model has become better than before. Maybe in the future, AI can do something that we feel is hard to replicate using AI, so I would suggest focusing on these parts:</p><ul><li><strong>Domain Knowledge Expertise</strong> → If we know the subject deeply, we can detect inaccuracies or hallucinations. By becoming a domain expert, we can get a sense of how to improve it.</li><li><strong>Prompt Engineering </strong>→ We may move the learning from “Learn how to search” to “Learn how to prompt”, mastering this can save your time and get a better outcome. Here is my favorite resource: <a href="https://www.promptingguide.ai/">https://www.promptingguide.ai/</a>. We don’t need to be experts on how AI works, as long as we know how to use AI, it should be enough for most of us.</li><li><strong>Creativity and Problem Solving </strong>→ Creativity + Problem Solving + AI = Masterpiece 💠. If we know what to do, we can ask AI to do it. Even if we don’t know what to do, we still can ask AI what to do haha. Just be creative. With AI, we can reduce a lot of entry point barriers, for example, a software engineer who hasn’t written Java code can use AI to help with that task.</li><li><strong>Be Human</strong> → If AI can take part in human tasks, then we should focus on what makes us truly human — like empathy, compassion, relationships, morality, ethics, collaboration, and more.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a313f3d5d87" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rails API + JWT Authentication]]></title>
            <link>https://medium.com/binar-academy/rails-api-jwt-authentication-a04503ea3248?source=rss-268abc1147a4------2</link>
            <guid isPermaLink="false">https://medium.com/p/a04503ea3248</guid>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Riski Midi Wardana]]></dc:creator>
            <pubDate>Sat, 17 Nov 2018 02:01:40 GMT</pubDate>
            <atom:updated>2022-03-03T11:23:00.998Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to build simple Rails API authentication using JSON Web Token (JWT)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*9pWUdYPAwCQoWdEnvZli4A.jpeg" /></figure><h4><strong>What we need</strong></h4><ul><li>Ruby 2.5.1</li><li>Rails 5.2.1</li><li>PostgreSQL</li><li>Insomnia / Postman</li></ul><p><strong>Github Repository</strong></p><p><a href="https://github.com/riskimidiw/rails-jwt">https://github.com/riskimidiw/rails-jwt</a></p><p><strong>REST API table</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/75e3042d171d1653cef5d6d8b322bed8/href">https://medium.com/media/75e3042d171d1653cef5d6d8b322bed8/href</a></iframe><p>Okay now we’re ready to generate the Rails project, type this on your terminal</p><pre>$ rails new rails-jwt --api</pre><p>Add JSON Web Token (JWT) and bcrypt gem</p><ul><li>JWT: Open industry standard (<a href="https://tools.ietf.org/html/rfc7519">RFC 7519</a>) for representing claims securely between two parties</li><li>bcrypt : Password hashing algorithm</li></ul><pre><em># Use Json Web Token (JWT) for token based authentication<br></em>gem &#39;jwt&#39;<br><em># Use ActiveModel has_secure_password<br></em>gem &#39;bcrypt&#39;, &#39;~&gt; 3.1.7&#39;</pre><p>and then install dependencies by typing this on your terminal</p><pre>$ bundle install</pre><p><strong>Update routes</strong></p><pre># config/routes.rb</pre><pre>Rails.application.routes.draw <strong>do<em><br>  </em></strong><em>resources </em>:users, param: :_username<br>  post &#39;/auth/login&#39;, to: &#39;authentication#login&#39;<br>  <em>get </em>&#39;/*a&#39;, to: &#39;application#not_found&#39;<br><strong>end</strong></pre><p>In the routes.rb, we defined routes for users using resources. resources syntax helps us for generating REST API design for the user using _username as a parameter. So it will look like our REST API table above.</p><p><strong>Create JsonWebToken class</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e66586b79ffb6ac8352397d055ea76b2/href">https://medium.com/media/e66586b79ffb6ac8352397d055ea76b2/href</a></iframe><p>SECRET_KEY is the key for encoding and decoding tokens. In the code above, we assign a secret key generated by default by rails application into the SECRET_KEY variable. SECRET_KEY must be secret and not to be shared. Every time we’re doing some encoding and decoding using JWT, we need to specify the SECRET_KEY. By grouping and encapsulating the JWT encoding and decoding mechanism in this class, we will reduce a couple of codes that have responsibility for doing encoding and decoding jobs, because we don’t need to specify SECRET_KEY every time. The decode and encode function above is defined as a static function because it will give flexibility for doing encoding and decoding jobs without instantiating the JsonWebToken object.</p><p>self.encode function has 2 parameters. first payload and second exp. Payload is a key-value object for holding data that want to be encoded. exp stand for expiration for holding expiration time token. if exp is not specified it will give you the default value in 24 hours or one day.</p><p>In self.decode function we decoded the token given by the user and get the first value then assign it to a decoded variable, the first value contains a payload that we had already encoded before and the second value contain information about the algorithm that we use for encoding and decoding token.</p><p><strong>Create authorize_request function</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/74016621e73504473ad73cbfd4668133/href">https://medium.com/media/74016621e73504473ad73cbfd4668133/href</a></iframe><p>authorize_request function has responsibility for authorizing user requests. first, we need to get a token in the header with ‘Authorization’ as a key. with this token now we can decode and get the payload value. In this application, we define user_id in the payload. You should not include the user credentials data into the payload because it will cause security issues, you can include data that is needed to authorize the user. When performing JsonWebToken.decode function, it will return JWT::DecodeError if there was an error like token was expired, token not valid, token missing, etc. After we got user_id from the payload then we will try to find the user by id and assign it into current_user variable, If the user does not exist it will return ActiveRecord::RecordNotFound and it will render an error message with HTTP status unauthorized.</p><p><strong>Create user model</strong></p><pre>$ rails g model user name:string username:string email:string password_digest:string</pre><p>add user validation</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fb5ce1dff5fab37c9e28a90795a8228a/href">https://medium.com/media/fb5ce1dff5fab37c9e28a90795a8228a/href</a></iframe><p><strong>Create user controller</strong></p><pre>$ rails g controller users</pre><p>Add Create, Read, Update, Delete (CRUD ) functionality</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5bcbb8150fd3fa38c1aab77c952a4055/href">https://medium.com/media/5bcbb8150fd3fa38c1aab77c952a4055/href</a></iframe><p><strong>Create authentication controller</strong></p><pre>$ rails g controller authentication</pre><p>Implement login feature</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5c1f3cc0e7541685f39907324653fada/href">https://medium.com/media/5c1f3cc0e7541685f39907324653fada/href</a></iframe><p>In JWT there is no way to invalidate token, you can use one of these approaches to implement the logout feature :</p><p>1. Remove token from the client, but token still valid, in my opinion, you should use short time period token.<br>2. Add token into blacklist, when token added into blacklist token still valid until expiration time but you can deny this request from accessing the resource.</p><p>Now you can test your application response with insomnia or postman</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t_qr4cjC5sSaakwqDj2YhQ.png" /><figcaption><strong>Create User</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lB6LVoAlZbI-TyoOiJVX6A.png" /><figcaption><strong>Login</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ajdPaUbzletWEgb2mwtbsA.png" /><figcaption><strong>Get All Users</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_nVK8HXiT55SkOvXJKLHnw.png" /><figcaption><strong>Get User</strong></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a04503ea3248" width="1" height="1" alt=""><hr><p><a href="https://medium.com/binar-academy/rails-api-jwt-authentication-a04503ea3248">Rails API + JWT Authentication</a> was originally published in <a href="https://medium.com/binar-academy">Binar Academy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>