<?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 Sparsh Agrawal on Medium]]></title>
        <description><![CDATA[Stories by Sparsh Agrawal on Medium]]></description>
        <link>https://medium.com/@sparshagrawal1212?source=rss-de6fbf13a9e4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*T0pvC9LPaL_c8c-QUE9uNw.jpeg</url>
            <title>Stories by Sparsh Agrawal on Medium</title>
            <link>https://medium.com/@sparshagrawal1212?source=rss-de6fbf13a9e4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 07:53:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sparshagrawal1212/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[Google Summer Of Code 2021 @Oppia]]></title>
            <link>https://medium.com/@sparshagrawal1212/google-summer-of-code-2021-oppia-8a7011828f26?source=rss-de6fbf13a9e4------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a7011828f26</guid>
            <category><![CDATA[script]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[oppia]]></category>
            <dc:creator><![CDATA[Sparsh Agrawal]]></dc:creator>
            <pubDate>Wed, 18 Aug 2021 22:06:40 GMT</pubDate>
            <atom:updated>2021-08-18T22:06:40.762Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*UnAC1_ugP803AV8t" /></figure><h3>Static Analysis Checks + Improvements</h3><p>The following blog summarizes my work in <a href="https://github.com/oppia">Oppia</a> as a part of <strong>Google Summer of Code, 2021</strong>.</p><p>I am thankful to my mentor <a href="https://www.linkedin.com/in/henningbenmax/">Ben Henning</a>, for being extremely helpful and supportive throughout this period.</p><p>During this period, I worked on adding custom checks thereby making the static analysis of <a href="https://github.com/oppia/oppia-android">oppia-android</a> much powerful. Here’s the link to my <a href="https://docs.google.com/document/d/10meQGICF9Zuwf1XVykVKsq1HtbwcUc0RaEfSVOQ6pMI/edit#heading=h.6n4ne5j3i490">proposal</a>. Further, to keep track of my progress and goals, we used GitHub projects, which could be found <a href="https://github.com/oppia/oppia-android/projects/8">here</a>.</p><h3><strong>Introduction</strong></h3><p><strong><em>Static analysis</em></strong> is a method of debugging by examining source code before a program is run. It’s done by analyzing a set of code against a set (or multiple sets) of coding rules.</p><p>The primary benefit is that it increases our ability to reliably enforce best practices. This is because humans make mistakes. Humans can unknowingly miss some places while reviewing, but with static analysis, this scenario will never happen. It takes time for developers to do manual code reviews. Automated tools are much faster. Static code checking helps to detect problems early on by pinpointing exactly where the error is in the code before a reviewer even looks at it.</p><p>The aim of the project is to fill in some of the gaps in the static analysis tooling by providing ways (particularly Kotlin scripts, that run during the CI workflow) to enforce best practices &amp; further simplify code reviews.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/0*HVKpqCJTog7K3LXQ.png" /><figcaption><em>Development flow without static analysis</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/0*P7Ph_kMkb0XSfPSJ.png" /><figcaption><em>Development flow with static analysis</em></figcaption></figure><p>We can see how a static analysis tool (in this case a linter) simplified the flow and saved the time of both the developer and the reviewer which was wasted earlier in correcting the lint errors.</p><h3><strong>Goals</strong></h3><ol><li><strong><em>Add support for generic regex-based pattern matching</em></strong></li></ol><p>It comprises of two parts:</p><ul><li><em>Generic regex pattern matching against file names</em></li><li><em>Generic regex pattern matching against file contents</em></li></ul><p>This check is needed for two primary reasons. The first is to prevent a particular type of file from being added to the wrong directory. The second one is to ensure that there are no prohibited file contents present in the repository, which allows the team to introduce specific best practices checks.</p><p><strong><em>Pull request:</em></strong> <a href="https://github.com/oppia/oppia-android/pull/3340"><strong>#3340</strong></a></p><p>2. <strong><em>Add check to ensure that all the XML files of the codebase are syntactically correct</em></strong></p><p>There are no linters to evaluate XML correctness. This check is needed to perform a fast check of correctness before any attempts to build the app will complete, allowing for a faster feedback cycle for potential XML issues.</p><p><strong><em>Pull request:</em></strong> <a href="https://github.com/oppia/oppia-android/pull/3341"><strong>#3341</strong></a></p><p>3. <strong><em>Add check to ensure that all the production Kotlin files have a corresponding test file present</em></strong></p><p>To ensure that we are not missing tests for any production file being added to the codebase, this check is needed. It helps us to ensure production files have corresponding tests and reminds the contributor to add tests for new code added.</p><p><strong><em>Pull request:</em></strong> <a href="https://github.com/oppia/oppia-android/pull/3343"><strong>#3343</strong></a></p><p>4. <strong><em>Add check to ensure that activities are defined with accessibility labels</em></strong></p><p>For users requiring accessibility assistance (e.g. using a screen reader), activity labels are very important since they are read by screen readers to provide context on where the user is within the app. Suppose, on the button click, the app transits to a new activity. An unassisted user will likely face no barriers in understanding that a new screen/activity has opened, but accessibility users need an indication so that they can be notified that the transition to a new activity has been successfully made. For this reason, all activities must be defined with accessibility labels.</p><p><strong><em>Pull request:</em></strong> <a href="https://github.com/oppia/oppia-android/pull/3352"><strong>#3352</strong></a></p><p>5. <strong><em>Add check to ensure that all non-private declarations/members have KDocs</em></strong></p><p>To ensure that we are not missing the documentation for any non-private declarations or members, this check is needed. Documentation is very important as it helps team members understand specific contexts within the codebase. Therefore, we should document as much as we can. Further, to ensure consistency we generally expect that all non-private members within Kotlin files are documented (per our <a href="https://developer.android.com/kotlin/style-guide#usage">style guide</a>).</p><p><strong><em>Pull request:</em></strong> <a href="https://github.com/oppia/oppia-android/pull/3499"><strong>#3499</strong></a></p><p>6. <strong><em>Update all the outdated TODOs of the repository</em></strong></p><p>All the TODOs of the repository which were poorly formatted had to be corrected to the correct format, and the TODOs that no longer corresponds to open issues on GitHub had to be repurposed.</p><p><strong><em>Pull request:</em></strong> <a href="https://github.com/oppia/oppia-android/pull/3610"><strong>#3610</strong></a></p><p>7. <strong><em>Add check to ensure all TODOs of the repository are correctly formatted and corresponds to open issues on GitHub</em></strong></p><p>To avoid scenarios where a TODO was added not corresponding to an open issue on GitHub, this check is particularly needed. Having a corresponding issue for a TODO helps us to track its progress. Also, in order to maintain consistency, we want all the TODOs to be formatted as per the convention.</p><p><strong><em>Pull request:</em></strong> <a href="https://github.com/oppia/oppia-android/pull/3508"><strong>#3508</strong></a></p><p>8. <strong><em>Add check to ensure that all TODOs of the closed issue has been addressed</em></strong></p><p>We need this check to avoid scenarios like missing a TODO item not being resolved and its issue being mistakenly closed since this should result in confusing contexts where a team member looking up a particular TODO from code sees that the issue is closed and isn’t sure whether the issue has actually been resolved. If a TODO issue is closed without resolving all of its TODO items, then it will be reopened automatically by the GitHub actions bot with a comment containing the unresolved TODOs.</p><p><strong><em>Pull request:</em></strong> <a href="https://github.com/oppia/oppia-android/pull/3629"><strong>#3629</strong></a></p><h3>Documenting the project</h3><p>The final task was to document the project properly; this includes giving the contributors an idea of what the checks are, why we need them, and medication strategy for fixing failures. For this, a Wiki page was exclusively created. The link to it could be found <a href="https://github.com/oppia/oppia-android/wiki/Static-Analysis-Checks">here</a>.</p><h3>Final Outcome</h3><p>The repository now has an 8 layer static analysis check that runs during the CI workflow, ensuring that proper coding conventions are followed and no ‘illegal’ code could be merged into the repository.</p><h3>Future Scope</h3><p>Some of the ideas I would love to see them being implemented and even contribute to them in the future are as follows.</p><ul><li><a href="https://github.com/oppia/oppia-android/issues/3316">Define our own DTD or XSD to validate the XML files</a></li><li><a href="https://github.com/oppia/oppia-android/issues/3436">Develop a mechanism for permanently exempting files that do not ever need tests</a></li><li>Ensure KDocs are correctly formatted as per the <a href="https://developer.android.com/kotlin/style-guide#documentation">style-guide</a></li></ul><h3>Takeaways</h3><p>Overall, GSoC’21 has been a thrilling journey for me. I went from having no idea about a completely unexplored world of static analysis to writing high-quality code that fulfills all the project&#39;s goals.</p><p>I am happy to see that the code I have written will impact hundreds and thousands of contributors to the <a href="https://github.com/oppia/oppia-android">oppia-android</a> project.</p><p><em>If you’d like to know more about other cool projects that I have been working on, take a look at my Github profile: </em><a href="https://github.com/Sparsh1212"><em>@Sparsh1212</em></a><em>. Also, feel free to reach out to me on </em><a href="https://www.linkedin.com/in/sparsh-agrawal-320050199/"><em>LinkedIn</em></a><em> or </em><a href="https://www.quora.com/profile/Sparsh-Agrawal-60"><em>Quora</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a7011828f26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My git-icious journey at IMG]]></title>
            <link>https://medium.com/img-iit-roorkee/my-git-icious-journey-at-img-f18d1a8a99ef?source=rss-de6fbf13a9e4------2</link>
            <guid isPermaLink="false">https://medium.com/p/f18d1a8a99ef</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[recruitment]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[experience]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Sparsh Agrawal]]></dc:creator>
            <pubDate>Sat, 19 Dec 2020 14:35:27 GMT</pubDate>
            <atom:updated>2020-12-19T14:35:27.595Z</atom:updated>
            <content:encoded><![CDATA[<p>It has been almost a year since I became a member of<a href="https://medium.com/img-iit-roorkee"> <strong>IMG</strong></a> as a developer. Looking back, I feel that a major part of my journey was quite analogous to the most used <strong>git</strong> commands. In this blog, I will take you through my awesome journey at <strong>IMG</strong> and how I draw parallels to the most frequently used git commands.</p><p>Grab a cup of tea/coffee because we have a long journey to cover.</p><h3>Git</h3><p>Before beginning, let&#39;s have a basic idea about git. <a href="https://git-scm.com/"><strong>Git</strong></a> is a free and open-source distributed version control system. Its main purpose is to keep track of projects and files as they change over time with the changes happening from different users. Git stores information about the project’s progress on a <a href="https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository"><strong>repository</strong></a>.</p><h3>Let’s begin</h3><pre>git init</pre><p>This is the most crucial command. In terms of its usage in git, this command is used to create a repository, so that after which git can perform all its magic. In the same way, <strong>init</strong>iating is the most important step in your development journey. I didn’t have any previous coding experience before coming to <strong>IITR</strong>. And when I came to know about <strong>IMG</strong>, and the huge competition one has to go through to get into it, I was a bit scared initially. But then also, I decided to give it a try and made my mind that I will try my best to get in-it. So, always give a try to everything, despite caring much for its result. It all depends on your efforts, the more you make, the more you achieve.</p><pre>git clone</pre><p>In terms of its usage in git, this command is used to obtain a repository from an existing URL. In the same way, I contacted many seniors (existing URL :p) of IMG so that I could get some guidance on how to start, the best resources to learn to code, and many other such things. IMG follows the principle: <em>“</em><strong><em>Help will always be given at IMG, to those who ask for it</em></strong><em>”. </em>So if you don’t ask for help then even IMG can’t help you. So always, feel free to reach any of us, and the people here will always love to help you.</p><pre>git add</pre><p>This command is used to add one or more files to the staging area. In my case, it was to add new skills of coding. Remember that, learning any new skill is a bit difficult in the starting, but as you spend more and more time on learning, you will slowly get comfortable in it. So never hesitate to learn anything new. That’s what I learnt while preparing for recruitment.</p><pre>git commit</pre><p>This command records or snapshots the file permanently in the version history. In my journey, this was the time when I had given all my efforts and appeared for the recruitment process. With all the efforts that I have made for getting into IMG, I was all set for making my name permanently in the IMGians list. And then this email from IMG after a nerve-wracking process finally made my day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nhjs_X32FXtBHjBjDFr3cw.png" /></figure><pre>git merge</pre><p>This command is used to merge a different branch into your active branch. In my case, it was to learn from the very-awesome people at IMG and merge their skills to my skill set. IMG is not limited to only web-development. Once you step into IMG, there’s no end to learning new skills. Here you will meet people who are excellent in any of the domains of coding you can think of be it competitive programming, mobile development, information security, dev-ops and plethora of other things.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/0*xQ4PYFOkXOF6pVE-" /></figure><p>It’s no doubt that you will find the inhabitants of IMG Lab to be fabulously dedicated hard-working people. Still, here we, work on the “<strong>Work hard party Harder</strong>” principle, so we do a hell lot of things other than coding like mafia sessions, movie-nights, musical workspace, ‘<strong>Tech Fridays</strong>’ — lectures on topics like cryptography, probability, stock-market analysis etc. to chill out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mj_JVo7bvx7huFDW8CI6yw.jpeg" /></figure><h3>Winding Up</h3><p>To conclude, I believe that IMG has the most important role in making me the person I am today. From having no idea of programming to building awesome web and mobile apps, learning a plethora of new languages and other skills and getting the opportunity to work, learn and enjoy with the most awesome people here, it was a phenomenal journey for me.</p><p>So, what’s stopping you from hopping into IMG is just a git init, so grab your terminal, hit the command, show us your dedication and become a part of us.</p><p><strong><em>See you at the recruitments! :)</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f18d1a8a99ef" width="1" height="1" alt=""><hr><p><a href="https://medium.com/img-iit-roorkee/my-git-icious-journey-at-img-f18d1a8a99ef">My git-icious journey at IMG</a> was originally published in <a href="https://medium.com/img-iit-roorkee">IMG IIT Roorkee</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>