<?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: ullas kunder</title>
    <description>The latest articles on DEV Community by ullas kunder (@ullas0bito).</description>
    <link>https://dev.to/ullas0bito</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%2F3022208%2F42d169db-a5ba-4221-8b8d-910b5b1918fd.jpg</url>
      <title>DEV Community: ullas kunder</title>
      <link>https://dev.to/ullas0bito</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ullas0bito"/>
    <language>en</language>
    <item>
      <title>Using GitHub as a Headless CMS for Blogs with Next.js – and Publishing to dev.to + RSS!</title>
      <dc:creator>ullas kunder</dc:creator>
      <pubDate>Thu, 08 May 2025 00:00:00 +0000</pubDate>
      <link>https://dev.to/ullas0bito/using-github-as-a-headless-cms-for-blogs-with-nextjs-and-publishing-to-devto-rss-4k51</link>
      <guid>https://dev.to/ullas0bito/using-github-as-a-headless-cms-for-blogs-with-nextjs-and-publishing-to-devto-rss-4k51</guid>
      <description>&lt;h1&gt;
  
  
  Using GitHub as a Headless CMS for Blogs with Next.js – and Publishing to dev.to + RSS!
&lt;/h1&gt;

&lt;p&gt;📝 GitHub → 🔁 Next.js API → 🌍 Blog + 🔗 RSS → ✨ dev.to&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; We're managing blog posts with MDX files inside a GitHub repo (private for safety), pulling them into our &lt;strong&gt;Next.js&lt;/strong&gt; app as a &lt;strong&gt;read-only CMS&lt;/strong&gt; , rendering them dynamically with Markdown, generating an RSS feed, and publishing to platforms like &lt;strong&gt;dev.to&lt;/strong&gt;. Clean, modern, no bloated CMS, no rebuilds on blog edits. 💡&lt;/p&gt;




&lt;h3&gt;
  
  
  🧐 Why GitHub as a Blog CMS?
&lt;/h3&gt;

&lt;p&gt;Most devs use tools like Notion, Sanity, WordPress (ew 😬), or even headless CMSes like Contentful. But what if I told you...&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“You already have a version-controlled, Markdown-friendly, Git-powered CMS sitting in your toolbelt.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That’s right: &lt;strong&gt;GitHub&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We manage all blog content as &lt;code&gt;.mdx&lt;/code&gt; files in a &lt;strong&gt;dedicated repo&lt;/strong&gt; , separate from our actual portfolio or blog frontend. Why?&lt;/p&gt;

&lt;h4&gt;
  
  
  🔥 The Pain Point
&lt;/h4&gt;

&lt;p&gt;If you include blog &lt;code&gt;.mdx&lt;/code&gt; content &lt;strong&gt;inside your Next.js app repo&lt;/strong&gt; , every time you tweak a typo, you have to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Push code&lt;/li&gt;
&lt;li&gt;Rebuild the whole app&lt;/li&gt;
&lt;li&gt;Redeploy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s... not ideal. Especially when the blog isn’t even changing the codebase.&lt;/p&gt;

&lt;h4&gt;
  
  
  💡 The Solution
&lt;/h4&gt;

&lt;p&gt;So we decoupled it. Blog content lives in a &lt;strong&gt;separate GitHub repo&lt;/strong&gt; (like &lt;code&gt;blog-api&lt;/code&gt;) and our main blog frontend fetches blog files from it using the &lt;strong&gt;GitHub API&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Private repo? Absolutely.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Because if it’s public, some clever clowns 🤡 might try to PR garbage or scrape it aggressively. Not today, Internet.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  🗂️ Blog Content Structure
&lt;/h3&gt;

&lt;p&gt;Our &lt;code&gt;blog-api&lt;/code&gt; repo looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\dev\blog-api
|
|-- advance-javascript.mdx
|-- basic-of-react-hooks.mdx
|-- basic-of-react17.mdx

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

&lt;/div&gt;



&lt;p&gt;Each file contains frontmatter metadata at the top:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
title: "Advance JavaScript"
subtitle: "Exploring closures, scopes and the weird parts"
id: 001
date: "Aug 3, 2023"
tag: ["js", "closures", "advanced"]
---

Your content goes here in MDX...

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

&lt;/div&gt;



&lt;p&gt;That’s it. Simple, readable, version-controlled.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔌 Wiring It into Next.js
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:.
│ favicon.ico
│ head.tsx
│ Home.tsx
│ layout.tsx
│ loading.tsx
│ manifest.ts
│ not-found.tsx
│ page.tsx
│ robots.ts
│ sitemap.ts
│
├───api
│ ├───blog
│ │ └───v2
│ │ │ route.ts // GET all blog posts
│ │ └───[slug]
| └───route.ts // GET blog by slug
│
├───blogs
│ │ BlogClient.tsx
│ │ page.tsx // Blogs list page ssr
│ └───[slug]
│ └───page.tsx // Dynamic blog post page
│
├───rss
│ └───route.ts // RSS feed route
│
└───lib
    ├───assets.ts
    ├───dateFormater.ts
    ├───fetchBlogFromGithub.ts
    // Fetch all MDX posts via GitHub API
    ├───fetchPostFromAPI.ts
    // Fetch single post from GitHub raw
    ├───getBaseUrl.ts
    ├───getProjectsData.ts
    ├───mailApi.ts
    ├───markdownToHtml.ts
    ├───nodemailer.ts
    ├───utils.ts
    └───getPostMetaData.ts
    // Pull metadata from all blog posts

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

&lt;/div&gt;



&lt;p&gt;Now let’s break down how we make this dynamic in &lt;strong&gt;Next.js&lt;/strong&gt; (App Router), &lt;em&gt;without&lt;/em&gt; rebuilding every time.&lt;/p&gt;




&lt;h3&gt;
  
  
  🧠 Step 1: API route to fetch all blog posts
&lt;/h3&gt;

&lt;p&gt;Inside &lt;code&gt;/app/api/blog/v2/route.ts&lt;/code&gt;, we add:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const dynamic = "force-dynamic";

export async function GET() {
  const posts = await fetchBlogPostsFromGitHub();
  return NextResponse.json(posts);
}

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

&lt;/div&gt;



&lt;p&gt;Why dynamic? Because we want &lt;strong&gt;on-demand rendering&lt;/strong&gt; with periodic revalidation, not static build-time fetches.&lt;/p&gt;




&lt;h3&gt;
  
  
  🪝 Step 2: &lt;code&gt;fetchBlogPostsFromGitHub()&lt;/code&gt; from our GitHub repo
&lt;/h3&gt;

&lt;p&gt;In &lt;code&gt;/lib/fetchBlogFromGithub.ts&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const res = await fetch(
  `https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/contents?ref=${BRANCH}`,
  { headers: { Authorization: `Bearer ${GITHUB_TOKEN}` } }
);

const files = await res.json();
const mdxFiles = files.filter((file) =&amp;gt; file.name.endsWith(".mdx"));

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

&lt;/div&gt;



&lt;p&gt;We loop through each file and use &lt;a href="https://github.com/jonschlinkert/gray-matter" rel="noopener noreferrer"&gt;gray-matter&lt;/a&gt; to parse the frontmatter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { data, content } = matter(rawContent);

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

&lt;/div&gt;



&lt;p&gt;That gives us metadata like &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;date&lt;/code&gt;, and the actual blog &lt;code&gt;content&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This returns a nice, digestible array of blog posts to the API consumer (our blog frontend).&lt;/p&gt;




&lt;h3&gt;
  
  
  📦 Client-side Fetch &amp;amp; Rendering
&lt;/h3&gt;

&lt;p&gt;In &lt;code&gt;/app/blogs/page.tsx&lt;/code&gt;, we call our API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const posts = await getPostMetaData();
return &amp;lt;BlogClient posts={posts} /&amp;gt;;

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

&lt;/div&gt;



&lt;p&gt;Inside &lt;code&gt;getPostMetaData()&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const response = await fetch(`${BASE_URL}/api/blog/v2`);

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

&lt;/div&gt;



&lt;p&gt;Why fetch from an API instead of reading &lt;code&gt;.mdx&lt;/code&gt; files directly?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keeps server-side data handling clean&lt;/li&gt;
&lt;li&gt;Allows for revalidation with &lt;code&gt;next: { revalidate: 60 }&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🔍 View Individual Posts
&lt;/h3&gt;

&lt;p&gt;In &lt;code&gt;[slug]/page.tsx&lt;/code&gt;, we dynamically fetch the content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const postContent = await fetchPostFromAPI(slug);

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

&lt;/div&gt;



&lt;p&gt;This hits:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET / api / blog / v2 / [slug];

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

&lt;/div&gt;



&lt;p&gt;Which in turn fetches:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://raw.githubusercontent.com/${REPO_OWNER}/${REPO_NAME}/${BRANCH}/${slug}.mdx

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

&lt;/div&gt;



&lt;p&gt;We parse the raw &lt;code&gt;.mdx&lt;/code&gt; again using &lt;code&gt;gray-matter&lt;/code&gt;, then render it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Markdown remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeRaw]}&amp;gt;
  {postContent.content}
&amp;lt;/Markdown&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;Boom. Fully dynamic blog. No build required. New blog post? Just &lt;code&gt;git push&lt;/code&gt; to your content repo and you’re done. 🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  📰 Bonus: Generating an RSS Feed
&lt;/h2&gt;

&lt;p&gt;RSS is still relevant – especially if you want to syndicate to sites like dev.to or Feedly.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;/app/rss/route.ts&lt;/code&gt;, we:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Call &lt;code&gt;getPostMetaData()&lt;/code&gt; again&lt;/li&gt;
&lt;li&gt;Convert each post to &lt;code&gt;&amp;lt;item&amp;gt;&lt;/code&gt; XML&lt;/li&gt;
&lt;li&gt;Wrap everything in a valid &lt;code&gt;&amp;lt;rss&amp;gt;&lt;/code&gt; schema
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;rss version="2.0"&amp;gt;
  &amp;lt;channel&amp;gt;
    &amp;lt;title&amp;gt;Ullas Kunder Blog&amp;lt;/title&amp;gt;
    &amp;lt;link&amp;gt;https://ullaskunder.com&amp;lt;/link&amp;gt;
    &amp;lt;description&amp;gt;...&amp;lt;/description&amp;gt;
    ${items.join("")}
  &amp;lt;/channel&amp;gt;
&amp;lt;/rss&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;Served with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return new NextResponse(rss, {
  headers: {
    "Content-Type": "application/xml",
  },
});

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

&lt;/div&gt;



&lt;p&gt;You now have an &lt;strong&gt;auto-updating RSS feed&lt;/strong&gt; from your GitHub-powered blog. 🤘&lt;/p&gt;

&lt;p&gt;Want to make sure it’s valid? Use this tool from W3C:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In &lt;strong&gt;development&lt;/strong&gt; , use &lt;strong&gt;Validate by Direct Input&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Once deployed, use &lt;strong&gt;Validate by URL&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 &lt;a href="https://validator.w3.org/feed/" rel="noopener noreferrer"&gt;https://validator.w3.org/feed/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure your XML is well-formed — dev.to and other RSS consumers can be picky.&lt;/p&gt;




&lt;h3&gt;
  
  
  ✍️ Publish to dev.to via RSS
&lt;/h3&gt;

&lt;p&gt;Platforms like &lt;strong&gt;dev.to&lt;/strong&gt; can automatically sync articles from your RSS feed.&lt;/p&gt;

&lt;p&gt;Just head to your dev.to settings → &lt;strong&gt;Extensions → RSS Integration&lt;/strong&gt; , and paste your RSS feed URL (e.g., &lt;code&gt;https://yourdomain.com/rss&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Once dev.to pulls in your post, you'll see it listed in your dashboard under &lt;strong&gt;Posts&lt;/strong&gt; :&lt;/p&gt;

&lt;p&gt;But here’s the catch: 🚫 There’s &lt;strong&gt;no visible "Publish" button&lt;/strong&gt; or any clear indication on that list view — which honestly sucks. You’d expect to be able to publish right from there, but no.&lt;/p&gt;

&lt;p&gt;Instead, you have to &lt;strong&gt;click "Edit"&lt;/strong&gt; on a post. Only &lt;em&gt;inside the edit screen&lt;/em&gt; will you see the message:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Unpublished Post. This URL is public but secret, so share at your own discretion.&lt;/code&gt; &amp;gt; &lt;em&gt;(Click to edit)&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Click that link, and in the editor, you’ll see the synced metadata at the top:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
title: Essential React Hooks: A Comprehensive Guide
published: false
date: 2023-07-19 00:00:00 UTC
tags: react, hooks, beginners
canonical_url: https://ullaskunder.tech/blogs/basic-of-react-hooks
---

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

&lt;/div&gt;



&lt;p&gt;👉 All you need to do is change:&lt;/p&gt;

&lt;p&gt;✅ &lt;code&gt;published: false&lt;/code&gt; to &lt;code&gt;published: true&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;...then save. Boom — it’s live.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🛠️ Hopefully dev.to improves this flow — it would be far more intuitive to allow publishing directly from the post list.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  🧠 What We’ve Achieved
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ Keep content and code separate&lt;/li&gt;
&lt;li&gt;✅ Avoid rebuilding the blog for every new post&lt;/li&gt;
&lt;li&gt;✅ Secure and version-controlled Markdown storage&lt;/li&gt;
&lt;li&gt;✅ Dynamic content loading with caching&lt;/li&gt;
&lt;li&gt;✅ Auto-generating RSS feed&lt;/li&gt;
&lt;li&gt;✅ Easy syndication to dev.to or elsewhere&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔐 Why a Private GitHub Repo?
&lt;/h2&gt;

&lt;p&gt;Because the internet is... well, the internet.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Public repo = free-for-all&lt;/li&gt;
&lt;li&gt;Random people might PR garbage&lt;/li&gt;
&lt;li&gt;Or worse, spam bots might crawl it constantly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, we keep it &lt;strong&gt;private&lt;/strong&gt; and authenticate with a &lt;strong&gt;GitHub token&lt;/strong&gt; (stored securely via environment variables like &lt;code&gt;GITHUB_TOKEN&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 Future Enhancements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✍️ Add support for content previews (e.g., &lt;code&gt;/drafts&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;🧠 Add AI summaries or highlights&lt;/li&gt;
&lt;li&gt;🔎 Integrate search indexing (Algolia, Meilisearch)&lt;/li&gt;
&lt;li&gt;💌 Generate email newsletters from RSS&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  💬 Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Using GitHub as your blog CMS might feel odd at first, but it makes total sense for dev-centric blogs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Markdown is natural for us&lt;/li&gt;
&lt;li&gt;Git is already part of our workflow&lt;/li&gt;
&lt;li&gt;Next.js handles the rendering like a champ&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Write locally. Commit. Push. Done. Let your blog do the heavy lifting, not your deploy pipeline.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
    </item>
    <item>
      <title>From Frontend to Go: Why I’m Switching Gears</title>
      <dc:creator>ullas kunder</dc:creator>
      <pubDate>Sun, 06 Apr 2025 08:10:37 +0000</pubDate>
      <link>https://dev.to/ullas0bito/from-frontend-to-go-why-im-switching-gears-1087</link>
      <guid>https://dev.to/ullas0bito/from-frontend-to-go-why-im-switching-gears-1087</guid>
      <description>&lt;p&gt;When I graduated, the world was locked down. COVID had pushed everything remote, including my final year of college. And to be honest? What we were taught back then didn’t feel like something that would help me land a real job. So, I thought — &lt;em&gt;screw this&lt;/em&gt;, I’ll figure it out myself.&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%2Fbpkm01jldvb44btb2pak.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%2Fbpkm01jldvb44btb2pak.png" alt="developer journey: learning, building, switching gears" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🎨 The Artist Who Switched Tabs
&lt;/h3&gt;

&lt;p&gt;Before code, I was deep into 3D art. I was self-taught, building photorealistic renders in Blender during my free time. You can even find some of my work online if you search &lt;strong&gt;“ullas kunder 3d art”&lt;/strong&gt; — I used to go by ullaskingsman back then — a playful twist on my name that still makes me smile. 😄&lt;br&gt;&lt;br&gt;
If you're curious to see more of my 3D work, I’ve also saved a highlight on my Instagram: &lt;a href="https://www.instagram.com/z_haruu/" rel="noopener noreferrer"&gt;&lt;strong&gt;@z_haruu&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In my first year of college, I even tried getting a job as a 3D artist. Didn’t work out. But that curiosity to understand how things are made — from pixels to logic — never left me.&lt;/p&gt;

&lt;h3&gt;
  
  
  💻 The Jump into Web Development
&lt;/h3&gt;

&lt;p&gt;That curiosity led me to web dev. I already knew some HTML, CSS, and JavaScript, and I picked up React through blogs and YouTube. Then came React Native — and the idea of building mobile apps felt exciting. So I started building. Learning. Repeating.&lt;/p&gt;

&lt;p&gt;After graduation, I applied like crazy. It wasn’t easy. But eventually, I landed my first role as an Associate Software Engineer. The pay was okay, but something felt off. Not long after, I moved to a Frontend Software Engineer role — better work, but I still felt like something was missing.&lt;/p&gt;

&lt;h3&gt;
  
  
  🗾 A Curiosity for Culture
&lt;/h3&gt;

&lt;p&gt;Somewhere along the way, I started falling in love with Japanese culture — the aesthetics, the philosophy, the engineering behind their everyday systems. It clicked with the way I think and how I want to grow. That’s when I made a choice:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I want to build systems, not just interfaces.&lt;br&gt;&lt;br&gt;
I want to understand how things run, not just how they look.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  🐹 Enter: Go
&lt;/h3&gt;

&lt;p&gt;I chose to learn Go — not just because it’s fast or trendy, but because it teaches you to think in terms of performance, simplicity, and clean architecture. I’m still early in my journey, but it feels like a new mental model. A new chapter.&lt;/p&gt;

&lt;p&gt;I don’t know where this path will lead. Maybe Japan. Maybe somewhere else. But I’m staying open.&lt;/p&gt;

&lt;p&gt;For now, I’m:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Continuing to improve my portfolio &lt;a href="https://ullaskunder.tech/" rel="noopener noreferrer"&gt;https://ullaskunder.tech/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Deepening my Go knowledge &lt;a href="https://github.com/ullaskunder3?tab=repositories&amp;amp;q=&amp;amp;type=source&amp;amp;language=go&amp;amp;sort=" rel="noopener noreferrer"&gt;github golang learning repo&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Keeping frontend in my toolbox (just in case)&lt;/li&gt;
&lt;li&gt;And learning like I always have — by doing&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🎯 Why Write This?
&lt;/h3&gt;

&lt;p&gt;Because I know I’m not the only one in transition.&lt;/p&gt;

&lt;p&gt;If you’re out there switching gears, jumping stacks, or just unsure where you belong — I get it. Tech is wide. Your path doesn’t have to be a straight line. Mine sure isn’t.&lt;/p&gt;

&lt;p&gt;Let’s build weird things. Let’s stay curious. And maybe, just maybe, let’s meet in Japan someday.&lt;/p&gt;

&lt;p&gt;—&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks for reading. If any part of this resonated, feel free to say hi. I’m always down to chat about code, art, or anime.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>go</category>
      <category>learning</category>
      <category>career</category>
    </item>
    <item>
      <title>The Enchanting Guide to JavaScript Exports and Imports</title>
      <dc:creator>ullas kunder</dc:creator>
      <pubDate>Tue, 30 Jan 2024 00:00:00 +0000</pubDate>
      <link>https://dev.to/ullas0bito/the-enchanting-guide-to-javascript-exports-and-imports-1pbg</link>
      <guid>https://dev.to/ullas0bito/the-enchanting-guide-to-javascript-exports-and-imports-1pbg</guid>
      <description>&lt;h1&gt;
  
  
  The Joy of Imports and Exports in JavaScript
&lt;/h1&gt;

&lt;p&gt;Welcome to the whimsical world of JavaScript exports and imports! 🚀 Today, we embark on a delightful journey to unravel the secrets of named and default exports, and we'll sprinkle in some tips on the best practices that make your code sing!&lt;/p&gt;

&lt;h2&gt;
  
  
  Once Upon a Time in the Export Kingdom
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🌈 Named Exports: A Symphony of Harmony
&lt;/h3&gt;

&lt;p&gt;In the magical land of JavaScript, named exports are like the individual musicians in an orchestra. Each module can export multiple values, functions, or objects, and they all get a chance to shine!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// magic.js
export const spellBook = ['Abracadabra', 'Wingardium Leviosa'];

export function castSpell(spell) {
  console.log(`Casting ${spell}! ✨`);
}

export const potionIngredients = {
  eyeOfNewt: 3,
  unicornHair: 1,
};

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

&lt;/div&gt;



&lt;p&gt;Behold! The magic.js module has bestowed upon us three marvelous exports: &lt;code&gt;spellBook&lt;/code&gt;, &lt;code&gt;castSpell&lt;/code&gt;, and &lt;code&gt;potionIngredients&lt;/code&gt;. Now, other modules can import these enchanting elements and bask in the magic!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// wizard.js
import { spellBook, castSpell, potionIngredients } from './magic';

console.log(spellBook); // ['Abracadabra', 'Wingardium Leviosa']
castSpell('Expelliarmus'); // Casting Expelliarmus! ✨
console.log(potionIngredients); // { eyeOfNewt: 3, unicornHair: 1 }

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  🚀 Default Exports: The Star of the Show
&lt;/h3&gt;

&lt;p&gt;In our magical symphony, the default export is the soloist, the star of the show! Only one value can be the default export in a module, and it doesn't need a fancy name when imported.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// wand.js
const wand = 'Elder Wand';
export default wand;

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

&lt;/div&gt;



&lt;p&gt;Prepare to be amazed! The wand.js module has a single, dazzling export: the &lt;code&gt;Elder Wand&lt;/code&gt;. Let's bring this mystical artifact into another module's spotlight!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// sorcerer.js
import wand from './wand';

console.log(`The sorcerer wields the mighty ${wand}! 🪄`);

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Choosing the Best Spell: Default vs. Named
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🌟 Default Export: The Chosen One
&lt;/h3&gt;

&lt;p&gt;Use default exports when there's a clear protagonist in your module. It simplifies imports and allows you to pick the "main character" of your module.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Only one export in wand.js
export default wand;

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  🌈 Named Exports: The Ensemble Cast
&lt;/h3&gt;

&lt;p&gt;Named exports shine when your module has multiple important entities to offer. It's like creating a team of heroes, each with their own strengths.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Multiple exports in magic.js
export const spellBook = ['Abracadabra', 'Wingardium Leviosa'];
export function castSpell(spell) {
  console.log(`Casting ${spell}! ✨`);
}
export const potionIngredients = { eyeOfNewt: 3, unicornHair: 1 };

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Grand Finale: Importing Magic
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🚀 The Full Ensemble: Named Imports
&lt;/h3&gt;

&lt;p&gt;To harness the full power of named exports, import them by name. It's like inviting specific wizards to your magical gathering.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// wizard.js
import { spellBook, castSpell, potionIngredients } from './magic';

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  🌟 The Solo Act: Default Import
&lt;/h3&gt;

&lt;p&gt;For default exports, a simple import statement is all you need. It's elegant, straightforward, and lets the star shine solo.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// sorcerer.js
import wand from './wand';

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Magical Encore: Best Practices
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Consistency is Key:&lt;/strong&gt; Whether you choose named or default exports, stick to a consistent style across your project. A harmonious codebase is a joy to maintain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mindful Naming:&lt;/strong&gt; Give meaningful names to your exports. Make your code a delightful read, like a well-crafted spell.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Organize the Orchestra:&lt;/strong&gt; Group related exports in a module. A tidy module is a happy module.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Default for Simplicity:&lt;/strong&gt; If a module has a clear protagonist, embrace the default export. It makes imports clean and straightforward.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Named for Flexibility:&lt;/strong&gt; When your module features a diverse set of entities, let them shine as named exports. It's like creating a magical team!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And there you have it, dear reader! The magical world of named and default exports in JavaScript. May your code be enchanting, your imports be seamless, and your JavaScript adventures be full of joy and whimsy! 🌟🪄&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Comprehensive Guide to Advanced JavaScript Concepts</title>
      <dc:creator>ullas kunder</dc:creator>
      <pubDate>Thu, 03 Aug 2023 00:00:00 +0000</pubDate>
      <link>https://dev.to/ullas0bito/comprehensive-guide-to-advanced-javascript-concepts-43a0</link>
      <guid>https://dev.to/ullas0bito/comprehensive-guide-to-advanced-javascript-concepts-43a0</guid>
      <description>&lt;h2&gt;
  
  
  Thanks
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;I would like to express my gratitude to the following YouTube creators for their impactful videos that greatly aided my understanding of JavaScript core concepts:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;CodeSmith (Will Sentance): "JavaScript The Hard Parts: Object Oriented Programming"&lt;/li&gt;
&lt;li&gt;Kyle Simpson: "You Don't Know JS" (also available on YouTube)&lt;/li&gt;
&lt;li&gt;Dave Gray: YouTube JavaScript Playlist&lt;/li&gt;
&lt;li&gt;Enes Karakaş: Advanced Object Concepts (available on YouTube)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thank you all for sharing your knowledge and helping me on my learning journey!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function outerFun() {
  let counter = 0;
  function increment() {
    counter++;
    console.log("counter:", counter);
  }
  increment();
}
outerFun();


Global Execution Context:
  - Variables:
    - outerFun: `&amp;lt;function reference&amp;gt;`
  - Function Declarations:
    - outerFun()

Execution Context of outerFun():
  - Variables:
    - counter: `0`
    - increment: `&amp;lt;function reference&amp;gt;`
  - Function Declarations:
    - increment()
  - Call Stack:
    - outerFun()

Execution Context of increment():
  - Variables:
    - (none)
  - Call Stack:
    - increment()
    - outerFun()
    - Global Execution Context

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

&lt;/div&gt;



&lt;p&gt;In this representation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The global execution context includes the &lt;code&gt;outerFun&lt;/code&gt; function reference.&lt;/li&gt;
&lt;li&gt;When &lt;code&gt;outerFun()&lt;/code&gt; is invoked, a new execution context for &lt;code&gt;outerFun&lt;/code&gt; is created. It includes the &lt;code&gt;counter&lt;/code&gt; variable initialized to 0 and the &lt;code&gt;increment&lt;/code&gt; function reference.&lt;/li&gt;
&lt;li&gt;Within the &lt;code&gt;outerFun&lt;/code&gt; execution context, there is a call to the &lt;code&gt;increment()&lt;/code&gt; function. This triggers the creation of a new execution context for &lt;code&gt;increment&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;increment&lt;/code&gt; execution context does not have any variables specific to it.&lt;/li&gt;
&lt;li&gt;The call stack keeps track of the active execution contexts. Initially, &lt;code&gt;outerFun()&lt;/code&gt; is at the top of the call stack. When &lt;code&gt;increment()&lt;/code&gt; is called, it is pushed onto the call stack above &lt;code&gt;outerFun()&lt;/code&gt;, and the global execution context is at the bottom.&lt;/li&gt;
&lt;li&gt;After the &lt;code&gt;increment&lt;/code&gt; function completes its execution, its execution context is popped off the call stack.&lt;/li&gt;
&lt;li&gt;Once &lt;code&gt;outerFun()&lt;/code&gt; finishes, its execution context is also popped off the stack.&lt;/li&gt;
&lt;li&gt;Finally, only the global execution context remains on the call stack.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope this Markdown format helps you understand the execution contexts more clearly. Let me know if you have any further questions!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function outerFun() {
  let counter = 0;
  function increment() {
    counter++;
    console.log("counter:", counter);
  }
  increment();
}
outerFun();

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Global Execution Context:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When &lt;code&gt;outerFunction()&lt;/code&gt; is called:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Call Stack:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When &lt;code&gt;exFun()&lt;/code&gt; is called the first time:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Call Stack:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When &lt;code&gt;exFun()&lt;/code&gt; is called the second time:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Call Stack:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In summary, the &lt;code&gt;counter&lt;/code&gt; variable is not incremented because &lt;code&gt;exFun&lt;/code&gt; tries to access it in the global execution context after the &lt;code&gt;outerFunction&lt;/code&gt; execution context has been deleted. The value of &lt;code&gt;counter&lt;/code&gt; is not persisted, so it remains at its initial value of 0.&lt;/p&gt;

&lt;h2&gt;
  
  
  Promises and Async/Await:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Promises: Asynchronous programming is a fundamental aspect of JavaScript. Promises provide a way to handle asynchronous operations and avoid callback hell
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fetchData = () =&amp;gt; {
  return new Promise((resolve, reject) =&amp;gt; {
    // Simulating an asynchronous operation
    setTimeout(() =&amp;gt; {
      const data = "One piece is real";
      if (data) {
        resolve(data);
      } else {
        reject("Error occurred");
      }
    }, 2000);
  });
};

fetchData()
  .then((data) =&amp;gt; console.log(data))
  .catch((error) =&amp;gt; console.error(error));

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Async/Await: Introduced in ES2017, async/await simplifies asynchronous code even further by allowing you to write asynchronous code that looks like synchronous code
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fetchData = () =&amp;gt; {
  return new Promise((resolve, reject) =&amp;gt; {
    setTimeout(() =&amp;gt; {
      const data = "Some fetched data";
      if (data) {
        resolve(data);
      } else {
        reject("Error occurred");
      }
    }, 2000);
  });
};

const fetchDataAsync = async () =&amp;gt; {
  try {
    const data = await fetchData();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
};

fetchDataAsync();

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Closures
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Closures allow functions to retain access to variables from their parent scopes even after the parent function has finished executing.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const outerFunction = (outerParam) =&amp;gt; {
  const innerFunction = (innerParam) =&amp;gt; {
    console.log(outerParam + innerParam);
  };

  return innerFunction;
};

const closure = outerFunction(10);
closure(5); // Output: 15

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Object Oriented Programming OOP ✨
&lt;/h2&gt;

&lt;p&gt;4 principle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Abstraction&lt;/li&gt;
&lt;li&gt;Encapsulation&lt;/li&gt;
&lt;li&gt;Inheritance&lt;/li&gt;
&lt;li&gt;Polymorphism&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prototypes
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;prototype&lt;/code&gt; is a special hidden property object that is associated with every functions and objects by default in JavaScript.&lt;/p&gt;

&lt;p&gt;Objects in JavaScript are linked to a certain prototype, by means object can access that prototype method =&amp;gt; &lt;code&gt;Prototypal inheritance&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let myArray = [11, 22, 33];
console.log(myArray.at(0));
//output: 11

/** Array.prototype is the prototype of all array objects
 * behind its calling myArray.prototype.at(2)
 **/

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

&lt;/div&gt;



&lt;p&gt;OOP is an enormously popular paradigm for structuring out complex code&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy to add features and functionality&lt;/li&gt;
&lt;li&gt;Performant (efficient in term of memory)&lt;/li&gt;
&lt;li&gt;Easy for us and other developers to reason about (a clear structure)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Objects - store functions with their associated data!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const user1 = {
  name: "ullas",
  score: 2,

  increment: function () {
    user1.score++;
  },
};

user1.increment();

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

&lt;/div&gt;



&lt;p&gt;This is the principal of encapsulation.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Multiple way to create an object, just to get familier with few means of defining the object&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Using empty object and then populate it with dot notation 🔰
&lt;/h2&gt;

&lt;p&gt;Creating user2 user 'dot notation'&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
const user2 = {};

user2.name = 'ullas';
user2.score = 6;
user2.increment = function(){
    user2.score++;
};

// Square bracket notation [] (never used except in one condition: evaluatng what goes in ex: user2[property] property: 'name')

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Using the built in js Object.create which will create empty object
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
const user3 = Object.create(null);

user3.name = 'ullas';
user3.score = 7;
user3.increment = function(){
    user3.score++;
};

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

&lt;/div&gt;



&lt;p&gt;! &lt;em&gt;our code is getting repetitive, we are breaking our DRY principle&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;? &lt;strong&gt;What if we have milion of user....?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Champ =&amp;gt; Functions 😁
&lt;/h2&gt;

&lt;p&gt;They are helpfull in this case so we don't have to repeat the code. They are wrapping up the instructions... write once call as many time you want&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution 1. Generate Object using a function
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function userCreator(name, score){

    const newUser = { };

    newuser.name = name;
    newuser.score = score;

    newuser.increment = function(){
        newuser.score++;
    };

    return newUser;
};

const user1 = userCreator('ullas', 10)
const user2 = userCreator('kingsman', 10)

user2.increment()

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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;! this solution is doing its task but &lt;strong&gt;fundamentally Unusable&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Reason:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In global memory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;user1 = &lt;code&gt;userCreator('ullas' 10)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;which create a new execuation context&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In a local memory&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In global memory&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same with =&amp;gt; &lt;strong&gt;user2&lt;/strong&gt; , declaring user2&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In global memory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;user2 = &lt;code&gt;userCreator('kingsman' 10)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;which create a new execuation context&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In a local memory&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In global memory&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;next step was =&amp;gt; &lt;strong&gt;to increment&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User1.increment();
User2.increment();

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Each time we create a new user we make space in our computer's memory for our data functions. But our functions are just copies&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In Global memory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    global memory with &amp;gt;
    - [function userCreator()]

    - user1 : {
        name: 'ullas'
        score: 10
        increment: -[f]- // same copy
    }

    - user2 : {
        name: 'kingsman'
        score: 10
        increment: -[f]- // same copy
    }

    - what if n number of user...

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Each object have brand new increment function defined on them... We should be able attach multiple function on them not single function ex: login, logout, render etc...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Is there a better way? to getting single copyies of them in &lt;code&gt;Global Memory&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Solution 2 😮
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Store the increment function in just one object and have the interpreter, if it doesn't find the function on user1, look up to that object to check if it's there&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How to make this link ?&lt;/p&gt;

&lt;h2&gt;
  
  
  Prototype chain
&lt;/h2&gt;

&lt;p&gt;In Global memory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    global memory with &amp;gt;

    userCreator : -[f]-

    user1 : {
        name: 'ullas'
        score: 10
        =&amp;gt; functionStore
    }

    user2 : {
        name: 'kingsman'
        score: 10
        =&amp;gt; functionStore
    }

    function functionStore: {
        increment: -[f]-
    }

    // =&amp;gt; this bond is called prototypal bond : chain link to or go look functionStore
    /**
     * when user doesn't find increment it goes look in function store for increment()
     */

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

&lt;/div&gt;



&lt;p&gt;The Code Base&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function userCreator(name, score) {
  const newUser = Object.create(functionStore);

  newUser.name = name;
  newUser.score = score;

  return newUser;
}

const functionStore = {
  increment: function () {
    this.score++;
  },
  Login: function () {
    console.log("Your are loggedin");
  },
};

const user1 = userCreator("ullas", 10);
const user2 = userCreator("kingsman", 10);

user1.increment();

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

&lt;/div&gt;



&lt;p&gt;In the global memory&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Initially:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  global memory &amp;gt;

  userCreator: -[f]-

  functionStore: {
      increment: -[f]-
      login: -[f]-
  }

  User1 :undefined

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

&lt;/div&gt;



&lt;p&gt;user1 = &lt;code&gt;userCreator('ullas' 10)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;which create a new execuation context&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In a local memory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now the &lt;code&gt;increment()&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;This &lt;code&gt;increment()&lt;/code&gt; function need to be usable on what ever object we run it on.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We need some placeholder inside of that function increment in order to refer to that object&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Or we need label thats always going to refer to that object on which we are running the function&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;this&lt;/strong&gt; Fundamental rule always pointing to the relevent object to the left-hand side of the dot on which we calling the function&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Creates a execuation Context&lt;/p&gt;

&lt;p&gt;In a local memory&lt;/p&gt;

&lt;p&gt;In the example above, &lt;code&gt;user1&lt;/code&gt; is to “the left of the dot” which means the &lt;code&gt;this&lt;/code&gt; keyword is referencing the &lt;code&gt;user1&lt;/code&gt; object. So, it’s as if, inside the &lt;code&gt;increment&lt;/code&gt; method, the JavaScript interpreter changes &lt;code&gt;this to user1&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// this =&amp;gt; to user1

this.score++
===&amp;gt; user1.score++

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Do we have copies of increment() stored in user1 and user2 =&amp;gt; &lt;code&gt;none&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Super sophisticated but not standard&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  solution 3, new Keyword 🤩
&lt;/h2&gt;

&lt;p&gt;Embracing the Magic of the &lt;code&gt;new&lt;/code&gt; Keyword: No Hard Work, Just Automation! 🤩&lt;/p&gt;

&lt;p&gt;Let's witness this enchantment in action with a spellbinding code example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const user1 = new userCreator("ullas", 10);

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

&lt;/div&gt;



&lt;p&gt;When we call the constructor function with &lt;code&gt;new&lt;/code&gt; keyword in front we automate 2 things&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Create&lt;/strong&gt; a new user object&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;return&lt;/strong&gt; the new user object&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Creating a New User Object&lt;/strong&gt; : By simply adding new before the function call, the &lt;code&gt;new&lt;/code&gt; keyword conjures a brand-new user object into existence. No more manual labor required!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Returning the New User Object&lt;/strong&gt; : The &lt;code&gt;new&lt;/code&gt; keyword, being the generous enchantress it is, automatically returns the newly created user object. We can catch it and cherish it as our very own.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But now we need to adjust how we write the body of userCreator&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Refer to the auto-created object?&lt;/li&gt;
&lt;li&gt;Known where to put our single copies of functions?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Interlude - functions are both objects and functions
&lt;/h2&gt;

&lt;p&gt;Before we continue our journey, let's explore a mesmerizing fact about functions. In JavaScript, functions possess the remarkable ability to be both objects and functions simultaneously. Mind-bending, isn't it?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function multiplyBy2(num){
    return num*2
}

multiplyBy2.stored = 5
multiplyBy2.(3) // 6

multiplyBy2.stored //5
multiplyBy2.prototype // ()

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

&lt;/div&gt;



&lt;p&gt;Here, we have the captivating &lt;code&gt;multiplyBy2&lt;/code&gt; function. It gracefully showcases its object-like qualities by sporting a &lt;code&gt;stored&lt;/code&gt; property with a value of 5. But wait, there's more! When invoked as a function, it magically multiplies the provided number by 2. In this case, &lt;code&gt;multiplyBy2(3)&lt;/code&gt; gracefully yields 6.&lt;/p&gt;

&lt;p&gt;Curiously, we can access the &lt;code&gt;stored&lt;/code&gt; property separately, giving us a surprising value of 5. Additionally, the enigmatic &lt;code&gt;multiplyBy2.prototype&lt;/code&gt; property returns an empty parentheses pair (). Its true purpose will soon be revealed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;let's return to the enchanting world of the &lt;code&gt;UserCreator&lt;/code&gt; constructor function.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Code Base&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function UserCreator(name, score) {
  this.name = name;
  this.score = score;
}
UserCreator.prototype.increment = function () {
  this.score++;
};
UserCreator.prototype.login = function () {
  console.log("You are loggedin");
};

const user1 = new UserCreator("ullas", 10);
user1.increment();

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

&lt;/div&gt;



&lt;p&gt;In the global memory&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Initially:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  global memory &amp;gt;

  userCreator() -[f]- //userCreator function version

  userCreator: {
      //userCreator object version
      prototype: {
          //functionStore
          increment: -[f]-
          login: -[f]-
      }
  }

  User1 :undefined

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

&lt;/div&gt;



&lt;p&gt;user1 = new &lt;code&gt;UserCreator('ullas' 10)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;which create a new execuation context&lt;/p&gt;

&lt;p&gt;Within the realm of &lt;code&gt;Local Memory&lt;/code&gt;, secrets are revealed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In a local memory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now the &lt;code&gt;increment()&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user1.increment();

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

&lt;/div&gt;



&lt;p&gt;Creates a execuation Context&lt;/p&gt;

&lt;p&gt;In a local memory&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// this =&amp;gt; to user1

this.score++;
// Translates to: user1.score++

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

&lt;/div&gt;



&lt;p&gt;Benefits&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Faster to Write&lt;/strong&gt; : The new keyword automates object creation and eliminates the need for manual object instantiation. We can summon objects into existence with a single line of code. Huzzah!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simplicity Reigns&lt;/strong&gt; : Our code becomes cleaner and more intuitive. We no longer need to explicitly return the object or worry about the intricate details of object creation. The new keyword takes care of it all. How delightful!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Professional Practices&lt;/strong&gt; : Despite its magical powers, using the new keyword remains a widely accepted and professional practice. Embrace this technique to impress your peers and create code that shines like a star.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Solution 4, class 🙌
&lt;/h2&gt;

&lt;h2&gt;
  
  
  The class &lt;code&gt;Syntatic Sugar&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class userCreator {
  constructor(name, score) {
    this.name = name;
    this.score = score;
  }
  increment() {
    this.score++;
  }
  login() {
    console.log("loggin");
  }
}
const user1 = new UserCreator("ullas", 10);
user1.increment();

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

&lt;/div&gt;



&lt;p&gt;In the global memory&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Initially:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  global memory &amp;gt;

  //class
  [
      userCreator() -[f]- //userCreator function version

      userCreator: {
          //userCreator object version
          prototype: {
              // =&amp;gt;functionStore
              increment: -[f]-
              login: -[f]-
          }
      }
  ]

  User1 :undefined

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

&lt;/div&gt;



&lt;p&gt;user1 = new &lt;code&gt;UserCreator('ullas' 10)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;which create a new execuation context&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In a local memory&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Proxy Object
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Proxy Objects:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Creating a Proxy Object:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Trap Methods:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Proxy Handler:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example: Property Access (get trap):&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example: using &lt;code&gt;receiver&lt;/code&gt; parameter in get trap&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example: Property Assignment (set trap):&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example: Property Deletion (deleteProperty trap):&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example: Prohibit Property Deletion (deleteProperty trap):&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example: Validation and Security:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example: Array Manipulation (apply trap):&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Sort Visualization using p5.js</title>
      <dc:creator>ullas kunder</dc:creator>
      <pubDate>Sun, 09 May 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/ullas0bito/sort-visualization-using-p5js-3l14</link>
      <guid>https://dev.to/ullas0bito/sort-visualization-using-p5js-3l14</guid>
      <description>&lt;h2&gt;
  
  
  Sort Visualization
&lt;/h2&gt;

&lt;p&gt;This is an example of bubble sort, I'll try to upload other Visualization practical &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%2Fthtorewi26qx1taq46ey.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%2Fthtorewi26qx1taq46ey.png" alt="example" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Table Of Content
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Bubble Sort Theory&lt;/li&gt;
&lt;li&gt;Practical Bubble Sort Visualization&lt;/li&gt;
&lt;li&gt;File Structure&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Bubble Sort Theory
&lt;/h2&gt;

&lt;p&gt;Bubble Sort| Runtime O(n²) average and worst case. Memort: O(1).&lt;/p&gt;

&lt;p&gt;O(n) (Best case) This time complexity can occur if the array is &lt;strong&gt;already sorted&lt;/strong&gt; , and that means that no swap occurred and only 1 iteration of n elements&lt;/p&gt;

&lt;p&gt;In bubble sort, we start at the beginning of the array and swap the first two elements if the first is greater than the second. Then, we go to the next pair, and so on, continuously making sweeps of the array until it is sorted. In doing so, the smaller items slowly"bubble" up to the beginning of the list.&lt;/p&gt;

&lt;p&gt;Bubble sort can be implemented as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Bubble-sort(a)

  for i = a.length() to 1
    for j = 1 to i-1
        if a[j]&amp;gt;a[j+1]
            swap(a[j],a[j+1]);
        end if

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

&lt;/div&gt;



&lt;p&gt;In the case of the standard version of the bubble sort, we need to do N iterations. In each iteration, we do the comparison and we perform swapping if required. Given an array of size N, the first iteration performs (N - 1) comparisons. The second iteration performs (N - 2) comparisons. In this way, the total number of comparison will be:&lt;/p&gt;

&lt;p&gt;(N - 1) + (N - 2) + (N - 3) + .......+ 3 + 2 + 1 = N(N - 1)/2 = O(N^2)&lt;/p&gt;

&lt;p&gt;Take an array of numbers " 5 1 4 2 8", and sort the array from lowest number to greatest number using bubble sort. In each step, elements written in &lt;strong&gt;bold&lt;/strong&gt; are being compared. Three passes will be required&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;First Pass&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Second Pass&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;The algorithm needs one additional whole pass without any swap to know it is sorted.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Third Pass&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;( 1 2 4 5 8 ) → ( 1 2 4 5 8 )&lt;/li&gt;
&lt;li&gt;( 1 2 4 5 8 ) → ( 1 2 4 5 8 )&lt;/li&gt;
&lt;li&gt;( 1 2 4 5 8 ) → ( 1 2 4 5 8 )&lt;/li&gt;
&lt;li&gt;( 1 2 4 5 8 ) → ( 1 2 4 5 8 )&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical Bubble Sort Visualization
&lt;/h2&gt;

&lt;p&gt;All you need is a Vs code(Visual studio code) or any other editor or IDE&lt;/p&gt;

&lt;p&gt;I'm using p5.js javascript library which is used for creative coding, Visualization, etc...\&lt;/p&gt;

&lt;h2&gt;
  
  
  File Structure
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Algorithm-Visualization:.
├── libraries
│ └──p5.min.js
│
├── style.css
├── script.js
├── jsconfig.json (not required if you dont use vs code p5 extension)
└── index.html

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

&lt;/div&gt;



&lt;p&gt;You can install p5 extension in vs code and run with live server extension&lt;/p&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;You just have to link the p5.min.js from &lt;a href="https://cdnjs.com/libraries/p5.js" rel="noopener noreferrer"&gt;cdnjs&lt;/a&gt; in you script that's it!!!&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.3.1/p5.min.js"&amp;gt;
&amp;lt;/script&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;Basic of p5.js&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;setup()&lt;/code&gt;:&lt;br&gt;&lt;br&gt;
It's used to define initial environment properties such as screen size and background color and to load media such as images and fonts as the program starts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;random()&lt;/code&gt;&lt;br&gt;&lt;br&gt;
Name itself define it's generate random floating point number between ranges given as the parameter&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;noise()&lt;/code&gt;&lt;br&gt;&lt;br&gt;
noise() cannot be called without parameter if called it will return NaN.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The range is between 0 and 1 noise will always return floating point value will not exced greater than 1 it will always cluster around 0.5 they dont have uniform distribution&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
