<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Oodo Roland Uchenna on Medium]]></title>
        <description><![CDATA[Stories by Oodo Roland Uchenna on Medium]]></description>
        <link>https://medium.com/@rocodeify?source=rss-e94e0cb2c925------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kiO4__GE1gfH5zcdASiBNg.jpeg</url>
            <title>Stories by Oodo Roland Uchenna on Medium</title>
            <link>https://medium.com/@rocodeify?source=rss-e94e0cb2c925------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 09:14:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rocodeify/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Deploy Node.js to Production: Fix Redis Errors, Memory Issues & More]]></title>
            <link>https://rocodeify.medium.com/how-to-deploy-node-js-to-production-fix-redis-errors-memory-issues-more-f27d16345f63?source=rss-e94e0cb2c925------2</link>
            <guid isPermaLink="false">https://medium.com/p/f27d16345f63</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[fullstack-development]]></category>
            <dc:creator><![CDATA[Oodo Roland Uchenna]]></dc:creator>
            <pubDate>Wed, 26 Nov 2025 08:02:12 GMT</pubDate>
            <atom:updated>2025-11-26T08:02:12.263Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2xjQpYDoWJKK2tNUn1ioLQ.png" /></figure><p>Okay, so… I just deployed my full-stack app to production.</p><p>I thought it would take 30 minutes.</p><p>It took 2 hours. Two. Hours.</p><p>So here’s the deal:</p><p>I’m going to walk you through exactly what happened.</p><p>The good parts, the frustrating parts, and — most importantly — the solutions that actually worked.</p><p>Let’s go.</p><h3>The Stack</h3><p>Before I dump all my problems on you, here’s what I’m working with:</p><ul><li><strong>Backend</strong>: Node.js + Express</li><li><strong>Frontend</strong>: React + Vite</li><li><strong>Database</strong>: MongoDB</li><li><strong>Cache</strong>: Redis</li><li><strong>Server</strong>: Ubuntu VPS with 3.8GB RAM (budget-friendly, but… I’ll get to that)</li><li><strong>Containerization</strong>: Docker Compose</li><li><strong>Web Server</strong>: Nginx</li><li><strong>SSL</strong>: Let’s Encrypt via Certbot</li></ul><p>Alright, let’s dive into the chaos.</p><h3>Step 1: Server Setup (This Part Was Actually Fine)</h3><h4>Creating a Non-Root User</h4><p>First things first — I’m not running everything as root. That’s just asking for trouble.</p><pre># SSH into your VPS<br><br>ssh root@your-vps-ip<br><br># Create deploy user<br><br>adduser deploy<br><br># Giving the deploy user admin privileges.# SSH into your VPS<br><br>usermod -aG sudo deploy<br><br># Switch into the new user&#39;s account<br><br>su - deploy</pre><p>Easy enough.</p><p>This part?</p><p>Smooth sailing. No complaints.</p><h4>Installing Everything</h4><pre>nginx sudo apt update &amp;&amp; sudo apt upgrade -y<br><br>sudo apt install -y curl git ufw fail2ban</pre><p>This installs these tools on your server:</p><ul><li><strong>curl</strong> → tool for making HTTP requests.</li><li><strong>git</strong> → version control (clone your repo, etc).</li><li><strong>ufw</strong> → firewall for controlling what ports are open.</li><li><strong>fail2ban</strong> → security tool that bans IPs after repeated attacks.</li><li><strong>nginx</strong> → web server that will serve your app.</li></ul><p>-y means “<strong>don’t ask me questions</strong>, just install everything.”</p><p>Done. Moving on.</p><h3>Firewall Setup</h3><pre>sudo ufw allow OpenSSH<br><br>sudo ufw allow &#39;Nginx Full&#39;  # Ports 80 &amp; 443<br><br>sudo ufw enable</pre><blockquote><em>If you don’t allow OpenSSH before enabling UFW (Uncomplicated Firewall), you can lock yourself out of the server.</em></blockquote><p>That’s why I had to run sudo ufw allow OpenSSH first.</p><p>Done.</p><p>On to the fun stuff.</p><h3>Step 2: Docker (Where Things Got Interesting)</h3><p>I’ve worked with Docker before, but production deployment has its own set of challenges.</p><p>The networking nuances, service discovery, and container orchestration — each environment teaches you something new.</p><pre># Install Docker<br><br>curl -fsSL https://get.docker.com | sh<br><br>sudo usermod -aG docker $USER<br><br># Log out and back in (this is important!)<br><br>exit<br><br>ssh deploy@your-vps-ip<br><br># Install Docker Compose plugin<br><br>sudo apt install -y docker-compose-plugin<br><br># Verify it worked<br><br>docker --version<br><br>docker compose version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*mTHWubfdZUf-rWOqBeG-xw.png" /></figure><p>Cool, Docker is installed.</p><p>Now the real fun begins.</p><h3>Step 3: Backend Deployment (Where Everything Went Wrong)</h3><h4>Cloning the Repo</h4><pre>cd ~<br><br>mkdir -p apps &amp;&amp; cd apps<br><br>git clone https://github.com/youruser/your-backend.git backend<br><br>cd backend</pre><p>New to Linux commands?</p><p>If you’re not familiar with commands like cd, mkdir, ls, or navigating the Linux file system, check out this <a href="https://zeenomtech.com/master-linux-file-system-commands-easy-tips-for-beginners/">comprehensive Linux file system commands guide</a> —it’ll help you feel more comfortable working in the terminal.</p><p>Smooth so far.</p><blockquote><em>But as any experienced developer knows, deployment always has surprises.</em></blockquote><h3>Setting Up Environment Variables</h3><p>I copied my <strong>.env.example</strong> to <strong>.env.production</strong> and started filling it out.</p><p>Here’s the critical configuration that makes or breaks your deployment:</p><pre>NODE_ENV=production<br>PORT=<br>MONGO_URI=<br>REDIS_HOST=<br>REDIS_PORT=<br>REDIS_URL=<br>LOG_TO_FILE=true</pre><blockquote><strong><em>Key thing to remember:</em></strong><em> Inside Docker containers, localhost doesn’t mean what you think it means.</em></blockquote><blockquote><em>Each container has its own network namespace.</em></blockquote><blockquote><em>So instead of localhost, you use the service name from your docker-compose.yml. In this case, redis and mongo.</em></blockquote><h3>The Dockerfile</h3><p>Create a Dockerfile (if it doesn’t already exist):</p><pre>vim Dockerfile<br><br># or use nano if you prefer<br><br>nano Dockerfile</pre><p><strong>Quick tip: </strong>If you’re new to <a href="https://www.vim.org/">vim</a> (or if you’ve ever gotten stuck trying to exit it, we’ve all been there),</p><p>I’ve got a <a href="https://medium.com/@rocodeify/how-to-use-vim-for-linux-users-a-step-by-step-guide-717a933587">step-by-step vim guide</a> that covers the basics, including how to save and exit without losing your mind.</p><p>Paste:</p><pre>FROM node:20-alpine<br><br>WORKDIR /app<br><br>COPY package*.json ./<br><br>RUN npm ci<br><br>COPY . .<br><br>ENV NODE_ENV=production<br><br>EXPOSE 3000<br><br>CMD [&quot;npm&quot;, &quot;run&quot;, &quot;start&quot;]</pre><p>Save.</p><p>Pretty standard. Nothing fancy here.</p><h4>docker-compose.yml (The Configuration That Tested My Patience)</h4><pre>vim docker-compose.yml<br><br># or<br><br>nano docker-compose.yml</pre><p>Tweak names/ports as needed:</p><pre>services:<br>  api:<br>    build: .<br>    container_name: backend-api<br>    restart: unless-stopped<br>    ports:<br>      - &quot;127.0.0.1:3000:3000&quot;  # Only bind to localhost (security!)<br>    env_file:<br>      - .env.production<br>    depends_on:<br>      - mongo<br>      - redis<br>    volumes:<br>      - ./logs:/app/logs<br>  mongo:<br>    image: mongo:6<br>    restart: unless-stopped<br>    volumes:<br>      - mongo_data:/data/db<br>    environment:<br>      - MONGO_INITDB_DATABASE=myDB<br>  redis:<br>    image: redis:7-alpine<br>    restart: unless-stopped<br>volumes:<br>  mongo_data:</pre><blockquote><em>This keeps the API bound only to localhost; Nginx will proxy to it.</em></blockquote><p>Looks simple, right?</p><p>Hah. Just wait.</p><h3>Building and Running</h3><pre>docker compose build<br><br>docker compose up -d<br><br>docker compose logs -f api</pre><p>I ran this.</p><p>Everything started.</p><p>The containers were up.</p><p>But when I checked the health endpoint,</p><pre>curl -s http://127.0.0.1:3000/healthz</pre><p>I saw this:</p><pre>{<br>  &quot;status&quot;: &quot;degraded&quot;,<br>  &quot;mongo&quot;: 1,<br>  &quot;redis&quot;: &quot;disconnected&quot;,<br>  &quot;timestamp&quot;: &quot;2025-11-10T16:38:30.601Z&quot;<br>}</pre><p><em>(Note: Timestamp shown for context)</em></p><blockquote><em>MongoDB was connected, but Redis showed as “disconnected.”</em></blockquote><h3>The Problems (And How I Solved Them)</h3><h4>Problem #1: Redis Connection Refused (The Redis v4 Configuration Issue)</h4><p>The health check revealed the issue, but the real problem was in the logs:</p><pre>ECONNREFUSED ::1:6379</pre><p>Over and over.</p><p>Every few seconds.</p><p>My logs were just… spam.</p><h4>My Debugging Process:</h4><p>I started with the standard troubleshooting checklist:</p><ul><li>Verified Redis container was running and healthy</li><li>Checked network connectivity between containers</li><li>Confirmed environment variables were being passed correctly</li><li>Reviewed Redis client configuration against the latest documentation</li></ul><p>The error pointed to a connection issue, but the containers were running fine. That’s when I realized the problem wasn’t with the infrastructure — it was with how the Redis client was being configured.</p><h4>The Root Cause:</h4><p>Redis v4 changed how you configure the client.</p><p>The old way with host and port options?</p><p>Those are ignored now.</p><p>The client just… doesn’t use them.</p><p>No error, no warning. It just silently fails.</p><p>The Fix (That Actually Worked):</p><pre>// ❌ This doesn&#39;t work in Redis v4 (but no error tells you that)<br><br>createClient({<br>  host: &#39;localhost&#39;,<br>  port: 6379<br>})<br><br>// ✅ This is what you need<br><br>const redisUrl = process.env.REDIS_URL || `redis://${process.env.REDIS_HOST || &#39;redis&#39;}:${process.env.REDIS_PORT || 6379}`;<br>this.client = createClient({<br>  url: redisUrl,<br>  socket: {<br>    reconnectStrategy: (retries) =&gt; Math.min(retries * 100, 3000),<br>  },<br>});</pre><p>Once I identified the root cause, the fix was straightforward.</p><p>I updated the code to use Redis v4’s URL-based configuration, rebuilt the container, and it worked immediately.</p><pre>curl -s http://127.0.0.1:3000/healthz</pre><pre>{<br>  &quot;status&quot;: &quot;ok&quot;,<br>  &quot;mongo&quot;: 1,<br>  &quot;redis&quot;: &quot;connected&quot;,<br>  &quot;timestamp&quot;: &quot;2025-11-10T17:01:27.727Z&quot;<br>}</pre><p><em>(Note: Timestamp shown for context)</em></p><p>Awesome!</p><blockquote><em>Backend container is now up and running successfully</em></blockquote><p>The solution itself is simple — the challenge was identifying the root cause.</p><p>Redis was showing “<strong>disconnected”</strong> because inside the container it tries to connect to localhost:6379.</p><p>Within Docker, localhost points to the container itself, not the Redis service.</p><h4>Problem #2: Port Already in Use (The Quick Win)</h4><p>This one was straightforward to resolve.</p><pre># Find what&#39;s using port 3000<br><br>sudo lsof -i :3000</pre><p>I verified it was a leftover development server (not a critical service), so I terminated it:</p><pre># Kill it (only after confirming it&#39;s safe to do so)<br><br>sudo kill &lt;PID&gt;</pre><p><strong>Best Practice:</strong> Always verify what’s running on a port before killing it.</p><p>If you’re unsure, the safer approach is to change the port mapping in <strong>docker-compose.yml</strong> instead:</p><pre>ports:<br>  - &quot;127.0.0.1:4000:3000&quot;  # Use a different host port</pre><h3>Step 4: Nginx Reverse Proxy (The Part That Actually Worked)</h3><blockquote><em>Now I need to make the backend reachable from the outside via Nginx and HTTPS.</em></blockquote><p>This part?</p><p>Smooth sailing.</p><p>Nginx is amazing.</p><p>Here’s what I did:</p><h4>Install and Enable Nginx</h4><pre>sudo apt install -y nginx<br><br>sudo systemctl enable --now nginx</pre><p>Then verify:</p><pre>sudo systemctl status nginx</pre><p>Example output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fuprmUyusBnA1XXHBpiRFg.png" /></figure><p>Nginx is running successfully.</p><h4>Creating the Server Block</h4><p>This will proxy <strong>api.mydomain.com</strong> (the backend domain) to the container on <strong>127.0.0.1:3000</strong>.</p><pre>sudo vim /etc/nginx/sites-available/backend-api.conf</pre><p>Content:</p><pre>server {<br>    listen 80;<br>    listen [::]:80;<br>    server_name api.mydomain.com;<br><br># Security headers<br>    add_header X-Frame-Options SAMEORIGIN;<br>    add_header X-Content-Type-Options nosniff;<br>    add_header Referrer-Policy no-referrer;<br>    location / {<br>        proxy_pass http://127.0.0.1:3000;<br>        proxy_set_header Host $host;<br>        proxy_set_header X-Real-IP $remote_addr;<br>        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>        proxy_set_header X-Forwarded-Proto $scheme;<br>        proxy_buffering off;<br>    }<br>}</pre><h4>Enabled the Site and Tested</h4><pre>sudo ln -s /etc/nginx/sites-available/backend-api.conf /etc/nginx/sites-enabled/</pre><pre>sudo nginx -t</pre><pre>sudo systemctl reload nginx</pre><p>Tested it.</p><p>Worked perfectly.</p><p>Before moving to HTTPS, I confirmed the proxy was working correctly.</p><p>Everything connected smoothly.</p><p>Finally, something that just worked without any debugging!</p><h3>Step 5: SSL Certificate (The Free Part)</h3><p>Let’s Encrypt is amazing.</p><p>Free SSL certificates? Yes.</p><pre>sudo apt install -y certbot python3-certbot-nginx<br><br>sudo certbot --nginx -d api.mydomain.com</pre><p>Followed the prompts.</p><p>Certbot does all the heavy lifting.</p><p>It even updates your Nginx config automatically.</p><p>I tested it:</p><pre>curl -I https://api.mydomain.com/healthz</pre><p>Bash</p><blockquote><em>HTTP/2 200. Beautiful.</em></blockquote><p>Backend is live over HTTPS at api.mydomain.com.</p><p><strong>Here’s what I’ve accomplished:</strong></p><ul><li>Docker stack is healthy (healthz shows status: “ok”)</li><li>Redis/Mongo connected via internal services</li><li>Nginx proxies api.mydomain.com → `127.0.0.1:3000`</li><li>Let’s Encrypt certificate installed; HTTPS check passes</li></ul><h3>Step 6: Frontend Deployment (Where My VPS Almost Died)</h3><h4>Building the Frontend</h4><p>I cloned the repo:</p><pre>cd ~/apps<br><br>git clone https://github.com/&lt;my-account&gt;/&lt;frontend-repo&gt;.git frontend<br><br>cd frontend</pre><p>Then ran</p><pre>npm ci</pre><p>and then…</p><pre>npm run build</pre><p>Example output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kYOfwQSG2HErnnF96gZGVQ.png" /></figure><p>And it hung.</p><p>Just… hung there.</p><p>For 10 minutes.</p><p>Nothing happening.</p><p>I canceled it. Tried again.</p><p>Same thing. Canceled.</p><p>Tried again. Same thing.</p><h4>Problem #3: Out of Memory (The VPS Killer)</h4><p>My VPS has 3.8GB of RAM.</p><p>That should be enough, right?</p><p>Wrong.</p><p>The build was trying to transform framer-motion and just… ran out of memory. No error. No crash.</p><p>Just… stopped responding.</p><p>What I Did:</p><p>First, I checked the resource usage:</p><pre>htop</pre><p>RAM was nearly maxed out, (about 3 GB used of 3.8 GB) and there’s no swap at all.</p><p>That explains why Vite keeps stalling once the build ramps up</p><p>The culprit?</p><p>My VS Code remote session was consuming massive amounts of memory — maxing out the available space on my VPS.</p><p>Killed unnecessary processes:</p><pre># VS Code servers were eating 1GB+ each<br><br>pkill -f .vscode-server</pre><p>Those VS Code server processes were consuming over a gig each.</p><p>With them gone, I freed up a lot of memory.</p><p>(Yes, I got kicked out of VS Code remote, but it was worth it.)</p><p>And it worked!</p><p>Finally.</p><p><strong>The build completed in about 3 minutes.</strong></p><h4>Problem #4: Case Sensitivity (The “Works on My Machine” Classic)</h4><p>After the build finally worked, I got this error:</p><pre>Could not resolve &quot;../../components/shared/filterTabs&quot;</pre><p>But it worked on my Windows machine!</p><p>What gives?</p><p>Oh right.</p><p>Linux is case-sensitive. Windows isn’t. The file was actually FilterTabs.jsx (capital F and T), but my import was lowercase.</p><p>Fixed the import, rebuilt, done. Classic.</p><h3>Deploying the Static Files</h3><pre>sudo mkdir -p /var/www/frontend<br><br>sudo rsync -av --delete dist/ /var/www/frontend/</pre><h3>Nginx Config for Frontend</h3><pre>server {<br>    listen 80;<br><br>    listen [::]:80;<br><br>    server_name mydomain.com www.mydomain.com;<br><br>    root /var/www/frontend;<br><br>    index index.html;<br><br>    # SPA fallback (important for React Router!)<br><br>    location / {<br>        try_files $uri $uri/ /index.html;<br>    }<br><br>    # Cache static assets (performance!)<br><br>    location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2)$ {<br>        expires 1y;<br>        add_header Cache-Control &quot;public, immutable&quot;;<br>    }<br>}</pre><p>Enabled it, got SSL, done.</p><p>Tested it:</p><pre>curl -I https://mydomain.com</pre><blockquote><em>HTTP/2 200. Frontend is live.</em></blockquote><p>Both backend and frontend are now running in production.</p><p>The app is live.</p><p>After 2 hours of debugging, it’s finally done.</p><h3>The Real Takeaways</h3><ul><li>Docker networking is different: localhost inside a container ≠ localhost on the host. Use service names. Understanding Docker’s networking model is crucial — check the <a href="https://docs.docker.com/network/">official Docker networking documentation</a> for deeper insights.</li><li>Memory matters: Small VPS? Monitor resource usage with htop and identify what’s consuming your memory. Sometimes it’s unexpected processes like VS Code remote sessions.</li><li>Case sensitivity will bite you: Test builds on Linux before deploying. Windows/macOS are case-insensitive; Linux isn’t. This catches many developers off guard.</li><li>Redis v4 changed things: URL-based config is required now. The old host/port options are ignored. The <a href="https://github.com/redis/node-redis">Redis Node.js client documentation</a> has the latest configuration details.</li><li>Read the logs: Seriously. The answers are usually there, buried in error messages. Structured logging makes this much easier.</li><li>It’s okay to struggle: I spent 2 hours on what should have been 30 minutes. That’s normal. Deployment is hard, it just is.</li></ul><h3>Additional Resources</h3><p>If you want to dive deeper into any of these topics, here are some valuable resources:</p><p><a href="https://docs.docker.com/network/">Docker Networking Documentation</a>: Comprehensive guide to Docker’s networking model</p><p><a href="https://nginx.org/en/docs/http/ngx_http_proxy_module.html">Nginx Reverse Proxy Guide</a>: Official Nginx proxy module documentation</p><p><a href="https://letsencrypt.org/docs/">Let’s Encrypt Documentation</a>: Everything you need to know about free SSL certificates</p><p><a href="https://github.com/redis/node-redis">Redis Node.js Client</a>: Official Redis client for Node.js with migration guides</p><p><a href="https://github.com/goldbergyoni/nodebestpractices">Node.js Production Best Practices</a>: Comprehensive checklist for Node.js production deployments</p><p><a href="https://zeenomtech.com/master-linux-file-system-commands-easy-tips-for-beginners/">Linux File System Commands Guide</a>: If you’re new to Linux, this covers all the essential file system commands</p><p><a href="https://medium.com/@rocodeify/how-to-use-vim-for-linux-users-a-step-by-step-guide-717a933587">Vim Editor Guide</a>: Step-by-step guide to using vim (including how to exit it — because we’ve all been there)</p><h3>Final Thoughts</h3><p>Look, deployment is hard. It just is. But it’s also… kind of satisfying when everything finally works?</p><p>I’m writing this because I wish I had this guide when I started.</p><p>Not the perfect, sanitized version — but the real one. The one where things break and you have to figure out why.</p><p>If you’re reading this and you’re stuck, know that you’re not alone. I was stuck too. We all are, at some point.</p><h3>Want More?</h3><p>If enough people want it, I’m thinking of making a video walkthrough.</p><p>Less reading, more watching.</p><p>If that sounds useful, drop a comment below and let me know.</p><p>I’ll prioritize it if there’s interest.</p><p>And hey — if you’ve deployed something recently, share your war stories in the comments.</p><p>What broke?</p><p>What surprised you?</p><p>What would you do differently?</p><p>We’re all learning together.</p><p><em>P.S. If you found this helpful, share it with someone who’s about to deploy their first app. Save them the 4 hours I spent debugging Redis connections.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f27d16345f63" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vertical vs Horizontal Scaling: 4 Costly Mistakes That’ll Kill Your App (And How to Avoid Them)]]></title>
            <link>https://rocodeify.medium.com/vertical-vs-horizontal-scaling-4-costly-mistakes-thatll-kill-your-app-and-how-to-avoid-them-9440429be978?source=rss-e94e0cb2c925------2</link>
            <guid isPermaLink="false">https://medium.com/p/9440429be978</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[scaling]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Oodo Roland Uchenna]]></dc:creator>
            <pubDate>Thu, 30 Oct 2025 08:01:55 GMT</pubDate>
            <atom:updated>2025-10-30T08:01:55.697Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*e3zvarxet2FogxioKE-0Ug.png" /></figure><p>Your server CPU is at 80%. Memory’s creeping up. Users are complaining.</p><p>Time to scale. But which way? 🔄</p><p>Most tutorials make this way more complicated than it needs to be.</p><p>Let me break it down in plain English.</p><p><strong>VERTICAL SCALING (Scale Up)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dVyl7UFhUT1EB4I994r80Q.png" /></figure><p>Upgrade your existing server. More CPU. More RAM. Faster storage.</p><p>Like upgrading your car’s engine from 4-cylinder to 8-cylinder.</p><p>Same car. More power.</p><p><strong>Pros:</strong><br>✅ Simple — just bigger hardware<br>✅ No load balancer needed<br>✅ Lower latency<br>✅ Easy to debug</p><p><strong>Cons:</strong><br>❌ Single point of failure<br>❌ Hits hardware limits<br>❌ Gets expensive fast<br>❌ Downtime during upgrades</p><p><strong>Cost example:</strong><br>2GB RAM server: $12/month<br>8GB RAM server: $48/month<br>64GB RAM server: $480/month</p><p>The math? 4x resources = 4x cost.</p><p><strong>HORIZONTAL SCALING (Scale Out)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PO17xGn0xEGVMUrKQF_IBw.png" /></figure><p>Add more servers instead of making one bigger.</p><p>3 servers instead of 1 giant one.<br>A load balancer divvies up the work.</p><p>Like going from 1 delivery truck to a whole fleet.</p><p><strong>Pros:</strong><br>✅ Fault tolerant — one dies, others keep going<br>✅ Can scale infinitely<br>✅ Better cost efficiency at scale<br>✅ Zero-downtime deployments<br>✅ Geographic distribution</p><p><strong>Cons:</strong><br>❌ More complexity<br>❌ Need a load balancer<br>❌ Network latency between servers<br>❌ Shared state gets tricky</p><p><strong>Cost example:</strong><br>3 servers × $12/month = $36/month<br>Same total resources as one $48/month server.<br>Cheaper. And more resilient.</p><p><strong>WHEN TO USE EACH:</strong></p><p><strong>Go Vertical When:</strong><br>→ You’re just starting out<br>→ Traffic is predictable<br>→ You want simplicity<br>→ Budget is tight</p><p>Note: Pre-launch or just launched? Start here. Don’t overcomplicate it.</p><p><strong>Go Horizontal When:</strong><br>→ You need high availability<br>→ Traffic is unpredictable<br>→ You want global reach<br>→ Zero-downtime matters<br>→ Your app is stateless</p><p>Note: Hit 10k+ daily active users? Downtime costs you money? Time to think horizontal.</p><p><strong>COMMON MISTAKES:</strong></p><p>❌ Going horizontal too early<br>Team of 2, 100 users, setting up Kubernetes? Overkill. <br>→ Start simple.</p><p>❌ Storing state on servers<br>Users log in on Server 1, next request goes to Server 2. Session gone. User logged out.<br>→ Fix: Store sessions in Redis or your database</p><p>❌ Not planning for database load<br>10 backend servers hammering one database? Bottleneck city.<br>→ Fix: Connection pooling, read replicas, aggressive caching</p><p>❌ Ignoring health checks<br>Server crashes, load balancer keeps sending traffic. Users get errors.<br>→ Fix: Configure health check endpoints</p><p><strong>THE BOTTOM LINE:</strong></p><p>Start simple. Scale when you need to.</p><p>Don’t overthink it. Don’t scale prematurely.</p><p>But when you need to scale? Now you know how.</p><h3>Further Reading</h3><p>If you found this helpful, you might also want to check out these posts:</p><h3><a href="https://zeenomtech.com/the-n1-problem-thats-killing-your-app-performance-and-how-i-fixed-it/">The N+1 Problem That’s Killing Your App Performance (And How I Fixed It)</a></h3><p>Before you even think about scaling, make sure you’re not shooting yourself in the foot with slow database queries. This post shows you exactly how to identify and fix the N+1 problem that’s probably slowing down your app right now.</p><h3><a href="https://zeenomtech.com/node-js-image-upload-and-storage-simplified-with-cloudinary/">Node.js Image Upload and Storage Simplified with Cloudinary</a></h3><p>When you’re building stateless apps for horizontal scaling, you can’t store files on your servers. This guide shows you how to handle file uploads properly with Cloudinary.</p><h3><a href="https://zeenomtech.com/master-linux-file-system-commands-easy-tips-for-beginners/">Master Linux File System Commands: Easy Tips for Beginners</a></h3><p>When you’re managing multiple servers, you’ll need to know your way around the Linux command line. This beginner-friendly guide covers the essential commands you’ll actually use.</p><p>Which one are you using? What’s been your biggest scaling challenge?</p><p>Drop it in the comments 👇</p><p><a href="https://www.linkedin.com/search/results/all/?keywords=%23scaling&amp;origin=HASH_TAG_FROM_FEED">#Scaling</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23devops&amp;origin=HASH_TAG_FROM_FEED">#DevOps</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23backenddevelopment&amp;origin=HASH_TAG_FROM_FEED">#BackendDevelopment</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23systemdesign&amp;origin=HASH_TAG_FROM_FEED">#SystemDesign</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23softwareengineering&amp;origin=HASH_TAG_FROM_FEED">#SoftwareEngineering</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23techtalk&amp;origin=HASH_TAG_FROM_FEED">#TechTalk</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23webdevelopment&amp;origin=HASH_TAG_FROM_FEED">#WebDevelopment</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9440429be978" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The N+1 Problem That’s Killing Your App Performance (And How I Fixed It)]]></title>
            <link>https://rocodeify.medium.com/the-n-1-problem-thats-killing-your-app-performance-and-how-i-fixed-it-5e2146f5b050?source=rss-e94e0cb2c925------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e2146f5b050</guid>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[n-plus-1-queries]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[mongodb]]></category>
            <dc:creator><![CDATA[Oodo Roland Uchenna]]></dc:creator>
            <pubDate>Wed, 22 Oct 2025 00:42:14 GMT</pubDate>
            <atom:updated>2025-10-22T00:42:14.458Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*pEXjCWQJzxCks7IwaXxmtA.png" /></figure><blockquote>Spoiler: It wasn’t my server specs.</blockquote><p>So there I was, deploying my app — can’t drop the real name, NDA things</p><p>— feeling pretty good about myself. Everything worked perfectly in development, right?</p><p>Wrong.</p><p>The moment real users started hitting my API, everything went to hell. Response times went from 200ms to 5+ seconds.</p><p>My database was screaming.</p><p>Users were complaining.</p><p>I was panicking.</p><p><em>“But it works fine on my machine!”</em></p><p>Turns out, I was making the classic <strong>N+1</strong> mistake. And honestly? I had no idea what that even meant until I spent 3 days debugging this mess.</p><h3>What the Heck is N+1?</h3><p><strong>Picture this:</strong> You’re fetching 100 courses from your database.</p><p>Sounds simple, right?</p><p><strong>What I was doing (the wrong way):</strong></p><pre>// ❌ This looks innocent but it&#39;s a performance killer<br>const courses = await Course.find({}); // 1 query<br><br>for (let course of courses) {<br>    const creator = await User.findById(course.createdBy); // 100 more queries!<br>    course.creator = creator;<br>}</pre><p>Total queries: 101</p><p>That’s 101 round trips to your database.</p><p>Each one takes time.</p><p>Multiply that by concurrent users, and boom — your server is toast.</p><p><strong>Here’s what my server logs looked like:</strong></p><pre>Query 1: Find courses (200ms)<br>Query 2: Find user for course 1 (50ms)<br>Query 3: Find user for course 2 (50ms)<br>Query 4: Find user for course 3 (50ms)<br>... (you get the idea)</pre><blockquote><em>Total time: 5.2 seconds for what should have been a 200ms request.</em></blockquote><p><strong>What I should have done:</strong></p><pre>//  One query with a join - much better!<br>const courses = await Course.find({})<br>    .populate(&#39;createdBy&#39;, &#39;firstName lastName email&#39;); // Just 1 query!</pre><p>Total queries: 1</p><h3>The 3 Fixes You Can Implement Today</h3><h3>1. Use Populate (Mongoose)</h3><pre>// Instead of this mess:<br>const courses = await Course.find({});<br>for (let course of courses) {<br>    course.creator = await User.findById(course.createdBy);<br>}<br><br>// Do this:<br>const courses = await Course.find({})<br>    .populate(&#39;createdBy&#39;, &#39;firstName lastName email&#39;);</pre><h3>2. Add Database Indexes</h3><pre>// In your model file:<br>courseSchema.index({ createdBy: 1 }); // Index foreign keys<br>courseSchema.index({ status: 1, createdAt: -1 }); // Compound indexes</pre><h3>3. Use Aggregation for Complex Queries</h3><pre>// When you need multiple joins:<br>const result = await Course.aggregate([<br>    {<br>        $lookup: {<br>            from: &#39;users&#39;,<br>            localField: &#39;createdBy&#39;,<br>            foreignField: &#39;_id&#39;,<br>            as: &#39;creator&#39;<br>        }<br>    }<br>]);</pre><h3>The Real Impact</h3><p>After fixing this, my app went from handling 50 concurrent users to 500+.</p><p>Same server, same codebase, just better queries.</p><p>Performance improvement: 96% faster</p><p>User capacity: 10x increase</p><p>My sanity: Restored</p><h3>What’s Your Experience?</h3><p>Have you run into the N+1 problem?</p><p>What was your “oh shit” moment when you realized your queries were the bottleneck?</p><p>Drop a comment below — I’d love to hear your war stories!</p><p>If you want to understand different loop patterns in <a href="https://www.w3schools.com/js/">JavaScript</a>, check out my earlier post:</p><p><a href="https://zeenomtech.com/confused-about-javascript-loops-we-can-help/">Confused About JavaScript Loops? We Can Help.</a></p><p>And if you want a deeper dive into the N+1 issue, this article is a great read:</p><p><a href="https://accreditly.io/articles/what-is-the-n1-problem-javascript-edition">What Is the N+1 Problem — JavaScript Edition (Accreditly)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e2146f5b050" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux Made Easy: Level Up Your Command Line Skills!]]></title>
            <link>https://rocodeify.medium.com/linux-made-easy-level-up-your-command-line-skills-fcc57a757865?source=rss-e94e0cb2c925------2</link>
            <guid isPermaLink="false">https://medium.com/p/fcc57a757865</guid>
            <category><![CDATA[terminal-commands]]></category>
            <category><![CDATA[shell]]></category>
            <category><![CDATA[linux-commands]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[command-line]]></category>
            <dc:creator><![CDATA[Oodo Roland Uchenna]]></dc:creator>
            <pubDate>Tue, 01 Oct 2024 15:37:10 GMT</pubDate>
            <atom:updated>2024-10-01T15:37:10.169Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Linux commands — how to navigate the terminal" src="https://cdn-images-1.medium.com/max/1024/1*t81sd7gQ7tfwf05UIknF7w.png" /></figure><p>Are you having trouble with Linux file system commands?</p><p>Yeah, I know — it can feel pretty crazy when you are trying to figure it all out. Don’t worry, it’s totally normal to feel confused at first.</p><p>But with a little practice, you’ll see that it’s actually a great way to organize and manage your files efficiently — and yes, quickly!</p><p>As a developer, DevOps person, DB administrator e.t.c., it is important to understand how to navigate and work around the Linux system.</p><p>Most production environments are hosted on Linux, so having a bit of knowledge about Linux commands is really handy — especially when it comes to installing development packages.</p><p>In this post, I will explain Linux file system commands step by step. We will go over folder structure, the key commands, and some simple tips for managing your files and folders.</p><p>Whether you are new to Linux or just need a quick refresher, this guide will help you feel more comfortable using it. So, let’s dive in and get started!</p><h3>Linux System Folder Structure</h3><p>Have you ever wondered how the Linux file system is structured?</p><p>C’mon! Back in the day, I thought it was just like my Windows setup, you know, with a Local Disk (C:) and some folders inside. Seriously, I am sure you have thought the same at some point too.</p><p>Well, here is the thing — Linux is totally different from Windows.</p><p>Instead of the usual “C:” drive, Linux organizes everything in a hierarchical structure, starting from the root directory, which is simply represented by “/”. Wild, right?</p><p>In a Linux system, everything branches out from this root directory. Let’s take a look at some of the key directories you will find in a typical Linux setup:</p><ul><li>“/etc” for configuration files,</li><li>“/usr” for user-installed software,</li><li>“/home” for user home directories,</li><li>“/media” contains removable devices,</li><li>“/tmp” contains temporary files</li><li>“/opt” contains third-party applications</li><li>etc.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jkm41o6APDMeTK5s" /></figure><h3>Navigating the Linux File System Commands</h3><p>The command line interface (CLI) is the primary way to navigate the file system in a Linux system.</p><blockquote><em>Working on the command line can be amazing, no doubt! But seriously, double-check the commands you type while following this guide — there’s no undo button here. The command line assumes you’re a pro with your tools, so mistakes can happen fast. And yeah, even one wrong command could have you tearing up! Trust me, it’s true. So, always cross-check before you hit that enter key.</em></blockquote><h3>Illustration 1:</h3><p>To see your current location in the file system, use the command pwd (print working directory)</p><pre>pwd</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/0*nz38eN_Y9DcAEklf" /></figure><blockquote><em>This shows that am currently on my Desktop located inside a folder called “roland” in the “home directory”</em></blockquote><h3>Illustration 2:</h3><p>To see the contents of a directory, use the command ls (list) followed by the path of the directory.</p><pre>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/0*OV-GrtE1Zvi5S6lI" /></figure><h3>Illustration 3:</h3><p>To change your current directory, use the command cd (change directory) followed by the path of the directory (folder) you want to navigate to:</p><pre>cd Desktop</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/0*E9LiAfT5NT4u_58m" /></figure><blockquote><em>From here, we tried moving from the current directory (which is “roland”) into the Desktop directory.</em></blockquote><h3>Commonly used Linux file system commands</h3><ul><li>pwd: displays the current working directory</li><li>cd: changes the current working directory</li><li>ls: list the contents of the current working directory</li><li>mkdir: create a new directory</li><li>rm: delete a file or a directory</li><li>mv: rename or move a file or a directory</li></ul><h3>Using Wildcards</h3><p>Have you ever wondered how you can select all the .js, .php, .doc, or even .txt files in a particular folder or directory all at once?</p><p>I bet you are thinking, “Wait, is that even possible?”</p><p>Well, yes, it is! But only from the command line. On a graphical interface like Windows, you can not do this in one go.</p><blockquote><em>This is where wildcards come into play.</em></blockquote><p>Wildcards allow you to use special characters to match multiple files or directories at once.</p><p>Examples:</p><ul><li>ls *.html will list all files with the .html extension in the current directory</li><li>rm -r /tmp/* will remove all files and directories in the /tmp directory</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/0*qkfJwxrisa1feMjB" /></figure><h3>Creating, Renaming, and Deleting Directories</h3><ul><li>To create a new directory, use the “mkdir” command followed by the name of the new directory. For example, Let’s create a directory with the name “my_projects”</li></ul><pre>mkdir my_projects</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/0*MtvyST9176Tzt3j2" /></figure><blockquote><em>This creates a new directory (folder) with the name “my_projects”</em></blockquote><ul><li>To rename a directory, use the “mv” command followed by the current name of the directory and the new name.</li></ul><pre>mv old_directory new_directory</pre><p>Note: You are probably wondering where “old_directory” and “new_directory” are coming from, right? Well, they are just the names of the folder you want to rename and the new name you want to give it, simple as that!</p><ul><li>To delete a directory, use the “rmdir” command followed by the name of the directory</li></ul><pre>rmdir old_directory</pre><h3>Working with Permissions and Ownership</h3><p>One of the coolest things about using Linux is its security. Have you ever thought about having a file or folder you really do not want anyone to mess with? Like a secret vault filled with all your goodies! That is where permissions and ownership come in.</p><p>In Linux, every file and directory has its own permissions and ownership settings that determine who can access and change them. Pretty neat, right?</p><p>So, to check the permissions for a file or directory, just use the command “ls -l”, followed by the path of the file or directory.</p><p>Right now, let us see what the permissions and ownership look like for files and directories on my Desktop:</p><pre>ls -l</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/0*KA1H9RIqaSEdcHRO" /></figure><p>From the image above, you will see that the entries starting with the letter “d” are directories (or folders), while the rest are basic files.</p><p>Now, you might be thinking, “What the heck do those other letters mean?” Do not fret!</p><p>In a Linux system, we have three types of users:</p><ul><li>Owner</li><li>Group</li><li>Others</li></ul><p>After the d or –, the next three letters tell you about the owner’s permissions, the following three are for the group users, and the last three are for others.</p><p>The letters rwx stand for read, write, and execute permissions, respectively.</p><p>Let us break down the first entry in the image above, about.html, to understand its permissions:</p><p>The first part of the output shows -rw-rw-r–. Here’s what it all means:</p><ul><li>The first character, –, tells us this is a regular file (not a directory).</li><li>The next three characters, rw-, indicate the owner’s permissions:r means the owner can read the file.w means the owner can write to the file.– means the owner does not have execute permission.</li><li>The next three characters, rw-, are for the group permissions:r means the group can read the file.w means the group can write to the file.– means the group cannot execute it.</li><li>The final three characters, r–, show the permissions for others (everyone else):r means others can read the file. — means others cannot write or execute it.</li></ul><p>So, to sum it up for about.html:</p><ul><li>The owner and group can read and modify the file.</li><li>Others can only read it but cannot change or execute it.</li></ul><p>And that same breakdown applies to every entry in the list, though you will see different permissions depending on the files and directories!</p><p>For more info on Ownership, check out — <a href="https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-permissions">An Introduction to Linux Permissions</a></p><h3>Using the “ls” Command: Listing Files and Directories with Options</h3><p>You can use the ls command to list the files and directories in a specified directory.</p><h3>Here are some examples of how to use the ls command:</h3><ul><li>To list the files and directories in the current directory, simply enter “ls” in the terminal</li><li>To list the files and directories in a specific directory, enter “ls” followed by the path of the directory. For example, “ls Documents” will list the files and directories in the Documents directory.</li><li>To list the files and directories in a directory and its subdirectories, use the -R option. For example, “ls -R Documents“</li><li>To list the files and directions in a directory with more details such as permissions, owner, etc. use the -l option. For example, “ls -l”</li><li>To list the files and directories in a directory in a human-readable format such as file size, use the -h option. For example, “ls -lh Documents”</li><li>To list the files and directories in a directory in reverse order use the -r option. For example, “ls -r Documents”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/0*FwVVkx02J0NSgaGv" /></figure><blockquote><em>These are just a few examples of how you can use the ls command to list files and directories.</em></blockquote><p>There are many other options and flags that you can use with the ls command to customize the output and get the information you need.</p><p>For more Info on linux file system commands, Check — <a href="https://www.digitalocean.com/community/tutorials/linux-commands">Top 50+ Linux Commands You MUST Know</a></p><h3>How to display the content of a file</h3><p>You can use the cat, less, head and tail commands to display the contents of a file.</p><h3>Here are some examples of how to use these commands:</h3><ul><li>cat command: To display the entire content of a file, use the cat command followed by the name of the file. For example, cat file.txt will display the contents of the file.txt</li><li>less command: To display the contents of a file in a scrollable format, use the less command followed by the name of the file. For example, less file.txt will display the contents of the file.txt in a scrollable format, so you can move through the file using the up and down arrow keys.</li><li>head command: To display the top few lines of a file, use the head command followed by the name of the file. For example, head -n 10 file.txt will display the first 10 lines of the file.txt</li><li>tail command: To display the last few lines of a file, use the tail command followed by the name of the file. For example, tail -n 10 file.txt will display the last 10 lines of the file.txt</li></ul><blockquote><em>It is important to note that you should have permission to access the file and if the file is very large the output may take a long time to be displayed.</em></blockquote><h3>How to create a file or directory</h3><p>You can use the touch and mkdir commands to create a file or directory respectively.</p><h3>Here are some examples of how to use these commands:</h3><ul><li>touch command: To create a new empty file, use the touch command followed by the name of the file. For example, touch newfile.txt will create an empty file named “newfile.txt” in the current directory.</li><li>mkdir command: To create a new directory. Use the mkdir command followed by the name of the directory. For example, mkdir new_directory will create a new directory named “new_directory” in the current directory.</li><li>mkdir -p command: To create a directory tree, use the mkdir -p command followed by the directory tree. For example, mkdir -p newdirectory/subdirectory1/subdirectory2 will create a directory tree with the name “newdirectory” and the subdirectories “subdirectory1” and “subdirectory2”</li></ul><blockquote><em>With Linux file system commands, you can do all sorts of magic quickly and effortlessly. Honestly, that is one of the best parts about working with the command line.</em></blockquote><p>Did you know you can create multiple files at once? Yup, it is totally possible! The command line is not just a basic tool — it is a powerful machine ready to handle any task you throw at it.</p><p>In the snapshot above, we created multiple files in one go. Pretty cool, right? It saves you the hassle of creating them one by one.</p><p>I bet you can not even imagine all the amazing things you can do with the command line. Sounds exciting, doesn’t it?</p><h3>How to Remove a File or Directory in a Linux System</h3><p>You can use the rm and rmdir commands to remove a file and directory respectively. Here are some examples of how to use these commands:</p><ul><li>rm command: To remove a file, use the rm command followed by the name of the file. For example, rm file.txt will remove the file named file.txt from the current directory.</li><li>rm -r command: To remove a directory and its contents, use the rm -r command followed by the name of the directory. For example, rm -r mydirectory will remove the directory named “mydirectory” and all of its contents.</li><li>rmdir command: To remove an empty directory, use the rmdir command followed by the name of the directory. For example, rmdir mydirectory will remove the empty directory named “mydirectory”.</li></ul><blockquote><em>It is important to note that these commands will remove the files and directories permanently without any prompt, so be careful when using them.</em></blockquote><p>Also, you should have permission to remove the files and directories.</p><p>You can also use rm — i to remove files interactively, this command will prompt you for confirmation before removing a file.</p><p>You can also use rm -f to remove files forcibly, this command will remove files even if the files are write-protected and it will not prompt for confirmation.</p><h3>How to Move or Copy a File or Directory in a Linux System</h3><p>You can use mv and cp commands to move or copy a file or directory respectively.</p><p>Here are some examples of how to use these commands:</p><p>mv command: To move a file or directory, use the mv command followed by the source file or directory and the destination.</p><p>For example, mv file.txt mydirectory will move the file named “file.txt” from the current directory to the directory named “mydirectory”</p><p>cp command: To copy a file, use the cp command followed by the source file and the destination.</p><p>For example, cp file.txt mydirectory will copy the file named “file.txt” from the current directory to the directory named “mydirectory”.</p><p>cp -r command: To copy a directory and its contents, use the cp -r command followed by the source directory and the destination.</p><p>For example, cp -r mydirectory newdirectory will copy the directory named “mydirectory” and all of its contents to the directory named “newdirectory”.</p><blockquote><em>It is important to note that when moving or copying a file or directory, you should have the permission to access the source file or directory and the destination directory.</em></blockquote><p>When you move a file with the mv command, the original file is removed and replaced by the new location, while the cp command creates a new copy of the file in the new location.</p><h3>Resources</h3><ul><li>Want to delve deeper into the world of the Linux shell? <a href="http://linuxcommand.org/lc3_lts0020.php">Check here</a>, for an in-depth look at ‘Learning the Shell’ and start mastering the command line today!</li><li>Want a step-by-step guide on how to build and validate web forms in node.js, check out — <a href="https://zeenomtech.com/build-powerful-web-form-with-node-js-step-by-step-guide/">Build Powerful Web Form with Node.js (Step-by-Step Guide)</a></li></ul><h3>Conclusion</h3><p>Mastering the Linux file system is essential for any developer, DevOps person, DB administrator, etc. The file system is the backbone of any operating system and understanding it is crucial for managing and organizing files and directories.</p><p>This guide provided a complete overview of the Linux file system, including its structure, file permissions, and common commands for navigating and managing files and directories.</p><p>By understanding the concepts and techniques presented in this guide, you will be able to efficiently and effectively manage your Linux file system.</p><p>Keep practicing and experimenting with different commands and you will soon be a pro at managing the Linux file system.</p><blockquote><em>If you found this guide helpful, please leave a comment below or share it with others who may find it useful. Your feedback and support are greatly appreciated and help me to continue creating valuable resources.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fcc57a757865" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Node.js Image Upload and Storage with Cloudinary]]></title>
            <link>https://towardsdev.com/node-js-image-upload-and-storage-with-cloudinary-c1cbd39b433d?source=rss-e94e0cb2c925------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1cbd39b433d</guid>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[multer]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[cloudinary]]></category>
            <dc:creator><![CDATA[Oodo Roland Uchenna]]></dc:creator>
            <pubDate>Wed, 31 Jul 2024 20:54:52 GMT</pubDate>
            <atom:updated>2024-08-02T15:13:48.169Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*245VRjJWIaZXrWdu0idhYA.png" /></figure><p>I’m excited to share that I’m building a mini web app for inventory management. One thing is crucial — do you know what it is? Ugh, product images.</p><blockquote><em>You might ask, “How am I saving the images?” Yes, I thought about that as well.</em></blockquote><h3>Here it is:</h3><p>I’m processing the image files alongside other form inputs using Multer, a middleware for handling image files. For the images to be processed correctly, the enctype attribute needs to be set, which allows Multer to process the files.</p><p>Below is the breakdown of my code, keeping modularity in mind. My Express server is already up and running on port 3000.</p><h3>Here’s the HTML form (item_form.ejs), styled with Bootstrap@5.3.3:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/0*mt8thfz9zoI3POce" /></figure><p>Rendering HTML Form with node.js</p><blockquote><em>Note: Did you happen to notice anything about the category field? Ughh!</em></blockquote><p>Yes, we are getting the available categories directly from the database, which in this project is <a href="https://www.mongodb.com/">MongoDB</a>. This way, you only select from the available categories.</p><p>Below is the output of the HTML form above:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6RprIYpua0suJxBw" /></figure><p>HTML Form</p><p>With the form set up, we can now move on to processing the images and other inputs using Multer.</p><h3>Server-Side Processing with Multer</h3><p>To handle the image upload and form data processing, we need to configure Multer in our Express app.</p><h3>Here’s a step-by-step guide:</h3><p>Install Required Packages:</p><pre>npm install multer express-validator mongoose cloudinary</pre><h3>Set Up Cloudinary</h3><p>To start using Cloudinary for storing our image files, you’ll need to create an account with <a href="https://cloudinary.com/">Cloudinary</a>. This will give you access to the Cloudinary setup credentials for your project.</p><p>I already have an account, so feel free to <a href="https://cloudinary.com/">check Cloudinary</a> out as it is a great place to securely store our image files.</p><p>In our index.js file, we import cloudinary and set up the configuration by adding the snippet below to your existing code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ndBwnGa8zNO1ioT1" /></figure><p>Cloudinary config set up</p><blockquote><em>Note: After signing up with </em><a href="https://cloudinary.com/"><em>Cloudinary</em></a><em>, you will have access to your cloud name, API key, and API secret key.</em></blockquote><p>Here, I’ve saved my credentials in environment variables, which is a best practice for security reasons.</p><p>Now that we have Cloudinary set up, let’s move on to configuring Multer for handling file uploads.</p><h3>Setting Up Multer</h3><p>Multer is a Node.js middleware for handling multipart/form-data, which is primarily used for uploading files. In our case, it’s perfect for handling product images.</p><p>Here’s how we can set it up:</p><ol><li>Configure Multer Storage and File Filter</li></ol><p>We’ve created a multerMiddleware.js file to handle our Multer configuration.</p><p>Let’s dive into the code and understand each part:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hZb3bbIVSr3f80mc" /></figure><p>Node.js — file upload middleware</p><blockquote><em>If you’d like to copy any of the code snippets for your projects, you can view the complete write-up on my </em><a href="https://zeenomtech.com/node-js-image-upload-and-storage-simplified-with-cloudinary/"><em>blog</em></a><em>. I’ve used a code formatter there, making it easy to copy and paste the code directly into your own project.</em></blockquote><h3>Breaking Down the Code</h3><p>First, we import the necessary modules:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/0*jbE1dTxth2-Fcxa3" /></figure><p>Importing module in node.js</p><ul><li>multer: This is the main package we’re using for handling file uploads.</li><li>path: This Node.js module helps us handle and transform file paths.</li></ul><h3>Configuring Storage</h3><p>Next, we configure the storage options for Multer:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zaiMCH9bAZjl-TTT" /></figure><p>Setting up storage for uploading your files</p><ul><li>destination: This function sets the destination directory for the uploaded files. Here, we specify ‘public/uploads’.</li><li>filename: This function sets the filename for the uploaded files. We use a combination of the current timestamp and a random number to ensure each file has a UNIQUE NAME. We also preserve the original file extension using path.extname(file.originalname).</li></ul><h3>Configuring Multer Upload Settings</h3><p>Now, we configure Multer with storage options and file validation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hqJnW3V3GPeP4zqg" /></figure><p>Multer Upload Settings</p><p>upload is configured using multer({}), where we pass our storage configuration and define additional settings:</p><ul><li>fileFilter: This function validates the file type. We allow only JPEG, JPG, and PNG files by checking the MIME type and file extension.</li><li>limits: Sets a maximum file size limit of 5MB to prevent excessively large uploads.</li></ul><p>If you are interested in the full project, you can check it out on my <a href="https://github.com/rolix202/Inventory_mgt_app_v1">GitHub repository</a>.</p><blockquote><em>It’s got everything we’ve discussed here and more. Don’t forget to star the repo if you find it useful!</em></blockquote><h3>Handling File Upload</h3><p>Finally, we define a function to handle the file upload and export it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OSGoeGNIig2YK1aa" /></figure><p>Multer fileupload</p><ul><li>fileUpload: This is a <a href="https://www.geeksforgeeks.org/javascript-higher-order-functions/">higher-order function</a> that takes the field name (the name attribute of the file input in your form) and returns a middleware function.</li><li>upload.single(field_name): This middleware handles a single file upload for the specified field.</li><li>Error Handling: We check for errors related to Multer and file validation. If there is an error, we set req.fileValidationError to the error message. If no file is uploaded, we set a specific validation error message.</li></ul><p>And there you have it!</p><blockquote><em>By following these steps, you can set up Multer to handle image uploads in your Express app.</em></blockquote><p>This setup ensures that your images are saved with unique filenames, validated for type and size, and handled securely.</p><p>Isn’t it great to see how it all comes together?</p><p>Let’s keep this momentum going! 🚀</p><h3>Validating Form Fields</h3><p>To ensure that the rest of the form fields are validated properly, we’ll use <a href="https://www.npmjs.com/package/express-validator">express-validator</a>. This package helps in validating and sanitizing user input.</p><p>Let’s create a validationMiddleware.js file to handle the validation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/0*dwwdfVBX5kztZ179" /></figure><p>Node.js — validating user input</p><h3>Explanation of Validation Rules</h3><p>Let’s break down the validation rules to see what’s happening:</p><ul><li>Importing “body”: We import the body function from express-validator which allows us to validate and sanitize the fields in the request body.</li><li>Validation Array: We create an array of validation chains called add_item_validation.</li></ul><h3>Field-Specific Validation</h3><ol><li>Name Validation:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zDDFg1-zkvyY95t4" /></figure><p>Node.js — validation user input</p><ul><li>notEmpty(): Ensures that the name field is not empty.</li><li>withMessage(): Customizes the error message.</li><li>trim(): Removes whitespace from both ends of the string.</li><li>escape(): Replaces &lt;, &gt;, &amp;, ‘, and “ with their corresponding HTML entities to prevent HTML injection.</li></ul><blockquote><em>Note: We do the same for other form inputs.</em></blockquote><p>This ensures that our form submissions are both safe and correctly formatted, preventing issues such as HTML injection and empty fields.</p><p>Kudos to reaching this far!</p><p>Did you encounter any challenges or find a better way to do something?</p><p>Don’t forget to use the comment section so we can learn from each other. Yeah!</p><h3>Putting Everything Together</h3><p>Let’s create a controller to build the logic itself.</p><p>We are creating productController.js as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/0*aZyFY-GMHWOYW-RL" /></figure><p>Node.js — controller for handling file upload and form inputs</p><p>Wooow! That’s a lot of code for the controller.</p><p>Worry not, let’s break it down:</p><h3>What’s Happening Here?</h3><p>We start by calling our fileUpload middleware and passing the name of the file field to it. This middleware processes the file and throws any errors if they occur.</p><p>Next, we <a href="https://www.geeksforgeeks.org/javascript-spread-operator/">spread</a> the add_item_validation middleware. This way, each validation rule is an individual element in our controller instead of an array of arrays.</p><p>We then wrap our callback function with asyncHandler from <a href="https://www.npmjs.com/package/express-async-handler">express-async-handler</a> to handle any errors in our callback function.</p><p>Remember, this is an <a href="https://www.w3schools.com/js/js_asynchronous.asp">asynchronous event</a>.</p><p>We’re making requests to the database and waiting for a response before proceeding to the next activity in the call stack.</p><p>For a guide on asynchronous events, check out <a href="https://www.w3schools.com/js/js_asynchronous.asp">W3Schools</a>.</p><blockquote><em>Feel free to share your observations in the comment section so we can learn from your point of view too.</em></blockquote><p>Let’s go there!</p><h3>Order Matters!</h3><p>The order of the file upload and validation rules is crucial. The file upload should come first, followed by the validation rules.</p><p>This ensures the rest of the form input is ready when validation happens.</p><p>In our callback, we capture any errors using validationResult(req) from <a href="https://express-validator.github.io/docs/guides/getting-started">express-validator</a> and store them in an array.</p><h3>Handling Categories</h3><p>Remember how we’re showing the categories in our HTML form?</p><p>Right, you remember that.</p><p>We fetch all the categories from our database, pulling out only the names. Then we loop through the categories to show the selected one in case of any error during form processing.</p><p>For a peek at different types of loops in JavaScript and when to use them, check my previous post — <a href="https://zeenomtech.com/confused-about-javascript-loops-we-can-help/">Confused About JavaScript Loops? We Can Help!</a></p><blockquote><em>Don’t forget to leave your review or share better ways you think work best.</em></blockquote><h3>Saving Images to Cloudinary</h3><p>Like you might have asked, “Is this guy really saving the images in his database like that?”</p><p>Smiles!</p><p>Nope! My senses are still active, and I wouldn’t make such a costly mistake.</p><p>So, what am I doing then?</p><p>Remember Cloudinary?</p><p>We talked about this earlier. It’s indeed a lifesaver here.</p><p>We save the image to Cloudinary and, if successful, delete it from the public/upload folder where we initially saved it.</p><p>We then save a reference to the image in our database.</p><p>Sounds awesome, right?</p><p>You might also wonder how we’re removing the image from our local file system.</p><p>We use the <a href="https://www.geeksforgeeks.org/node-js-fs-unlink-method/">fs.unlink() method</a>. Check out <a href="https://www.geeksforgeeks.org/node-js-fs-unlink-method/">GeeksforGeeks</a> for a prep on what it is all about. We add a promise to it, making it fs.promises.unlink() because it returns a <a href="https://www.w3schools.com/js/js_promise.asp">promise</a>.</p><p>After uploading to Cloudinary, we save the path in our database.</p><p>Wondering how our database is structured?</p><p>Here’s an overview of our database:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/0*uigLFQ6GzD2cjUE4" /></figure><p>MongoDB — database model</p><p>And that’s it! You’ve got the controller logic in place.</p><blockquote><em>Keep the comments and questions coming, and let’s learn together.</em></blockquote><h3>Conclusion</h3><p>Wow, you made it!</p><p>Kudos for sticking through this comprehensive guide on building a product inventory system with image uploads using Express, Multer, and Cloudinary.</p><p>You’ve navigated through setting up the front-end form, configuring Multer for file uploads, validating form fields with express-validator, and saving data to a MongoDB database.</p><p>By now, you should have a solid understanding of how to handle file uploads, validate user input, and manage relationships in a database.</p><p>These skills are crucial for any developer looking to build robust web applications.</p><p>But don’t stop here! The best way to reinforce what you’ve learned is by applying it.</p><h3>Let’s Hear from You!</h3><p>What challenges did you face while following this guide? Did you find any better ways to implement certain features? We’d love to hear your thoughts and experiences. Drop a comment below, and let’s learn from each other!</p><p>Remember, every expert was once a beginner. Keep coding, keep exploring, and most importantly, have fun with it!</p><h3>Let’s Connect:</h3><p>If you found this guide helpful, share it with your fellow developers. Follow me for more tips on web development.</p><p>And if you have any questions or need further clarification on any part of this project, don’t hesitate to reach out.</p><h3>Check Out My Other Posts</h3><p>Thanks for following along! If you found this guide helpful, you might also enjoy some of my other posts:</p><ul><li><a href="https://zeenomtech.com/build-powerful-web-form-with-node-js-step-by-step-guide/">Build Powerful Web Forms with Node.js (Step-by-Step Guide)</a></li><li><a href="https://zeenomtech.com/confused-about-javascript-loops-we-can-help/">Confused About JavaScript Loops? We Can Help!</a></li><li><a href="https://zeenomtech.com/the-crud-trap-why-most-web-apps-fail-before-they-even-start-and-how-to-avoid-it/">The CRUD Trap: Why Most Web Apps Fail Before They Even Start (And How to Avoid It)</a></li></ul><p>Feel free to leave comments, share your thoughts, or ask any questions.</p><p>Happy coding!</p><p>Thank you, #My3MTT, for this opportunity to share my #3MTTWeeklyReflection.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1cbd39b433d" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/node-js-image-upload-and-storage-with-cloudinary-c1cbd39b433d">Node.js Image Upload and Storage with Cloudinary</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Use Vim for Linux Users: A Step-by-Step Guide]]></title>
            <link>https://rocodeify.medium.com/how-to-use-vim-for-linux-users-a-step-by-step-guide-717a933587?source=rss-e94e0cb2c925------2</link>
            <guid isPermaLink="false">https://medium.com/p/717a933587</guid>
            <dc:creator><![CDATA[Oodo Roland Uchenna]]></dc:creator>
            <pubDate>Mon, 24 Jul 2023 10:17:35 GMT</pubDate>
            <atom:updated>2023-07-24T10:17:35.464Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NGaobPJQrQD6PdXUoZQI3A.png" /></figure><p>Vim is a widely used text editor among Linux enthusiasts for its efficiency and flexibility.</p><p>However, it can be challenging for new Linux users to learn. This guide is here to change that. I will take you step by step through the basics of Vim, from navigating and editing files to using its advanced features.</p><p>Whether you are new to Linux or looking to improve your workflow, this guide will help you unlock the full potential of Vim</p><h3>What is Vim?</h3><p>Vim (vi) is a command line-based text editor that is commonly used in Unix-based operating systems.</p><p>It is known for its efficiency and powerful set of commands, which allow users to quickly and easily edit text files.</p><p>It has a challenging process, but many users find it to be a valuable tool for editing text files quickly and efficiently.</p><p>Vim is an extended version of Vi, that includes additional features such as syntax highlighting, undo/redo, and a visual mode for selecting text.</p><h3>How to start and exit Vi (Vim)</h3><p>Vim is used to create and edit text files. To start Vim, you need to open a terminal on your Linux computer.</p><p>A terminal is a program that allows you to interact with your computer using text commands. Once the terminal is open, you can start Vim by typing “vi” followed by the name of the file you want to edit.</p><p>For example:</p><pre>vi file.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/0*Id_IgiAf3-7saEVU" /></figure><p>this will open the “file.txt” in vim for editing.</p><p>Once the file is open, you will be in normal mode. In this mode, you can navigate through the text using the arrow keys on your keyboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/0*868H_Q3VbujEAGr9" /></figure><p>To start editing the file, you need to press the “i” key on your keyboard.</p><p>This will take you to the insert mode, where you can add, modify or delete text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/0*Rkqzm1HAAh3puJNS" /></figure><p>To go back to normal mode, you need to press the “Esc” key on your keyboard.</p><p>While in normal mode, you can also use commands such as “:w” to save your changes, and “:q” to quit without saving changes.</p><p>To exit vim and save your changes, you need to press the “ESC” key, then type “:wq” and press the “Enter” key.</p><p>This command will save your changes and close the file.</p><p>To exit vim without saving your changes, you need to press the “Esc” key, then type “:q!” and press the “Enter” key.</p><p>This command will close the file without saving your changes.</p><blockquote><em>It is important to note that you must press the “Esc” key first before entering any command in the command mode.</em></blockquote><p>In summary, Vim has two main modes that are used frequently as seen above:</p><ol><li>Normal mode: This is the default mode you see when you first open a file in vim. In normal mode, you can navigate through the text using the arrow keys, and you can use various commands to manipulate text.</li><li>Insert mode: This mode allows you to insert or edit text within a file. To enter insert mode, press the “i” key in normal mode. Once in insert mode, you can type text as you would in any other text editor. To return to normal mode, press the “Esc” key.</li></ol><h3>How to edit text in Vim</h3><p>Editing text in Vim can seem a bit tricky at first, but once you understand the basic concepts, it becomes quite straightforward.</p><p>When you first open a file in Vim, you will be in “normal mode”.</p><p>In this mode, you can navigate through the text using the arrow keys, but you cannot make any changes to the text.</p><p>To make changes to the test, you need to enter “insert mode”.</p><p>To enter insert mode, you can press the “i” key.</p><p>Once you are in insert mode, you can add, modify, or delete text as you would in any other text editor.</p><p>To exit insert mode, you can press the “Esc” key.</p><p>For example, let’s say you have a file open in Vim and the contents of the file are:</p><pre>Hello, this is a sample text file.</pre><p>BashCopy</p><p>If you want to add more text to the end of the file, you would first press the “i” key to enter insert mode, then you can add text at the cursor position.</p><pre>Hello, this is a sample text file.<br>This is an additional text.</pre><p>BashCopy</p><p>Also, if you want to modify some existing text, you would first press the “i” key to enter insert mode, then place the cursor on the text you want to change and start editing, then press the “Esc” key to go back to normal mode.</p><h3>How to cut, copy and paste lines in Vim</h3><p>One of the common tasks you may need to do is to move lines of text around in a file. To do this, Vim provides the commands “dd”, “yy” and “p” to help you cut, copy and paste lines of text.</p><ul><li>To cut a line, you need to move your cursor to the line you want to cut, then type “dd”. This will delete the line and store it in a buffer.</li><li>To copy a line, you need to move your cursor to the line you want to copy, then type “yy”. This will copy the line and store it in a buffer.</li><li>To paste a line, you need to move your cursor to the location where you want to paste the line, then type “p”. this will insert the line from the buffer at the location of the cursor.</li></ul><p>For example, if you have a file that looks like this:</p><pre>This is the first line.<br>This is the second line.<br>This is the third line.</pre><p>and you want to move the second line to the end of the file, you could do the following:</p><ul><li>Move your cursor to the second line</li><li>Type “dd” to cut the second line</li><li>Move your cursor to the third line</li><li>Type “p” to paste the second line after the third line</li></ul><p>Now the text file will look like this:</p><pre>This is the first line.<br>This is the third line.<br>This is the second line.</pre><blockquote><em>It is important to remember that the commands “dd”, “yy” and “p” are used in the Vi command mode to work with lines, not words or characters.</em></blockquote><h3>How to search forward and backward in Vim</h3><p>In Vim, you can search for a specific word or phrase in your text by using the “search” command. There are two ways to search in vim: forward and backward.</p><p>To search forward for a word or phrase:</p><ul><li>Press the “/” key, which will bring up the search prompt at the bottom of the screen.</li><li>Type in the word or phrase you want to search for and press the “Enter” key.</li><li>Vim will take you to the next occurrence of the word or phrase in your text.</li><li>You can press “n” to go to the next occurrence or “N” to go to the previous occurrence.</li></ul><p>For example, if you have a text file that looks like this:</p><pre>This is the first line.<br>This is the second line.<br>This is the third line.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/0*XNpNziU4PGO_koh3" /></figure><p>If you want to search for the word “the”, you would press “/” then type “the” and press enter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/0*huGbCHkK7RGEQTfR" /></figure><p>This will take you to the first occurrence of the word “the” in the text. If you press “n” it will take you to the next occurrence of the word.</p><p>To search backward for a word or phrase:</p><ul><li>Press the “?” key, which will bring up the search prompt at the bottom of the screen.</li><li>Type in the word or phrase you want to search for and press the “Enter” key.</li><li>Vim will take you to the previous occurrence of the word or phrase in your text.</li><li>You can press “n” to go to the next occurrence or “N” to go to the previous occurrence.</li></ul><blockquote><em>It is important to notice that the commands “n” and “N” are used to navigate between the search results not to search again.</em></blockquote><h3>How to undo in Vim</h3><p>In Vim, you can undo changes you have made to a text file by using the “undo” command. This can be helpful if you accidentally delete or change something and want to go back to the previous version.</p><p>To undo the last changes, you made:</p><ul><li>Press the “u” key. This will undo the last change you made.</li><li>You can press “u” multiple times to undo multiple changes.</li></ul><p>For example, if you have a text file that looks like this:</p><pre>This is the first line.<br>This is the second line.<br>This is the third line.</pre><p>BashCopy</p><p>and you delete the second line by accident, you can press “u” to undo the deletion and bring the second line back.</p><blockquote><em>It is important to notice that the undo command only undoes the last change you made.</em></blockquote><p>If you have made multiple changes and want to go back to a previous version, you can use the command “: earlier” followed by the number of minutes you want to go back.</p><p>For example, : earlier 5m will undo the changes made in the last 5 minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/0*yMbikFesOO3xgg6r" /></figure><blockquote><em>Also, it is possible to redo changes by using the command “ctrl + r”.</em></blockquote><h3>How to quit Vim</h3><p>In Vim, you can quit the editor by using the “:q” command. This command will close the current file and exit Vim.</p><p>To quit Vim:</p><ul><li>Press the “Esc” key to enter command mode</li><li>Press the “:” key</li><li>Type “q” and press “Enter”.</li></ul><p>For example, if you are currently editing a file called “file.txt” and want to quit Vim, you would press the “:” key, type “q”, and press “Enter”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/0*k32BlAagZXx9dGyv" /></figure><p>However, if you made changes to the file and have not saved them yet, Vim will prompt you to save the changes before quitting. If you want to save the changes and quit, you can use the “:wq”.</p><p>If you don’t want to save the changes and quit, you can use the command “:q!”.</p><p>It is also important to notice that if you are editing multiple files in a Vim session, you can quit the current file using “:q” but you have to use “:qa” to quit all the open files, also you can use “:qa!” to quit all the open files without saving the changes.</p><h3>Further Resources:</h3><p>Before you wrap up, I invite you to delve deeper into the world of Linux file systems.</p><ul><li><a href="https://rocodeify.com/linux-emacs-text-editor-how-to-use-it-effectively/">How to use Emacs editor for Linux Users: A Step-by-Step Guide</a></li><li><a href="https://rocodeify.com/how-to-navigate-efficiently-with-shell-terminal/">How To Navigate Efficiently With Shell Terminal</a></li><li><a href="https://rocodeify.com/mastering-the-linux-file-system-a-complete-overview/">Mastering the Linux File System: A Complete Overview</a></li></ul><h3>Conclusion</h3><p>To wrap it up, Vim is a powerful and versatile text editor that Linux users can benefit greatly from.</p><p>With this guide, users can learn how to use Vim for basic text editing tasks, as well as advanced features like undo and redo.</p><p>By mastering Vim’s commands and shortcuts, Linux users can take their text editing skills to the next level, becoming more efficient and productive.</p><p>Struggling with a Challenge? Join our ‘<a href="https://rocodeify.com/forum/">Ask a Question’ forum!</a> Connect, learn, and get expert help from our community. Join now!</p><p>#Vim #TextEditor #TechLover #linux #linuxadministrator</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=717a933587" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Use Symbolic Link in Linux: A Short Guide]]></title>
            <link>https://rocodeify.medium.com/how-to-use-symbolic-link-in-linux-a-short-guide-e1f58565fd77?source=rss-e94e0cb2c925------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1f58565fd77</guid>
            <category><![CDATA[shell-script]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[shell]]></category>
            <category><![CDATA[symbolic-link]]></category>
            <dc:creator><![CDATA[Oodo Roland Uchenna]]></dc:creator>
            <pubDate>Sat, 11 Feb 2023 09:43:24 GMT</pubDate>
            <atom:updated>2023-02-11T09:44:50.321Z</atom:updated>
            <content:encoded><![CDATA[<p>Are you tired of constantly navigating through multiple directories just to access a single file in Linux? Say goodbye to that frustration with a <strong>symbolic link</strong>!</p><p>This handy feature allows you to <strong>create shortcuts to files or directories</strong>, making it easier to access and manage your files. In this short guide, you will learn how to create and use symbolic links in Linux, and how it can simplify your daily work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*CYjBUhYn3HhmJcFLJ0ASzA.jpeg" /></figure><p>Don’t just take our word for it — according to a recent survey of Linux professionals, <strong>over 80% of them use symbolic links on a regular basis.</strong> So, if you want to join the ranks of the most efficient Linux users, keep reading to find out how to use symbolic links like a pro!</p><h3>What is Symbolic Link?</h3><p>A symbolic link, also known as a <strong>symlink or soft link</strong>, is a special type of file that acts as a shortcut to another file or directory on a computer.</p><p>It is like a virtual pointer to another file, which allows you to access that file from multiple locations without having to physically copy it.</p><p>Think of it like a signpost pointing you in the direction of another file. When you follow the link, it takes you to the file or directory it is linked to. If the original file changes, the changes will be reflected when you access the symbolic link.</p><p><strong>For example,</strong> imagine you have a file called “<strong>important_document.txt</strong>” in your document folder.</p><p>You can <strong>create a link</strong> to that file on your Desktop so that you can access the file from either location.</p><p>Symbolic links are particularly useful for managing and organizing your files and directories, especially if you have a lot of files and need to access them from different locations.</p><p>They are also useful for managing software and configuration files, where you may want to switch between different versions of a file or reference a file from multiple locations.</p><p>In short, symbolic links are a flexible and convenient way to manage and access your files and directories in Linux.</p><h3>Why Use Symbolic Link?</h3><p><strong>Here are some reasons why you might use symbolic links:</strong></p><ul><li><strong>File and directory organization</strong>: Symbolic links allow you to create a shortcut to a file or directory in another location, which can help you better organize your files and directories.</li><li><strong>File sharing:</strong> Symbolic links can be used to share files between different parts of a file system or between multiple file systems.</li><li><strong>Data redundancy:</strong> By creating a link to a file, you can ensure that multiple parts of your file system have access to the same data, reducing the risk of data loss in the event of a file becoming unavailable.</li><li><strong>Cross-platform compatibility:</strong> Symbolic links are supported by most modern operating systems, which makes them a useful tool for linking files and directories between different platforms.</li><li><strong>Application compatibility</strong>: Some applications require certain files or directories to be located in specific locations in order to work correctly. By using symbolic links, you can ensure that the required files and directories are in the correct location without having to physically move them.</li></ul><h3>Creating Symbolic Link</h3><h3>The ln Command</h3><p>The <strong>ln</strong> command is a Linux and UNIX command that is used to create links between files and directories.</p><p>A <strong>link is a reference to another file or directory</strong> that allows you to access the contents of the linked file or directory as if they were located in the same location as the link.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cjBLG35PsnC6JYpa.png" /></figure><p>From the picture above, you can create a symbolic link (shortcut) on the Desktop (<strong><em>depending on where you want to access it from</em></strong>) that points to the frequently used directory for easy access.</p><p><strong>There are two types of links that can be created using the ln commands:</strong></p><ul><li>Symbolic links and</li><li>Hard links</li></ul><p>A <strong>symbolic link</strong> as explained earlier is a reference to another file or directory that contains the path to the target file or directory.</p><p>It acts like a <strong>shortcut</strong> to the target file or directory, and if the target file or directory is deleted, the link will become broken, and will not be able to access the contents of the target file or directory.</p><p><strong>Here is an example of how to create a symbolic link using the ln command:</strong></p><pre>ln -s /path/to/target /path/to/link</pre><p>In this example, the <strong>-s</strong> option is used to specify that a symbolic link should be created, and <strong>/path/to/target</strong> is the path to the file or directory that you want to link to, and <strong>/path/to/link</strong> is the path to the symbolic link that you want to create.</p><p>If you have a directory called “<strong>books</strong>” in the directory <strong>“/Desktop/alx-system_engineering-devops/0x01-shell_permissions/blog</strong>”,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BK6m4DnKwKeVlbp4.png" /></figure><p>You could create a link to it in your Desktop directory with the following command:</p><pre>ln -s ~/Desktop/alx-system_engineering-devops/0x01-shell_permissions/blog/books ~/Desktop/Books</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QL7mOVYh3h6Nv51E.png" /></figure><p><strong>Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*COUnvQQOY-L9ayhG.png" /></figure><p>Now, when you access <strong>~/Desktop/Books</strong>, it will take you to <strong>~/Desktop/alx-system_engineering-devops/0x01-shell_permissions/blog/books</strong>.</p><p>And there you have it, the ln command in Linux just saved you a <strong>significant amount of time</strong> and <strong>reduced your typing effort</strong>.</p><h3>Using Symbolic Links</h3><h3>Navigating to Files and Directories</h3><p>To navigate to the target file or directory that a symbolic link points to, you can simply treat the link as if it were the actual target file or directory.</p><p>This means you can use the symbolic link in the same way you would use the actual target file or directory.</p><p>For example, let’s say you have a symbolic link named <strong>Books</strong> from the example above that points to the directory <strong>~/Desktop/alx-system_engineering-devops/0x01-shell_permissions/blog/books</strong>. You can access the contents of <strong>&quot;Books</strong>&quot; by navigating to the <strong>Books shortcut</strong> created on the Desktop by using the <strong>cd</strong> command in a terminal:</p><pre>cd ~/Desktop/Books</pre><p>This will change the current working directory to the target directory, <strong>~/Desktop/alx-system_engineering-devops/0x01-shell_permissions/blog/books</strong>, as if you had navigated to it directly.</p><h3>Updating and Deleting Files</h3><p>When you update or delete a file in a directory that a symbolic link points to, those changes will be reflected in the link.</p><p>For example, the symbolic link <strong>Books,</strong> we created above that point to <strong>~/Desktop/alx-system_engineering-devops/0x01-shell_permissions/blog/books</strong></p><p>adding a new file inside the link will automatically add the new files to the target directory as well.</p><h3>To delete a symbolic link, you can use the rm command in a terminal:</h3><pre>rm ~/Desktop/Books</pre><p>This will remove the symbolic link<strong> “Books”</strong> we created above, but it will not affect the target file or directory that the link points to.</p><blockquote><em>It is important to note that deleting the target file or directory that a symbolic link points to will make the symbolic link invalid, as it will no longer have a target to point to.</em></blockquote><p>In this case, the symbolic link will become a broken link and will no longer work as expected.</p><h3>Limitations and Considerations</h3><p><strong>When using symbolic links, there are some limitations and considerations to keep in mind:</strong></p><ul><li>Symbolic links can only be created on the same file system as the target file or directory. This means that symbolic links cannot be used to link to files or directories on different file systems.</li><li>If the target file or directory is deleted, the symbolic link will become broken and will no longer work as expected.</li><li>Some applications and scripts may not work correctly with symbolic links, especially if the link is used as an input or output file. In these cases, it may be necessary to use the full path to the target or directory instead of the symbolic link.</li><li>If you have multiple symbolic links pointing to the same target file or directory, changes made to the target will be reflected in all of the symbolic links.</li><li>Certain file system operations, such as copying or moving, may not work as expected with symbolic links. For example, copying a shortcut will create a copy of the link, not a copy of the target file or directory.</li></ul><p>Overall, symbolic links can be a useful tool for organizing and accessing files and directories in Linux, but it is important to use them carefully to avoid unintended consequences.</p><h3>Quiz</h3><blockquote><em>What happens to the symbolic link if the original file is deleted or moved to a different location?</em></blockquote><p><strong>a.</strong> <strong><em>The symbolic link remains unchanged</em></strong></p><p><strong>b.</strong> <strong><em>The symbolic link is automatically updated</em></strong></p><p><strong>c</strong>. <strong><em>The symbolic link becomes broken</em></strong></p><p><strong>d.</strong> <strong><em>None of the above</em></strong></p><p>Ready to test your knowledge of the ln command in Linux?</p><p><strong>Drop your answers in the comment section</strong> and let’s see who nails it! <strong>Prove that you’re a symbolic link master and share your score with the community</strong></p><p>If you’re having any difficulties or need additional guidance, don’t hesitate to post your challenges on our forum at <a href="https://rocodeify.com/forums/"><strong>FORUM</strong></a>.</p><h3>Conclusion</h3><p>Symbolic links are a powerful tool in Linux that allows you to create links between files and directories, making it easier to access and manage your files.</p><p>Create a symbolic link to create an alias for a target file or directory and use it just like the actual file or directory. To create a symbolic link in Linux, you can use the <strong>ln -s</strong> command, followed by the target file or directory and the desired link name.</p><p>When using symbolic links, it’s important to be aware of their limitations and considerations. Such as the fact that they can only be created on the same file system as the target file or directory.</p><p>And also, changes made to the target file or directory will be reflected in the shortcut created.</p><p>Overall, symbolic links can be a useful way to organize and access your files in Linux, but it’s important to understand how to use them properly to ensure that they work as expected.</p><h3>Additional Resources</h3><ul><li><a href="https://rocodeify.com/how-to-use-vim-for-linux-users-a-step-by-step-guide/">How to Use Vim for Linux Users: A Step-by-Step Guide</a></li><li><a href="https://rocodeify.com/linux-emacs-text-editor-how-to-use-it-effectively/">Linux Emacs Text Editor: How to Use it Effectively</a></li><li><a href="https://rocodeify.com/how-to-navigate-efficiently-with-shell-terminal/">How To Navigate Efficiently With Shell Terminal</a></li><li><a href="https://rocodeify.com/mastering-the-linux-file-system-a-complete-overview/">Mastering the Linux File System: A Complete Overview</a></li><li><a href="http://www.tldp.org/">Linux Documentation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1f58565fd77" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Use Emacs: A Comprehensive Tutorial]]></title>
            <link>https://rocodeify.medium.com/linux-emacs-text-editor-how-to-use-it-effectively-124792741d9e?source=rss-e94e0cb2c925------2</link>
            <guid isPermaLink="false">https://medium.com/p/124792741d9e</guid>
            <category><![CDATA[text-editor]]></category>
            <category><![CDATA[emacs]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Oodo Roland Uchenna]]></dc:creator>
            <pubDate>Fri, 10 Feb 2023 12:23:22 GMT</pubDate>
            <atom:updated>2023-07-24T10:21:15.338Z</atom:updated>
            <content:encoded><![CDATA[<p>Are you constantly struggling to navigate through files while working on your Linux system? Or maybe you find yourself wasting precious time trying to remember complex commands and key combinations. Look no further than the powerful text editor, <strong>Linux Emacs</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q-jWjt67v859LemKbFE-9Q.jpeg" /></figure><p>In this guide, I will show you how Emacs can help solve these problems and make your work more efficient. From mastering window management to configuring advanced features, you will learn how to effectively use emacs to streamline your workflow and make editing a breeze.</p><p>Whether you are a beginner or a seasoned pro, this guide will take your Linux experience to the next level.</p><h3>What is Linux Emacs and how is it different from other text editors?</h3><p><strong>Emacs</strong> is a software program that allows you to c<strong>reate, edit, and save text files</strong>. It is similar to other text editors like Microsoft word or notepad, but it has some additional features that make it <strong>more powerful and useful for programmers</strong> and <strong>advanced users.</strong></p><p><strong>For example,</strong> when you open a file with code in it. Emacs can highlight different parts of the code in different colors, which makes it easier to read and understand.</p><p>It also allows you to open multiple files at the same time, and easily switch between them.</p><p>Another example of its power is that it has a built-in terminal emulator that allows you to run command line commands directly from within the editor, so you don’t have to switch back and forth between the editor and the terminal.</p><p>To start using emacs, you can open it by typing <strong>“emacs”</strong> in the terminal or by searching for it in the applications menu if you are on windows or mac.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/0*mw8-xntEtY9vRO7O.png" /></figure><p>Once it is open, you can create a new file by pressing <strong>C-x C-f</strong> <strong>(CTRL + x CTRL + f)</strong> and type in the name of the file you want to create.</p><p>You can then start typing in the file and use the key bindings to navigate and edit the text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/0*x3l9gKeixsCKvgfK.png" /></figure><p><strong>Emacs</strong> also has a built-in tutorial that can be accessed by pressing <strong>C-h t</strong> <strong>(CTRL + h t)</strong>, this tutorial will help you learn the basic commands and key bindings in emacs.</p><h3>How to open and save files on Emacs</h3><p>In Emacs, you can open and save files using key bindings.</p><p><strong>To open a file in Emacs</strong>, you can use the key binding <strong>C-x C-f</strong>. This stands for <strong>CTRL + x CTRL + f</strong>.</p><blockquote><em>After pressing the keys, you will be prompted to enter the name of the file you want to open.</em></blockquote><p><strong>For example</strong>, if you want to open a file called <strong>“myfile.c”</strong>, you would type “<strong>myfile.c</strong>” on the prompt and press the Enter key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/0*N0cVzvDj_UaFLrLC.png" /></figure><p><strong>To save a file in Emacs,</strong> you can use the key binding <strong>C-x C-s</strong>. This stands for <strong>CTRL + x CTRL + s</strong>. After pressing these keys, <strong>the current file will be saved</strong>.</p><p>If you have not already saved the file, you will be prompted to enter a name for the file before it is saved.</p><p><strong>For example</strong>, if you opened a new file called <strong>“myfile.c”</strong> and made some changes, you can save it by pressing <strong>C-x C-s</strong> keybindings.</p><blockquote><em>It is important to know that in emacs, the key bindings are case-sensitive, so </em><strong><em>C-x C-f</em></strong><em> is different from </em><strong><em>c-x c-f</em></strong><em>, make sure to use the correct case when using the keybindings.</em></blockquote><h3>What is a buffer and how to switch from one to the other in Emacs</h3><p>In the context of text editors like Emacs, a <strong>buffer</strong> refers to a <strong>temporary storage area</strong> for the<strong> </strong>text being edited. It is essentially a window into a file that allows you to make changes to the contents of the file.</p><p>When you open a file in emacs, <strong>a buffer is created for that file</strong>. Multiple buffers can be opened in emacs at the same time, allowing you to work on different files at the same time.</p><p><strong>For example,</strong> you can have one buffer open for a file called <strong>“file1.txt”</strong> and another buffer open for <strong>“file2.txt”</strong>. You can switch between these buffers to edit the different files.</p><p>To switch between buffers in Emacs, you can use the command <strong>C-x b</strong> <strong>(CTRL + x,</strong> release both keys, and <strong>press b</strong>), which prompts you to enter the name of the buffer you want to switch to.</p><p><strong>For example</strong>, if you have a buffer open for <strong>“file1.txt”</strong> and you want to switch to a buffer for <strong>“file2.txt”</strong>, you would press <strong>C-x b</strong> and then type <strong>“file2.txt”</strong> and press enter.</p><p>Another way to switch between buffers is by using the <strong>C-x left arrow</strong> and <strong>C-x right arrow</strong> keys. These keys allow you to switch to the previous and next buffer respectively.</p><p>You can also use the <strong>C-x C-b</strong> command to display a list of all open buffers and select the one you want to switch to by typing the buffer number or buffer name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/0*_HBRm27tUH23xpxh.png" /></figure><h3>How to cut and paste lines and regions in Emacs</h3><p>In Emacs, you can use keyboard shortcuts to cut and paste lines and regions of text.</p><p><strong>To cut a line of text</strong>, place the cursor at the<strong> beginning of the line</strong> and press <strong>C-k</strong>. This will cut the entire line and store it in a special area called the <strong>“kill-ring.”</strong></p><p>The<strong> kill-ring</strong> is like a clipboard, where you can store multiple items that you have cut or copied.</p><p><strong>To cut a region of text</strong>, you first need to mark the beginning of the region by pressing <strong>C-@ </strong>or <strong>C-SPC</strong>. Then, move the cursor to the end of the region you want to cut.</p><p>Finally, press <strong>C-w</strong>.</p><p>This will cut the region and store it in the <strong>kill-ring</strong>.</p><p>Once you have cut or copied text, you can paste it by pressing <strong>C-y</strong>. This will paste the most recently cut or copied text at the cursor location.</p><p>You can also paste the previous text from the kill-ring by pressing <strong>M-y</strong>. For example, <strong>if you have cut or copied multiple items</strong>, you can use <strong>M-y</strong> to paste the second–most recent item, then <strong>M-y</strong> again to paste the third-most recent item, and so on.</p><p><strong>Here is an example of how you might use these shortcuts to cut and paste a region of text:</strong></p><ol><li>Open a file in Emacs and move the cursor to the beginning of the region you want to cut.</li><li>Press <strong>C-@</strong> or <strong>C-SPC</strong> to mark the beginning of the region.</li><li>Move the cursor to the end of the region you want to cut.</li><li>Press <strong>C-w</strong> to cut the region and store it in the kill-ring.</li><li>Move the cursor to the location where you want to paste the text.</li><li>Press <strong>C-y</strong> to paste the text.</li></ol><p>Note that, you can also use <strong>C-x h</strong> <strong>to select all the lines</strong> in the buffer and then cut and paste as above.</p><h3>How to search forward and backward</h3><p>In Emacs, you can search for text both <strong>forward and backward</strong> using the keyboard shortcuts <strong>C-s</strong> (search forward) and <strong>C-r</strong> (search backward).</p><p>When you press <strong>C-s</strong>, the cursor will move to the next occurrence of the text you type. Pressing <strong>C-s</strong> again will move the cursor to the next occurrence of the text.</p><p>When you press <strong>C-r</strong>, the cursor will move to the previous occurrence of the text you typed. Pressing <strong>C-r</strong> again will move the cursor to the previous occurrence of the text.</p><p><strong>Here is an example of how you might use these shortcuts to search for a specific word in a file:</strong></p><ol><li>Open a file in Emacs.</li><li>Press <strong>C-s</strong> to initiate a forward search.</li><li>Type the word you want to search for, and press enter.</li><li>The cursor will move to the next occurrence of the word in the file.</li><li>Press <strong>C-s</strong> again to move the cursor to the next occurrence of the word.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/0*NPPGK0iqEmnEYGfM.png" /></figure><p>Similarly, you can use<strong> C-r</strong> to search for a word backward.</p><p>In addition to this, you can also use <strong>C-s</strong> to search for a regular expression (regex) and <strong>M-x</strong> occur to display all matches of a regex in a buffer.</p><p>It is also possible to search and replace text in a buffer or a file using the command <strong>M-x replace-string</strong>.</p><h3>How to undo in Emacs</h3><p>In Emacs, you can undo changes to a file by using the undo command. There are a few different ways to invoke this command, depending on your preference and the situation:</p><ul><li>The most common way to undo changes is to use the <strong>C-/</strong> (<strong>CTRL + slash</strong>) key binding. Press and hold the Control key and then press the / key. This will undo the last change you made to the file.</li><li>Another way to undo changes is to use the <strong>C-x u</strong> (CTRL + x u) key binding. Press and hold the Control key, press x, release both keys, and then press u. this will also undo the last change you made to the file.</li><li>You can also use<strong> M-x</strong> undo command to undo the changes. Press M-x and type undo and press Enter.</li></ul><p>You can also redo changes after undoing them using <strong>C-g</strong> key binding.</p><p><strong>Here is an example of how you might use the undo command:</strong></p><ol><li>Open a file in Emacs.</li><li>Make some changes to the file, for example adding some text or deleting some text</li><li>If you realize that you made a mistake, press <strong>C-/</strong> or <strong>C-x u</strong> to undo the last change you made.</li><li>If you decide that you actually wanted to keep the change you just undid, press <strong>C-g</strong> to redo the change.</li></ol><p>It is worth noting that the undo command <strong>keeps track of multiple changes</strong>, so you can keep undoing changes until you reach the original state of the file.</p><p>If you want to undo multiple changes at once, you can use <strong>C-u</strong> followed by <strong>a number</strong> (e.g. <strong>C-u 2 C-/</strong>) to undo that many changes, or use <strong>M-x undo-tree-visualize</strong> to visualize the undo tree.</p><p>Also, you can save your work before making any changes by using<strong> C-x C-s</strong> command or <strong>M-x save-buffer</strong> command.</p><h3>How to cancel half-entered commands in Emacs</h3><p>In Emacs, you can cancel a half-entered command by using the <strong>C-g</strong> (<strong>Control + g</strong>) key binding.</p><p><strong>Here is an example of how you might use the </strong><strong>C-g command:</strong></p><ol><li>Start entering a command in the mini buffer, for example, <strong>M-x find-file</strong></li><li>Realize that you made a mistake and <strong>want to cancel the command</strong></li><li>Press <strong>C-g</strong> to cancel the command and then return to the previous state.</li></ol><p>You can also use <strong>C-g</strong> to stop a command that is running and return to the previous state.</p><p>It is important to note that <strong>C-g</strong> command can also be used to cancel a running command, or to cancel a command that is stuck or taking too long.</p><p>This can be useful in situations where you accidentally started a command that you don’t want to run or when the command is stuck and not responding.</p><p><strong>Here is an example of how you might use the </strong><strong>C-g command to stop a running command:</strong></p><ol><li>Start a command that takes a long time to run, for example, <strong>M-x find-file</strong> on a large file</li><li>Realize that you don’t want to run the command anymore</li><li>Press <strong>C-g</strong> to stop the command and return to the previous state.</li></ol><p>It is worth noting that <strong>C-g</strong> is a versatile command and can be used in many situations to cancel or interrupt running commands or actions.</p><h3>How to quit Emacs</h3><p>In Emacs, you can quit the editor by using the <strong>C-x C-c</strong> <strong>(CTRL + x CTRL + c</strong>) keybinding. This will close the current buffer and exit the editor.</p><p>Here is an example of how you might use the <strong>C-x C-c</strong> command:</p><ol><li>Open a file in Emacs by using the <strong>C-x C-f</strong> command</li><li>Make any changes you want to the file</li><li>Save your changes by using the <strong>C-x C-s</strong> command</li><li>Press <strong>C-x C-c</strong> to close the current buffer and exit the editor</li></ol><p>Alternatively, you can also quit emacs using the <strong>M-x kill-emacs</strong> command by typing <strong>M-x kill-emacs and pressing</strong> Enter.</p><p>It is worth noting that if you have unsaved changes in any buffers, Emacs will prompt you to save them before exiting. And also if you have multiple open buffers, using <strong>C-x C-c</strong> will close the current buffer and return to the buffer you were previously in.</p><p>It is important to note that quitting emacs will close all the open buffers and unsaved changes will be lost. <strong>So, it is always a good practice to save your work before quitting emacs.</strong></p><h3>Resources</h3><ul><li><a href="http://How To Navigate Efficiently With Shell Terminal"><strong>How To Navigate Efficiently With Shell Terminal</strong></a></li><li><a href="https://rocodeify.com/how-to-use-vim-for-linux-users-a-step-by-step-guide/"><strong>How to Use Vim for Linux Users: A Step-by-Step Guide</strong></a></li><li><a href="https://rocodeify.com/mastering-the-linux-file-system-a-complete-overview/"><strong>Mastering the Linux File System: A Complete Overview</strong></a></li><li><a href="https://rocodeify.com/how-to-execute-a-command-with-a-shell-script-in-linux/"><strong>How To Execute Shell script in Linux</strong></a></li></ul><h3>Conclusion</h3><p>In conclusion, the Linux Emacs text editor is a powerful tool that offers a wide range of features for editing and manipulating text.</p><p>With its intuitive interface and customizable settings, it is a great choice for both novice and advanced users. By learning to use its various commands and keybindings, you can become more productive and efficient in your text editing tasks.</p><p>Whether you’re writing code, composing a document, or working on any other type of text-based project, the Linux Emacs text editor is an excellent choice for getting the job done quickly and effectively. So, give it a try and you’ll see the difference it makes in your workflow.</p><p><strong>If you have any questions or challenges related to the topic, please feel free to post them on the forum at </strong><a href="https://rocodeify.com/forum/"><strong>Forums</strong></a><strong>.</strong></p><p>#emacs #linux #linuxadministrator</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=124792741d9e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create a Branch in GitHub: Beginners guide]]></title>
            <link>https://blog.devgenius.io/how-to-create-a-branch-in-github-beginners-guide-b8fefde19962?source=rss-e94e0cb2c925------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8fefde19962</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[git-branch]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Oodo Roland Uchenna]]></dc:creator>
            <pubDate>Tue, 07 Feb 2023 06:23:33 GMT</pubDate>
            <atom:updated>2024-08-02T18:40:42.459Z</atom:updated>
            <content:encoded><![CDATA[<p>Collaborating on a software project can present challenges, but with GitHub, <strong>it’s made easy.</strong> One way to do this is by creating a branch in GitHub, allowing you to work on your own version of the project and merge changes with the main codebase when ready. Learn How to Create a Branch in GitHub in this step-by-step guide and take control of your code today.</p><p><strong>Let’s get started!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*rJEwBcAXmOcHmYe31lVPqQ.jpeg" /></figure><h3>Introduction to Git Branching</h3><p><strong>Git branching</strong> is a way to work with different versions of a project at the same time. Imagine you have a recipe for a cake, and you want to try a new ingredient. With Git branching, you can make a copy of the recipe and try the new ingredient without affecting the original recipe.</p><p>In software development, <strong>a branch is like a separate copy of your project</strong>. You can make changes to your branch without affecting the main project, once you are happy with your changes, you can combine your branch with the main project.</p><p>Think of Git branching as creating a new path for your project. The main path is called the <strong>“master”</strong> branch.</p><p>When you create a new branch, you can make changes to that branch without affecting the “master” branch. This allows you to <strong>try out new ideas or fix bugs</strong> without affecting the main project.</p><h3>Here is a simple example to help you understand Git branching:</h3><p>Let’s say you have a project called <strong>“MyAPP”</strong>, and the main branch is called <strong>“master”</strong>.</p><p>The <strong>“master”</strong> branch is the main line of development and is used to release the final version of the project.</p><blockquote><em>You want to try a </em><strong><em>new feature</em></strong><em> for the project, but you don’t want to affect the </em><strong><em>“master” </em></strong><em>branch.</em></blockquote><p>To do this, you can create a new branch called <strong>“new-feature”</strong>.</p><p>You can switch to the new branch and make your changes. Once you are done, you can <strong>merge the changes</strong> from the <strong>“new-feature”</strong> branch back into the “master” branch.</p><p>Git branching allows you to work on different parts of a project at the same time, and it is a powerful tool for software development.</p><h3>Why Use Git Branching?</h3><p>Git branching is a <strong>powerful tool</strong> in software development that allows multiple developers to work on the same project without affecting each other’s work.</p><p><strong>Here are some reasons why you should use Git branching:</strong></p><ol><li><strong>Isolation of changes:</strong> when you create a new branch, you can make changes to your branch without affecting the main project. This allows you to try out new ideas, fix bugs, or experiment with new features without affecting the main project.</li><li><strong>Collaboration:</strong> multiple developers can work on different branches of the same project at the same time. This allows for more efficient collaboration and better code integration.</li><li><strong>Improved code quality:</strong> By working on different branches, you can easily identify and fix bugs in a separate environment before integrating the changes into the main project.</li><li><strong>Version control</strong>: with Git branching, you can keep track of different versions of your project and switch between them easily. This allows you to experiment with new features and revert to the previous ones if necessary.</li><li><strong>Easy experimentation:</strong> with Git branching, you can easily create new branches to try out new ideas or features without affecting the main project. This makes it easy to experiment and find the best solution to a problem.</li></ol><p>Git branching provides a safe and efficient way to work on a project with multiple developers, improve code quality, and maintain control over different versions of the project.</p><h3>How to Create a Branch in GitHub: A Step-by-Step Guide</h3><p>Here is how you can create a branch in Git:</p><ul><li>Open your Git repository in the terminal or command line.</li><li>Type the following command to see a list of all existing branches:</li></ul><pre>git branch</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/0*a9LAhMVr4FKUkFQB.png" /></figure><ul><li>To create a <strong>new branch</strong>, use the following command:</li></ul><pre>git branch &lt;branch-name&gt;</pre><p>replace <strong>&lt;branch-name&gt;</strong> with the desired <strong>name of your new branch.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/0*fnn6aEh5gahrxcf7.png" /></figure><ul><li>To switch to the <strong>new branch</strong>, use the following command:</li></ul><pre>git checkout &lt;branch-name&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/0*irZZnDsm7I05U1QX.png" /></figure><p>This will switch your repository to the specified branch and you will be able to work on it.</p><ul><li>You can now make changes to your code and track them in the new branch. To save your changes, use the following commands:</li></ul><pre>git add .<br>git commit -m &quot;Your commit message&quot;<br>git push</pre><p><strong>This creates a new branch and allows you to make changes without affecting the main codebase.</strong></p><h3>Merging Branches</h3><p>Merging in Git is the process of bringing changes from one branch into another branch. this allows you to combine the work from multiple branches into a single branch.</p><p>For example, let’s say you have a <strong>master branch</strong> that represents the latest, stable version of your code.</p><p>And you have a <strong>update_script branch</strong> that contains a new feature you have been working on. When you are ready to bring the new feature into the main codebase, you can merge the feature branch into the master branch.</p><p><strong>Here is how you would do this in Git:</strong></p><ul><li><strong>Check out the target branch:</strong> In this case, you would check out the master branch using the <strong>git checkout</strong> command:</li></ul><pre>git checkout master</pre><p>This command switches to the master branch, which is the target branch where you want to merge the changes from the <strong>update_script branch</strong>.</p><ul><li><strong>Merge the source branch</strong>: Next, you would merge the feature branch into the master branch using the <strong>git merge</strong> command:</li></ul><pre>git merge update_script</pre><p>This command merges the <strong>update_script</strong> branch into the <strong>master</strong> branch. Git compares the two branches and combines the changes from the update_script branch into the master branch.</p><p>If there are any conflicts between the two branches (i.e., if the same lines of code have been changed in both branches). Git will notify you and you will need to resolve the conflicts manually.</p><p><strong>This is the basic process of merging in Git.</strong></p><h3>Resolving Conflicts</h3><p>When merging branches in Git, <strong>conflicts may arise if the same lines of code have been changed in both branches</strong>. When this happens, Git will notify you of the conflict and you will need to resolve it manually.</p><p><strong>Here is an example of how you would resolve a conflict in Git:</strong></p><ol><li><strong>Identify the conflict:</strong> Git will notify you of the conflict when you try to merge the branches. For example, you might see a message like this:</li></ol><pre>Auto-merging &lt;file&gt;<br>CONFLICT (content): Merge conflict in &lt;file&gt;</pre><ul><li><strong>Open the conflicted file:</strong> Open the file that has the conflict in a text editor. You will see something like this:</li></ul><pre>&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD<br>This is the original line of code from the current branch.<br>=======<br>This is the line of code from the branch you&#39;re trying to merge in.<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; &lt;branch-name&gt;</pre><ul><li><strong>Resolve the conflict:</strong> in the conflicted file, edit the code to reflect the desired outcome. You can keep one version of the code, or you can combine the two.</li><li><strong>Commit the changes: </strong>Once you’ve resolved the conflict, save the file and commit the changes using the <strong>git commit</strong> command. Be sure to write a descriptive commit message that explains what you did.</li></ul><pre>git commit -m &quot;Resolved merge conflict in &lt;file&gt;&quot;</pre><p><strong>This is the basic process of resolving conflicts in Git.</strong></p><p>By following these steps, you can effectively resolve conflicts that arise when merging branches.</p><p><strong>Note:</strong> If there are multiple conflicts, you’ll need to resolve each one individually. Once all the conflicts have been resolved, you can continue with the merge as usual by committing and pushing the changes to the remote repository.</p><h3>Deleting Branches</h3><p>Deleting a branch in Git is a simple process that can be done with the following command:</p><pre>git branch -d &lt;branch-name&gt;</pre><p>The <strong>-d</strong> option stands for &quot;delete&quot; and tells Git to delete the specified branch. For example, deleting the <strong>update_script</strong> branch, you would run:</p><pre>git branch -d update_script</pre><blockquote><em>It is important to note that you can only delete a branch if it has already been fully merged into another branch.</em></blockquote><p><strong>This is because deleting a branch would permanently remove all the changes that have been made in that branch.</strong></p><p>If you try to delete a branch that has not been fully merged, Git will stop you and give you an error message.</p><p>If you need to delete a branch that has not been fully merged, you can use the <strong>-D</strong> option instead of <strong>-d</strong>.</p><p>The <strong>-D</strong> option stands for <strong>“force delete”</strong> and tells Git to delete the branch regardless of whether it has been fully merged or not.</p><p>However, be careful when using this option, as it permanently removes all the changes that have been made in the branch and there is no way to recover them.</p><p>In summary, deleting a branch in Git is a straightforward process, but it is important to be careful when doing so to avoid losing any important changes or data.</p><h3>Quiz</h3><blockquote><strong><em>How do you switch between branches in Git?</em></strong></blockquote><p><strong>a.</strong> git switch branch-name</p><p><strong>b.</strong> git checkout branch-name</p><p><strong>c.</strong> git change branch-name</p><p><strong>We’re excited to see your answers to this Git branching quiz! Share your knowledge and let us know how much you know about this amazing tool by leaving your answers in the comments below.</strong></p><p>Your answers will be carefully reviewed and we’ll make sure <strong>to give you proper recognition for your efforts</strong>. So don’t hesitate, show us what you’ve got!</p><blockquote><strong><em>We hope you’re enjoying the Git branching quiz!</em></strong></blockquote><p>If you’re having any difficulties or need additional guidance, don’t hesitate to post your challenges on our forum at <a href="https://rocodeify.com/forums/"><strong>FORUM</strong></a>.</p><p>Our <strong>friendly community of experts</strong> will be happy to help you out and support your learning journey. See you on the forum!</p><h3>Conclusion</h3><p>Git is a powerful version control system that allows you to manage and track changes to your code over time. Understanding the basic Git concepts, such as branches, merging, resolving conflicts, and deleting branches, is essential to effectively use Git.</p><p>Branches in Git are an effective ways to work on multiple features or bug fixes simultaneously, without affecting the main codebase.</p><p>Merging allows you to combine the changes from multiple branches into a single branch while resolving conflicts involves manually resolving conflicts that arise when merging.</p><p>Deleting branches is a simple process, but it is important to be cautious to avoid losing important changes or data.</p><p>By mastering these basic Git concepts, you can make the most of Git and effectively collaborate with others on your code.</p><h3>Resources</h3><ul><li><a href="https://rocodeify.com/how-to-use-vim-for-linux-users-a-step-by-step-guide/">How to Use Vim for Linux Users: A Step-by-Step Guide</a></li><li><a href="https://rocodeify.com/linux-emacs-text-editor-how-to-use-it-effectively/">Linux Emacs Text Editor: How to Use it Effectively</a></li><li><a href="https://rocodeify.com/how-to-navigate-efficiently-with-shell-terminal/">How To Navigate Efficiently With Shell Terminal</a></li><li><a href="https://rocodeify.com/mastering-the-linux-file-system-a-complete-overview/">Mastering the Linux File System: A Complete Overview</a></li><li><a href="https://docs.github.com/en/get-started/quickstart/set-up-git">Resources to learn Git</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8fefde19962" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/how-to-create-a-branch-in-github-beginners-guide-b8fefde19962">How to Create a Branch in GitHub: Beginners guide</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Get Started with C Programming for Beginners]]></title>
            <link>https://rocodeify.medium.com/how-to-get-started-with-c-programming-for-beginners-cb96852a55ba?source=rss-e94e0cb2c925------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb96852a55ba</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[c-programming]]></category>
            <dc:creator><![CDATA[Oodo Roland Uchenna]]></dc:creator>
            <pubDate>Sat, 04 Feb 2023 09:05:21 GMT</pubDate>
            <atom:updated>2023-02-04T09:16:48.141Z</atom:updated>
            <content:encoded><![CDATA[<p>C programming is a versatile and widely used programming language that is essential for anyone interested in software development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*Aea3NXr6gGQo7H6bt8Iqng.jpeg" /></figure><p>It is the foundation of many popular programming languages, including Java, C++, and Python, making it an excellent starting point for beginners.</p><p>In this guide, you will learn how to get started with C programming and how to create your first program. We will cover the basics of C syntax, how to set up your development environment, and how to compile and execute your code.</p><p>Whether you are a complete beginner or looking to refresh your memory, this guide will provide you with the knowledge and skills you need to start writing your own C programs.</p><h3>Introduction to Compiling and Executing Programs</h3><p>Compiling and executing a program are two important steps in the software development process. When you write a program in a high-level programming language like C, it needs to be translated into machine code that the computer can understand and execute. This translation process is called compiling. Once your program is compiled, it can be executed, meaning run or executed, on the computer.</p><p>Think of it like cooking a meal. Just like you need ingredients and a recipe to cook a meal, you need a program written in a high-level language and a compiler to create an executable program. And just like you need to actually cook the meal to eat it, you need to execute the program to see the results of your code.</p><p>In simple terms, compiling is the process of converting your source code into machine code, and executing is the process of running the machine code on the computer. These two steps are essential for bringing your code to life and making it do what you want it to do.</p><h3>Setting up Your Development Environment</h3><p>A development environment is the software and tools you need to write, compile, and execute your programs. Setting up a development environment is an important step in getting started with C programming because it provides you with the necessary tools to write and test your code.</p><p>There are many options for setting up a C programming development environment, including using an Integrated Development Environment (IDE) or using a text editor and command-line tools. An IDE is a software application that provides a comprehensive environment for software development, including a text editor, compiler, and debugging tools. Some popular IDEs for C programming include Code::Blocks, Microsoft Visual Studio, and Eclipse.</p><p>If you prefer to use a text editor and command-line tools, you will need to install a compiler, such as GCC, and a text editor, such as Notepad++ or Sublime Text. Once you have these tools installed, you can write your code in the text editor, save it with a .c extension, and then compile and execute it from the command line.</p><p>No matter which option you choose, the key is to have a development environment that you are comfortable with and that provides the tools you need to write, compile, and execute your C programs.</p><h3>Understanding the Structure of a C Program</h3><p>The structure of a C program consists of a set of building blocks, including functions, variables, and statements, that work together to perform specific tasks. Understanding the structure of a C program is important because it allows you to write well-organized and efficient code that is easy to understand and maintain.</p><p>A C program typically starts with the preprocessor directive, which includes any header files that your program needs to run. Next, you declare any variables that your program will use. Then, you define one or more functions that perform specific tasks.</p><p>The main function is the starting point of a C program and is where the program’s logic is defined. Within the main function, you can use variables, statements, and other functions to perform tasks and produce the desired output.</p><p>It’s important to note that C is a procedural programming language, which means that the code is executed in a step-by-step manner, from top to bottom. Each statement in your program is executed in the order it appears, making it easy to understand and debug.</p><h4>Here is a simple example of a C program that prints the message “Hello, World!” to the console:</h4><pre>#include &lt;stdio.h&gt;<br><br>int main()<br>{<br>    printf(&quot;Hello, World!&quot;);<br>    return 0;<br>}</pre><h4>Let’s break down the structure of this program:</h4><ol><li>#include &lt;stdio.h&gt; is a preprocessor directive that includes the header file stdio.h, which provides the printf function used in this program.</li><li>int main() defines the main function, which is the starting point of the program.</li><li>Within the main function, the statement printf(&quot;Hello, World!&quot;); uses the printf function to print the message &quot;Hello, World!&quot; to the console.</li><li>The statement return 0; ends the main function and indicates that the program has been executed successfully.</li></ol><p>In summary, the structure of a C program consists of preprocessor directives, variable declarations, function definitions, and statements within the main function that work together to produce the desired outcome. By understanding the structure of a C program, you can write organized and efficient code that is easy to understand and maintain.</p><h3>Compiling Your First C Program</h3><p>Here is an example of how to compile and run your first C program:</p><ol><li>Save the code above to a file with a .c extension, such as hello.c.</li><li>Open a terminal or command prompt and navigate to the directory where the file is saved.</li><li>Compile the program by running the following command:</li></ol><pre>gcc hello.c -o hello</pre><p>This will compile the program using the GCC compiler and generate an executable file named hello.</p><ol><li>Run the program by executing the following command:</li></ol><pre>./hello</pre><p>You should see the output:</p><pre>Hello, World!</pre><p><strong>This is the basic process of compiling and running a C program.</strong></p><p>If you’re looking for a more technical guide on C programming, be sure to check out my article “<a href="https://rocodeify.com/how-to-get-started-with-c-programming-for-beginners/"><strong>How to Get Started with C Programming</strong></a>”</p><p>This article covers the fundamentals of C programming in-depth and provides detailed code examples to help you understand the concepts. Whether you’re just starting out or looking to expand your knowledge, this article is sure to provide the technical information you need to get ahead.”</p><h3>Conclusion</h3><p>C programming is a powerful and widely-used language that is used to develop a wide range of software and applications. By following best practices and using the right tools, you can write clear, efficient, and maintainable code in C.</p><p>To continue learning C programming, here are some next steps you can take:</p><ol><li><strong>Read C books and online tutorials:</strong> There are many excellent resources available online and in print that can help you continue your learning journey.</li><li><strong>Practice writing code:</strong> The more code you write, the more comfortable you will become with the language and the more confident you will become in your ability to solve problems.</li><li><strong>Participate in coding challenges and projects:</strong> Participating in coding challenges and working on projects can help you apply what you have learned, build your skills, and gain experience.</li><li><strong>Join online communities:</strong> Join online communities, such as <a href="https://rocodeify.com/forums/"><strong>Forums</strong></a> and discussion groups, to connect with other C programmers and learn from their experiences.</li><li><strong>Explore different areas of C programming:</strong> There are many different areas of C programming, such as game development, system programming, and embedded systems, that you can explore to further your knowledge and skills.</li></ol><p>By following these steps and continuously learning and practicing, you will become a more proficient C programmer and be well on your way to building a successful career in the field.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb96852a55ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>