<?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[Sahej's Blog]]></title><description><![CDATA[I am a developer having fun creating software.]]></description><link>https://blog.sahej.io</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 04:47:48 GMT</lastBuildDate><atom:link href="https://blog.sahej.io/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Elevate Your GitHub Presence: How to Make an Outstanding GitHub Repository and Readme for Your Project]]></title><description><![CDATA[Introduction
In today's digital age, GitHub has become an essential tool for developers, providing a platform to showcase their projects and collaborate with others. However, with over 100 million repositories hosted on GitHub, it's becoming increasi...]]></description><link>https://blog.sahej.io/creating-an-outstanding-github-repository-for-your-project</link><guid isPermaLink="true">https://blog.sahej.io/creating-an-outstanding-github-repository-for-your-project</guid><category><![CDATA[GitHub]]></category><category><![CDATA[Programming Blogs]]></category><category><![CDATA[projects]]></category><dc:creator><![CDATA[Sahej A. Singh]]></dc:creator><pubDate>Sat, 29 Apr 2023 18:03:34 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1682791262452/5769fcbf-3104-4416-9793-4c631a4b5ff9.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-introduction">Introduction</h2>
<p>In today's digital age, GitHub has become an essential tool for developers, providing a platform to showcase their projects and collaborate with others. However, with over 100 million repositories hosted on GitHub, it's becoming increasingly challenging to stand out from the crowd. Whether you're an experienced developer or just starting, it can be challenging to create a GitHub repository that stands out. In this blog post, we'll provide you with practical tips and best practices to create an outstanding GitHub repository for your project. From setting up your repository to optimizing your README file, we'll guide you through the key elements to make your project stand out on GitHub. So, let's get started!</p>
<h3 id="heading-importance-amp-benefits-of-a-well-organized-github-repository">Importance &amp; Benefits of a Well-organized GitHub Repository</h3>
<p>An organized GitHub repository can make a significant difference in attracting potential collaborators and employers to your project. A well-organized repository makes it easier for others to understand your project's purpose, how it works, and how they can contribute to it.</p>
<h2 id="heading-repository-setup">Repository setup</h2>
<blockquote>
<p>"Well begun is half done" - Aristotle</p>
</blockquote>
<p>The process of creating an outstanding GitHub repository begins at its inception. Therefore, we will start by discussing all the options provided by GitHub when creating a new repository. However, if you already have an existing repository, you can still follow along with the entire content of this blog post.</p>
<h3 id="heading-choose-a-descriptive-name">Choose a descriptive name</h3>
<p>When creating your repository, choose a name that clearly describes your project and is easy to remember. Avoid using vague or generic names, as they can make it difficult for others to find your project. The name is usually the first thing that everyone will notice about your repository, so selecting a good name is extremely important.</p>
<h3 id="heading-add-a-concise-description">Add a concise description</h3>
<p>Include a brief description of your project that emphasizes its primary features and objectives. Your repository's name and description are indexed by GitHub to display results in their search bar, so be sure to incorporate any relevant search keywords about your project. Additionally, the first sentence of the description should enable others to swiftly grasp the nature of your project and determine if it aligns with their interests.</p>
<h3 id="heading-add-a-readme">Add a README</h3>
<p>Initialising a new repository with a README file is always a good idea. We cover, in-depth, how to make a great README file in a later section. In the beginning, just writing a more detailed description of your project is more than enough.</p>
<h3 id="heading-choose-an-appropriate-license">Choose an appropriate license</h3>
<p>A repository that is public but does not have a license feels like a code dump and not professional at all. So choose an appropriate license when you are making a public repository. A quick comparison of commonly used open-source licenses is available at <a target="_blank" href="https://choosealicense.com/licenses/">choosealicense.com</a>. Doing this will automatically add a LICENSE file to the root of your repository.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1682776846504/3d048a00-65cb-45a1-b166-d49e4a57d6be.png?width=250" alt class="image--center mx-auto" /></p>
<h3 id="heading-select-a-relevant-gitignore-template">Select a relevant .gitignore template</h3>
<p>When initially creating a repository on GitHub, you have the option to select a .gitignore template based on the programming language or framework you will be working with. I recommend first searching for the primary framework or library you are using, and if you don't find it, simply choose the programming language you are using.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1682659487058/9991c411-1edb-4e55-80e5-f7ebe5472c5e.png?width=250" alt class="image--center mx-auto" /></p>
<h2 id="heading-readme-file">README file</h2>
<p>Think of the README file as the homepage for your repository. Usually, it is the first and only thing visitors to your repository's page will see, as people rarely examine the code directly. Therefore, it is crucial to create a strong impression by designing a well-structured and visually appealing README file.</p>
<h3 id="heading-project-title-and-description">Project title and description</h3>
<p>Begin with your project title in Heading 1 font, followed by a description of your project. Your title may optionally contain the logo of your project if you have designed one for it.</p>
<p>From this point forward, I will guide you through each section that should be included in your README file. Use Heading 2 font for all section headings in your README. Using more than one Heading 1 font in a file often looks unappealing. The sections below are discussed in the same order as my recommendation for their placement in a README file.</p>
<pre><code class="lang-markdown"><span class="hljs-section"># Project Title</span>
Project description

<span class="hljs-section">## Screenshots (Section Heading)</span>
Section content

<span class="hljs-section">## Section Heading</span>
^ Note Heading 2 used for section heading
</code></pre>
<h3 id="heading-screenshots">Screenshots</h3>
<p>If your project features a user interface, include screenshots in this section. Images are effective at capturing attention, so it's beneficial to position the screenshots section where minimal scrolling is required to view it. You can display multiple images side-by-side in a GitHub README using the following code.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1682761636857/1ff236fb-fc97-43b9-93ff-362393175d27.png" alt class="image--center mx-auto" /></p>
<pre><code class="lang-markdown">| ![<span class="hljs-string">alt-1</span>](<span class="hljs-link">img-1.png</span>) | ![<span class="hljs-string">alt-2</span>](<span class="hljs-link">img-2.png</span>) | ![<span class="hljs-string">alt-3</span>](<span class="hljs-link">img-3.png</span>) |
| :-----------------: | :-----------------: | :-----------------: |
|       IBM ROM       |   Space Invaders    | Timendus' OpCode Test |
</code></pre>
<p>The above example images are from one of my projects.</p>
<h3 id="heading-table-of-contents">Table of contents</h3>
<p>A simple bulleted list with hyperlinks to other sections of your README file should suffice. I recommend writing the rest of your README file first, and then adding this section only if your README becomes long enough that finding different sections through quick scrolling becomes inconvenient. However, in my modest experience, this section is not often necessary.</p>
<h3 id="heading-features">Features</h3>
<p>Create a bulleted list that highlights the most notable and unique features of your project. The content of this section will naturally be unique for each project. Emphasize what distinguishes your project apart from other similar projects in this section.</p>
<h3 id="heading-usage">Usage</h3>
<p>This section will contain the "hello world" of your project. If your project is a library intended for use by other developers, include some code that demonstrates the basic functionalities of your project through minimal examples. Adding a link to your library's documentation in this section is a good idea.</p>
<p>However, if your project is an app or website with an intuitive UI, you may want to skip this section. That being said, if your app or website is intended for advanced technical users (perhaps a CAD software), it would be a good idea to include a user manual in this section. If your user manual is lengthy, then provide a brief overview in this section and simply link to the documentation (i.e., the full user manual) of your project.</p>
<h3 id="heading-installation">Installation</h3>
<p>Place the installation instructions for your project in this section. If your project offers multiple installation methods, create a sub-section for each one. Within each installation method sub-section, include a list of prerequisites that features names and links to external dependencies or build tools that may be necessary.</p>
<p>Ensure that the instructions in this section are dead simple so that even absolute beginners can follow them. This may even include explaining basic commands like <code>cd</code> if your project is not specifically aimed at highly advanced users.</p>
<p>Common installation methods found in README files include downloading the executable from GitHub Releases, building from source, an app store link etc. You can see the installation section for one of my projects at <a target="_blank" href="https://github.com/sahej-dev/Snow#installation">this link</a>.</p>
<h3 id="heading-contributing-guidelines">Contributing Guidelines</h3>
<p>Include this section in your README if you want to encourage others to contribute to your project. GitHub suggests creating a CONTRIBUTING file in the root of your repository, which provides a clear guide on the proper way to contribute to your project and outlines the rules and conventions that contributors must follow. Use this section to briefly encourage contributions and include a link to your CONTRIBUTING file.</p>
<pre><code class="lang-markdown"><span class="hljs-section">## Contributing Guidelines</span>
We always welcome contributions from developers of all skill levels. Please look at [<span class="hljs-string">CONTRIBUTING</span>](<span class="hljs-link">./CONTRIBUTING.md</span>) to get started!
</code></pre>
<p>You can refer to the official GitHub documentation website's CONTRIBUTING.md file, located at <a target="_blank" href="https://github.com/github/docs/blob/main/CONTRIBUTING.md">github/docs/CONTRIBUTING.md</a>, as an example of a well-written CONTRIBUTING file.</p>
<h3 id="heading-acknowledgements">Acknowledgements</h3>
<p>Expressing gratitude and giving thanks is crucial. This section is dedicated to doing exactly that. List the individuals, projects, or major libraries that have played a significant role in making your project a reality. There's no need to include every library used in your project; simply mention a few of the major ones, without which building your project would have been considerably more challenging.</p>
<h3 id="heading-license">License</h3>
<p>This section is optional. However, if you choose to include this section in your README, simply provide the name of the license under which the project is licensed, along with a link to your LICENSE file. For example:</p>
<pre><code class="lang-markdown">This project is licensed under the terms of <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">name-of-your-chosen-license</span>&gt;</span></span>. For more details see [<span class="hljs-string">LICENSE</span>](<span class="hljs-link">./LICENSE.md</span>).
</code></pre>
<p>Whew! That concludes the README file which is the biggest part of a GitHub repository.</p>
<h2 id="heading-maintenance">Maintenance</h2>
<p>If you consider your project complete, you probably won't need to perform much maintenance on your repository, except for the occasional library updates. On the other hand, you might be someone who plans on constantly adding features, fixing bugs, and working on updates for your project.</p>
<p>Regardless of your plans for your repository, it's very likely you'll need to make some commits. So, let's briefly discuss how to make good commits and release your project.</p>
<h3 id="heading-committing-code">Committing Code</h3>
<p>This section likely requires the least amount of effort. Simply adhere to some widely accepted best practices for committing code:</p>
<p>1. Write clear and concise commit messages 2. Commit frequently, with small, focused changes 3. Use branches for developing features and fixing bugs</p>
<p>The above points are largely inspired by <a target="_blank" href="https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/code-submission-guidelines">Appflowy's code submission guidelines</a>. These guidelines are a quick two-minute read and incredibly valuable, so I highly recommend taking the time to review them. The following is an excellent way, which is mentioned in the Appflowy guidelines, to format your commit messages:</p>
<ul>
<li><p>The commit message consists of <code>type</code>:<code>subject</code></p>
</li>
<li><p><code>type</code> must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]</p>
</li>
</ul>
<h2 id="heading-versioning-and-releases">Versioning and Releases</h2>
<p>Releases are deployable iterations of your software that you can make available to a wider audience for downloading and usage. For a step-by-step guide on creating releases on GitHub, refer to <a target="_blank" href="https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release">this page</a> in the GitHub documentation. Don't worry this can be done using the GitHub website's UI and is really easy.</p>
<p>I will provide my recommendations on how to create effective releases for your project.</p>
<h3 id="heading-semantic-versioning">Semantic Versioning</h3>
<ul>
<li><p>Use semantic versioning to generate version numbers for your project. The following is a screenshot of the <a target="_blank" href="https://semver.org/#summary">summary section on semver.org</a>, which offers a concise explanation of what semantic versioning involves.</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1682789120162/dd061be5-b395-43b0-a8a0-41586ff77982.png" alt class="image--center mx-auto" /></p>
</li>
</ul>
<h3 id="heading-changelogs">Changelogs</h3>
<p>Changelogs are comprehensive documents that inform the end users of your project about the new features, bug fixes, and modifications made in the current release compared to the previous one. These are typically included in the release description.</p>
<p>Compose a changelog for each release of your project. For the initial release of your project, you may present the list of features instead of a changelog. By adhering to the suggestions in the "Committing Code" section, reviewing the commit messages since the last release can greatly assist in writing release notes.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In conclusion, creating an outstanding GitHub repository and README file for your project requires careful planning and attention to detail. By following the best practices outlined in this article, you can ensure your project stands out and attracts potential collaborators, employers, and users. Remember to focus on clear communication, organization, and visual appeal to make your repository and README file truly exceptional. Keep your project well-maintained and up-to-date, and you'll be well on your way to achieving success on GitHub.</p>
<p>Thank you for reading this far; I truly appreciate it. Feel free to connect with me on <a target="_blank" href="https://www.linkedin.com/in/sahej-a-singh/">LinkedIn</a> or leave a comment if you'd like to share your thoughts directly. I always welcome criticism.</p>
<p>If you enjoyed this post, you might want to check out my other articles at <a target="_blank" href="https://blog.sahej.io/">blog.sahej.io</a>. (There aren't any others at the moment, but more will be added in the future!)</p>
<p>Wishing you a fantastic day ahead!</p>
]]></content:encoded></item><item><title><![CDATA[How I Made my First Open Source Contribution]]></title><description><![CDATA[👀Finding a Project
I occasionally browse GitHub like scrolling through a social media app. A few days ago I stumbled upon an issue that I thought I could solve. This was in a project called AppFlowy.
https://github.com/AppFlowy-IO/AppFlowy
 
I initi...]]></description><link>https://blog.sahej.io/first-open-source-contribution</link><guid isPermaLink="true">https://blog.sahej.io/first-open-source-contribution</guid><category><![CDATA[Open Source]]></category><category><![CDATA[Flutter]]></category><category><![CDATA[hacktoberfest2022]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[beginner]]></category><dc:creator><![CDATA[Sahej A. Singh]]></dc:creator><pubDate>Wed, 12 Oct 2022 11:39:52 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1665574657779/4KCE1z8Rd.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-finding-a-project">👀Finding a Project</h1>
<p>I occasionally browse GitHub like scrolling through a social media app. A few days ago I stumbled upon an issue that I thought I could solve. This was in a project called AppFlowy.</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://github.com/AppFlowy-IO/AppFlowy">https://github.com/AppFlowy-IO/AppFlowy</a></div>
<p> </p>
<p>I initially found out about AppFlowy about a month before the time of writing. I loved it but I did not start using it because it did not feel ready for everyday use yet. I want AppFlowy to grow so I was excited to get an opportunity to contribute to it. Moreover, the frontend is written in Flutter which I am very familiar with. Familiarity with the tech stack certainly helped me with this first open-source contribution.</p>
<h1 id="heading-the-issue">⚠️The Issue</h1>
<p>I was looking at the issues marked <code>good_first_issue</code> and <code>hacktoberfest</code>, and ended up finding <a target="_blank" href="https://github.com/AppFlowy-IO/AppFlowy/issues/1186">this one</a>.</p>
<p><strong>TLDR:</strong> In the table UI, when the column type was set to a specific type, undesirable extra vertical spacing was added to rows. You can see the before &amp; after fix comparison below.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665501031761/DUTmXfbLN.png" alt="Expected vs Actual UI Comparison" class="image--center mx-auto" /></p>
<p><a target="_blank" href="https://user-images.githubusercontent.com/71320345/192566299-f9b28dfb-3db1-4d80-b88b-1e58c974a637.mp4">Video demonstrating the issue</a>.</p>
<h1 id="heading-building-the-project">🔨Building the Project</h1>
<p>The first step was to get a development build running on my machine. I sought out the <a target="_blank" href="https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/environment-setup">official build guide</a> and followed the steps.</p>
<p>Of course, I ran into an issue. I am building on an M1-based Mac, and the installed version of cocoapods on my machine refused to run. It was expecting the x86 version of some module (or something), which was (obviously) missing on my ARM64-based machine. Luckily a quick search took me to <a target="_blank" href="https://stackoverflow.com/questions/64901180/how-to-run-cocoapods-on-apple-silicon-m1">this</a> StackOverflow page, and it was a quick and easy fix.</p>
<p>Turns out that the Homebrew version of cocoapods runs flawlessly on ARM64 Macs. So I just had to do,</p>
<pre><code class="lang-markdown">sudo gem uninstall cocoapods
brew install cocoapods
</code></pre>
<p>And I had a build running, setting me up for my first open-source contribution!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665397812339/wHVY9QAMS.png" alt="A build of AppFlowy running, atop an instance of VScode" class="image--center mx-auto" /></p>
<h1 id="heading-the-code">👨‍💻The Code</h1>
<p>Now I had to find out the code responsible for table UI. I reproduced the issue and used Flutter's widget selector tool to find out the culprit widget. This lead me to the aptly named <code>GridMultiSelectCell</code> widget. Here is the widget tree:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665405917699/-zt2IZ96o.png" alt="GridMultiSelectCell Widget Tree" class="image--center mx-auto" /></p>
<p>Then I used Flutter's layout explorer to find that a <code>Wrap</code> widget (<a target="_blank" href="https://api.flutter.dev/flutter/widgets/Wrap-class.html">docs</a>), which houses some levels below in <code>GridMultiSelectCell</code> was responsible for the extra height.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665429510093/FxJ0x35N6.png" alt="GridMultiSelectCell Widget Tree Culprit Highlighted" class="image--center mx-auto" /></p>
<p>Then I found the code responsible for generating that <code>Wrap</code>.</p>
<pre><code class="lang-dart"><span class="hljs-keyword">final</span> children = widget.selectOptions.map(
  (option) {
    <span class="hljs-keyword">return</span> SelectOptionTag.fromOption(
      context: context,
      option: option,
    );
  },
).toList();

child = Wrap(
  spacing: <span class="hljs-number">4</span>,
  runSpacing: <span class="hljs-number">2</span>,
  children: children,
);
</code></pre>
<p>The <code>spacing: 4</code> in the constructor for <code>Wrap</code> was responsible for the extra height for some reason. As far as I know, it should just be adding horizontal margins between the children elements. Anyway, commenting out the <code>spacing</code> attribute eliminated the extra height but, unsurprisingly, horizontal spacing between the children was also eliminated.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665501379473/XPkSsC-jI.png" alt="Extra Height Eliminated" class="image--center mx-auto" /></p>
<p>I added that space back by giving each child a margin, which was accomplished by wrapping the <code>SelectOptionTag</code> constructor in a <code>Padding</code> widget.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1665501217525/Ked8zokpv.png" alt="Vertical Spacing Added" class="image--center mx-auto" /></p>
<p>Below is the final code:</p>
<pre><code class="lang-dart"><span class="hljs-keyword">final</span> children = widget.selectOptions.map(
  (option) {
    <span class="hljs-keyword">return</span> Padding(
      padding: <span class="hljs-keyword">const</span> EdgeInsets.only(right: <span class="hljs-number">4</span>),
      child: SelectOptionTag.fromOption(
        context: context,
        option: option,
      ),
    );
  },
).toList();

child = Wrap(
  runSpacing: <span class="hljs-number">2</span>,
  children: children,
);
</code></pre>
<p>That was NOT a lot of code. I certainly did get off easy for my first open-source contribution.</p>
<h1 id="heading-creating-a-pull-request">✅Creating a Pull Request</h1>
<p>I was assigned a mentor when the issue was assigned to me. As this was my first open source contribution I did not want to make any mistake so I reached out to my mentor on Discord. I briefly summed up what I had done, and asked if I should do the fix in another way. He responded and said that my approach seems okay and I should create a pull request, so he could take a look at the changes.</p>
<p>So I staged, commit, pushed, and created a <a target="_blank" href="https://github.com/AppFlowy-IO/AppFlowy/pull/1261">pull request</a>. A few hours later it was merged and I had officially made my first open-source contribution and Hacktoberfest submission.</p>
<p><strong>PS:</strong> I thought about if I should write this blog or not because it was a very small, minuscule, and easy fix. Anyways I felt really good and happy about the contribution, so decided to go ahead with it anyways.</p>
<h1 id="heading-thanks">✌️Thanks</h1>
<p>This is it for this one.</p>
<p>Feel free to reach out to me on <a target="_blank" href="https://www.linkedin.com/in/sahej-a-singh/">LinkedIn</a>, or leave a comment to share your thoughts directly with me. I always welcome criticism.</p>
<p>If you enjoyed your read, then you may wish to check out my other posts at blog.sahej.io. (There are no others at the time, but there will be more in the future ;) )</p>
<p>Wish you a happy day ahead!</p>
]]></content:encoded></item></channel></rss>