<?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>Forem: Uthsob Chakraborty</title>
    <description>The latest articles on Forem by Uthsob Chakraborty (@uthsob_cb).</description>
    <link>https://forem.com/uthsob_cb</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%2F1088022%2F0846af6e-a95d-4bed-8140-4bf2de26f79e.jpg</url>
      <title>Forem: Uthsob Chakraborty</title>
      <link>https://forem.com/uthsob_cb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/uthsob_cb"/>
    <language>en</language>
    <item>
      <title>How I made my own Operating System (OS)</title>
      <dc:creator>Uthsob Chakraborty</dc:creator>
      <pubDate>Sun, 05 Oct 2025 12:01:01 +0000</pubDate>
      <link>https://forem.com/uthsob_cb/how-i-made-my-own-operating-system-os-ffh</link>
      <guid>https://forem.com/uthsob_cb/how-i-made-my-own-operating-system-os-ffh</guid>
      <description>&lt;p&gt;I made my Own Operating System named “NO OS”; Here is the log of NO OS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is this done?
&lt;/h2&gt;

&lt;p&gt;The main reason behind building &lt;strong&gt;NO OS&lt;/strong&gt; is &lt;strong&gt;learning&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In our Operating System course, we were told that the best way to understand how an OS really works is to try building one. While NO OS is not a fully functional operating system, it helps in understanding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Boot process&lt;/strong&gt;: how a CPU starts and how the control passes from bootloader → kernel.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kernel basics&lt;/strong&gt;: setting up memory, stack, and jumping into C code from assembly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory management&lt;/strong&gt;: simulating frame allocation, freeing memory, and showing system usage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low-level programming&lt;/strong&gt;: working without libraries, writing directly to hardware like VGA text memory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For programmers (especially students like me), it’s very easy to forget what we were trying to do after a few weeks/months.&lt;/p&gt;

&lt;p&gt;That’s why documenting &lt;strong&gt;why this project exists&lt;/strong&gt; is almost more important than the code itself — so future contributors (or even my future self) know the intention:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This project is not meant to be a production OS, but a playground for learning OS concepts step by step.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What is this?
&lt;/h2&gt;

&lt;p&gt;Imagine turning on your computer: you see the screen light up, the operating system loads, and then you can open apps, browse the internet, or play music.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NO OS is a baby version of that idea&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;But instead of doing &lt;em&gt;all&lt;/em&gt; those complicated things, NO OS only does two very simple things right now:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Shows text on the screen&lt;/strong&gt; — so the system can "say hello" when it starts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manages memory in a toy way&lt;/strong&gt; — like keeping track of which parts of your desk are empty and which parts are already used.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That’s it. NO OS doesn’t run apps, doesn’t connect to the internet, and doesn’t have graphics. It’s called &lt;strong&gt;“NO OS”&lt;/strong&gt; because it’s really a &lt;strong&gt;Non-Operational Operating System,&lt;/strong&gt; a joke name to remind us that it doesn’t do much yet.&lt;/p&gt;

&lt;p&gt;But it’s a &lt;strong&gt;stepping stone&lt;/strong&gt;: with this base, future improvements like adding keyboard input, handling files, or running small programs could be built.&lt;/p&gt;

&lt;p&gt;So for someone who has never programmed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Think of NO OS as a &lt;strong&gt;blank notebook&lt;/strong&gt; with the first two pages written.&lt;/li&gt;
&lt;li&gt;It doesn’t have stories yet, but the notebook is ready for you (or others) to start filling it.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Background:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;In this semester (Summer 2025), I got the course Operating System. And in the Lab of same course we required to build a project. Our Faculty said - "If you really want to understand how a Operating System Works you should build it." So here i'm building my own Operating System called &lt;strong&gt;&lt;em&gt;"NO OS";&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Just like the name suggests, No OS has no work. It’s truly “Non Operational” OS. But what i learned from building this-&lt;/p&gt;

&lt;p&gt;Firstly we need to know what a Operating System is and what it does- &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Definition:&lt;/strong&gt; A operating System is a system software that manages computer hardware and software resources, providing common services for computer programs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Work:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An Operating System basically does following works;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Resource Management&lt;/li&gt;
&lt;li&gt;Process Management&lt;/li&gt;
&lt;li&gt;File Management&lt;/li&gt;
&lt;li&gt;User Interface&lt;/li&gt;
&lt;li&gt;Input/Output (I/O) Management&lt;/li&gt;
&lt;li&gt;Security&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But building such a fully working OS with all functions is very hard; especially single-handedly and when you have time constrains and you also have other work and personal life. So in that meantime possibly i built tiny portion or base of a Operating System. &lt;/p&gt;

&lt;p&gt;Here is how NO OS works and what it does-&lt;/p&gt;

&lt;p&gt;First look at the file structure. We have following files;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="n"&gt;NoOS&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="n"&gt;bochsrc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;txt&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="n"&gt;iso&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="n"&gt;boot&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;       &lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="n"&gt;grub&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;           &lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="n"&gt;grub&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cfg&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="n"&gt;kernel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="n"&gt;link&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ld&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="n"&gt;loader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="n"&gt;Makefile&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="n"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="n"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="n"&gt;README&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;md&lt;/span&gt;
&lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="n"&gt;types&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;Here in  if you look at the github repo you’ll find the boot-loader folder as well; i thought about creating the boot loader from scratch but didn’t have the courage to build that too. So just used &lt;code&gt;grub.cfg&lt;/code&gt; that just points to boot from &lt;code&gt;/boot/kernel.elf&lt;/code&gt; file; Oh also speaking of &lt;code&gt;grub&lt;/code&gt; we used &lt;strong&gt;&lt;code&gt;Bochs&lt;/code&gt;&lt;/strong&gt; to emulate and run our OS in development mode. That's what the configuration file kept in &lt;code&gt;bochsrc.txt&lt;/code&gt; it simulates an x86 architecture PC. In out config we just pointed and gave 32 Megabyte (MB) of RAM and uses &lt;code&gt;SDL&lt;/code&gt; as display library to display.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Loader Script:&lt;/strong&gt; Anyway, &lt;code&gt;loader.s&lt;/code&gt; It’s the &lt;strong&gt;real entry point&lt;/strong&gt; for this operating system after the boot-loader (GRUB) passes control to the kernel. This file takes care of the low-level setup before calling  C kernel code. This is assembly code that normally has 4 core responsibilities-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Multiboot Header:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stack Setup:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Calls the Kernel:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Halts the CPU:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nasm"&gt;&lt;code&gt;&lt;span class="nf"&gt;global&lt;/span&gt; &lt;span class="nv"&gt;loader&lt;/span&gt;

&lt;span class="nf"&gt;extern&lt;/span&gt; &lt;span class="nv"&gt;kernel_main&lt;/span&gt;

&lt;span class="no"&gt;MAGIC_NUMBER&lt;/span&gt;&lt;span class="kd"&gt; equ&lt;/span&gt; &lt;span class="mh"&gt;0x1BADB002&lt;/span&gt;     
&lt;span class="no"&gt;FLAGS&lt;/span&gt;&lt;span class="kd"&gt;        equ&lt;/span&gt; &lt;span class="mh"&gt;0x0&lt;/span&gt;            
&lt;span class="no"&gt;CHECKSUM&lt;/span&gt;&lt;span class="kd"&gt;     equ&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;MAGIC_NUMBER&lt;/span&gt;  

&lt;span class="nf"&gt;section&lt;/span&gt; &lt;span class="nv"&gt;.text&lt;/span&gt;
    &lt;span class="nf"&gt;align&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;                     
    &lt;span class="kd"&gt;dd&lt;/span&gt; &lt;span class="nv"&gt;MAGIC_NUMBER&lt;/span&gt;             
    &lt;span class="kd"&gt;dd&lt;/span&gt; &lt;span class="nv"&gt;FLAGS&lt;/span&gt;                    
    &lt;span class="kd"&gt;dd&lt;/span&gt; &lt;span class="nb"&gt;CH&lt;/span&gt;&lt;span class="nv"&gt;ECKSUM&lt;/span&gt;               

&lt;span class="nl"&gt;loader:&lt;/span&gt;
    &lt;span class="nf"&gt;mov&lt;/span&gt; &lt;span class="nb"&gt;esp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;kernel_stack_top&lt;/span&gt;      &lt;span class="c1"&gt;; Set up the stack pointer&lt;/span&gt;
    &lt;span class="nf"&gt;call&lt;/span&gt; &lt;span class="nv"&gt;kernel_main&lt;/span&gt;               &lt;span class="c1"&gt;; Call the C kernel entry point&lt;/span&gt;

    &lt;span class="nf"&gt;cli&lt;/span&gt;                            &lt;span class="c1"&gt;; Disable interrupts&lt;/span&gt;
&lt;span class="nl"&gt;.hang:&lt;/span&gt;
    &lt;span class="nf"&gt;hlt&lt;/span&gt;                            &lt;span class="c1"&gt;; Halt CPU&lt;/span&gt;
    &lt;span class="nf"&gt;jmp&lt;/span&gt; &lt;span class="nv"&gt;.hang&lt;/span&gt;                      &lt;span class="c1"&gt;; Infinite halt loop&lt;/span&gt;

&lt;span class="nf"&gt;section&lt;/span&gt; &lt;span class="nv"&gt;.bss&lt;/span&gt;
    &lt;span class="nf"&gt;align&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;
    &lt;span class="nl"&gt;kernel_stack_bottom:&lt;/span&gt;
        &lt;span class="kd"&gt;resb&lt;/span&gt; &lt;span class="mi"&gt;16384&lt;/span&gt;                 &lt;span class="c1"&gt;; Reserve 16KB for the stack&lt;/span&gt;
    &lt;span class="nl"&gt;kernel_stack_top:&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Kernel and Memory Management:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Kernel is the MAGIC file the core of an OS. It’s the main file that does all the magic of a OS in the behind. Including all the core job of OS. The NO OS kernel is written in C.  &lt;/p&gt;

&lt;p&gt;As i have explained what are the issue for me to build a full kernel. But to call it a OS  i have included only 3 things. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Managing or Showing Output/Display Management.&lt;/li&gt;
&lt;li&gt;User Interface though just static&lt;/li&gt;
&lt;li&gt;And Memory Management (to be specific how it’s allocating memory)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s discuss on more detailed about each one;&lt;/p&gt;

&lt;p&gt;As its allocate memory so i have created a separate code file for manage memory on &lt;code&gt;memory.c&lt;/code&gt; and &lt;code&gt;memory.h&lt;/code&gt; that simulates-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Physical memory frame allocation using bitmap&lt;/li&gt;
&lt;li&gt;Simple heap allocator for kernel memory&lt;/li&gt;
&lt;li&gt;Memory information display
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nf"&gt;allocate_frame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint32_t&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;pmm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;total_frames&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;uint32_t&lt;/span&gt; &lt;span class="n"&gt;byte&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;uint32_t&lt;/span&gt; &lt;span class="n"&gt;bit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pmm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bitmap&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;byte&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;bit&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;pmm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bitmap&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;byte&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;|=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;bit&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="n"&gt;pmm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;used_frames&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;FRAME_SIZE&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Out of memory&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This function is a helper function for frame allocation&lt;/p&gt;

&lt;p&gt;and then this code check the Free frame-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;free_frame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;uint32_t&lt;/span&gt; &lt;span class="n"&gt;frame_num&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint32_t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="n"&gt;frame&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;FRAME_SIZE&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;uint32_t&lt;/span&gt; &lt;span class="n"&gt;byte&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;frame_num&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;uint32_t&lt;/span&gt; &lt;span class="n"&gt;bit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;frame_num&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="n"&gt;pmm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bitmap&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;byte&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;=&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;bit&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;pmm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;used_frames&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And this is for the UI to show memory information. and finally get the free memory block.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;show_memory_info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;uint32_t&lt;/span&gt; &lt;span class="n"&gt;free_mem&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;get_free_memory&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Memory Info:&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"  Total: %d KB&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pmm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;memory_size&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"  Used:  %d KB&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pmm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;memory_size&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;free_mem&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"  Free:  %d KB&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;free_mem&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"  Frames: %d total, %d used&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pmm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;total_frames&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pmm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;used_frames&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kt"&gt;uint32_t&lt;/span&gt; &lt;span class="nf"&gt;get_free_memory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pmm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;total_frames&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;pmm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;used_frames&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;FRAME_SIZE&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;All these memory management code come handy to current memory management simulation and future memory related task. &lt;/p&gt;

&lt;p&gt;Let’s get back to the &lt;code&gt;kernel.c&lt;/code&gt;-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;"types.h"&lt;/span&gt;&lt;span class="cp"&gt;
#include&lt;/span&gt; &lt;span class="cpf"&gt;"memory.h"&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="cp"&gt;#define VGA_WIDTH 80
#define VGA_HEIGHT 25
#define VGA_MEMORY 0xB8000
&lt;/span&gt;
&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;uint16_t&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;vga_buffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint16_t&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="n"&gt;VGA_MEMORY&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;size_t&lt;/span&gt; &lt;span class="n"&gt;vga_row&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;size_t&lt;/span&gt; &lt;span class="n"&gt;vga_column&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;uint8_t&lt;/span&gt; &lt;span class="n"&gt;vga_color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;clear_screen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;putchar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;str&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...);&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;print_number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint32_t&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;print_hex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint32_t&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;demonstrate_memory_operations&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the entry of the kernel we just called all the required function including &lt;code&gt;memory&lt;/code&gt; file; And then defined our UI/display size with VGA (Video Graphics Array) that does the display management and the basic display usage. How it shows with the display are in code if you read it carefully you will understand. And then finally the UI; So to make it minimal kept just as CLI UI&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;kernel_main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;clear_screen&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"====================&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"  Welcome to NO OS!&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"====================&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"This is NO OS that has no work! That does nothing currently but simulate-&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"- Display text on screen&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"- Handle basic memory management&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Initializing memory manager...&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;init_memory_manager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Memory manager initialized successfully!&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="n"&gt;demonstrate_memory_operations&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;Simulation of Memory management!!&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Debug: NoOS is running successfully! The system is alive and operational.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;asm&lt;/span&gt; &lt;span class="k"&gt;volatile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"hlt"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As there is no code implemented to interrupt handling here so it’s just static screen showing basic UI and dynamic memory allocation part. Here is a screenshot of the working NO OS.&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%2Feaoju2zn9wfg10gwy2fb.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%2Feaoju2zn9wfg10gwy2fb.png" alt=" " width="800" height="564"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s the whole overview of NO OS;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Makefile and Linker:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As we have left with these 2 file now lets discuss about them briefly. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;link.ld&lt;/code&gt;&lt;/strong&gt; tells the linker how to arrange the kernel binary in memory, sets the load address to 1MB, aligns sections to 4KB, and specifies the entry point so the OS boots and runs correctly.&lt;/p&gt;

&lt;p&gt;and then the &lt;code&gt;Makefile&lt;/code&gt; is the custom make command that creates the ISO, it has some other commands to clean, run and generating the ISO.&lt;/p&gt;

&lt;p&gt;Totally completed the system.&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%2Femdpdefxmahxk54u2cz6.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%2Femdpdefxmahxk54u2cz6.png" alt=" " width="325" height="118"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OHHH&lt;br&gt;
**&lt;/p&gt;

&lt;h2&gt;
  
  
  Contribution
&lt;/h2&gt;

&lt;p&gt;NO OS is a learning project, and there’s a lot of room to grow. If you’re interested in operating system development or just want to experiment with low-level programming, you’re welcome to contribute!&lt;/p&gt;

&lt;p&gt;Here are some ideas for contributions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Add Interrupt Handling&lt;/strong&gt; – implement a simple Interrupt Descriptor Table (IDT) and handle basic hardware interrupts (keyboard, timer).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improve Memory Management&lt;/strong&gt; – extend the frame allocator into a proper paging/virtual memory system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scheduler&lt;/strong&gt; – add process structures and a round-robin (or any) scheduling algorithm.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Filesystem&lt;/strong&gt; – experiment with a basic in-memory filesystem or integrate FAT12/16 for disk I/O.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drivers&lt;/strong&gt; – simple keyboard, timer, and screen drivers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation &amp;amp; Tutorials&lt;/strong&gt; – improve explanations, add diagrams, or create step-by-step setup instructions for beginners.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’d like to contribute:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Fork the repository. — &lt;a href="https://github.com/uthsobcb/NoOS" rel="noopener noreferrer"&gt;https://github.com/uthsobcb/NoOS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Open a Pull Request.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>c</category>
      <category>assembly</category>
      <category>osdev</category>
      <category>os</category>
    </item>
    <item>
      <title>Understanding Web Servers by Building One in C</title>
      <dc:creator>Uthsob Chakraborty</dc:creator>
      <pubDate>Mon, 02 Jun 2025 16:18:47 +0000</pubDate>
      <link>https://forem.com/uthsob_cb/understanding-web-servers-by-building-one-in-c-1l3n</link>
      <guid>https://forem.com/uthsob_cb/understanding-web-servers-by-building-one-in-c-1l3n</guid>
      <description>&lt;p&gt;&lt;strong&gt;Web servers — the magical thing.&lt;/strong&gt;&lt;br&gt;
Is it really magical? Pretty much, yes. But let’s break down this magic today. For fun, I’ve built a basic one using C and the socket library. You can find the backstory and full code &lt;a href="https://github.com/uthsobcb/esspress/tree/main#a-web-server-built-with-c" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Before diving into code, let’s first understand: &lt;strong&gt;what is a web server?&lt;/strong&gt;&lt;/p&gt;



&lt;p&gt;By reading this blog, you're already interacting with a web server — specifically, the one hosting this blog. But how does it actually work?&lt;/p&gt;

&lt;p&gt;When you access this page through a browser, communication happens over &lt;strong&gt;HTTP (Hypertext Transfer Protocol)&lt;/strong&gt;.&lt;br&gt;
Your browser sends a request to a remote cloud server where the blog is hosted.&lt;br&gt;
The web server receives that request and responds with content — like an &lt;code&gt;index.html&lt;/code&gt; or &lt;code&gt;blog.html&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;This process is built on two main protocols:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TCP/IP&lt;/strong&gt; – for establishing connections and transmitting data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTTP&lt;/strong&gt; – for structuring the exchange of web content (pages, APIs, etc.).&lt;/li&gt;
&lt;/ul&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%2F4slpoxobyju5n9wh49l3.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%2F4slpoxobyju5n9wh49l3.png" alt="Process diagram" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sounds pretty simple, right?&lt;br&gt;
But what’s happening under the hood?&lt;/p&gt;

&lt;p&gt;Let’s explore this using a real example — a web server built using C. You can find the full code in the repo:&lt;br&gt;
 &lt;a href="https://github.com/uthsobcb/esspress/tree/main#a-web-server-built-with-c" rel="noopener noreferrer"&gt;https://github.com/uthsobcb/esspress&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Note: This server doesn’t use a real database — it reads from a &lt;code&gt;.txt&lt;/code&gt; file as a data source.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  Setting Up: Required Libraries
&lt;/h2&gt;

&lt;p&gt;Since we’ll interact with HTTP, sockets, and the network layer, we need to include the following C standard libraries:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt;&lt;span class="cpf"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
#include&lt;/span&gt;&lt;span class="cpf"&gt;&amp;lt;stdlib.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
#include&lt;/span&gt;&lt;span class="cpf"&gt;&amp;lt;string.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
#include&lt;/span&gt;&lt;span class="cpf"&gt;&amp;lt;sys/socket.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
#include&lt;/span&gt;&lt;span class="cpf"&gt;&amp;lt;netinet/in.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
#include&lt;/span&gt;&lt;span class="cpf"&gt;&amp;lt;unistd.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  1. Preparing the Response
&lt;/h2&gt;

&lt;p&gt;The server serves an HTML file (&lt;code&gt;index.html&lt;/code&gt;) as the homepage. First, we open the file, read its content, and attach it to a basic HTTP 200 response header.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;FILE&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;html_data&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;html_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fopen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"index.html"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"r"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;response_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="n"&gt;fgets&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response_data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;html_data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;http_header&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2048&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"HTTP/1.1 200 OK&lt;/span&gt;&lt;span class="se"&gt;\r\n\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;strcat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;http_header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;response_data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This builds a minimal HTTP response like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP/1.1 200 OK

&amp;lt;html&amp;gt;...&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  2. Setting Up the Server
&lt;/h2&gt;

&lt;p&gt;In this part, we define the server socket, specify the IP and port, and bind it to the machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;server_socket&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;server_socket&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;AF_INET&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SOCK_STREAM&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;sockaddr_in&lt;/span&gt; &lt;span class="n"&gt;server_address&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;server_address&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sin_family&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;AF_INET&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;server_address&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sin_port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;htons&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;8001&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;server_address&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sin_addr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;s_addr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;INADDR_ANY&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then bind the socket and start listening for connections:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="n"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;server_socket&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;sockaddr&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;server_address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;sizeof&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;server_address&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="n"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;server_socket&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look closely at this line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="n"&gt;server_address&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sin_port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;htons&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;8001&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We're serving the web on &lt;strong&gt;port 8001&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Receiving Requests and Sending Responses
&lt;/h2&gt;

&lt;p&gt;Inside an infinite loop, the server accepts incoming client connections and responds based on the requested path.&lt;/p&gt;

&lt;p&gt;For example, if the browser sends a request for &lt;code&gt;/&lt;/code&gt;, we return the HTML page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;strncmp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request_buffer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"GET / "&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client_socket&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;http_header&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;strlen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;http_header&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Similarly, when the client requests the &lt;code&gt;/data&lt;/code&gt; path, we read data from a &lt;code&gt;db.txt&lt;/code&gt; file and send it as plain text:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="nf"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;strncmp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request_buffer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"GET /data"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;FILE&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;db_file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fopen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"assets/db.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"r"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;...&lt;/span&gt;
    &lt;span class="n"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client_socket&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data_response&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;strlen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data_response&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And if the path is unknown, we send a standard 404 response.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This isn’t a production-ready server — it’s a learning project. But it does give you a crystal-clear understanding of how a browser talks to a server, how requests are handled, and how responses are structured.&lt;/p&gt;

&lt;p&gt;If you've made it this far, congrats — you now understand the &lt;strong&gt;core mechanism behind every website you’ve ever visited&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Feel free to clone, run, and even improve the project:&lt;br&gt;
&lt;a href="https://github.com/uthsobcb/esspress" rel="noopener noreferrer"&gt;https://github.com/uthsobcb/esspress&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webserver</category>
      <category>socket</category>
      <category>c</category>
      <category>server</category>
    </item>
    <item>
      <title>I Built an AI-Powered Journaling App That Understands Your Emotions — Meet Echo ☁️</title>
      <dc:creator>Uthsob Chakraborty</dc:creator>
      <pubDate>Fri, 11 Apr 2025 15:04:04 +0000</pubDate>
      <link>https://forem.com/uthsob_cb/i-built-an-ai-powered-journaling-app-that-understands-your-emotions-meet-echo-3a91</link>
      <guid>https://forem.com/uthsob_cb/i-built-an-ai-powered-journaling-app-that-understands-your-emotions-meet-echo-3a91</guid>
      <description>&lt;p&gt;Hey devs 👋&lt;br&gt;&lt;br&gt;
After months of building solo, I just launched my passion project — it’s called &lt;strong&gt;&lt;a href="https://www.my-echo.space/" rel="noopener noreferrer"&gt;Echo&lt;/a&gt;&lt;/strong&gt;, and it’s an emotional journaling app that adapts to how you feel.&lt;/p&gt;

&lt;p&gt;Let me tell you the story.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Why I Built Echo
&lt;/h2&gt;

&lt;p&gt;A few months ago, I hit a rough patch — burnout, overwhelm, total emotional fog. I stepped away from social media and started writing again. Just raw thoughts, emotional check-ins, mood scribbles. And it helped.&lt;/p&gt;

&lt;p&gt;But the more I journaled, the more I realized how disconnected digital tools were from real human feelings.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;Echo&lt;/strong&gt; — a journaling space that &lt;em&gt;feels&lt;/em&gt; like it’s listening.&lt;/p&gt;




&lt;h2&gt;
  
  
  ☁️ What Is Echo?
&lt;/h2&gt;

&lt;p&gt;Echo is a journaling app with a twist:&lt;br&gt;&lt;br&gt;
It features an emotional AI companion — a small, fluffy cloud — that reflects your moods visually and grows with your entries.&lt;/p&gt;

&lt;p&gt;✨ Features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Emotion-aware journaling prompts&lt;/li&gt;
&lt;li&gt;Mood tracking that adapts to your patterns&lt;/li&gt;
&lt;li&gt;Visual cloud that shifts shape based on your check-in&lt;/li&gt;
&lt;li&gt;AI insights from your writing (totally private, unless you opt-in for research)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  - Clean UI, privacy-first design, no selling data
&lt;/h2&gt;

&lt;h2&gt;
  
  
  ⚙️ How I Built It
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Stack:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frontend: &lt;code&gt;Next.js&lt;/code&gt;, &lt;code&gt;TailwindCSS&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Backend: &lt;code&gt;MongoDB&lt;/code&gt;, &lt;code&gt;NextAuth&lt;/code&gt;, &lt;code&gt;Gemini API&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;AI: &lt;code&gt;Gemini API&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Mood logic: Lightweight NLP + rule-based scoring, integrated with visuals
&lt;/li&gt;
&lt;li&gt;Hosting: &lt;code&gt;Vercel&lt;/code&gt;, &lt;code&gt;Resend&lt;/code&gt; for transactional emails
&lt;/li&gt;
&lt;li&gt;Image upload: &lt;code&gt;ImgBB&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And yes — I did it all solo. From UX to backend routes, from modal animations to content writing.&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 What Makes It Different?
&lt;/h2&gt;

&lt;p&gt;Most journaling apps either feel too clinical (like mental health checklists) or too plain (just a textarea).&lt;br&gt;&lt;br&gt;
Echo bridges the gap. It's expressive. It's private. And it treats journaling like a relationship — between you and your mind.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 It’s Live on Product Hunt
&lt;/h2&gt;

&lt;p&gt;I just launched Echo on Product hunt:&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://www.producthunt.com/posts/echo-e657689c-f521-42ce-9dec-904ae6fd47ac" rel="noopener noreferrer"&gt;https://www.producthunt.com/posts/echo-e657689c-f521-42ce-9dec-904ae6fd47ac&lt;/a&gt;&lt;br&gt;
Though Echo, couldn't gain lot of upvote or many user from product hunt (i will erite about this later) But still product hunt is a way to reach me If it resonates, I’d love your feedback, support, or just a kind word. Launching something solo is scary. But it’s also what makes it special.&lt;/p&gt;




&lt;p&gt;Thanks for reading! If you’ve ever thought of journaling — or building something that blends empathy + code — I’d love to chat.&lt;/p&gt;

&lt;h1&gt;
  
  
  buildinpublic #mentalhealth #ai #nextjs #solodev #echoapp
&lt;/h1&gt;

</description>
      <category>nextjs</category>
      <category>mentalhealth</category>
      <category>devjournal</category>
    </item>
    <item>
      <title>Creating an IoT Device Frontend: A High-Level Overview</title>
      <dc:creator>Uthsob Chakraborty</dc:creator>
      <pubDate>Sun, 27 Oct 2024 18:27:52 +0000</pubDate>
      <link>https://forem.com/uthsob_cb/creating-an-iot-device-frontend-a-high-level-overview-40ln</link>
      <guid>https://forem.com/uthsob_cb/creating-an-iot-device-frontend-a-high-level-overview-40ln</guid>
      <description>&lt;p&gt;Recently, I had the opportunity to work on a university project focused on building a &lt;strong&gt;Smart Dustbin&lt;/strong&gt;. Although I can't share specific code snippets or show the actual device nor the frontend screenshot due to project restrictions, I’m excited to provide a high-level overview of how the project was structured, the technologies we used, and the challenges we faced. Below, you’ll find the high-level architecture that guided our work:&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%2Fjlkgftlluvqkpvne9shw.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%2Fjlkgftlluvqkpvne9shw.png" alt="Data Flow" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Project Overview&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The idea behind the Smart Dustbin is simple yet powerful: to create an intelligent waste management system that monitors the fill level of a dustbin, measures various environmental parameters, and alerts stakeholders when the dustbin needs to be emptied. Here's how we approached the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Tech Stack Breakdown&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Our project was divided into three main components: the IoT device, the server, and the frontend dashboard. Let’s dive into the details of each component:&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;1. IoT Device&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The IoT device was designed and managed by a friend of mine, who did a fantastic job handling the hardware aspect of the project. Here's what was involved:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hardware&lt;/strong&gt;: We used a NodeMCU microcontroller, which provides built-in Wi-Fi support, making it ideal for connecting to the MQTT server. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Programming Language&lt;/strong&gt;: The entire code for the device was written in &lt;strong&gt;C++&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Transmission&lt;/strong&gt;: The NodeMCU collected data such as trash level, gas concentrations (CO2, O2, NH4), and GPS coordinates. This data was then sent to an MQTT server over a wireless connection.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;2. Server&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The server played a pivotal role in our project. Its main functions were to manage real-time data, store it in a database, and communicate with the frontend.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Server Setup&lt;/strong&gt;: We used &lt;strong&gt;Node.js&lt;/strong&gt; to build the server, which allowed us to handle multiple connections efficiently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-Time Communication&lt;/strong&gt;: For real-time data updates, we leveraged &lt;strong&gt;Socket.IO&lt;/strong&gt;, enabling the server to push data directly to the frontend.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database &amp;amp; Authentication&lt;/strong&gt;: We chose &lt;strong&gt;Firebase&lt;/strong&gt; as our backend service for both data storage and authentication. Firebase's flexibility allowed us to store sensor readings and manage user authentication seamlessly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;3. Frontend&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The frontend was the core of the project, where most of the data visualization and user interactions were handled. It involved extracting meaningful data from server responses and presenting it in a user-friendly manner.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data Handling&lt;/strong&gt;: The server sent a &lt;strong&gt;string&lt;/strong&gt; of data through MQTT and Socket.IO. I extracted the necessary information and stored it in variables for further processing.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Data Visualization&lt;/strong&gt;: The data received from the device and server included:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Level of Trash&lt;/strong&gt;: Displayed using a &lt;strong&gt;gauge meter&lt;/strong&gt; to visually represent how full the dustbin was.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Coordinates (Latitude and Longitude)&lt;/strong&gt;: Used to pinpoint the exact location of the dustbin on a map.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gas Levels (CO2, O2, NH4)&lt;/strong&gt;: Each gas level was shown in separate sections using individual gauge meters for clarity.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Key Functionalities&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Trash Level Monitoring&lt;/strong&gt;: The trash level was constantly checked to see if it exceeded 75%. If it did, an automated email was triggered to notify the relevant parties, including the current location of the dustbin.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mapping&lt;/strong&gt;: Using the &lt;strong&gt;Leaflet.js&lt;/strong&gt; library, I integrated the latitude and longitude data to display the dustbin's location on an interactive map using OpenStreetMap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gas Monitoring&lt;/strong&gt;: Each gas sensor reading was visualized using distinct gauges to allow easy monitoring of environmental parameters.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Challenges and Solutions&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Parsing String Data&lt;/strong&gt;: The server sent data as a single string, so I had to develop custom logic to parse it and extract each data type (trash level, coordinates, gas levels). Careful parsing was crucial for maintaining data accuracy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Real-Time Updates&lt;/strong&gt;: Displaying real-time data while ensuring smooth user interaction was challenging. Leveraging Socket.IO allowed me to deliver instantaneous updates without affecting the UI's responsiveness.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visualizing Sensor Data&lt;/strong&gt;: Making sensor data comprehensible required well-thought-out visual elements. Using gauge meters provided an intuitive way to present real-time changes, especially for trash levels and gas concentrations.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Results and Achievements&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The final product was a fully functioning Smart Dustbin system that provided live updates on the trash fill level, monitored various environmental parameters, and used map integration to show its exact location. Here's a summary of what we achieved:&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%2Fssrsqfkeim04rsihepol.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%2Fssrsqfkeim04rsihepol.png" alt="Image description" width="800" height="409"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is how it looks. As i mentioned earlier i can't really add device picture nor the code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Data Monitoring&lt;/strong&gt;: Real-time monitoring of trash levels and gas concentrations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Alerts&lt;/strong&gt;: Email notifications when the trash level exceeded a certain threshold.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Geolocation Tracking&lt;/strong&gt;: Real-time location updates of the dustbin on an interactive map.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User-Friendly Dashboard&lt;/strong&gt;: A clean and informative UI that made it easy to monitor and manage data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This project was a fantastic opportunity to work with real-time data and build an IoT application from the ground up. It provided valuable hands-on experience with technologies like MQTT, Node.js, Socket.IO, Firebase, and React. Each component brought unique challenges, but by leveraging the strengths of each technology, we were able to create a seamless system that effectively managed and displayed real-time IoT data.&lt;/p&gt;

&lt;p&gt;Building a Smart Dustbin might sound simple, but the complexity lies in ensuring all the moving parts work together efficiently. It was an enriching project, and I hope this overview gives you an idea of how you can approach similar IoT projects with a real-time data focus.&lt;/p&gt;

</description>
      <category>iot</category>
      <category>react</category>
      <category>mqtt</category>
      <category>socket</category>
    </item>
    <item>
      <title>How to find problem in Codeforces</title>
      <dc:creator>Uthsob Chakraborty</dc:creator>
      <pubDate>Sun, 24 Dec 2023 09:55:17 +0000</pubDate>
      <link>https://forem.com/uthsob_cb/how-to-find-problem-in-codeforces-1ll4</link>
      <guid>https://forem.com/uthsob_cb/how-to-find-problem-in-codeforces-1ll4</guid>
      <description>&lt;p&gt;Hello, nice people! How are you? I hope everything is well. &lt;/p&gt;

&lt;p&gt;As a programmer, I hope you are already familiar with Codeforces. If you don’t know about Codeforces, well, it is an online judge where you can find and solve programming problems by running your code. The online judge will then display the result, and this is the primary function of an online judge. Codeforces is a popular online judge, boasting over 14000 registered Bangladeshi problem solvers.&lt;/p&gt;

&lt;p&gt;When you visit &lt;a href="https://codeforces.com/problemset" rel="noopener noreferrer"&gt;Codeforces problemset&lt;/a&gt;, you will find a list of all problems. If you are a beginner in problem-solving and come across a problem, you might feel intimidated by programming. However, don't worry because you may encounter challenging problems as well as easier ones. While you're here, you don't need to feel tense because we are here to help you.&lt;/p&gt;

&lt;p&gt;Now, let's get to the main point. When you visit Codeforces problems, you will initially find them in the default order.&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%2Fo98iiexn7s5mtulnb4e9.jpg" 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%2Fo98iiexn7s5mtulnb4e9.jpg" alt="Image description" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To make it easier, you can sort these problems in three ways.&lt;/p&gt;

&lt;p&gt;Way 1: Difficulty Sorting:&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%2Fast53705qrsz5318c2tc.jpg" 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%2Fast53705qrsz5318c2tc.jpg" alt="Image description" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click here, and you will find problems sorted by difficulty. Initially, it will display hard to easy problems. Check the problem difficulty; if it is &amp;lt;3500, it is considered a hard problem. Click the sign again, and it will arrange them from easy to hard. Now you can find a suitable problem for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Way 2: Sorting by Most Solved:&lt;/strong&gt;&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%2Fofrup0y4s15vuz2v4cie.jpg" 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%2Fofrup0y4s15vuz2v4cie.jpg" alt="Image description" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click here, and it will sort problems by the most accepted solutions by users. If many people have tried a problem, it might be easier. This way, you can find a suitable problem for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Way 3: Sort with Rating and Tags:&lt;/strong&gt;&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%2Fm8d3amab7pweo8f2cqoc.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%2Fm8d3amab7pweo8f2cqoc.png" alt="Image description" width="412" height="533"&gt;&lt;/a&gt;&lt;br&gt;
In the first blank box, you can input the minimum rating of the problem, and in the second box, you can input the maximum rating of the problem. For example:&lt;/p&gt;

&lt;p&gt;You can also add tags for topics you have recently learned, such as math, binary search, dp, etc.&lt;/p&gt;

&lt;p&gt;I hope these methods will help you find a problem that suits your skill level. Now you can start solving problems. Don't give up, and best of luck!&lt;/p&gt;

&lt;h1&gt;
  
  
  Happy_Problem_Solving
&lt;/h1&gt;

&lt;p&gt;August 2019&lt;/p&gt;

&lt;p&gt;[Important Footnote: This note/article was written in 2019; when i started my coding journey. So my written was not polished and did lot of mistake back then. I haven't got any time to rewrite this article. So posting all this in this forum blog post. I believe still this post would help a lot of newcommers. &lt;br&gt;
Uthsob]&lt;/p&gt;

</description>
      <category>codeforces</category>
      <category>cp</category>
      <category>competativeprogramming</category>
    </item>
    <item>
      <title>Advent of Code: Intro to Programming Puzzles and Problem-Solving Delights</title>
      <dc:creator>Uthsob Chakraborty</dc:creator>
      <pubDate>Thu, 30 Nov 2023 13:22:10 +0000</pubDate>
      <link>https://forem.com/uthsob_cb/advent-of-code-intro-to-programming-puzzles-and-problem-solving-delights-3bhk</link>
      <guid>https://forem.com/uthsob_cb/advent-of-code-intro-to-programming-puzzles-and-problem-solving-delights-3bhk</guid>
      <description>&lt;p&gt;Advent of Code is an annual programming event that takes place in the month of December. It starts from &lt;em&gt;December 1 and Ends on the 25th&lt;/em&gt;. It consists of 25 small programming puzzles that are released one day at a time. The puzzles are designed to be challenging but solvable, and they cover a wide range of topics, from algorithms and data structures to mathematics and cryptography.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How does Advent of Code work?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To participate in Advent of Code, you will need to create an account on the Advent of Code website. Once you have an account, you can log in each day to view the new puzzle. Each puzzle consists of a description of the problem and a set of input data. Your task is to write a program that produces the correct output for the given input data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why to participate in Advent of Code?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Advent of Code is not a competition with others. Rather its a game for programmer.As mentioned earlier, it's just puzzle-solving with programming. By solving complex puzzle you can sharp your brain for learning complex things. You will learn new algorithms and data structures and improve your problem-solving and complex thinking skill. This teaches not only how to code well but also how to think well. Advent of Code is mainly designed for getting into spirit of coding in holiday. Since it's designed for the holiday season, many people learn new programming languages and apply their knowledge by solving puzzles.  And most importantly AOC(Advent of Code)  make us realize that code is for fun and how to enjoy coding.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What makes different than Competitive Programming:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Competitive programming and Advent of Code are both programming events, but they have different goals and formats. Competitive programming is a sport in which programmers compete to solve algorithmic problems as quickly and efficiently as possible. AOC is a more casual event that is designed to be fun and accessible to programmers of all skill levels.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to Participate:&lt;/strong&gt;&lt;br&gt;
Advent of Code is a web-based event that is open to anyone who can write code. There is no registration or fee required to participate. The puzzles are released at midnight UTC each day, and you have until the next day to submit your solution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to participate in Advent of Code:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you are interested in participating in Advent of Code, the first thing you need to do is create an account on the Advent of Code website &lt;a href="https://adventofcode.com/" rel="noopener noreferrer"&gt;https://adventofcode.com/&lt;/a&gt;  Once you have an account, you can log in each day to view the new puzzle.&lt;/p&gt;

&lt;p&gt;Here are some additional tips for getting started with Advent of Code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Choose a programming language that you are comfortable with.&lt;/strong&gt; You can use any programming language that you like, but it is important to choose a language that you are familiar with. This will make it easier to focus on solving the puzzles, rather than on learning a new language.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Start with the early puzzles.&lt;/strong&gt; The early puzzles are typically easier than the later puzzles. This will give you a chance to get used to the format of the puzzles and to learn the basic concepts that you will need to solve the later puzzles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't be afraid to ask for help.&lt;/strong&gt; If you are stuck on a puzzle, don't be afraid to ask for help. There are many online forums and communities where you can ask for help from other participants.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check previous years puzzles&lt;/strong&gt; To get complete idea of the format of Advent of Code and get started grinding you should check out old puzzles first. To checkout old problems- 
&lt;a href="https://adventofcode.com/2022/" rel="noopener noreferrer"&gt;https://adventofcode.com/2022/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So Start your Adventure on Coding Puzzles with Advent of Code. I wish you best of luck.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy coding!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>adventofcode</category>
      <category>programming</category>
      <category>puzzle</category>
    </item>
    <item>
      <title>Decoding DALL-E 3: Unraveling the Text-to-Art Algorithm</title>
      <dc:creator>Uthsob Chakraborty</dc:creator>
      <pubDate>Sat, 11 Nov 2023 14:19:22 +0000</pubDate>
      <link>https://forem.com/uthsob_cb/decoding-dall-e-3-unraveling-the-text-to-art-algorithm-16co</link>
      <guid>https://forem.com/uthsob_cb/decoding-dall-e-3-unraveling-the-text-to-art-algorithm-16co</guid>
      <description>&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%2Flgoe0qkm6303ss82nr63.jpg" 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%2Flgoe0qkm6303ss82nr63.jpg" alt="A robot is saying - " width="800" height="800"&gt;&lt;/a&gt; &lt;br&gt;
Today spotlighting the marvels of DALL-E 3, the AI that transforms words into stunning visuals.&lt;/p&gt;

&lt;p&gt;You might have experimented with DALL-E 2, or at least you’ve heard about it. To jog your memory, DALL-E 2 is a state-of-the-art "text-to-image" generation AI developed by OpenAI. It has the uncanny ability to convert textual descriptions into images that can be astonishingly lifelike. If you are curious about the inner workings of this AI and how it crafts images that almost defy reality, I recommend giving this article a read—though it's currently penned in Bengali. &lt;a href="https://dev.to/uthsob_cb/dall-e2-yebhaabe-baastber-mto-chbi-aanke-2b11"&gt;Dev.to Bengali Article on DALL-E 2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The process is straightforward yet awe-inspiring: you provide a text prompt, and DALL-E 2 generates an image in response. For instance, for the prompt “A cat is playing guitar, a digital art”, DALL-E 2 conjured up this creative piece of digital art: &lt;br&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%2F68igf5e3q0dc94jj3ehk.jpeg" 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%2F68igf5e3q0dc94jj3ehk.jpeg" alt="Generated with DALL-E 2, Prompt: A Cat is playing guitar" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;(Generated with DALL-E 2, Prompt: A Cat is playing guitar)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Despite its brilliance, DALL-E 2 had its share of limitations, notably the challenge of incorporating text within the images it created. That's where its successor comes into play. OpenAI's recent announcement of DALL-E 3 has brought an exciting development: the ability to draw text within art.&lt;br&gt;
But how does DALL-E 3 accomplish this feat? Let's dive into the technical symphony behind DALL-E 3's new capability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Encoding and Latent Spaces
&lt;/h2&gt;

&lt;p&gt;The first step involves encoding the text into a "latent space". Think of this space as a complex map that captures the essence of the text’s meaning. This encoded information then guides the image generation process, ensuring that text elements are incorporated accurately.&lt;/p&gt;

&lt;p&gt;And this is a visual representation of latent space-&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%2Fvcjpfpxbgjhzvuo4t96d.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%2Fvcjpfpxbgjhzvuo4t96d.png" alt="Latent Space" width="600" height="329"&gt;&lt;/a&gt;&lt;br&gt;
But here instead of taking image as input it take and work with Text and convert to image.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Role of Attention Mechanisms
&lt;/h2&gt;

&lt;p&gt;At the heart of DALL-E 3's capability to draw text is a mechanism known as "attention". This mechanism empowers the AI to zoom in on specific portions of the text during the image creation process. When the prompt includes text, like "a cat with the word 'meow' written on it", the model hones in on "meow" to ensure it appears naturally and consistently within the image.&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%2F7jj9mnowaiaez8um5gy5.jpg" 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%2F7jj9mnowaiaez8um5gy5.jpg" alt="A cat is saying " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A cat is saying "Meow" Generated by DALL-E 3&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Back-Translation for Contextual Understanding
&lt;/h2&gt;

&lt;p&gt;To deepen its grasp of textual context, DALL-E 3 employs "back-translation". This process translates the text into a different language and then back again. This roundabout translation enriches the AI’s understanding of the text's meaning, providing a more nuanced interpretation that can be conveyed visually&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%2Fqcn883pzaioj9ccfn8jf.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%2Fqcn883pzaioj9ccfn8jf.png" alt="Image description" width="800" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;(Visual Representaion of Attention Mechanism)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Combining Technologies for Enhanced Creativity
&lt;/h2&gt;

&lt;p&gt;By integrating attention mechanisms, back-translation, and the sophisticated use of latent spaces, DALL-E 3 is not just a text-to-image model but a conduit for complex and realistic visual storytelling. It's a step forward in AI creativity, one that expands the horizons of what we can imagine and bring to visual life with mere words.&lt;/p&gt;

</description>
      <category>dalle3</category>
      <category>ai</category>
      <category>text2image</category>
    </item>
    <item>
      <title>Awesome Developer Program for students</title>
      <dc:creator>Uthsob Chakraborty</dc:creator>
      <pubDate>Thu, 07 Sep 2023 15:59:48 +0000</pubDate>
      <link>https://forem.com/uthsob_cb/awesome-developer-program-for-students-271g</link>
      <guid>https://forem.com/uthsob_cb/awesome-developer-program-for-students-271g</guid>
      <description>&lt;p&gt;As an undergrad student you should explore your opportunity over the internet to grow your network. Here is an awesome list of developer/volunteer programs for students. Apply and grow your network. Make your network networth.&lt;br&gt;
I made a list of few developer program/volunteer program so you don't have to search it for everywhere.&lt;/p&gt;

&lt;p&gt;TensorFlow User Group - &lt;a href="https://www.tensorflow.org/community/groups" rel="noopener noreferrer"&gt;https://www.tensorflow.org/community/groups&lt;/a&gt;&lt;br&gt;
Gitlab Heros - &lt;a href="https://about.gitlab.com/community/heroes/" rel="noopener noreferrer"&gt;https://about.gitlab.com/community/heroes/&lt;/a&gt;&lt;br&gt;
Github Campus Experts - &lt;a href="https://education.github.com/experts" rel="noopener noreferrer"&gt;https://education.github.com/experts&lt;/a&gt;&lt;br&gt;
Cloud Native Bangladesh - &lt;a href="https://community.cncf.io/cloud-native-bangladesh/" rel="noopener noreferrer"&gt;https://community.cncf.io/cloud-native-bangladesh/&lt;/a&gt; (this link is for Bangladesh only but there are global program also. check out in their website)&lt;br&gt;
AWS Community Builder - &lt;a href="https://aws.amazon.com/developer/community/community-builders/" rel="noopener noreferrer"&gt;https://aws.amazon.com/developer/community/community-builders/&lt;/a&gt;&lt;br&gt;
GitKraken Ambassador - &lt;a href="https://www.gitkraken.com/ambassador" rel="noopener noreferrer"&gt;https://www.gitkraken.com/ambassador&lt;/a&gt;&lt;br&gt;
Hackclub- &lt;a href="https://hackclub.com/" rel="noopener noreferrer"&gt;https://hackclub.com/&lt;/a&gt;&lt;br&gt;
Auth 0 Ambassador - &lt;a href="https://auth0.com/ambassador-program" rel="noopener noreferrer"&gt;https://auth0.com/ambassador-program&lt;/a&gt;&lt;br&gt;
Postman ambassador - &lt;a href="https://www.postman.com/student-program/student-leader/" rel="noopener noreferrer"&gt;https://www.postman.com/student-program/student-leader/&lt;/a&gt;&lt;br&gt;
KodeKloud Ambassador - &lt;a href="https://kodekloud.com/pages/ambassador-program" rel="noopener noreferrer"&gt;https://kodekloud.com/pages/ambassador-program&lt;/a&gt;&lt;br&gt;
Gold Microsoft Learn Student Ambassador - &lt;a href="https://mvp.microsoft.com/studentambassadors" rel="noopener noreferrer"&gt;https://mvp.microsoft.com/studentambassadors&lt;/a&gt;&lt;br&gt;
AWS Cloud Club - &lt;a href="https://aws.amazon.com/developer/community/students/cloudclubs/?community-captains-all.sort-by=item.additionalFields.sortPosition&amp;amp;community-captains-all.sort-order=asc&amp;amp;awsf.filter-location=*all&amp;amp;awsf.filter-year=*all" rel="noopener noreferrer"&gt;https://aws.amazon.com/developer/community/students/cloudclubs/?community-captains-all.sort-by=item.additionalFields.sortPosition&amp;amp;community-captains-all.sort-order=asc&amp;amp;awsf.filter-location=*all&amp;amp;awsf.filter-year=*all&lt;/a&gt;&lt;br&gt;
Facebook Developer Circles - &lt;a href="https://www.developers.facebook.com/developercircles/join/" rel="noopener noreferrer"&gt;https://www.developers.facebook.com/developercircles/join/&lt;/a&gt;&lt;br&gt;
Apple WWDC Scholarships- &lt;a href="https://developer.apple.com/wwdc23/swift-student-challenge/" rel="noopener noreferrer"&gt;https://developer.apple.com/wwdc23/swift-student-challenge/&lt;/a&gt;&lt;br&gt;
IBM Students Z Ambassador- &lt;a href="https://community.ibm.com/community/user/ibmz-and-linuxone/blogs/melissa-sassi1/2021/08/11/z-ambassador-cohort-2-call-for-applications" rel="noopener noreferrer"&gt;https://community.ibm.com/community/user/ibmz-and-linuxone/blogs/melissa-sassi1/2021/08/11/z-ambassador-cohort-2-call-for-applications&lt;/a&gt;&lt;br&gt;
Adobe Creative Residency Community Fund- &lt;br&gt;
&lt;a href="https://www.adobe.com/about-adobe/creative-residency/community-fund.html" rel="noopener noreferrer"&gt;https://www.adobe.com/about-adobe/creative-residency/community-fund.html&lt;/a&gt;&lt;br&gt;
Trailblazer Connect-&lt;br&gt;
&lt;a href="https://trailhead.salesforce.com/trailblazerconnect/" rel="noopener noreferrer"&gt;https://trailhead.salesforce.com/trailblazerconnect/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you know any other program please comment down below. I will add this on. Thanks&lt;/p&gt;

</description>
      <category>developer</category>
      <category>eca</category>
      <category>student</category>
      <category>oppourtinity</category>
    </item>
    <item>
      <title>How to Add an SSH Key for GitHub on Linux</title>
      <dc:creator>Uthsob Chakraborty</dc:creator>
      <pubDate>Fri, 01 Sep 2023 07:54:12 +0000</pubDate>
      <link>https://forem.com/uthsob_cb/how-to-add-an-ssh-key-for-github-on-linux-54ka</link>
      <guid>https://forem.com/uthsob_cb/how-to-add-an-ssh-key-for-github-on-linux-54ka</guid>
      <description>&lt;p&gt;GitHub is a popular platform for version control and collaborative software development. To securely access and interact with your GitHub repositories from a Linux machine, you can use SSH keys for authentication. This article will guide you through the process of generating and adding an SSH key to your GitHub account on a Linux system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Check for Existing SSH Keys:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before generating a new SSH key, it's essential to check if you already have one. Open a terminal and use the following command to list your SSH keys:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; ~/.ssh/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you see files named &lt;code&gt;id_rsa&lt;/code&gt; or &lt;code&gt;id_dsa&lt;/code&gt; in the output, you likely already have SSH keys. You can skip to Step 4 to add your existing key to GitHub. If not, continue to generate a new SSH key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Generate a New SSH Key:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To generate a new SSH key, open a terminal and enter the following command, replacing &lt;code&gt;&amp;lt;your_email@example.com&amp;gt;&lt;/code&gt; with the email associated with your GitHub account:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; ed25519 &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"&amp;lt;your_email@example.com&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use the RSA algorithm (&lt;code&gt;-t rsa&lt;/code&gt;) instead of Ed25519 if you prefer.&lt;/p&gt;

&lt;p&gt;The command will prompt you to choose a location to save the key (press Enter to accept the default location &lt;code&gt;~/.ssh/id_ed25519&lt;/code&gt; or specify a different location) and set a passphrase for added security. Make sure to remember this passphrase or store it securely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Add the SSH Key to SSH-Agent:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To ensure your SSH key is actively used, add it to the SSH-Agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;ssh-agent &lt;span class="nt"&gt;-s&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
ssh-add ~/.ssh/id_ed25519
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;~/.ssh/id_ed25519&lt;/code&gt; with the path to your generated SSH key if it's different.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Add the SSH Key to GitHub:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Log in to your GitHub account.&lt;/li&gt;
&lt;li&gt;Click on your profile picture in the upper-right corner and select "Settings."&lt;/li&gt;
&lt;li&gt;In the left sidebar, click on "SSH and GPG keys."&lt;/li&gt;
&lt;li&gt;Click the "New SSH key" button.&lt;/li&gt;
&lt;li&gt;Provide a title for your SSH key (e.g., "Linux Workstation") and paste your public key (usually found in &lt;code&gt;~/.ssh/id_ed25519.pub&lt;/code&gt;) into the "Key" field.&lt;/li&gt;
&lt;li&gt;Click the "Add SSH key" button.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Test the SSH Key:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To make sure your SSH key is working correctly, run the following command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh &lt;span class="nt"&gt;-T&lt;/span&gt; git@github.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You may see a warning message regarding authenticity; type "yes" to confirm. If everything is set up correctly, you should receive a "Hi ! You've successfully authenticated..." message.&lt;/p&gt;

&lt;p&gt;Adding an SSH key for GitHub on a Linux system enhances the security and convenience of accessing your repositories. By following the steps outlined in this article, you can securely connect to your GitHub account, making it easier to manage your code and collaborate with others in the GitHub community.&lt;/p&gt;

</description>
      <category>github</category>
      <category>ssh</category>
      <category>linux</category>
    </item>
    <item>
      <title>DALL-E:2 যেভাবে বাস্তবের মতো ছবি আঁকে?</title>
      <dc:creator>Uthsob Chakraborty</dc:creator>
      <pubDate>Wed, 24 May 2023 09:54:35 +0000</pubDate>
      <link>https://forem.com/uthsob_cb/dall-e2-yebhaabe-baastber-mto-chbi-aanke-2b11</link>
      <guid>https://forem.com/uthsob_cb/dall-e2-yebhaabe-baastber-mto-chbi-aanke-2b11</guid>
      <description>&lt;p&gt;নিচের যেসব ছবিগুলা দেখছেন এগুলা কিন্তু কোনো মানুষ আঁকেনি বা বানায় নি সবগুলো কৃত্রিম বুদ্ধিমত্তা দিয়ে তৈরি করা হয়েছে। শুধু একটা বর্ণনা দেয়া হয়েছে কেমন ছবি চাই বাকিটা কৃত্রিম বুদ্ধিমত্তা বা এআই(AI) এঁকে দিয়েছে। এখানে থাকা ছবিগুলা Open AI এর সর্বশেষ রোবট বা এআই(AI) DALL-E 2 দিয়ে জেনারেট করা।&lt;br&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%2F74pb93kfcehc93def7ok.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%2F74pb93kfcehc93def7ok.png" alt="Cat Playing Guitar" width="800" height="800"&gt;&lt;/a&gt;&lt;br&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%2Fpv3k8sqryz9sv14fbp2p.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%2Fpv3k8sqryz9sv14fbp2p.png" alt="Panda playing kung fu in the Moon and looking at earth" width="800" height="800"&gt;&lt;/a&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%2Fodg5zkt6jqpzs0hfwple.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%2Fodg5zkt6jqpzs0hfwple.png" alt="Astronaut playing with cats and balls in space" width="800" height="800"&gt;&lt;/a&gt;&lt;br&gt;
প্রথমেই DALL-E এর নাম সম্পর্কে বলি DALL-E নাম টা মুলত বিখ্যাত স্প্যানিশ আর্টিস্ট &lt;strong&gt;Salvador Dalí&lt;/strong&gt; এবং ২০০৮ এ মুক্তি Disney এর থেকে মুক্তি পাওয়া Wall-E নাম দুটি থেকে বানানো হয়েছেে। এটি Wall-E এর মতোই একটি কৃত্রিম বুদ্ধিমত্তা সম্পন্ন রোবট এবং একই সাথে ভালো আর্টিস্ট সে হিসেবে এই নামটি ব্যাবহার করা হয়েছে।&lt;/p&gt;

&lt;p&gt;২০২১ এর প্রথম দিকে DALL-E সম্পর্কে প্রথম ঘোষনা করে OpenAI। তখনও সেটা কারো পরীক্ষার জন্য উন্মুক্ত করে নি OpenAI। তবে এবছর OpenAI DALL-E 2 নামে এর সর্বশেষ ভার্সন প্রকাশ করে। এবং এবারই প্রথম যেখানে ডেভেলপার,আর্টিস্ট,ইনফ্লুয়েন্সারদের DALL-E 2 পরীক্ষা করার জন্য আমন্ত্রণ পাঠায়। এখনো সর্বসাধারনের জন্য উন্মুক্ত করেনি OpenAI।&lt;/p&gt;

&lt;p&gt;এই রোবটটি  অনেক ক্ষেত্রে মানুষের থেকে ভালো ছবি আঁকে। চলুন জেনে নেই কিভাবে এই কঠিন কাজটি করে DALL-E 2।&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;কিভাবে আঁকল?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;আপনার দেয়া ডেস্ক্রিপশন বা বর্ণনা অনুযায়ী প্রয়োজনীয় ছবি গুলা আগে বুঝার চেষ্টা করে। মনে করুন আমার ডেস্ক্রিপশন হলো- &lt;/p&gt;

&lt;p&gt;“A penguin riding a scooter in Dhaka City” আগে সে তার ডেটা সেট থেকে খুজে অব্জেক্টিফাই করার চেষ্টা করে কোনটা কী?&lt;/p&gt;

&lt;p&gt;যেমন- একটা পেনগুইন আসলে দেখতে কেম্ন?&lt;br&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%2Fudxmj13xh429pqic4vho.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%2Fudxmj13xh429pqic4vho.png" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;br&gt;
স্কুটার কি? ঢাকা শহর দেখতে কেমন? স্কুটারে চড়ে কিভাবে?&lt;br&gt;
আপনার দেয়া কি-ওয়ার্ড থেকে  DALL-E 2  একটি &lt;strong&gt;টেক্সট এনকোডার&lt;/strong&gt; এর মাধ্যমে এনকোড করে। তারপর ডেস্ক্রিপশন অনুযায়ী বস্তুগুলোকে চিহ্নিত করে একটি মানচিত্র বা ম্যাপ জেনারেট করে। ম্যাপ থেকে একটি ছবি তৈরি করে এআই টি এই প্রক্রিয়ার নাম &lt;strong&gt;prior&lt;/strong&gt; &lt;br&gt;
এই &lt;strong&gt;prior&lt;/strong&gt; থেকে একটা প্রকৃত ছবিতে রুপান্তর করতে একটি &lt;strong&gt;image decoder&lt;/strong&gt; কাজ করে&lt;br&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%2F7uxfc0qakrvwevhuiovk.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%2F7uxfc0qakrvwevhuiovk.png" alt="Image description" width="800" height="247"&gt;&lt;/a&gt;&lt;br&gt;
ডিকোডার টি ব্যাসিকালি সব ছবিকে এম্বেড করার চেষ্টা করে। এম্বেড হলো কি-ওয়ার্ডগুলোকে একটা ম্যাথমেটিকাল রুপ বা ভেক্টরে রুপ দেয়ার চেষ্টা করা। সেই থেকে একটি ইমেজ ম্যাপ তৈরী করে।&lt;/p&gt;

&lt;p&gt;এ প্রক্রিয়ায় কাজ করে &lt;strong&gt;CLIP (Contrastive Language-Image Pre-training)&lt;/strong&gt; নামে &lt;strong&gt;OpenAI&lt;/strong&gt; এর আরেকটি মডেল। যার কাজ হলো কোনো ছবির জন্য একটা সঠিক ও মানানসই ক্যাপশন দেয়া। যেটাকে মুলত আমরা &lt;strong&gt;DALL-E 2&lt;/strong&gt; এর করা কাজ এর উল্টা প্রক্রিয়াও বলতে পারি। CLIP মুলত দুটি নিউরাল নেটওয়ার্ক দিয়ে তৈরি। একটি টেক্সট এনকোডার এবং আরেকটি ইমেজ এনকোডার। CLIP কে এক বিশাল ছবি ও তার ক্যাপশনের ডেটাসেট দ্বারা ট্রেইন করা হয়।&lt;/p&gt;

&lt;p&gt;একটা উদাহরণ দেই- যখন আমরা ইন্সটাগ্রাম বা ফেসবুকে একটা পেনগুইন এর ছবি দিয়ে ক্যাপশন দেই “A Penguin”  &lt;strong&gt;CLIP&lt;/strong&gt;  সেই ক্যাপশন অনুযায়ী ট্রেইন হয় আসলে একটি পেংগুইন আসলে দেখতে কেমন। &lt;/p&gt;

&lt;p&gt;ট্রেইন হওয়া &lt;strong&gt;CLIP&lt;/strong&gt; মডেলটি  &lt;strong&gt;prior&lt;/strong&gt; প্রক্রিয়ায় পাওয়া টেক্সটগুলোর সাথে মিলিয়ে বস্তুগুলোকে নিউরাল নেটওয়ার্কের মাধ্যমে সাবজেক্ট,আর্ট স্টাইল বা টেক্সচার, স্কেল, সম্পর্ক এবং দুরত্ব পরিমাপ করে সমগ্র আর্টের একটি মানচিত্র বা ম্যাপ জেনারেট করে ম্যাপ থেকে *&lt;strong&gt;&lt;em&gt;Visual Semantics&lt;/em&gt;&lt;/strong&gt;* তৈরি করে। এই ভিজ্যুয়াল সিমান্টিক্স কে ছবিতে রুপান্তরের কাজটি করে &lt;strong&gt;GLIDE&lt;/strong&gt; নামের আরেকটি মডেল। যার কাজ &lt;strong&gt;CLIP&lt;/strong&gt; এর ভিজ্যুয়াল সিম্যান্টিক্স থেকে সর্বোচ্চ গ্রহনযোগ্য ছবিতে রুপান্তর করা। &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GLIDE&lt;/strong&gt;  আবার আবার কাজ করে ডিফিউশন বা &lt;strong&gt;diffusion&lt;/strong&gt; মডেল ব্যবহার করে।&lt;/p&gt;

&lt;p&gt;এই &lt;strong&gt;diffusion&lt;/strong&gt; জিনিসটা আবার কি? পদার্থবিজ্ঞানের তাপগতিবিদ্যার থেকে অনুপ্রাণিত হওয়া একটি মডেল। এর কাজ  &lt;strong&gt;CLIPE&lt;/strong&gt; এর দেওয়া ডাটা অনুসারে আস্তে আস্তে ছবিতে &lt;em&gt;noise&lt;/em&gt; যুক্ত করতে থাকে। এই &lt;em&gt;noise&lt;/em&gt; যুক্ত করা চলে &lt;em&gt;Gaussian Noise&lt;/em&gt; হওয়া &lt;strong&gt;পর্যন্ত তার পর সেটি রিভার্স প্রক্রিয়ায় পুনরায় &lt;em&gt;De-noising&lt;/em&gt; করা হয়। ফলে এক পর্যায়ে এটি একটি পরিষ্কার ও সুন্দর ছবি দিতে সক্ষম হয়।&lt;br&gt;
**diffusion&lt;/strong&gt; মডেল টি মূলত &lt;strong&gt;GLIDE&lt;/strong&gt; কে ট্রেনিং করানোতে কাজে লাগে। ট্রেইনড হলে সে ডেটাসেটের বাইরে নিজেই কিছু ছবি জেনারেট করতে পারে। যেমন আপনি যখন অবাস্তব কিছু ডেস্ক্রিপশন এ লিখবেন সেটি সে এই মডেলের মাধ্যমে সেই জিনিসটা আসলে কেমন তার একটা রেফারেন্স নিয়ে নতুন ছবি তৈরী করবে। &lt;br&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%2Fc2245sbjrzs0rjt63tti.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%2Fc2245sbjrzs0rjt63tti.png" alt="Image description" width="800" height="128"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;DALL-E 2&lt;/strong&gt; এখানে &lt;strong&gt;GLIDE&lt;/strong&gt; এর মার্জিত সংস্করণ ব্যবহার করে। মার্জিত &lt;strong&gt;GLIDE&lt;/strong&gt; মডেল সর্বোচ্চ সম্ভাব্য ছবির ভিজুয়্যাল সিম্যান্টিক্স এর মাধ্যমে ম্যাপ উপস্থাপন করে। তা ব্যবহার করে সব ডাটা &lt;strong&gt;prior&lt;/strong&gt; কে দেয়া হয় তার উপর ভিত্তি করে &lt;em&gt;image encoding&lt;/em&gt; এর মাধ্যমে সব ফ্রেম মিলিয়ে কয়েকটি ছবি জেনারেট করে থাকে।আর এভাবেই &lt;strong&gt;DALL-E 2&lt;/strong&gt; কাজ করে।&lt;/p&gt;

&lt;p&gt;DALL-E 2 এর এখনো বেশ কিছু সীমাবদ্ধতা রয়েছে। সেগুলো-&lt;/p&gt;

&lt;p&gt;১। DALL-E কে একের অধিক মানুষ আঁকার দায়িত্ব দিলে সে তা পারে না পারলেও চেহারা নষ্ট করে দেয়।&lt;/p&gt;

&lt;p&gt;২। DALL-E গণনা করতে এখনো দুর্বল। ধরুন আপনি একটি prompt দিলেন যেখানে চাচ্ছেন “একটি বিড়াল  ৫ টি মাছ খাচ্ছে” সেক্ষেত্রে DALL-E গণনা করে বিড়াল আর মাছৈর সংখ্যা নিয়ে ঝামেলা পাঁকাবে।&lt;/p&gt;

&lt;p&gt;৩। DALL-E টেক্সট জেনারেটিং এ দুর্বল। ধরুন আপনি একটি সাইনবোর্ডে একটা নির্দিষ্ট লেখা দিয়ে চাইলেন তার ছবি পেতে কিন্তু সেই রেজাল্ট আপনার মোটেও মনমত পাবেন না। লেখালেখির ক্ষেত্রে DALL-E দুর্বল।&lt;/p&gt;

&lt;p&gt;৪। কিছু সেন্সেটিভ ওয়ার্ড(যেমন: রক্ত,খুন,নগ্নতা ইত্যাদি) থাকলে DALL-E কোনো ছবি জেনারেট করতে পারেনা। বরং ভায়োলেশন হিসেবে ধরে রিপোর্ট করে।&lt;/p&gt;

&lt;p&gt;এমন আরো কিছু ঝুকি ও সীমাবদ্ধতা আছে DALL-E তে। যদিও OpenAI টিম সেটা সাড়াতে কাজ করছে। ঝুকি ও সীমাবদ্ধতাগুলো পড়তে চাইলে দেখে আসুন-&lt;a href="https://github.com/openai/dalle-2-preview/blob/main/system-card.md" rel="noopener noreferrer"&gt;https://github.com/openai/dalle-2-preview/blob/main/system-card.md&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;পরিশিষ্ট:&lt;/p&gt;

&lt;p&gt;DALL-E কিভাবে কাজ করে জানাটা থেকে ভিতরে কি কি প্রক্রিয়া হচ্ছে সেটা বুঝাটা বেশ কঠিন। আমি চেষ্টা করে যত সহজে ব্যাপারটা কে বোধগম্য করার কিন্তু টেকনিকাল টার্মগুলো বেশ খটমটে এবং কঠিন। ভুল হতেও পারে কিছু তাই যারা বুঝেন একটু ভেরিফাই করে দিয়েন দয়া করে। মূল সোর্স সংযুক্ত করলাম এখানে সোর্স-&lt;br&gt;
&lt;a href="https://www.assemblyai.com/blog/how-dall-e-2-actually-works/" rel="noopener noreferrer"&gt;https://www.assemblyai.com/blog/how-dall-e-2-actually-works/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dalle2</category>
      <category>ai</category>
      <category>bangla</category>
    </item>
  </channel>
</rss>
