<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Adhiraj Dutta </title>
    <description>The latest articles on DEV Community by Adhiraj Dutta  (@byt3h3ad).</description>
    <link>https://dev.to/byt3h3ad</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F546461%2Fb430ed3b-a534-44e9-90c2-c22012317d64.jpeg</url>
      <title>DEV Community: Adhiraj Dutta </title>
      <link>https://dev.to/byt3h3ad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/byt3h3ad"/>
    <language>en</language>
    <item>
      <title>ESLinter - for all JavaScript projects</title>
      <dc:creator>Adhiraj Dutta </dc:creator>
      <pubDate>Tue, 23 May 2023 19:25:42 +0000</pubDate>
      <link>https://dev.to/byt3h3ad/placeholder-title-5dgp</link>
      <guid>https://dev.to/byt3h3ad/placeholder-title-5dgp</guid>
      <description>&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;I built a Github workflow that lints every pull request and checks for errors using the rules set up in the project's &lt;code&gt;.eslintrc.json&lt;/code&gt; file. This is very useful for maintainer's as contributor's may not follow the rules setup by the project which can lead to a messy codebase that can become difficult to maintain as it scales.&lt;/p&gt;

&lt;h3&gt;
  
  
  Category Submission: Maintainer Must-Haves
&lt;/h3&gt;

&lt;h3&gt;
  
  
  App Link
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/byt3h3ad/eslinter"&gt;Github repository&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Description
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: eslinter

on:
  pull_request:
    branches:
      - "**"
    types: [opened]

jobs:
  linter:
    name: eslint runner
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
    steps:
      - uses: actions/checkout@v2
      - uses: reviewdog/action-eslint@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          reporter: github-pr-review
          eslint_flags: "src/"

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the simple workflow. The &lt;code&gt;eslint_flags:&lt;/code&gt; can be changed to the specific directory required.&lt;/p&gt;

&lt;h3&gt;
  
  
  Link to Source Code
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/byt3h3ad/eslinter"&gt;Github Repo&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Permissive License
&lt;/h3&gt;

&lt;p&gt;MIT &lt;/p&gt;

&lt;h2&gt;
  
  
  Background (What made you decide to build this particular app? What inspired you?)
&lt;/h2&gt;

&lt;p&gt;Working on team projects where eslint is not used by someone can make the whole project messy. Implementing this action will make the lives of maintainers easier as they can rest assured that no unlinted code will be pushed to the codebase.&lt;/p&gt;

&lt;h3&gt;
  
  
  How I built it (How did you utilize GitHub Actions or GitHub Codespaces? Did you learn something new along the way? Pick up a new skill?)
&lt;/h3&gt;

&lt;p&gt;I finally made a CI tool that will be helpful for people. This is certainly a first for me. I took help of the official docs for Github Actions and &lt;a href="https://github.com/reviewdog"&gt;reviewdog&lt;/a&gt; and cooked it up in a few hours, as I only got to know about the hackathon on it's last day. A huge thank you to the awesome actions by reviewdog!&lt;br&gt;
 Testing it was a bit of a problem with new PRs everytime something broke. I hope there will be a way of testing actions offline in the future.&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Resources/Info
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/reviewdog/action-eslint"&gt;reviewdog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>githubhack23</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>devops</category>
    </item>
    <item>
      <title>The Curious Case of 257</title>
      <dc:creator>Adhiraj Dutta </dc:creator>
      <pubDate>Mon, 09 Jan 2023 15:02:29 +0000</pubDate>
      <link>https://dev.to/byt3h3ad/the-curious-case-of-257-38a2</link>
      <guid>https://dev.to/byt3h3ad/the-curious-case-of-257-38a2</guid>
      <description>&lt;p&gt;Python has an interesting caching feature, which I discovered recently -  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgid14j11kjdiwr5qyt10.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgid14j11kjdiwr5qyt10.png" alt="code" width="800" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is called small integer caching. &lt;/p&gt;

&lt;p&gt;What Python does is pre-allocate a global list of integers as singletons in the range [-5, 256] during initialisation. So every time that an integer is created in this range, instead of creating a new object, a reference to the existing object is returned. Therefore it saves a lot of space and computation for commonly used integers.&lt;/p&gt;

&lt;p&gt;This can also be seen during computations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft1msnjhpn6cnyyz9n09p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft1msnjhpn6cnyyz9n09p.png" alt="code" width="800" height="101"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another interesting byte. When initialised in the same line, the interpreter creates a new object for the first variable, and then reference the second variable with the same object. This is because the  compiler can see both the variables and can optimise the referencing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvaztf2flsij9b6yzmhut.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvaztf2flsij9b6yzmhut.png" alt="code" width="800" height="130"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hey wait! I am not done yet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1z2ysoau7lv29lug1b7p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1z2ysoau7lv29lug1b7p.png" alt="code" width="562" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another new confusing thing?&lt;/p&gt;

&lt;p&gt;The compiler also optimises identical literals, when the code is compiled in the same code object. So, 1. If the Python compiler can see the whole code, more optimisations may apply to the code. When typing into the Python shell each line is a completely different statement, parsed, and compiled separately. &lt;/p&gt;

&lt;p&gt;This works for floats as well, which is not cached.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fegp4pjl0y6r7st5qlt46.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fegp4pjl0y6r7st5qlt46.png" alt="code" width="570" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Literals inside tuples and other data structures are shared as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl1rwqbw3j0vwaos0gesl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl1rwqbw3j0vwaos0gesl.png" alt="code" width="800" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Java uses a similar approach and caches the integers between -128 to 127. However this works only on autoboxing. They’re not cached if built with the constructor.&lt;/p&gt;

&lt;p&gt;References -&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jakevdp.github.io/blog/2014/05/09/why-python-is-slow/" rel="noopener noreferrer"&gt;Why Python is Slow: Looking Under the Hood&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://rushter.com/blog/python-integer-implementation/" rel="noopener noreferrer"&gt;Python internals: Arbitrary-precision integer implementation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.com/a/15172182" rel="noopener noreferrer"&gt;What's with the integer cache maintained by the interpreter?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PS: This is my first technical blog post, so any corrections and constructive criticisms are welcome!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>opensource</category>
      <category>softwaredevelopment</category>
      <category>discuss</category>
    </item>
    <item>
      <title>the new next is here</title>
      <dc:creator>Adhiraj Dutta </dc:creator>
      <pubDate>Fri, 28 Oct 2022 13:03:28 +0000</pubDate>
      <link>https://dev.to/byt3h3ad/the-new-next-is-here-h38</link>
      <guid>https://dev.to/byt3h3ad/the-new-next-is-here-h38</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hello there!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hope everyone is doing fantastic! &lt;em&gt;Duh! Why are you even so enthusiastic about anything&lt;/em&gt;, I hear you say. Well, I am excited because one of web's most beloved frameworks, &lt;a href="https://nextjs.org"&gt;Next.js&lt;/a&gt; just got its new version - &lt;code&gt;13.0.0&lt;/code&gt;. Announced at the &lt;a href="https://nextjs.org/conf"&gt;Next.js conference&lt;/a&gt;, it lays the foundations to be dynamic without limits.&lt;/p&gt;

&lt;p&gt;It has created a lot of noise in the developer community as the version comes packing with an alpha version of a faster bundler, called Turbopack, as well as a redesigned approach to server rendering, routing, layouts, and data fetching. &lt;/p&gt;

&lt;p&gt;Let's talk about the new &lt;a href="https://vercel.com/blog/turbopack"&gt;Turbopack bundler&lt;/a&gt;, written in Rust. It is positioned as a successor to &lt;a href="https://webpack.js.org/"&gt;Webpack&lt;/a&gt;. Offering improved speed and a better architecture, Turbopack is a build system for JavaScript and TypeScript that is designed for incremental builds. Turbopack is 700 times faster than Webpack when working with large applications, the parent company of Next, &lt;a href="https://vercel.com/"&gt;Vercel&lt;/a&gt; said.&lt;/p&gt;

&lt;p&gt;We also have an enhanced version of the framework's filesystem-based routing system. It sets out to make it easy to lay out complex interfaces and maintain state across navigations, all while avoiding expensive re-renders. So now we get to save 8 seconds of build time each time we hit save xD!&lt;/p&gt;

&lt;p&gt;The gods on the side of Next listened to our prayers and have improved on the existing &lt;code&gt;Image&lt;/code&gt; component, making it easier to display images with less layout shift and better optimisation of files. On a similar front, there's also a new font system that automatically optimises fonts and automatically uses the CSS size-adjust property.&lt;/p&gt;

&lt;p&gt;All's sweet as honey as we go on about the new changes. Let's have a look at what's going to break when we finally run &lt;a href="https://nextjs.org/docs/upgrading"&gt;that&lt;/a&gt; &lt;code&gt;npm i next@latest react@latest react-dom@latest eslint-config-next@latest&lt;/code&gt; command - &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The minimum Node.js version has been bumped from &lt;code&gt;12.22.0&lt;/code&gt; to &lt;code&gt;14.0.0&lt;/code&gt;, since 12.x has reached end-of-life.&lt;/li&gt;
&lt;li&gt;The minimum React version has been bumped from &lt;code&gt;17.0.2&lt;/code&gt; to &lt;code&gt;18.2.0&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The swcMinify configuration property was changed from false to true.&lt;/li&gt;
&lt;li&gt;The next/image import was renamed to &lt;code&gt;next/legacy/image&lt;/code&gt;. The &lt;code&gt;next/future/image&lt;/code&gt; import was renamed to &lt;code&gt;next/image&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The next/link child can no longer be &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Huff! That was a LOT of fanboying over a single update. See you later folks, happy deving!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>nextjs</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to start your coding journey</title>
      <dc:creator>Adhiraj Dutta </dc:creator>
      <pubDate>Fri, 21 Oct 2022 21:06:27 +0000</pubDate>
      <link>https://dev.to/byt3h3ad/how-to-start-your-coding-journey-kmb</link>
      <guid>https://dev.to/byt3h3ad/how-to-start-your-coding-journey-kmb</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This is more of a how-I-did-it post than a how-you-should-do-it post.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I first dabbled in coding in class 11 when my curriculum added in C++. I was familiar with python before but C++ was where my real coding journey began. And it has really been a roller coaster ride ever since. From pitfalls of depression to riding the waves of confidence, coding has it all. I am now a mediocre noob after much procrastination and practice.&lt;/p&gt;

&lt;p&gt;In this post I want to share the platforms and resources that helped me a lot on this journey!&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;a href="https://www.hackerrank.com/"&gt;HackerRank&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;I joined HackerRank in class 12, during the covid period and it was my first foray in competitive programming. It is very beginner friendly and it is a very good place for beginners to start with.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://www.codechef.com/"&gt;CodeChef&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;I next jumped to CodeChef when it was still free and really good for people to start off with. I started giving contests from here. The Long Challenges are really good for noobs as the longer duration allows people to learn the topics well and apply them to solve the questions. However with the pro plans arriving and the blatant cheating during contests made me move away from this site.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://codeforces.com/"&gt;Codeforces&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Codeforces is very well known in the competitive programming world as "the" place for contests. It might seem a bit overwhelming for newcomers at first, but after solving a few problems you will be able to get the hang of it. Contests are held regularly every week. The level here is harder than codechef, so directly jumping here will be a bit difficult for you. Better take it slow, or else you will fall into spiral of despair which is hard to get out of.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://leetcode.com/"&gt;LeetCode&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;LeetCode needs NO introduction. It is THE interview preparation platform. The problems here focus on algorithms more with rigorous practice for data structures like linked list, stack, queue etc which is not generally seen in other programming websites. The problem classification, study plans and weekly short contests make it a really good place to hone up your coding skills.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://neetcode.io/"&gt;Neetcode&lt;/a&gt; is a great companion website for Leetcode. It has curated problems and their solutions from Leetcode.&lt;/p&gt;

&lt;p&gt;One other website that focuses more on algorithms is &lt;a href="https://www.codewars.com/"&gt;Codewars&lt;/a&gt;. It will really help you in improving your coding style and help you write clean and efficient programs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://lightoj.com"&gt;LightOJ&lt;/a&gt; is something I came across fairly recently and it has really good categorisation of problems. This is good for practicing certain topics and getting a better grasp at them.&lt;/p&gt;

&lt;p&gt;Like every skill, only regular practice makes you improve. &lt;a href="https://clist.by/"&gt;CLIST&lt;/a&gt; is a great place to keep track of upcoming contests. You can directly add them to your calendar from the site.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.geeksforgeeks.org/"&gt;GeeksForGeeks&lt;/a&gt; and &lt;a href="https://cp-algorithms.com/"&gt;CP-Algorithms&lt;/a&gt; are really resources. Make sure to use them! However, some topics are out of scope in these websites, so make sure to use your own discretion.&lt;/p&gt;

&lt;p&gt;The following are famous annual contests conducted by large organizations. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://codingcompetitions.withgoogle.com/codejam/"&gt;Google Codejam&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.facebook.com/codingcompetitions/hacker-cup"&gt;Facebook Hackercup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://codingcompetitions.withgoogle.com/hashcode"&gt;Google Hashcode&lt;/a&gt; [This one's an optimization contest.]&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Some good youtube resources are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/c/Errichto"&gt;Errichto&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/c/SecondThread"&gt;SecondThread&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/c/WilliamFiset-videos"&gt;William Fiset&lt;/a&gt; (Graph algos)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/c/takeUforward"&gt;Strider&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;This is an exhaustive resource dump. Do not get overwhelmed. Just refer these when you need help. Everyone's way of learning and understanding is different. Explore and try to find the suitable way that will help you the most. I will keep updating the blog post as I get older and wiser.&lt;/p&gt;

&lt;p&gt;Happy learning!&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>computerscience</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
