<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: csm</title>
    <description>The latest articles on DEV Community by csm (@csm18).</description>
    <link>https://dev.to/csm18</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1590922%2F1d71d879-5f9e-42d7-a40e-436badadd278.png</url>
      <title>DEV Community: csm</title>
      <link>https://dev.to/csm18</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/csm18"/>
    <language>en</language>
    <item>
      <title>10 problems I face to start a new project!</title>
      <dc:creator>csm</dc:creator>
      <pubDate>Sat, 31 Oct 2026 08:08:45 +0000</pubDate>
      <link>https://dev.to/csm18/10-problems-i-face-to-start-a-new-project-4eie</link>
      <guid>https://dev.to/csm18/10-problems-i-face-to-start-a-new-project-4eie</guid>
      <description>&lt;p&gt;I will just go straight into the points (sorry, problems):&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Idea
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;My mind is really good at not giving ideas and occasionally giving some cool ones&lt;/li&gt;
&lt;li&gt;Some thing that I saw somewhere looks cool, but feels not in my range. &lt;/li&gt;
&lt;li&gt;Some thing that I can implement and is simple and fun but feels waste of time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Fear that someone else already implemented it or is doing it better than me
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The feeling comes like I need to build the best thing in the world or else am done!&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Naming the project!
&lt;/h2&gt;

&lt;p&gt;This is where all my energy goes! 😂&lt;br&gt;
Either the name is not cool or the name conflicts with an existing one.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Choosing Tech Stack
&lt;/h2&gt;

&lt;p&gt;I know that practical choices should be made but my mind fights with:&lt;br&gt;
cool new niche tech stack vs industry standard vs bla bla bla&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Scope of the project
&lt;/h2&gt;

&lt;p&gt;The focus should be on MVP but mind goes for tiny little unncessary details. &lt;/p&gt;

&lt;h2&gt;
  
  
  6. Project setup
&lt;/h2&gt;

&lt;p&gt;The idea, the motivation all dries up before I even finish the setup!&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Git commit messages
&lt;/h2&gt;

&lt;p&gt;I did my setup commit like 'project setup'&lt;br&gt;
Then I remember  the already commit made by github is 'Initial commit'&lt;br&gt;
Its starting with capital letter, but I like all small letters.&lt;br&gt;
But, wait I also like consistency!&lt;/p&gt;

&lt;p&gt;After some commits:&lt;br&gt;
Should I make a single commit for all the changes I just made or multiple commits: one for a feature, one for updating README, one for updating my name in License.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Code organisation and conventions
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;camelCase vs snake_case vs PascalCase&lt;/li&gt;
&lt;li&gt;output folder name: target vs build vs bin vs ...&lt;/li&gt;
&lt;li&gt;exposing all the contents of a pkg vs explicit one thing&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  9. Writing tests
&lt;/h2&gt;

&lt;p&gt;Still I don't like testing and I don't know how to write tests!&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Half of the project is done and my mind getting distracted by another cool project!
&lt;/h2&gt;

&lt;p&gt;Its fully because of laziness!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Its just a post to yell at my habits to feel light!&lt;/p&gt;

&lt;p&gt;I read some articles related to this topic and got inspired to carefully observe what my problems are and note them down!&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>mc- A pre-preprocessor for C for header files generation</title>
      <dc:creator>csm</dc:creator>
      <pubDate>Fri, 30 Oct 2026 10:56:59 +0000</pubDate>
      <link>https://dev.to/csm18/mc-a-pre-preprocessor-for-c-for-header-files-generation-2fch</link>
      <guid>https://dev.to/csm18/mc-a-pre-preprocessor-for-c-for-header-files-generation-2fch</guid>
      <description>&lt;h1&gt;
  
  
  mc
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;mc&lt;/code&gt; stands for &lt;code&gt;meta-c&lt;/code&gt;:&lt;br&gt;
    A pre-preprocessor for C.&lt;/p&gt;

&lt;p&gt;It generates .h header files for .c files using custom macro syntax.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/csm-clone-wars/mc" rel="noopener noreferrer"&gt;link to repo&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Disclaimer
&lt;/h2&gt;

&lt;p&gt;With mixed feelings of guilt and pride, I want to say that this is a purely vibe-coded app.&lt;br&gt;
But it works exactly the way I wanted it to.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why
&lt;/h2&gt;

&lt;p&gt;In C, as a beginner, its difficult to keep switching between a &lt;code&gt;.c&lt;/code&gt; file and its corresponding &lt;code&gt;.h&lt;/code&gt; file just to update declarations. &lt;code&gt;mc&lt;/code&gt; solves my problem.&lt;/p&gt;

&lt;p&gt;I got the idea from Pascal, where you can write the implementation and interface in the same file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the comments as macros
&lt;/h2&gt;

&lt;p&gt;Its because,by using comments as macros, code editors don't need a new language extension to recognise plain regular c code.&lt;br&gt;
Best of both worlds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Development Environment
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Operating System: Linux Mint&lt;/li&gt;
&lt;li&gt;Go Toolchain&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;

&lt;p&gt;The idea is:&lt;br&gt;
In a single .c file using custom comment macro syntax we write all our .h header content and give the file to &lt;code&gt;mc&lt;/code&gt; and it will generate the header file.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;hello.c:
&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="c1"&gt;// Hello module example!&lt;/span&gt;

&lt;span class="c1"&gt;//@pub&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="c1"&gt;//@end&lt;/span&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;
&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="n"&gt;puts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello world!"&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;ul&gt;
&lt;li&gt;main.c:
&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="c1"&gt;// Enven if empty each .c file should have the @pub macro at the top&lt;/span&gt;
&lt;span class="c1"&gt;//@pub&lt;/span&gt;
&lt;span class="c1"&gt;//@end&lt;/span&gt;

&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;"hello.h"&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;return&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;h2&gt;
  
  
  MC Rules
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Each .c file should have @pub macro at the top.&lt;/li&gt;
&lt;li&gt;Before @pub macro whitespace characters and single line comments are allowed.&lt;/li&gt;
&lt;li&gt;@pub macro can be empty.&lt;/li&gt;
&lt;li&gt;Anything inside (between the macro comments &lt;code&gt;//@pub&lt;/code&gt; &lt;code&gt;//@end&lt;/code&gt; will go to the .h header file).&lt;/li&gt;
&lt;li&gt;Every generated header file template includes &lt;code&gt;#pragma once&lt;/code&gt; at the top, even if the @pub macro is empty.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Commands
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mc &amp;lt;no args&amp;gt;      -&amp;gt; Print mc version and help
mc -version,  -v  -&amp;gt; Print mc version
mc -help,     -h  -&amp;gt; Print mc commands list
mc -watch,    -w  -&amp;gt; Watch for any file changes and regenerate .h files
mc hi.c main.c    -&amp;gt; Generate .h header files in include/ folder for given .c files
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  License
&lt;/h2&gt;

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

</description>
      <category>opensource</category>
      <category>vibecoding</category>
      <category>c</category>
      <category>linux</category>
    </item>
    <item>
      <title>sz - view file size</title>
      <dc:creator>csm</dc:creator>
      <pubDate>Sun, 18 Oct 2026 08:07:41 +0000</pubDate>
      <link>https://dev.to/csm18/sz-view-file-size-1me6</link>
      <guid>https://dev.to/csm18/sz-view-file-size-1me6</guid>
      <description>&lt;h1&gt;
  
  
  sz
&lt;/h1&gt;

&lt;p&gt;A Linux utility for viewing file sizes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/csm-clone-wars/sz" rel="noopener noreferrer"&gt;link to repo&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;sz&lt;/code&gt; displays the size of a given file in human readable format (KB,MB,GB).&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sz hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;4.50 MB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Development Environment
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Operating System: Linux Mint&lt;/li&gt;
&lt;li&gt;Rust Toolchain&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Building the Project
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;clone the repo&lt;/li&gt;
&lt;li&gt;cd into the cloned repo&lt;/li&gt;
&lt;li&gt;to build:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo build &lt;span class="nt"&gt;--release&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;the &lt;code&gt;sz&lt;/code&gt; binary will be created under "target/release" folder.&lt;/li&gt;
&lt;li&gt;Add the &lt;code&gt;sz&lt;/code&gt; binary's directory to PATH to use it from anywhere in the terminal.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Commands
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sz &amp;lt;no args&amp;gt;     -&amp;gt; Print sz commands
sz -version, -v  -&amp;gt; Print sz version
sz -help,    -h  -&amp;gt; Print sz commands
sz &amp;lt;file.txt&amp;gt;    -&amp;gt; Print file size
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  License
&lt;/h2&gt;

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

</description>
      <category>showdev</category>
      <category>rust</category>
      <category>linux</category>
      <category>opensource</category>
    </item>
    <item>
      <title>trailing return types in cpp</title>
      <dc:creator>csm</dc:creator>
      <pubDate>Wed, 14 Oct 2026 07:13:29 +0000</pubDate>
      <link>https://dev.to/csm18/trailing-return-types-in-cpp-epd</link>
      <guid>https://dev.to/csm18/trailing-return-types-in-cpp-epd</guid>
      <description>&lt;p&gt;I know that C++ has different versions (standards) and &lt;br&gt;
and from C++11 its called modern C++, because it got many features that made C++ feel like a brand new language or simply modern.&lt;/p&gt;

&lt;p&gt;And it did all this while maintaining backward compatibility!&lt;br&gt;
Still, there are many things people don't like about C++.&lt;br&gt;
For me, especially the lengthy return types that hide the function names.&lt;/p&gt;

&lt;p&gt;For example, suppose you have a function like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;tuple&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;vector&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Diagnostic&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;vector&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;unordered_map&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;unordered_map&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;
&lt;span class="n"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;vector&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;){}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;😅 Can you see where the function name is? &lt;/p&gt;

&lt;p&gt;I've always wanted a feature like the one in modern languages such as Rust and Go, where you write the return type after the function's parameters.&lt;/p&gt;

&lt;p&gt;Guess what? All this time, I didn't know C++ had supported trailing return type syntax since C++11!&lt;/p&gt;

&lt;p&gt;Now the same above function, using trailing return types, would look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="k"&gt;auto&lt;/span&gt; &lt;span class="n"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;vector&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;tuple&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;
    &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;vector&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Diagnostic&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
    &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;vector&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;unordered_map&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;unordered_map&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Function body&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;It has happened many times that C++ already had the features I needed. I just didn't know they existed!&lt;/p&gt;

</description>
      <category>cpp</category>
    </item>
    <item>
      <title>whoami in rust</title>
      <dc:creator>csm</dc:creator>
      <pubDate>Wed, 07 Oct 2026 02:57:41 +0000</pubDate>
      <link>https://dev.to/csm18/whoami-in-rust-1bg7</link>
      <guid>https://dev.to/csm18/whoami-in-rust-1bg7</guid>
      <description>&lt;h1&gt;
  
  
  whoami
&lt;/h1&gt;

&lt;p&gt;A reimplementation of the Linux command &lt;code&gt;whoami&lt;/code&gt; in Rust.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/csm-clone-wars/whoami" rel="noopener noreferrer"&gt;link to repo&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;whoami&lt;/code&gt; displays the user name associated with the current effective user ID. Same as &lt;code&gt;id -un&lt;/code&gt;.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;whoami&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;csm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Development Environment
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Operating System: Linux Mint&lt;/li&gt;
&lt;li&gt;Rust Toolchain&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Building the Project
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;clone the repo&lt;/li&gt;
&lt;li&gt;cd into the cloned repo&lt;/li&gt;
&lt;li&gt;to build:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo build &lt;span class="nt"&gt;--release&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;to build and run:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo run &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;-help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Commands
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;whoami &amp;lt;no args&amp;gt;     -&amp;gt; Print effective userid
whoami -version, -v  -&amp;gt; Print whoami version
whoami -help,    -h  -&amp;gt; Print whoami commands

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  License
&lt;/h2&gt;

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




&lt;h2&gt;
  
  
  What I learned?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Simple command does not mean simple to implement&lt;/li&gt;
&lt;li&gt;For the first time wrote some unsafe rust code with &lt;code&gt;libc&lt;/code&gt; crate.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>rust</category>
      <category>opensource</category>
      <category>linux</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Programming kya hai?</title>
      <dc:creator>csm</dc:creator>
      <pubDate>Sun, 04 Oct 2026 02:06:54 +0000</pubDate>
      <link>https://dev.to/csm18/programming-kya-hai-2pj9</link>
      <guid>https://dev.to/csm18/programming-kya-hai-2pj9</guid>
      <description>&lt;p&gt;Yaha tak aane ke baad, ye &lt;strong&gt;title&lt;/strong&gt; thoda ajeeb lagega 😅&lt;br&gt;
Par ant tak bane rahiye!&lt;/p&gt;
&lt;h2&gt;
  
  
  Programming kya hai?
&lt;/h2&gt;

&lt;p&gt;Sabko pata hai:&lt;br&gt;
aagyakaari &lt;strong&gt;computer&lt;/strong&gt; ko aagya dena!&lt;/p&gt;
&lt;h2&gt;
  
  
  Computer ki bhasha kya hai?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Computer&lt;/strong&gt; sirf &lt;strong&gt;binary&lt;/strong&gt;, yani &lt;strong&gt;0&lt;/strong&gt; aur &lt;strong&gt;1&lt;/strong&gt;, samajhta hai.&lt;/p&gt;
&lt;h2&gt;
  
  
  Programming language kya hai? Aur itni saari kyun hain? 😭
&lt;/h2&gt;

&lt;p&gt;Jese hum insaanon ki bhasha sirf &lt;strong&gt;sound&lt;/strong&gt; hai, wese hi computer ki bhasha sirf &lt;strong&gt;electricity voltage level&lt;/strong&gt; hai.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Higher voltage -&amp;gt; 1&lt;br&gt;
Lower voltage -&amp;gt; 0&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ab hum &lt;strong&gt;sound&lt;/strong&gt; ko likh nahi sakte, isliye humne &lt;strong&gt;script&lt;/strong&gt; banayi hai. Kuch usi tarah, humne &lt;strong&gt;assembly language&lt;/strong&gt; banayi hai!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Assembly&lt;/strong&gt; bhasha &lt;strong&gt;machine&lt;/strong&gt; bhasha ke bahut nazdeek hai, isliye mushkil hai:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;; Linux x86-64 with NASM
section .data
    msg db "Hello, World!", 10
    len equ $ - msg

section .text
    global _start

_start:
    mov rax, 1          ; sys_write
    mov rdi, 1          ; stdout
    mov rsi, msg        ; message
    mov rdx, len        ; length
    syscall

    mov rax, 60         ; sys_exit
    xor rdi, rdi        ; exit code 0
    syscall
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tabhi humne &lt;strong&gt;high-level languages&lt;/strong&gt; banayi hain, taaki &lt;strong&gt;program&lt;/strong&gt; likhna aasaan ho.&lt;br&gt;
Jese: &lt;strong&gt;C, C++, Rust, Go, Python, JavaScript&lt;/strong&gt;, aadi.&lt;/p&gt;
&lt;h2&gt;
  
  
  Programming languages kitne tarah ke hote hain?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Compiled (C,C++,Rust,Go)&lt;/li&gt;
&lt;li&gt;Interpreted (Python, Ruby)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Compiled&lt;/strong&gt; yani hamara likha hua &lt;strong&gt;code&lt;/strong&gt;, &lt;strong&gt;binary&lt;/strong&gt; me badal kar ek &lt;strong&gt;file&lt;/strong&gt; me &lt;strong&gt;save&lt;/strong&gt; karte hain.&lt;br&gt;
Wo &lt;strong&gt;file&lt;/strong&gt; seedha hum chala sakte hain.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Jese, &lt;strong&gt;packed food items&lt;/strong&gt; ki tarah, seedha kha sakte hain.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Interpreted&lt;/strong&gt; matlab jab hum kahenge, tab us waqt &lt;strong&gt;interpreter&lt;/strong&gt; hamare likhe &lt;strong&gt;code&lt;/strong&gt; ko &lt;strong&gt;line by line&lt;/strong&gt; badal kar chalayega.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Jese, garam-garam dosa &lt;strong&gt;hotel&lt;/strong&gt; me banakar dete hain, aur hum wahi par khaate hain.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Hello World Program
&lt;/h2&gt;

&lt;p&gt;To, hum kaha par the?&lt;/p&gt;

&lt;p&gt;Go me &lt;strong&gt;Hello World Program&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s"&gt;"fmt"&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Pranaam 🙏🙏🙏🙏"&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;Humne ab tak seekha hai ki har Go program me ek &lt;strong&gt;main package&lt;/strong&gt; hoga, jisme &lt;strong&gt;main function&lt;/strong&gt; se hamara program shuru hoga.&lt;/p&gt;

&lt;p&gt;Yaha par sirf ek line hai &lt;strong&gt;main function&lt;/strong&gt; ke andar, jo &lt;strong&gt;"Pranaam 🙏🙏🙏🙏"&lt;/strong&gt; ko print karegi.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;fmt&lt;/strong&gt; ek package hai jo Go ke saath aata hai, jismein &lt;strong&gt;Println()&lt;/strong&gt; ek function hai, jiska kaam text ko terminal par print karna hai.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;fmt package&lt;/strong&gt; &lt;strong&gt;standard library&lt;/strong&gt; ka hissa hai.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kya hum bina library ke code likh sakte hain?
&lt;/h2&gt;

&lt;p&gt;Jo students beginners hain, unmein kuch logon ko ye bhram hai ki agar hum bina kisi &lt;strong&gt;library&lt;/strong&gt; ki madad ke saara code likhenge, tabhi hum programmer ya developer banenge.&lt;/p&gt;

&lt;p&gt;Par ek udaharan ke saath is bhram ko door karte hain:&lt;/p&gt;

&lt;p&gt;Hamare ghar ek baar ek &lt;strong&gt;carpenter uncle&lt;/strong&gt; aaye the &lt;strong&gt;door&lt;/strong&gt; lagane ke liye.&lt;br&gt;
Wo sirf bana-banaya &lt;strong&gt;door&lt;/strong&gt; lagate hain.&lt;br&gt;
&lt;strong&gt;Door&lt;/strong&gt; humein hi kisi dukaan se khareedna padta hai.&lt;/p&gt;

&lt;p&gt;Lekin purane zamaane me &lt;strong&gt;carpenter&lt;/strong&gt; khud ghar aakar wahin par lakdi kaat kar &lt;strong&gt;door&lt;/strong&gt; banate the aur phir &lt;strong&gt;fit&lt;/strong&gt; karte the.&lt;/p&gt;

&lt;p&gt;Is zamaane me na hamare paas waqt hai, na paise, &lt;strong&gt;door&lt;/strong&gt; banwa kar lagwane ke liye.&lt;/p&gt;

&lt;p&gt;To jo uncle hamare ghar aaye the, wo bhi &lt;strong&gt;carpenter&lt;/strong&gt; hain, aur jo &lt;strong&gt;shop&lt;/strong&gt; me &lt;strong&gt;door&lt;/strong&gt; banate hain, wo bhi &lt;strong&gt;carpenter&lt;/strong&gt; hain.&lt;br&gt;
Bas unka &lt;strong&gt;kaam&lt;/strong&gt; alag hai.&lt;/p&gt;

&lt;p&gt;Waise hi, &lt;strong&gt;Python&lt;/strong&gt; me &lt;strong&gt;code&lt;/strong&gt; likhne wale bhi &lt;strong&gt;programmer&lt;/strong&gt; hain aur &lt;strong&gt;Python&lt;/strong&gt; ki &lt;strong&gt;libraries&lt;/strong&gt; likhne wale bhi &lt;strong&gt;programmer&lt;/strong&gt; hain.&lt;/p&gt;

&lt;p&gt;Jis &lt;strong&gt;domain&lt;/strong&gt; me humein ruchi ho, usi me jaana chahiye!&lt;/p&gt;

&lt;p&gt;Aaj ke liye bas itna hi 🫡&lt;/p&gt;




&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Kavi&lt;/strong&gt;: Ab waqt hai meri &lt;strong&gt;all-time favorite kavita&lt;/strong&gt; ke liye!&lt;br&gt;
Sunna chahoge?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Shrota&lt;/strong&gt;: Bilkul!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Kavi&lt;/strong&gt;: Arz kiya hai,&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;हार को चुराने से चोर बनोगे
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Shrota&lt;/strong&gt;: Thik hai thik hai, aage?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kavi&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;और हार को हराने से वीर बनोगे
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Shrota&lt;/strong&gt;: 🥶&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>go</category>
      <category>hindi</category>
      <category>tutorial</category>
      <category>hinglish</category>
    </item>
    <item>
      <title>pwd in rust</title>
      <dc:creator>csm</dc:creator>
      <pubDate>Fri, 02 Oct 2026 05:29:38 +0000</pubDate>
      <link>https://dev.to/csm18/pwd-in-rust-3i5p</link>
      <guid>https://dev.to/csm18/pwd-in-rust-3i5p</guid>
      <description>&lt;p&gt;A reimplementation of the Linux command pwd (Print Working Directory) in Rust.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/csm-clone-wars/pwd/tree/main" rel="noopener noreferrer"&gt;link to repo&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;pwd&lt;/code&gt; displays the full path of the directory you are currently in.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/home/csm/Documents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Development Environment
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Operating System: Linux Mint&lt;/li&gt;
&lt;li&gt;Rust Toolchain&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Building the Project
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;clone the repo&lt;/li&gt;
&lt;li&gt;cd into the cloned repo&lt;/li&gt;
&lt;li&gt;to build:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo build &lt;span class="nt"&gt;--release&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;to build and run:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo run &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;-help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Commands
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    pwd &amp;lt;no args&amp;gt;        -&amp;gt; Print working directory logical path
    pwd -version,  -v    -&amp;gt; Print pwd version
    pwd -help,     -h    -&amp;gt; Print pwd commands list
    pwd -logical,  -l    -&amp;gt; Print working directory logical path
    pwd -physical, -p    -&amp;gt; Print working directory physical path (resolving sym-links)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  License
&lt;/h2&gt;

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

</description>
      <category>rust</category>
      <category>showdev</category>
      <category>linux</category>
      <category>devtools</category>
    </item>
    <item>
      <title>Vim Basics</title>
      <dc:creator>csm</dc:creator>
      <pubDate>Sat, 26 Sep 2026 02:21:08 +0000</pubDate>
      <link>https://dev.to/csm18/vim-basics-4l30</link>
      <guid>https://dev.to/csm18/vim-basics-4l30</guid>
      <description>&lt;p&gt;Just the basics you need to get started.&lt;br&gt;
Also for those who are trapped in classic vim situation, where you don't know how to quit!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Vim is a powerful, keyboard-driven command-line text editor (an improved version of the classic Unix “vi”) used for efficiently editing code and plain-text files.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Things you need
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Linux Mint or Ubuntu&lt;/li&gt;
&lt;li&gt;Vim 8.2 or above&lt;/li&gt;
&lt;li&gt;Alacritty terminal (Why? Just for feel!)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;vim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Open a file in Vim
&lt;/h2&gt;

&lt;p&gt;Suppose you are inside a folder called &lt;code&gt;hello&lt;/code&gt; and it has a file &lt;code&gt;hello.txt&lt;/code&gt;.&lt;br&gt;
You open the file in Vim:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vim hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Modes of Vim
&lt;/h2&gt;

&lt;p&gt;In vim we have modes.&lt;br&gt;
When you open a file the default mode is Normal mode.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Normal mode  -&amp;gt; Esc key
Insert mode  -&amp;gt; i
Command mode -&amp;gt; Esc key then :
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What the heck are modes?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;When you press '&lt;strong&gt;i&lt;/strong&gt;', you can type in the editor, thats Insert mode.&lt;/li&gt;
&lt;li&gt;When you press '&lt;strong&gt;Esc&lt;/strong&gt;' key, you go back into Normal mode where you can view the file without typing.&lt;/li&gt;
&lt;li&gt;When you press '&lt;strong&gt;:&lt;/strong&gt;' inside normal mode, that is Command mode.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For beginners, insert mode is for you to type.&lt;br&gt;
Later you will learn the powers of normal mode where you can use Vim's shortcuts to edit the file super hyper fastly!&lt;br&gt;
Command mode, for now, is for saving the changes you made and to quit and get out of Vim.&lt;/p&gt;
&lt;h2&gt;
  
  
  Quit, Save, and others
&lt;/h2&gt;

&lt;p&gt;First, press '&lt;strong&gt;Esc&lt;/strong&gt;' to ensure you are in Normal mode.&lt;br&gt;
Then:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To just quit:
Type &lt;code&gt;:q&lt;/code&gt; then press &lt;code&gt;Enter&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;To just save:
Type &lt;code&gt;:w&lt;/code&gt; then press &lt;code&gt;Enter&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;To save and quit at once:
Type &lt;code&gt;:wq&lt;/code&gt; then press &lt;code&gt;Enter&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;To quit without saving:
Type &lt;code&gt;:q!&lt;/code&gt; then press &lt;code&gt;Enter&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;

&lt;p&gt;1) Open the &lt;code&gt;hello.txt&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vim hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2) Type some text:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Press &lt;code&gt;i&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Then type this text:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;hello world!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3) Save the changes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Press &lt;code&gt;Esc&lt;/code&gt; to come out of insert mode&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;:w&lt;/code&gt; and press &lt;code&gt;Enter&lt;/code&gt; to save the changes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;4) Quit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Type &lt;code&gt;:q&lt;/code&gt; and press &lt;code&gt;Enter&lt;/code&gt; to quit&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Classic 'Unable To Quit Vim' Situation
&lt;/h2&gt;

&lt;p&gt;If you are someone who just want to quit, then:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Press &lt;code&gt;Esc&lt;/code&gt; then type &lt;code&gt;:q!&lt;/code&gt; then press &lt;code&gt;Enter&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Thats it! 🥶&lt;/p&gt;

</description>
      <category>vim</category>
    </item>
    <item>
      <title>GCC Flags Notes</title>
      <dc:creator>csm</dc:creator>
      <pubDate>Fri, 11 Sep 2026 01:13:27 +0000</pubDate>
      <link>https://dev.to/csm18/gcc-flags-notes-5h51</link>
      <guid>https://dev.to/csm18/gcc-flags-notes-5h51</guid>
      <description>&lt;p&gt;My notes on GNU C Compiler (GCC) Flags&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Flags
&lt;/h2&gt;

&lt;h3&gt;
  
  
  -c
&lt;/h3&gt;

&lt;p&gt;It tells GCC to compile the source file into an object file (.o), but do not link it into an executable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc &lt;span class="nt"&gt;-c&lt;/span&gt; main.c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;main.o
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you can link it separately:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc main.o &lt;span class="nt"&gt;-o&lt;/span&gt; main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  -o
&lt;/h3&gt;

&lt;p&gt;It specifies the output filename.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc main.c &lt;span class="nt"&gt;-o&lt;/span&gt; main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We get:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  -l
&lt;/h3&gt;

&lt;p&gt;It means "link this library".&lt;br&gt;
For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc main.c &lt;span class="nt"&gt;-lm&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;-l -&amp;gt; link a library&lt;/li&gt;
&lt;li&gt;m -&amp;gt; library name libm&lt;/li&gt;
&lt;li&gt;-o main -&amp;gt; output executable named main&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;The library must be present in the standard search paths of GCC.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  -I
&lt;/h3&gt;

&lt;p&gt;It specifies an additional directory to search for header files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc &lt;span class="nt"&gt;-Iinclude&lt;/span&gt; main.c &lt;span class="nt"&gt;-o&lt;/span&gt; main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells GCC:&lt;br&gt;
When you see &lt;code&gt;#include "something.h"&lt;/code&gt;, also look inside the &lt;code&gt;include/&lt;/code&gt; directory.&lt;/p&gt;
&lt;h3&gt;
  
  
  -L
&lt;/h3&gt;

&lt;p&gt;It specifies an additional directory to search for libraries during linking.&lt;br&gt;
For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc main.c &lt;span class="nt"&gt;-L&lt;/span&gt;./lib &lt;span class="nt"&gt;-lmylib&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;-L./lib -&amp;gt; search &lt;code&gt;./lib&lt;/code&gt; for libraries&lt;/li&gt;
&lt;li&gt;-lmylib -&amp;gt; link &lt;code&gt;libmylib&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;-o main -&amp;gt; produce main&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  -static
&lt;/h3&gt;

&lt;p&gt;It tells the linker to create a statically linked executable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc main.c &lt;span class="nt"&gt;-static&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Optimisation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  -O
&lt;/h3&gt;

&lt;p&gt;Sets the level of optimisation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc &lt;span class="nt"&gt;-O2&lt;/span&gt; main.c &lt;span class="nt"&gt;-o&lt;/span&gt; main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Optimisation Levels
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;0 -&amp;gt; does nothing&lt;/li&gt;
&lt;li&gt;1 -&amp;gt; basic optimisation&lt;/li&gt;
&lt;li&gt;2 -&amp;gt; produces small binaries&lt;/li&gt;
&lt;li&gt;3 -&amp;gt; produces fast binaries (may not be small in size)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1 -&amp;gt; for fast compile times
2 -&amp;gt; for production
0 -&amp;gt; for debugging
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Strict Rules, Warnings and Errors
&lt;/h2&gt;

&lt;p&gt;Basic ones are:&lt;/p&gt;

&lt;h3&gt;
  
  
  -std
&lt;/h3&gt;

&lt;p&gt;It specifies which C standard the compiler should follow.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc &lt;span class="nt"&gt;-std&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;c17 main.c &lt;span class="nt"&gt;-o&lt;/span&gt; main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  -Wall
&lt;/h3&gt;

&lt;h3&gt;
  
  
  -Wextra
&lt;/h3&gt;

&lt;h3&gt;
  
  
  -Wpedantic
&lt;/h3&gt;

&lt;h3&gt;
  
  
  -Werror
&lt;/h3&gt;

&lt;p&gt;Some extra ones:&lt;/p&gt;

&lt;h3&gt;
  
  
  -W
&lt;/h3&gt;

&lt;h3&gt;
  
  
  -Wconversion
&lt;/h3&gt;

&lt;h3&gt;
  
  
  -Wshadow
&lt;/h3&gt;

&lt;h3&gt;
  
  
  -Wcast-qual
&lt;/h3&gt;

&lt;h3&gt;
  
  
  -Wwrite-strings
&lt;/h3&gt;

&lt;h2&gt;
  
  
  Debugging Related
&lt;/h2&gt;

&lt;h3&gt;
  
  
  -g
&lt;/h3&gt;

&lt;p&gt;It generates debugging information in the executable/object file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc &lt;span class="nt"&gt;-g&lt;/span&gt; main.c &lt;span class="nt"&gt;-o&lt;/span&gt; main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;It mainly tells GCC to include information that debuggers such as GDB can use.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Preprocessing Related
&lt;/h2&gt;

&lt;h3&gt;
  
  
  -E
&lt;/h3&gt;

&lt;p&gt;It says run only the preprocessor.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc &lt;span class="nt"&gt;-E&lt;/span&gt; main.c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  -D
&lt;/h3&gt;

&lt;p&gt;It defines a macro from the commmand-line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc &lt;span class="nt"&gt;-DTEST&lt;/span&gt; main.c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;-D -&amp;gt; define macro&lt;/li&gt;
&lt;li&gt;TEST -&amp;gt; name of the macro&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Thats it! 😵‍💫&lt;/p&gt;

</description>
      <category>c</category>
      <category>notes</category>
    </item>
    <item>
      <title>Pehla Go Program</title>
      <dc:creator>csm</dc:creator>
      <pubDate>Sun, 26 Jul 2026 06:30:00 +0000</pubDate>
      <link>https://dev.to/csm18/pehla-go-program-242m</link>
      <guid>https://dev.to/csm18/pehla-go-program-242m</guid>
      <description>&lt;p&gt;Pichle post mein humne Go ke baare mein jaana tha.&lt;br&gt;
Ab Go ka setup karenge aur pehla Go program likhenge!&lt;/p&gt;
&lt;h2&gt;
  
  
  Pehle Magajmari (Setup)
&lt;/h2&gt;

&lt;p&gt;Hame bas 2 cheese chahiye:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ek Go &lt;/li&gt;
&lt;li&gt;Dusra Code Editor&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Official &lt;a href="https://go.dev/" rel="noopener noreferrer"&gt;website&lt;/a&gt; pe jao aur apne platform ke hisaab se Go download kar lo.&lt;br&gt;
Rahi code editor ki baat, to VS Code aur Go ka extension install kar lo.&lt;br&gt;
Bas!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Chela: Guruji! Linux pe Go ka package kaha rakhna hai aur PATH environment variable kese set karte hai?
Guru: Baccha! Tu Go seekhne aya hai ya Google karna?
Chela: 😅 Bas iss baar bataado 🙏
Guru: Hmm.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Linux pe Go
&lt;/h3&gt;

&lt;p&gt;Terminal kholo aur shuru ho jao!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sabse pehle purna koyi Go installation ho to use uthake phenk do!
Taaki version conflict naa ho.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; /usr/local/go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Phir apne platform ke hisaab se package ko download karo (latest wala).
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wget https://go.dev/dl/go1.26.5.linux-amd64.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Ab us package ko unpack ya extract karo &lt;code&gt;/usr/local/&lt;/code&gt; me
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo tar&lt;/span&gt; &lt;span class="nt"&gt;-C&lt;/span&gt; /usr/local &lt;span class="nt"&gt;-xzf&lt;/span&gt; go1.26.5.linux-amd64.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Bas ab Go ka path set karna hai.
Ye neeche wala command &lt;code&gt;.bashrc&lt;/code&gt; file me Go ka path set kardega!
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'export PATH=$PATH:/usr/local/go/bin'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Ya to naya terminal tab kholo ya phir ye karo:
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;p&gt;Ab Go ka version print karke dekho:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Thoda Gyan
&lt;/h2&gt;

&lt;p&gt;Kuch bhi likhne se pehle Go ke kuch niyam jaan lete hai!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Go ka code ham &lt;code&gt;.go&lt;/code&gt; wale files me likhte hai (&lt;code&gt;.go&lt;/code&gt; extension)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ek example Go project ka structure kuch aesa dikhta hai&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj6xvz0s9c7b3545s2v4q.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj6xvz0s9c7b3545s2v4q.png" alt=" " width="799" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To, niyam:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Har .go wala file ek folder ka hissa hota hai jise ham &lt;strong&gt;package&lt;/strong&gt; kehte hai&lt;/li&gt;
&lt;li&gt;Jitne bhi hamare package wale folder hai wo sab ek bade folder ke hissa hai, jise ham &lt;strong&gt;module&lt;/strong&gt; bolte hai&lt;/li&gt;
&lt;li&gt;Ek Go module yaani ek project hai, matlab ya to module ko ek library ki tarah dusre projects me istemal kar sakte hai ya phir iss module se ek &lt;strong&gt;binary executable&lt;/strong&gt; bana sakte hai&lt;/li&gt;
&lt;li&gt;Ek folder ko module tabhi bolte hai jab usme go.mod file ho!
Warna go compiler chillake bolega "Ye module nahi hai! Me compile kese karu?"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yaha 2 sawaal manme ayenge:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;go.mod file ka kaam kya hai? &lt;/li&gt;
&lt;li&gt;Jab saare .go files kisi na kisi package folder ke ander honge to uper image me main.go file seedha module wale folder me kese ghum raha hai?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Aur unke javaab kuch ese hai:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;go.mod file &lt;strong&gt;external dependencies&lt;/strong&gt; ko manage karta hai.
Yaani ki agar hamare project me ek web framework ya koi bhi library chahiye kisi dusre ka likha hua, to uska zikr hum go.mod file me karenge aur go compiler use project me add kar dega!&lt;/li&gt;
&lt;li&gt;main.go, wese to uska naam kuch bhi rakh sakte hai par uske ander ham bolte hai ki ye main package ka hissa hai.&lt;/li&gt;
&lt;li&gt;main package hamare module(project) ka entry point hai,
jaha se execution shuru hota hai!
Iss liye wo seedha module wale folder ke ander ghum sakta hai&lt;/li&gt;
&lt;li&gt;Ek aur baat, ham jitne chahein utne .go files bana sakte hai main package ke ander, matlab module wale folder me!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bas har file ke ander kehna hoga ki ye main package ka hissa hai, aur ek file esa hona chahiye jisme main() naam ka function ho!&lt;/p&gt;

&lt;h2&gt;
  
  
  Hello World Program
&lt;/h2&gt;

&lt;p&gt;Terminal ko apne pasand ke location pe kholo aur shuru!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Project ka folder banake usme ghuso
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir hello &amp;amp;&amp;amp; cd hello
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Go se kaho ki wo go.mod file banaye
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go mod init hello
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Ab ek main.go file banao
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;touch main.go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;main.go ko VS Code me kholo
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;code main.go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;main.go ko neeche wale code se bhar do
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package main

import "fmt"

func main(){
    fmt.Println("Pranaam 🙏🙏🙏🙏")
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Ab file ko save karne ke baad wapis terminal me aake project ko run karo
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go run .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Aapke terminal ke screen pe &lt;strong&gt;Pranaam 🙏🙏🙏🙏&lt;/strong&gt; wala message dikha to aapne sab tikh se kar diya!&lt;br&gt;
Agar nahi dikha to kya karna hai mujhe nahi pata 😄&lt;br&gt;
(Google karke dekhlo)&lt;/p&gt;

&lt;p&gt;Iss program ka matlab kya hai ye hum agle post me dekhenge!&lt;br&gt;
Tab tak ke liye alvida!&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwanvjqtegrabic4x7ru4.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwanvjqtegrabic4x7ru4.png" alt=" " width="750" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>hinglish</category>
      <category>hindi</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Golang in Hinglish</title>
      <dc:creator>csm</dc:creator>
      <pubDate>Mon, 20 Jul 2026 18:42:23 +0000</pubDate>
      <link>https://dev.to/csm18/golang-in-hinglish-1058</link>
      <guid>https://dev.to/csm18/golang-in-hinglish-1058</guid>
      <description>&lt;p&gt;A simple tutorial series on go in Hinglish.&lt;br&gt;
Jitna mujhe aata hai utna, aur zyada tar mere notes se!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Me non-native speaker hu to spelling mistakes to honge, is liye Hinglish spellings aur grammar ke liye main AI use karunga, par dev ke bot ko pata nahi chalega kyuki ye English nahi hai 😉&lt;/p&gt;

&lt;h2&gt;
  
  
  Parichay / Intro
&lt;/h2&gt;

&lt;p&gt;Shuruat hum isse karenge ki Go kya hai aur uske fayde kya hain.&lt;/p&gt;

&lt;p&gt;Pehle hum Wikipedia ki definition dekhte hain:&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4e651du0fg5mu4d5pa75.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4e651du0fg5mu4d5pa75.png" alt="Wikipedia Definition of Go" width="799" height="283"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To, Go ek aasan language hai.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go compiled language hai, matlab ek bar compiler ko humne apna code diya to wo ek executable file dega jo sidha hum chala sakte hain bina kisi aur dependency ke, jaise ki Python ka interpreter.&lt;/li&gt;
&lt;li&gt;Dusri high-level languages jaise Python ya JavaScript se Go tez chalta hai.&lt;/li&gt;
&lt;li&gt;Garbage collected hai, yani C ki tarah hame memory ko manually manage karna nahi padega.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Go ka istemal kahan hota hai?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;APIs aur Web Servers banane me&lt;/li&gt;
&lt;li&gt;Network Programming aur Distributed Systems me&lt;/li&gt;
&lt;li&gt;Cloud-Native Applications aur Microservices banane me&lt;/li&gt;
&lt;li&gt;DevOps aur Infrastructure Automation me&lt;/li&gt;
&lt;li&gt;Command Line (CLI) Tools banane me&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Agar upar ki baatein abhi samajh na aayein, to koi baat nahi. Filhal itna samajh lijiye ki Go ka istemal bahut jagah hota hai to job ke liye kaam aayega.&lt;/p&gt;




&lt;p&gt;To ye thi Go ki kahani, CSM ki zubani... (jo chalti rahegi!)&lt;/p&gt;

&lt;p&gt;Aur haan, har post ke aakhir me meri ek shayari hogi, jo aapko guru dakshina ke roop me jhelni padegi! 😄&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ख़यालों को बातों में उलझाए रखना ।&lt;br&gt;
इस पल के हक़ीक़त को सुलझाए रखना ।&lt;br&gt;
शिद्दत से चाहा जो मिल कर रहेगा ।&lt;br&gt;
चेहरे पे मुस्कान थोड़ी बनाए रखना ।।&lt;/strong&gt;&lt;br&gt;
                    -csm&lt;/p&gt;

</description>
      <category>go</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>TikTikBoom</title>
      <dc:creator>csm</dc:creator>
      <pubDate>Sun, 14 Jun 2026 17:58:31 +0000</pubDate>
      <link>https://dev.to/csm18/tiktikboom-2ij5</link>
      <guid>https://dev.to/csm18/tiktikboom-2ij5</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/june-game-jam-2026-06-03"&gt;June Solstice Game Jam&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Turing's Enigma: The Solstice Protocol&lt;/strong&gt; (TikTikBoom) is a cyber-retro, pixel-powered architectural platformer and computer science puzzle-hacking game I built natively with React and the Phaser 3 Arcade Physics Engine. &lt;/p&gt;

&lt;p&gt;Tasked with saving core system tapes from corruption, I designed a gameplay system where players journey deep into a simulated computing core at Bletchley Park. To progress, you must dynamically alternate your project's binary data states, intercept rogue runtime glitches, and override terminal arrays by solving logical computer science riddles.&lt;/p&gt;

&lt;p&gt;My goal was to design an interactive experience that relates heavily to the Solstice timeline by directly celebrating the birthday of computing pioneer Alan Turing (born June 23rd). Rather than making a static quiz app, I integrated historical cryptographic components directly into an active, retro gameplay engine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Live Game Link: &lt;a href="https://tik-tik-boom-kappa.vercel.app/" rel="noopener noreferrer"&gt;https://tik-tik-boom-kappa.vercel.app/&lt;/a&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Video Demo
&lt;/h2&gt;

&lt;p&gt;Check out my video demonstration showcasing the system sequence, binary state-switching, and dynamic stage deconstruction loop in action:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/YuTa3hB_7EU" rel="noopener noreferrer"&gt;https://youtu.be/YuTa3hB_7EU&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/csm-18" rel="noopener noreferrer"&gt;
        csm-18
      &lt;/a&gt; / &lt;a href="https://github.com/csm-18/TikTikBoom" rel="noopener noreferrer"&gt;
        TikTikBoom
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      TikTikBoom
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;🌌 Turing's Enigma: The Solstice Protocol&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://dev.to/challenges/june-game-jam-2026-06-03" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/9c82c76691e9751132e0a7fd16e26d32dc532b3a9cb961aab9215d81084c8290/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f47616d655f4a616d2d4a756e655f536f6c73746963652d6666613530303f7374796c653d666f722d7468652d6261646765" alt="Game Jam Entry"&gt;&lt;/a&gt;
&lt;a href="https://phaser.io" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/4c4841aa7ea8ce9925c60d9ebf4ee87286dc0da0f49f07aa4dec6cb325b485e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5068617365722d76332e36302d3030643266663f7374796c653d666f722d7468652d6261646765266c6f676f3d706861736572" alt="Framework"&gt;&lt;/a&gt;
&lt;a href="https://react.dev" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/62494362d2b33c3d17f071c4507b95e6dc38e0d35a6c9a406147c98f5867d4c6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f52656163742d31382e782d3631646166623f7374796c653d666f722d7468652d6261646765266c6f676f3d7265616374" alt="UI Library"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A cyber-retro, pixel-powered architectural platformer and puzzle-hacking game built natively using &lt;strong&gt;React&lt;/strong&gt; and the &lt;strong&gt;Phaser 3 Arcade Physics Engine&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Tasked with saving the core system tapes, you must journey deep into the architecture of Bletchley Park’s computing core, intercept runtime glitches, and break the shifting code logic patterns across 8 distinct architectural sectors.&lt;/p&gt;
&lt;p&gt;Happy Birthday, Alan Turing! Built for the DEV June Solstice Game Jam.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🎮 Gameplay &amp;amp; Control Schematics&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Navigate through security grids, manipulate the logic state of your data projectiles, and override terminal arrays.&lt;/p&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action Key&lt;/th&gt;
&lt;th&gt;System Instruction Matrix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
A / D
&lt;/td&gt;
&lt;td&gt;Move horizontal node left and right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;W&lt;/td&gt;
&lt;td&gt;Jump or scale architecture platforms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Z&lt;/td&gt;
&lt;td&gt;Toggle binary code tape stream state between &lt;code&gt;[ 0 ]&lt;/code&gt; (Cyan) and &lt;code&gt;[ 1 ]&lt;/code&gt; (Orange)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SPACE&lt;/td&gt;
&lt;td&gt;Fire targeted decryption code matrices&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E&lt;/td&gt;
&lt;td&gt;Interface directly with the physical &lt;strong&gt;Turing Bombe&lt;/strong&gt; terminal mainframe&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🔁 Core Loop Protocol&lt;/h2&gt;…&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/csm-18/TikTikBoom" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


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

&lt;p&gt;I leveraged a hybrid configuration of modern web tech and hardware-accelerated graphics to assemble the engine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React Wrapper Shell:&lt;/strong&gt; I used React to manage the responsive layout viewport containment, game jam thematic branding, dynamic metadata panels, and interactive instructions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Phaser 3 Physics Framework:&lt;/strong&gt; I utilized Phaser to drive the 2D gameplay engine loops, platform collisions, player vector tracking, weapon projectiles, and sprite animations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic Geometry Pipeline (&lt;code&gt;buildLevelMap&lt;/code&gt;):&lt;/strong&gt; Instead of using standard static level switching, I built a pipeline that completely wipes the canvas physics groups and procedurally constructs unique floor structures, target positions, variable enemy speeds, and distinct environmental colors across 8 progressive sectors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bi-Tier Operational Loop:&lt;/strong&gt; I structured each level to follow a rigorous logic gate workflow. You first provide an answer to a &lt;strong&gt;Training Matrix&lt;/strong&gt; conceptual problem (Arrays, Search Algorithms, Sorts, Linked Lists, Stacks, Queues, Binary Trees, and the Halting Problem). Correctly solving it releases binary color-coded glitch anomalies. Once purged, you return right back to the terminal mainframe to crack the &lt;strong&gt;Mission Matrix&lt;/strong&gt; override and advance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State Isolation Overhaul:&lt;/strong&gt; I implemented safe-frame transaction locks (&lt;code&gt;this.transitioning&lt;/code&gt;) and automated tactical instructional labels (&lt;code&gt;this.phaseAlert&lt;/code&gt;). This allowed me to solve the critical UX blindspot of players getting disoriented during map transitions, cleanly guiding them when to fight anomalies and when to log back into the mainframe terminal.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prize Category
&lt;/h2&gt;

&lt;p&gt;I am officially submitting my game to the following category:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Ode to Alan Turing:&lt;/strong&gt; The entire core narrative, timeline, mechanics, and architecture of my project serve as a tribute to Turing’s profound legacy. Players interface directly with a simulated &lt;strong&gt;Turing Bombe&lt;/strong&gt; device, manage binary tape states, and run through a progression of fundamental algorithmic breakthroughs that he pioneered—culminating in breaking code blocks tied directly to the &lt;em&gt;Turing Test&lt;/em&gt; and &lt;em&gt;The Halting Problem&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Thanks
&lt;/h2&gt;

&lt;p&gt;A huge thank you to the DEV team and the organizers of the &lt;strong&gt;June Solstice Game Jam&lt;/strong&gt;! &lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>gamechallenge</category>
      <category>gamedev</category>
    </item>
  </channel>
</rss>
