<?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 Sj Ng on Medium]]></title>
        <description><![CDATA[Stories by Sj Ng on Medium]]></description>
        <link>https://medium.com/@sjng?source=rss-afb3283a1e05------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*-re4-a032Ec4nF9_.</url>
            <title>Stories by Sj Ng on Medium</title>
            <link>https://medium.com/@sjng?source=rss-afb3283a1e05------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 17:57:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sjng/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[DeepWiki: Why I Open-Sourced an AI-Powered Wiki Generator]]></title>
            <link>https://medium.com/@sjng/deepwiki-why-i-open-sourced-an-ai-powered-wiki-generator-b67b624e4679?source=rss-afb3283a1e05------2</link>
            <guid isPermaLink="false">https://medium.com/p/b67b624e4679</guid>
            <category><![CDATA[wikipedia]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Sj Ng]]></dc:creator>
            <pubDate>Wed, 30 Apr 2025 09:15:26 GMT</pubDate>
            <atom:updated>2025-04-30T09:15:26.309Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UzcIwOVEeQwDr3Dk.png" /></figure><h3>The Problem with Documentation</h3><p>Every developer knows this story: You find an interesting GitHub repository, excitedly clone it, and then… spend hours trying to understand how it actually works. The documentation, if it exists, is often outdated, incomplete, or buried in scattered README files.</p><p>We’ve all been there. We’ve all also been on the other side — promising ourselves we’ll “document it later” (spoiler: we rarely do).</p><h3>Enter DeepWiki</h3><p>DeepWiki started as a closed-source project by DevinAI, aiming to solve this universal developer pain point. The idea was simple but powerful: automatically generate comprehensive documentation for any GitHub repository using AI.</p><p>But I believed this solution needed to be accessible to everyone. That’s why I created DeepWiki-Open — a completely free, open-source implementation that anyone can run locally.</p><h3>How DeepWiki Works</h3><p>Under the hood, DeepWiki uses a sophisticated pipeline combining multiple AI technologies:</p><ol><li>Smart Repository Analysis: DeepWiki clones your repository and analyzes its structure, identifying key components and their relationships.</li><li>Context-Aware AI: Using a combination of Google’s Gemini and OpenAI’s embedding models, DeepWiki understands your code in context, not just as isolated files.</li><li>Intelligent Documentation Generation: The system generates comprehensive documentation that includes:</li></ol><ul><li>Detailed explanations of code functionality</li><li>Architecture diagrams using Mermaid</li><li>Component relationships</li><li>Setup instructions</li><li>Usage examples</li></ul><ol><li>Visual Understanding: One of DeepWiki’s most powerful features is its ability to automatically generate diagrams that visualize:</li></ol><ul><li>System architecture</li><li>Relationship Diagrams</li><li>Data flow</li><li>Component relationships</li><li>Process workflows</li><li>Class hierarchies</li></ul><h3>Why Open Source?</h3><p>The decision to open-source DeepWiki wasn’t just about making it free. It was about:</p><ol><li>Accessibility: Good documentation tools should be available to everyone, not just those who can afford expensive subscriptions.</li><li>Privacy: By running locally, your code never leaves your machine. No need to worry about sensitive code being sent to cloud services.</li><li>Customization: The open-source nature means you can modify and extend DeepWiki to fit your specific needs.</li><li>Community: Building in public allows others to contribute, improve, and adapt the tool for different use cases.</li></ol><h3>Technical Deep Dive</h3><p>DeepWiki is built with modern technologies:</p><ul><li>Frontend: Next.js 15.3 with React 19</li><li>Backend: FastAPI with Python</li><li>AI Models:</li><li>Google’s Gemini for text generation</li><li>OpenAI’s embeddings for code understanding</li><li>LLM Framework: AdalFlow</li><li>Visualization: Mermaid for diagram generation</li></ul><p>The architecture is designed to be modular and efficient:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*QN8VOXsWJ08M0je-ZY9n4g.png" /></figure><h3>Getting Started</h3><p>Setting up DeepWiki is straightforward:</p><ol><li>Clone the repository</li><li>Set up your API keys for Google and OpenAI</li><li>Install dependencies</li><li>Start the backend and frontend servers</li></ol><p>That’s it! You’re ready to generate documentation for any GitHub repository.</p><h3>The Future of Documentation</h3><p>DeepWiki represents a shift in how we think about documentation. Instead of viewing it as a burden — something we must write manually — we can leverage AI to:</p><ul><li>Generate baseline documentation automatically</li><li>Keep documentation in sync with code changes</li><li>Create visual representations of complex systems</li><li>Make documentation more interactive and engaging</li></ul><h3>Join the Revolution</h3><p>DeepWiki-Open is just the beginning. As an open-source project, its potential grows with every contributor. Whether you’re a developer looking to improve your project’s documentation or an enthusiast interested in AI applications, there’s a place for you in the DeepWiki community.</p><p>Check out the project on GitHub: <a href="https://github.com/AsyncFuncAI/deepwiki-open">https://github.com/AsyncFuncAI/deepwiki-open</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b67b624e4679" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Finally: MCP That Speaks Repository Instead of Just Code]]></title>
            <link>https://medium.com/@sjng/finally-mcp-that-speaks-repository-instead-of-just-code-9e41e5067af7?source=rss-afb3283a1e05------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e41e5067af7</guid>
            <category><![CDATA[gemini-ai-app]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mcp-client]]></category>
            <category><![CDATA[mcp-server]]></category>
            <dc:creator><![CDATA[Sj Ng]]></dc:creator>
            <pubDate>Sat, 12 Apr 2025 00:54:04 GMT</pubDate>
            <atom:updated>2025-04-12T00:55:39.821Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UUKAn-ECvAQTzU7YBhnQ9Q.png" /></figure><p>We’ve all been there. You open a promising GitHub repository, eager to understand how it works, only to find yourself drowning in a maze of folders, cryptic naming conventions, and documentation that raises more questions than it answers. Sure, existing AI tools can explain what a function does, but they miss the bigger picture? the why, the how, and the “what were they thinking?”</p><p>That’s what makes GitHub Chat different. Instead of just parsing code snippets, it understands repositories as living, breathing projects. I first realized this when I asked it about authentication flow in a complex Next.js project. Rather than spitting out a generic explanation about JWT tokens, it walked me through the actual implementation, pointing out the interplay betweenclient-page.tsx, Supabase integration, and the freemium model considerations.</p><p>The magic lies in its ability to connect the dots. When you ask about a feature, it doesn’t just search for relevant code. tl;dr; it understands the project’s architecture, its tech decisions, and even points out commented-out code that hints at future plans. It’s like having a senior developer who was there when the architectural decisions were made.</p><p>What’s refreshing is how it handles uncertainty. Instead of making things up (we’ve all dealt with that in other AI tools), it tells you when it needs more context or when certain files aren’t available. It’s honest about its limitations, which, ironically, makes it more trustworthy.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FBF-wgKLTWUk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DBF-wgKLTWUk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FBF-wgKLTWUk%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/81bda54a74746ffa6d60ac48edafc6e1/href">https://medium.com/media/81bda54a74746ffa6d60ac48edafc6e1/href</a></iframe><p>The platform is currently in a freemium period, offering unlimited access to all features. After this period, it’ll shift to a tiered model, but even the free tier gives you enough messages to get meaningful insights about any repository.</p><p>For those of us who spend hours trying to understand why a project is structured in a certain way, or what implications a particular pattern might have, this tool feels like a breakthrough. It’s not just another code explainer, it’s a repository whisperer.</p><p>The next time you’re staring at a GitHub repository at midnight, wondering how all the pieces fit together, remember: you don’t have to figure it out alone anymore. The repository is ready to talk to you.</p><p>Try it at <a href="https://github-chat.com/">https://github-chat.com</a>. Your future self, bleary-eyed at 3 AM, will thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e41e5067af7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modularizing code using the KonMari Method]]></title>
            <link>https://medium.com/@sjng/modularizing-code-using-the-konmari-method-fb5b48b4d76a?source=rss-afb3283a1e05------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb5b48b4d76a</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[konmari]]></category>
            <dc:creator><![CDATA[Sj Ng]]></dc:creator>
            <pubDate>Sun, 27 Jan 2019 05:21:19 GMT</pubDate>
            <atom:updated>2019-01-27T05:30:59.174Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*EtXlcR7UZz8_74l096884w.jpeg" /><figcaption>Photo from <a href="https://weburbanist.com/2014/07/31/cargo-canvases-6-street-artists-paint-22-stacked-containers/">WebUrbanist</a></figcaption></figure><p>This post is not to convince you why modularizing your code is the best practice you should follow, because it obviously is the best practice, unless you’re working alone or you’re just simply trying to build a Hello World app to show off your first 🚵 commit on Github.</p><p>Modularizing code is similar as decluttering your messy closet. Like your’ dirty laundry, it often piled up before you even realized. You might end up getting stressed trying to find where is doSomething method located and then realized it was in line 2356 of getDoSomething.Something.doSomething() . So much fun, right? 🙌</p><p>Let’s begin the <strong>CodeMari</strong> journey…</p><p>Hold on, before we get started, let’s begin with the custom of greeting the [Code]. Close your eyes, think of what your ideal code structure look like…</p><p>….</p><p>….</p><p>Thank you.</p><h3><strong>Step 1 | Discarding by category comes first. (Categorizing)</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j35lGG3MD8U3Y6FaSAeJnw.jpeg" /><figcaption>Photo from <a href="https://www.reviewed.com/laundry/features/youve-been-sorting-your-laundry-all-wrong-heres-how-to-do-it-the-right-way">Reviewed</a></figcaption></figure><ul><li>Put all your cluttered 10,000 lines of code on VSCode (make sure it is Dark Theme), start categorizing which method should go where. Example: GeneralUtil, HTTPService, ClientSideService, ThirdPartyService, TwitterClientService…etc.</li><li>You will probably find duplicated code in multiple places, code that only been used once….OR worst, commented code that you might feel too ‘sentimental’ to get rid of.</li></ul><h3><strong>Step 2 |Break code category into subcategories as necessary.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*ngi3bvnGhVggRBiNEO2Dbg.jpeg" /><figcaption>Photo from <a href="https://www.google.com/url?sa=i&amp;source=images&amp;cd=&amp;cad=rja&amp;uact=8&amp;ved=2ahUKEwi1uuKlnY3gAhXyoYMKHep7C3sQjhx6BAgBEAM&amp;url=https%3A%2F%2Fwww.tintup.com%2Fblog%2Fmfbt%2F&amp;psig=AOvVaw2dS5Y6Z0rmihJE9gebbRTe&amp;ust=1548653309616281">TinTub</a></figcaption></figure><ul><li>KISS (Keep it simple stupid), refactor that huge chunk of chained method into single method. Follow the Single Responsibility Principle, doSomething should not execute doOtherThing , doSomething should not do two things. Lookup Singleton or Factory Design Pattern.</li><li>Sometimes, it can be very tempting to migrate most of the stuff to GeneralUtil, that’s not how you should do it. Doing that is as if you were moving the dirty laundry from current laundry basket to another laundry basket. Put some effort in thinking how to modularize individual modules behind a public interface.</li></ul><h3><strong>Step 3 |Keep only those codes that spark joy.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jmxEs6igBObZBV4RNLooOw.jpeg" /><figcaption>Photo by Photo: Yuliya Evstratenko/Shutterstock</figcaption></figure><ul><li>If you can’t relate with the word spark joy , I strongly suggest you ask your tech lead or seniors if those lines of code spark joy for them during code review. You will quickly find out the answer, that i can guarantee.</li><li>Sometimes Joy can be very different depending on individual, for example: One of my senior prefer the AirBnB styling guide, whereas others prefer the Google styling guide. Inline Curly Braces vs New Line Curly Braces; 2 Space Indentation vs Tab Indentation..etc. Bring those problems to All-Hands meeting and let everyone’s hand decide which spark more Joy. Period.</li></ul><h3><strong>Step 4 | After you’ve finished discarding, commit your code thoroughly and completely.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JySnUcENPbR6lFKu8MslaA.jpeg" /><figcaption>Photos from <a href="https://www.google.com/url?sa=i&amp;source=images&amp;cd=&amp;cad=rja&amp;uact=8&amp;ved=2ahUKEwjb64bMnY3gAhUlpoMKHQgWCXwQjB16BAgBEAQ&amp;url=https%3A%2F%2Fwww.abccolumbia.com%2F2016%2F04%2F18%2Fethiopians-complete-1st-ever-sweep-of-boston-marathon%2F&amp;psig=AOvVaw0lqwyFPwuFe0CwZ9qqdInT&amp;ust=1548653382526735">ABCColumbia</a></figcaption></figure><ul><li>Rule №1: Always remember to commit your code after you refactor or discard unwanted code. Also, check all the dependencies, NPMs, Nuget packages (.Net), remember to discard those dependencies that are no longer needed.</li><li>Rule №2: Your local machine is not your trash can, store your stuff in S3, Blob Storage, Google Cloud etc. Reorganize your folder structure so it speed up your productivity again. Last but not least, always have a backup.</li></ul><h3><strong>Step 5 | Do it all in one go.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FSO6FkP-qLOKiEplBQZELw.png" /><figcaption>Photo From My Hero Academia/ Shonen Jump</figcaption></figure><ul><li>Dedicate a day to do this with your team to prevent yourself being sidetracked by other meetings or bug fixes. I strongly suggest using the <a href="https://en.wikipedia.org/wiki/Mob_programming">MOB programming</a> approach for this.</li><li>DO NOT checkpoint your code thinking you will be back to the same line the next day. <a href="https://sethrobertson.github.io/GitBestPractices/">Commit Often, Perfect Later, Publish Once</a>, stick with this rule.</li></ul><p>Happy <strong>CodeMari 🎊 🎊</strong>, and stay tuned for more awesome stuff on my blog!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb5b48b4d76a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>