<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Abiodun Paul Ogunnaike</title>
    <description>The latest articles on Forem by Abiodun Paul Ogunnaike (@abbeymaniak).</description>
    <link>https://forem.com/abbeymaniak</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F259401%2Fa0331633-e64f-4fc8-9d5a-5c0d5678d1a3.png</url>
      <title>Forem: Abiodun Paul Ogunnaike</title>
      <link>https://forem.com/abbeymaniak</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/abbeymaniak"/>
    <language>en</language>
    <item>
      <title>Built a Fully Offline AI Assistant on My Mac (Using Local LLMs)</title>
      <dc:creator>Abiodun Paul Ogunnaike</dc:creator>
      <pubDate>Mon, 13 Apr 2026 18:31:50 +0000</pubDate>
      <link>https://forem.com/abbeymaniak/built-a-fully-offline-ai-assistant-on-my-mac-using-local-llms-3nhj</link>
      <guid>https://forem.com/abbeymaniak/built-a-fully-offline-ai-assistant-on-my-mac-using-local-llms-3nhj</guid>
      <description>&lt;p&gt;Most AI apps today rely on APIs.&lt;/p&gt;

&lt;p&gt;I wanted something different:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A fully offline AI assistant&lt;/li&gt;
&lt;li&gt; Runs locally on my Mac&lt;/li&gt;
&lt;li&gt; No API keys, no internet required&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I built one.&lt;/p&gt;

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

&lt;p&gt;A local AI assistant that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runs using a small language model (LLaMA / Mistral)&lt;/li&gt;
&lt;li&gt;Works entirely offline&lt;/li&gt;
&lt;li&gt;Supports chat + memory&lt;/li&gt;
&lt;li&gt;Can be extended into a RAG system&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[CLI / Terminal] 
      ↓ 
[Node.js App] 
      ↓ 
[Ollama (Local AI Engine)] 
      ↓ 
[Local LLM]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 1 — Install Ollama on your local Machine
&lt;/h2&gt;



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

&lt;/div&gt;



&lt;p&gt;Start the server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pull a model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama run qwen2.5:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;I choose qwen:2.5:latest because its just 4.7GB in size&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 — Build CLI Assistant
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;local-ai-assistant 
&lt;span class="nb"&gt;cd &lt;/span&gt;local-ai-assistant 
npm init &lt;span class="nt"&gt;-y&lt;/span&gt; 
npm &lt;span class="nb"&gt;install &lt;/span&gt;axios readline-sync
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Create a file in the local-ai-assistant folder&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;assistant.js&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="sr"&gt;/usr/&lt;/span&gt;&lt;span class="nx"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt; &lt;span class="nx"&gt;node&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;axios&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;readline&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;readline-sync&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;history&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;readline&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;question&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;You: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="nx"&gt;history&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;http://localhost:11434/api/chat&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;qwen2.5:latest&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;history&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;

        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;reply&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;No response&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="nx"&gt;history&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;assistant&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;reply&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;AI:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3 — Make It a Global CLI Tool
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;Update&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;package.json:&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"local-ai"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"bin"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"local-ai"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./assistant.js"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

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

&lt;/div&gt;



&lt;p&gt;Now you can run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;local-ai
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;ul&gt;
&lt;li&gt;Local LLMs are powerful enough for real use cases&lt;/li&gt;
&lt;li&gt;You don’t need Python to start — Node works fine&lt;/li&gt;
&lt;li&gt;The real value is in architecture, not just models&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What i intend to build next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Add file-based memory (RAG)&lt;/li&gt;
&lt;li&gt;Add tools (agent behavior)&lt;/li&gt;
&lt;li&gt;Connect to Laravel API&lt;/li&gt;
&lt;li&gt;Deploy via Docker + AWS&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;Running AI locally changes how you think about systems.&lt;/p&gt;

&lt;p&gt;You’re no longer dependent on external APIs — you own the stack.&lt;/p&gt;

&lt;p&gt;If you’re building something similar, I’d love to connect &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/abbeymaniak" rel="noopener noreferrer"&gt;https://github.com/abbeymaniak&lt;/a&gt;&lt;br&gt;
&lt;a href="https://linkedin.com/in/abiodun-paul-ogunnaike" rel="noopener noreferrer"&gt;https://linkedin.com/in/abiodun-paul-ogunnaike&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>node</category>
      <category>llm</category>
    </item>
    <item>
      <title>Stateless vs. Stateful Systems in Software Architecture</title>
      <dc:creator>Abiodun Paul Ogunnaike</dc:creator>
      <pubDate>Fri, 27 Mar 2026 19:58:22 +0000</pubDate>
      <link>https://forem.com/abbeymaniak/stateless-vs-stateful-systems-in-software-architecture-nl8</link>
      <guid>https://forem.com/abbeymaniak/stateless-vs-stateful-systems-in-software-architecture-nl8</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;TD;LR:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Stateless systems scale easily and recover quickly.&lt;/em&gt; (Scale with stateless.)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Stateful systems enable deeper, continuous user experiences.&lt;/em&gt; (Experience with stateful.)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Great architecture isn’t about choosing one it’s about placing state intentionally.&lt;/em&gt; (Win by controlling where state lives.)&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Modern software architecture often comes down to one fundamental question: Should your system remember anything between requests? That single decision shapes scalability, complexity, performance, and even cost. Let’s break it down clearly and practically.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does “Remembering Between Requests” Really Mean?
&lt;/h2&gt;

&lt;p&gt;When a system remembers, it retains information about a user or process across multiple interactions.&lt;/p&gt;

&lt;p&gt;A stateful system keeps that memory internally (e.g., user session stored on a server).&lt;br&gt;
A stateless system treats every request as independent no memory of the past.&lt;/p&gt;

&lt;p&gt;Think of it like this:&lt;/p&gt;

&lt;p&gt;Stateful = a waiter who remembers your order without asking again&lt;br&gt;
Stateless = a waiter who asks you to repeat your order every time&lt;/p&gt;

&lt;h2&gt;
  
  
  Stateless Systems: Simple, Scalable, Cloud-Friendly
&lt;/h2&gt;

&lt;p&gt;A stateless system does not store client context between requests. Each request must contain all the information needed to process it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it works&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No session stored on the server
State is passed via: &lt;/li&gt;
&lt;li&gt;   Tokens (e.g., JWT)&lt;/li&gt;
&lt;li&gt;   Query params / headers&lt;/li&gt;
&lt;li&gt;   External storage (DB, cache)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Advantages&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Horizontal scalability (effortless scaling)&lt;/strong&gt;&lt;br&gt;
You can spin up multiple servers behind a load balancer without worrying about where a user’s data lives.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Fault tolerance&lt;/strong&gt;&lt;br&gt;
If one server dies, another can handle the next request seamlessly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Simpler infrastructure&lt;/strong&gt;&lt;br&gt;
No need for session replication or sticky sessions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Trade-offs&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Larger request sizes (state sent every time)&lt;/li&gt;
&lt;li&gt;More work pushed to clients or external systems&lt;/li&gt;
&lt;li&gt;Can feel less intuitive for complex workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Real-world examples&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;REST APIs&lt;/li&gt;
&lt;li&gt;Microservices architectures&lt;/li&gt;
&lt;li&gt;Serverless functions (e.g., AWS Lambda)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Stateful Systems: Powerful but Complex
&lt;/h2&gt;

&lt;p&gt;A stateful system stores data about a user/session on the server across multiple requests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it works&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Server stores session data (memory, Redis, DB)&lt;/li&gt;
&lt;li&gt;Client sends a session ID (cookie)&lt;/li&gt;
&lt;li&gt;Server retrieves stored context&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Advantages&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Simpler client logic&lt;/strong&gt;&lt;br&gt;
The server “remembers,” so the client doesn’t have to send everything every time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Efficient for long-lived interactions&lt;/strong&gt;&lt;br&gt;
   Great for workflows like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shopping carts&lt;/li&gt;
&lt;li&gt;Multiplayer games&lt;/li&gt;
&lt;li&gt;Real-time collaboration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Trade-offs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Harder to scale&lt;/strong&gt;&lt;br&gt;
You need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sticky sessions, or&lt;/li&gt;
&lt;li&gt;Shared session stores (e.g., Redis)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Reduced fault tolerance&lt;/strong&gt;&lt;br&gt;
If the server holding the session crashes, state may be lost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Operational complexity&lt;/strong&gt;&lt;br&gt;
Session replication, synchronization, and consistency become real challenges.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hybrid Reality (What Most Systems Actually Do)
&lt;/h2&gt;

&lt;p&gt;Here’s the truth: most modern systems are not purely stateless or stateful—they’re a mix.&lt;/p&gt;

&lt;p&gt;A common pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep application servers stateless
Store state in external systems:&lt;/li&gt;
&lt;li&gt;Databases&lt;/li&gt;
&lt;li&gt;Caches (Redis)&lt;/li&gt;
&lt;li&gt;Object storage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This gives you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stateless scalability&lt;/li&gt;
&lt;li&gt;Stateful capability (via external persistence)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For Example in &lt;strong&gt;Celebrateme.co&lt;/strong&gt; a digital platform focused on helping people to never miss important moments like birthdays and making those moments more meaningful with Physical and digital gifts currently in development:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The API is stateless&lt;/li&gt;
&lt;li&gt;Authentication uses JWT (stateless)&lt;/li&gt;
&lt;li&gt;User data lives in a database (stateful, but externalized)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The following Non-Function Requirements will determine which approach to take:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. How much scale do you need?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Massive / unpredictable traffic → Stateless (JWT)&lt;/li&gt;
&lt;li&gt;Controlled / predictable → Stateful can work (cookies)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. How critical is resilience?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;High uptime requirement → Stateless wins&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. How complex is the interaction?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multi-step workflows → Stateful or hybrid&lt;/li&gt;
&lt;li&gt;Simple request-response → Stateless&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. What’s your team’s operational maturity?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Small team → stateless reduces headaches&lt;/li&gt;
&lt;li&gt;Experienced infra team → stateful is manageable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;My advice: default to stateless, and introduce state only where it’s truly needed.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This keeps your system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easier to scale&lt;/li&gt;
&lt;li&gt;Easier to debug&lt;/li&gt;
&lt;li&gt;Easier to deploy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Stateless systems optimize for scale and resilience&lt;/em&gt;&lt;/strong&gt;.&lt;br&gt;
&lt;em&gt;&lt;strong&gt;Stateful systems optimize for rich, continuous interactions.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;The best architects don’t pick one blindly, they control where state lives.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>performance</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>10 REST API MISTAKES TO AVOID</title>
      <dc:creator>Abiodun Paul Ogunnaike</dc:creator>
      <pubDate>Fri, 20 Mar 2026 15:47:55 +0000</pubDate>
      <link>https://forem.com/abbeymaniak/10-rest-api-mistakes-to-avoid-1a94</link>
      <guid>https://forem.com/abbeymaniak/10-rest-api-mistakes-to-avoid-1a94</guid>
      <description>&lt;p&gt;If you're building APIs with Wordpress, Laravel or Node.js, this might hit a bit close to home&lt;/p&gt;

&lt;p&gt;A lot of developers aren’t really designing APIs&lt;br&gt;
they’re just returning JSON and calling it a day.&lt;/p&gt;

&lt;p&gt;And that’s where things start to fall apart.&lt;/p&gt;

&lt;p&gt;Because a solid API isn’t just something that “works.”&lt;br&gt;
It should be consistent, scalable, predictable, and easy for other developers to use.&lt;/p&gt;

&lt;p&gt;Let’s break down some of the most common mistakes and how to fix them 👇&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;❌ 1. Using Verbs in URLs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wrong&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET /getBooks  
POST /createBook 
DELETE /deleteBook/1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Right&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET /books  
POST /books 
DELETE /books/1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;👉 URLs should represent resources (nouns) — not actions.&lt;br&gt;
HTTP methods already define the action.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;❌ 2. Ignoring HTTP Status Codes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wrong&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;200 OK
{ "status": "error", "message": "User not found" }
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Right&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;200 → Success&lt;/li&gt;
&lt;li&gt;201 → Created&lt;/li&gt;
&lt;li&gt;400 → Bad Request&lt;/li&gt;
&lt;li&gt;401 → Unauthorized&lt;/li&gt;
&lt;li&gt;403 → Forbidden&lt;/li&gt;
&lt;li&gt;404 → Not Found&lt;/li&gt;
&lt;li&gt;422 → Validation Error&lt;/li&gt;
&lt;li&gt;500 → Server Error&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;👉 Status codes are part of your API contract.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;❌ 3. Inconsistent JSON Structure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wrong&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"userName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Paul"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"username"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Paul"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Right&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pick one style: snake_case OR camelCase&lt;/li&gt;
&lt;li&gt;Use it everywhere&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;👉 Consistency builds trust.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;❌ 4. No API Versioning&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wrong&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Right&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/api/v1/books
/api/v2/books
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;&lt;strong&gt;👉 Versioning prevents breaking existing clients.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;❌ 5. No Pagination&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wrong&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET /books → returns 10,000 records

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Right&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET /books?page=1&amp;amp;limit=10
{
  "data": [],
  "meta": {
    "current_page": 1,
    "total": 1000
  }
}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;&lt;strong&gt;👉 Pagination improves performance, scalability, and UX.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;❌ 6. Mixing Authentication &amp;amp; Authorization&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authentication = Who are you?&lt;/li&gt;
&lt;li&gt;Authorization = What can you do?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;👉 Use proper tools:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JWT / OAuth&lt;/li&gt;
&lt;li&gt;Laravel Sanctum / Passport&lt;/li&gt;
&lt;li&gt;Never trust frontend validation alone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;❌ 7. Poor Error Handling&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bad&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Something went wrong"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Good&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;404&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Book not found"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;&lt;strong&gt;👉 Errors should be predictable and structured.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;❌ 8. Bad Filtering &amp;amp; Sorting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wrong&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET /getActiveEventsSortedByName

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Right&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET /events?status=active&amp;amp;sort=name
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;&lt;strong&gt;👉 Keep it clean, flexible, and scalable.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;❌ 9. Ignoring Security&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common mistakes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No rate limiting&lt;/li&gt;
&lt;li&gt;No validation&lt;/li&gt;
&lt;li&gt;No HTTPS&lt;/li&gt;
&lt;li&gt;Exposing sensitive data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;👉 Best practices:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Always use HTTPS&lt;/li&gt;
&lt;li&gt;Validate all inputs&lt;/li&gt;
&lt;li&gt;Add rate limiting&lt;/li&gt;
&lt;li&gt;Hide sensitive/internal fields&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;❌ 10. Designing APIs Around Your Database&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bad mindset&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;“This is my table structure”&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good mindset&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;“This is what the client needs”&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;👉 Your API is a contract, not a database mirror.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Good APIs Look Like&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Versioned endpoints&lt;/li&gt;
&lt;li&gt;Consistent naming&lt;/li&gt;
&lt;li&gt;Proper status codes&lt;/li&gt;
&lt;li&gt;Pagination&lt;/li&gt;
&lt;li&gt;Filtering &amp;amp; sorting&lt;/li&gt;
&lt;li&gt;Secure authentication&lt;/li&gt;
&lt;li&gt;Structured errors&lt;/li&gt;
&lt;li&gt;Resource-based URLs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;REST API design isn’t about returning JSON.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It’s about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Consistency&lt;/li&gt;
&lt;li&gt;Scalability&lt;/li&gt;
&lt;li&gt;Predictability&lt;/li&gt;
&lt;li&gt;Security&lt;/li&gt;
&lt;li&gt;Developer Experience&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When your API is clean and predictable…&lt;br&gt;
developers love working with it.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>restapi</category>
      <category>webdev</category>
      <category>data</category>
      <category>php</category>
    </item>
    <item>
      <title>Elvis (?:) vs Null Coalescing (??) in PHP: A Practical Guide for WordPress Developers</title>
      <dc:creator>Abiodun Paul Ogunnaike</dc:creator>
      <pubDate>Wed, 11 Mar 2026 09:12:33 +0000</pubDate>
      <link>https://forem.com/abbeymaniak/elvis-vs-null-coalescing-in-php-a-practical-guide-for-wordpress-developers-3ih4</link>
      <guid>https://forem.com/abbeymaniak/elvis-vs-null-coalescing-in-php-a-practical-guide-for-wordpress-developers-3ih4</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;??&lt;/code&gt; (Null Coalescing Operator)
Only falls back if the variable is undefined or null.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$page&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$_GET&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'page'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Good for array keys, request data, and optional variables where values like 0 or "" might still be valid.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;?:&lt;/code&gt; (Elvis Operator)
Falls back for any falsy value (false, 0, "", null, etc.).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;$per_page = get_option('posts_per_page') ?: 6;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Good for database values or WordPress options where empty or false values should trigger a default.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✅ Simple rule:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;??&lt;/code&gt; when you only want to check for missing or null variables.&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;?:&lt;/code&gt; when you want a fallback for anything falsy.&lt;/p&gt;




&lt;p&gt;When writing PHP especially in a WordPress environment you’ll often need to provide fallback values when data isn’t available. PHP gives us two operators that look similar but behave very differently:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The Elvis operator ?:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Null Coalescing operator ??&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At first glance they seem interchangeable. In practice, they solve two completely different problems, and choosing the wrong one can lead to subtle bugs—particularly when dealing with WordPress functions like get_option().&lt;/p&gt;

&lt;p&gt;Let’s break down how they differ and when you should use each one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Key Difference&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The distinction comes down to what counts as “missing” data.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;??&lt;/code&gt;                Only null or undefined variables&lt;br&gt;
&lt;code&gt;?:&lt;/code&gt;                Any falsy value&lt;/p&gt;

&lt;p&gt;In PHP, falsy values include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;null&lt;/li&gt;
&lt;li&gt;false&lt;/li&gt;
&lt;li&gt;0&lt;/li&gt;
&lt;li&gt;"0"&lt;/li&gt;
&lt;li&gt;"" (empty string)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.toempty%20array"&gt;&lt;/a&gt;
Understanding this difference is critical when working with WordPress APIs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The WordPress&lt;/strong&gt; get_option() &lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;WordPress functions don’t always behave the way you might expect.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nf"&gt;get_option&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'posts_per_page'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This function can return:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;false → if the option does not exist&lt;/li&gt;
&lt;li&gt;"" (empty string) → if the option exists but has no value&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now consider this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$per_page&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_option&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'posts_per_page'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You might expect it to fall back to 6 when the option is empty.&lt;/p&gt;

&lt;p&gt;But it won’t.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;??&lt;/code&gt; operator only checks for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;null&lt;/li&gt;
&lt;li&gt;undefined variables&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So if &lt;code&gt;get_option()&lt;/code&gt; returns:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;PHP will treat those as valid values and not use the fallback.&lt;/p&gt;

&lt;p&gt;That means &lt;code&gt;$per_page&lt;/code&gt; might end up being an empty string instead of &lt;code&gt;6&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why the Elvis Operator Works Better Here&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now look at the Elvis operator:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$per_page&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_option&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'posts_per_page'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?:&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This behaves differently.&lt;/p&gt;

&lt;p&gt;The Elvis operator checks for falsy values, which includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;false&lt;/li&gt;
&lt;li&gt;""&lt;/li&gt;
&lt;li&gt;null&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So if &lt;code&gt;get_option()&lt;/code&gt; returns any of those, the fallback &lt;code&gt;6&lt;/code&gt; is used.&lt;/p&gt;

&lt;p&gt;This guarantees that &lt;code&gt;$per_page&lt;/code&gt; always contains a &lt;strong&gt;usable value&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does That Mean ?: Is Better Than ???&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not exactly.&lt;/p&gt;

&lt;p&gt;They are &lt;strong&gt;&lt;em&gt;not competing operators&lt;/em&gt;.&lt;/strong&gt; They solve different problems.&lt;/p&gt;

&lt;p&gt;The key is understanding &lt;strong&gt;&lt;em&gt;what values you want to allow&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to Use the Elvis Operator (?:)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;?:&lt;/code&gt; when you want to reject any &lt;code&gt;falsy&lt;/code&gt; value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example Use Case&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Reading settings from a database where empty or false values are not valid.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$per_page&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_option&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'posts_per_page'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?:&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the database returns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;false&lt;/li&gt;
&lt;li&gt;""&lt;/li&gt;
&lt;li&gt;null&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;the code will fall back to &lt;code&gt;6&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This is very common when working with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WordPress options&lt;/li&gt;
&lt;li&gt;configuration values&lt;/li&gt;
&lt;li&gt;settings panels&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When to Use the Null Coalescing Operator (??)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;??&lt;/code&gt; when you only want to handle &lt;code&gt;undefined variables or null values&lt;/code&gt;, while preserving valid falsy values.&lt;/p&gt;

&lt;p&gt;This is particularly useful for user input or array access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example Use Case&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Reading query parameters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$paged&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;intval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$_GET&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'epage'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;$_GET['epage']&lt;/code&gt; does not exist, it falls back to 1.&lt;/p&gt;

&lt;p&gt;But if it exists and contains something like:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;PHP will still attempt to parse it instead of replacing it with 1.&lt;/p&gt;

&lt;p&gt;This is important in cases where 0 might be a valid value, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;pricing ($price = 0 meaning free)&lt;/li&gt;
&lt;li&gt;counts&lt;/li&gt;
&lt;li&gt;indexes&lt;/li&gt;
&lt;li&gt;pagination offsets&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;The Elvis operator and the null coalescing operator look similar, but they solve different problems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Elvis (&lt;code&gt;?:&lt;/code&gt;)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rejects any falsy value&lt;/li&gt;
&lt;li&gt;Useful for database values and settings&lt;/li&gt;
&lt;li&gt;Common in WordPress code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Null Coalescing (&lt;code&gt;??&lt;/code&gt;)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only checks for null or undefined variables&lt;/li&gt;
&lt;li&gt;Preserves valid falsy values like 0&lt;/li&gt;
&lt;li&gt;Ideal for array access and request data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Choosing the right one ensures your fallback logic behaves exactly as intended.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Takeaway
&lt;/h2&gt;

&lt;p&gt;If you're working with WordPress options or database-driven values, the Elvis operator often gives you safer behavior:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$per_page&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_option&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'posts_per_page'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?:&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But when handling &lt;strong&gt;request data or optional variables&lt;/strong&gt;, the null coalescing operator is usually the better fit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$page&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$_GET&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'page'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Understanding the difference may seem small, but it can prevent subtle bugs that are frustrating to track down later.&lt;/p&gt;

&lt;p&gt;And as always in PHP, the right operator depends on what counts as “missing” data in your application.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Unique Field Guard for ACF</title>
      <dc:creator>Abiodun Paul Ogunnaike</dc:creator>
      <pubDate>Tue, 06 May 2025 12:30:27 +0000</pubDate>
      <link>https://forem.com/abbeymaniak/unique-field-guard-for-acf-4ba8</link>
      <guid>https://forem.com/abbeymaniak/unique-field-guard-for-acf-4ba8</guid>
      <description>&lt;p&gt;I’m excited to share a project, I’ve been working on that solves a headache I’ve encountered way too often when building custom solutions with ACF.&lt;/p&gt;

&lt;p&gt;🔒 Unique Field Guard is a lightweight plugin that prevents duplicate values from being saved in Advanced Custom Fields — perfect for use cases like:&lt;/p&gt;

&lt;p&gt;💼 Unique employee IDs&lt;/p&gt;

&lt;p&gt;📧 Preventing duplicate email or username fields&lt;/p&gt;

&lt;p&gt;📁 Custom directories or member listings&lt;/p&gt;

&lt;p&gt;⚙️ What It Offers:&lt;br&gt;
Instant validation before saving&lt;/p&gt;

&lt;p&gt;Works on posts, custom post types, and taxonomies&lt;/p&gt;

&lt;p&gt;Easy to set up — plug and play&lt;/p&gt;

&lt;p&gt;Filter hooks for developers needing deeper control&lt;/p&gt;

&lt;p&gt;No bloat, just clean code built for speed and safety&lt;/p&gt;

&lt;p&gt;Built it because I needed it. Sharing it because I know you probably do too.&lt;/p&gt;

&lt;p&gt;📥 &lt;a href="https://wordpress.org/plugins/unique-field-guard-for-acf/" rel="noopener noreferrer"&gt;https://wordpress.org/plugins/unique-field-guard-for-acf/&lt;/a&gt;&lt;br&gt;
📢 Feedback, suggestions, and collabs are welcome!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/abiodun-paul-ogunnaike/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/abiodun-paul-ogunnaike/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, I’m open to remote dev opportunities – so if you know a team hiring passionate WordPress or PHP developers, I’d love to chat.&lt;/p&gt;

&lt;h1&gt;
  
  
  WordPress #AdvancedCustomFields #ACF #PluginDev #OpenSource #WordPressCommunity #DevLife #WPCustomFields #PHPDev #UniqueFieldValidation
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Getting Started with HTML: A Beginner's Guide</title>
      <dc:creator>Abiodun Paul Ogunnaike</dc:creator>
      <pubDate>Sun, 03 Dec 2023 19:51:54 +0000</pubDate>
      <link>https://forem.com/abbeymaniak/getting-started-with-html-a-beginners-guide-1mec</link>
      <guid>https://forem.com/abbeymaniak/getting-started-with-html-a-beginners-guide-1mec</guid>
      <description>&lt;p&gt;HTML, or HyperText Markup Language, is the backbone of the World Wide Web. It is the standard markup language used to create and design web pages. Whether you're a complete beginner or someone with a bit of coding experience, learning HTML is an essential step toward understanding how websites are structured and developed. In this guide, we'll take you through the basics of HTML to help you get started on your journey to web development.&lt;/p&gt;

&lt;p&gt;Understanding HTML&lt;br&gt;
HTML is a markup language that uses a system of tags to structure content on the web. These tags are surrounded by angle brackets, and they define the elements on a web page. An HTML document consists of a series of nested elements that create the structure of a webpage. Each element serves a specific purpose and can contain text, images, links, and more.&lt;/p&gt;

&lt;p&gt;Setting Up Your Environment&lt;br&gt;
Before you start writing HTML code, you need a simple text editor to create and save your files. Popular choices include Notepad (Windows), TextEdit (Mac), or Visual Studio Code. Once you have your text editor ready, create a new file and save it with the ".html" extension.&lt;/p&gt;

&lt;p&gt;Basic HTML Structure&lt;br&gt;
Every HTML document follows a basic structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;The Title&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;!-- The content goes here --&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;:&lt;/code&gt; This declaration defines the document type and version of HTML being used. It should be placed at the beginning of every HTML document.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;html&amp;gt;:&lt;/code&gt; This is the root element that wraps all the content on the page.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;head&amp;gt;:&lt;/code&gt; Contains meta-information about the HTML document, such as the title, character set, and links to external stylesheets.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;title&amp;gt;:&lt;/code&gt; Sets the title of the web page, which appears in the browser tab.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;body&amp;gt;:&lt;/code&gt; Contains the actual content of the web page, such as text, images, links, and more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML Elements and Tags&lt;/strong&gt;&lt;br&gt;
HTML elements are the building blocks of a web page, and they are defined by tags. Tags consist of an opening tag, content, and a closing tag. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is a paragraph.&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt; is the opening tag.
This is a paragraph. is the content.
&amp;lt;/p&amp;gt; is the closing tag.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here are some common HTML tags:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;h1&amp;gt; to &amp;lt;h6&amp;gt;:&lt;/code&gt; Headings of different levels.&lt;br&gt;
&lt;code&gt;&amp;lt;p&amp;gt;:&lt;/code&gt; Paragraph.&lt;br&gt;
&lt;code&gt;&amp;lt;a&amp;gt;:&lt;/code&gt; Anchor, used for links.&lt;br&gt;
&lt;code&gt;&amp;lt;img&amp;gt;:&lt;/code&gt; Image.&lt;br&gt;
&lt;code&gt;&amp;lt;ul&amp;gt;, &amp;lt;ol&amp;gt;, &amp;lt;li&amp;gt;:&lt;/code&gt; Unordered list, ordered list, list item.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adding Text and Headings&lt;/strong&gt;&lt;br&gt;
To add text to your webpage, you can use the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tag for paragraphs and &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; to &lt;code&gt;&amp;lt;h6&amp;gt;&lt;/code&gt; tags for headings. For example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;h1&amp;gt;This is a Heading&amp;lt;/h1&amp;gt;&lt;br&gt;
&amp;lt;p&amp;gt;This is a paragraph of text.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adding Images&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To add an image, use the &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag and specify the image source (src) and alternative text (alt). For example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;img src="image.jpg" alt="A descriptive text about the image for screen readers"&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating Links&lt;/strong&gt;&lt;br&gt;
To create a hyperlink, use the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tag and specify the destination URL in the href attribute. &lt;br&gt;
For example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;a href="https://www.example.com"&amp;gt;Visit Example.com&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Saving and Previewing Your HTML File&lt;/strong&gt;&lt;br&gt;
Save your HTML file and open it in a web browser to see the results. Right-click on the file and choose "Open with" to select your preferred browser.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
This basic guide should provide you with a solid foundation for creating simple web pages using HTML. As you progress in your web development journey, you'll explore more advanced features and learn how to integrate CSS (Cascading Style Sheets) and JavaScript to enhance the functionality and appearance of your websites. Keep practicing, refer to documentation, and don't hesitate to experiment with your code to deepen your understanding of HTML. Happy coding!&lt;/p&gt;

&lt;p&gt;Feel Free to Connect On linkedIn&lt;br&gt;
 &lt;a href="https://www.linkedin.com/in/abiodun-paul-ogunnaike/"&gt;https://www.linkedin.com/in/abiodun-paul-ogunnaike/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>html</category>
    </item>
    <item>
      <title>Understanding Frontend vs. Backend Development</title>
      <dc:creator>Abiodun Paul Ogunnaike</dc:creator>
      <pubDate>Sat, 18 Nov 2023 21:41:13 +0000</pubDate>
      <link>https://forem.com/abbeymaniak/understanding-frontend-vs-backend-development-11ld</link>
      <guid>https://forem.com/abbeymaniak/understanding-frontend-vs-backend-development-11ld</guid>
      <description>&lt;p&gt;In the large and dynamic field of web development. These phrases designate several phases of the development process,Frontend and backend developers collaborate together to create websites and applications, each with its own duties, tools, and difficulties. Anyone wishing to pursue a career in web development or wants to effectively manage a development project must comprehend the distinctions between frontend and backend development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Frontend Development:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The goal of frontend development, also known as client-side development, is to create a website's or application's user interface and user experience. This is the area of development where users have direct interaction. Frontend developers are in charge of putting the design into practice and making sure the application or website is aesthetically pleasing, responsive, and easy to use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key responsibilities of frontend developers include:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;User Interface (UI) Design:&lt;br&gt;
Designing and implementing the visual elements of the user interface, including layout, colors, typography, and interactive components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User Experience (UX):&lt;br&gt;
Ensuring a seamless and enjoyable experience for users by optimizing navigation, responsiveness, and overall usability.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Frontend Languages and Frameworks: Using languages such as HTML, CSS, and JavaScript, along with frameworks like React, Angular, or Vue.js, to build the frontend components and interactivity.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cross-Browser Compatibility:
Ensuring that the website or application works consistently across different web browsers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Backend Development:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Backend development, sometimes referred to as server-side development, works on a website or application's internal workings. In addition to handling the logic that drives the frontend, it entails maintaining databases and server setup. The smooth operation of the program, the safe storage and retrieval of data, and the efficient frontend-server communication are all priorities for backend developers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key responsibilities of backend developers include:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Server Management:&lt;br&gt;
Configuring and maintaining servers to handle requests from users, manage databases, and execute server-side code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Database Management:&lt;br&gt;
Designing and managing databases to store and retrieve data efficiently.Examples of common databases used are MySQL, MongoDB,PostgreSQL.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Server-Side Languages and Frameworks:&lt;br&gt;
Using languages such as Python, Ruby, Java, or PHP, along with frameworks like Django, Ruby on Rails, or Express.js, to build the backend logic and handle server-side operations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Security:&lt;br&gt;
Implementing security measures to protect against vulnerabilities and unauthorized access to data.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Collaboration and Full-Stack Development:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While frontend and backend development are distinct, they often go hand-in-hand. Developers who have expertise in both frontend and backend development are known as full-stack developers. Full-stack developers have a comprehensive understanding of the entire development process, from designing user interfaces to managing server operations.&lt;/p&gt;

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

&lt;p&gt;Frontend and backend development are essential elements in the dynamic field of web development that collaborate to produce a smooth and useful user experience. Backend developers take care of the server-side processes and make sure that data is managed effectively and securely, while frontend developers concentrate on the interactive and visual elements that users interact with directly. Understanding the roles and duties of frontend and backend developers is crucial for success in the digital world, regardless of your interest in managing a development project or pursuing a career in web development.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Introduction to Programming Logic: Understanding the Basics of Coding</title>
      <dc:creator>Abiodun Paul Ogunnaike</dc:creator>
      <pubDate>Sun, 29 Oct 2023 15:44:20 +0000</pubDate>
      <link>https://forem.com/abbeymaniak/introduction-to-programming-logic-understanding-the-basics-of-coding-64a</link>
      <guid>https://forem.com/abbeymaniak/introduction-to-programming-logic-understanding-the-basics-of-coding-64a</guid>
      <description>&lt;p&gt;Essentially, programming is giving instructions to a machine on how to carry out particular tasks. Programming logic is something that must be understood and used in order to interact with computers. What enables developers to solve issues, make apps, and construct software systems is the basic organization and flow of operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Programming Logic?&lt;/strong&gt;&lt;br&gt;
The basic way programmers understand and organize their code to produce desired results is known as programming logic. Fundamentally, it involves decomposing issues into smaller, more manageable components and formulating a plan of action to address each one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Elements of Programming Logic:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;&lt;em&gt;1. Sequence:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Programming logic involves arranging commands in a sequential order, allowing the computer to execute them one after another.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;2. Selection (Conditional Statements):&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Conditions or logical tests are used to direct the flow of a program. For instance, "if-else" statements allow the code to make decisions based on specific conditions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;3. Iteration (Loops):&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Loops enable the repetition of certain tasks until a condition is met. This helps in automating repetitive tasks and managing data efficiently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is Programming Logic Important?&lt;/strong&gt;&lt;br&gt;
Understanding programming logic is crucial for several reasons:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;1. Problem Solving:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Programming logic helps in breaking down complex problems into smaller, manageable parts. This simplification enables developers to solve problems systematically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;2. Efficient Code Writing:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
By using logical structures, programmers can write code that is not only understandable but also efficient. It helps in avoiding redundancy and streamlining the execution process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;3. Enhancing Debugging Skills:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Logical thinking assists in identifying errors within the code and debugging more effectively. It becomes easier to trace the flow of a program and identify where issues might occur.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Building Blocks of Programming Logic:&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;&lt;strong&gt;Variables:&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
Variables are used to store data within a program. They can be manipulated and used in logical operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Operators:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Operators perform specific operations on variables and values. For instance, arithmetic operators (+, -, *, /) are used for mathematical operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Control Structures:&lt;/strong&gt;&lt;br&gt;
Control structures like loops (for, while, do-while) and conditional statements (if, else if, else) control the flow of the program.&lt;/p&gt;

&lt;p&gt;Examples of Programming Logic:&lt;br&gt;
&lt;strong&gt;&lt;em&gt;1. Conditional Statements:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$age = 25;

if ($age &amp;lt; 18) {
    echo "You are a minor.";
} else {
    echo "You are an adult.";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;2. Looping:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for ($i = 0; $i &amp;lt; 9; $i++) {
    echo "Count: $i &amp;lt;br&amp;gt;";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;How to Develop Strong Programming Logic?&lt;/strong&gt;&lt;br&gt;
Solving problems and practicing regularly are necessary to develop strong programming reasoning. Here are some actions you can take to sharpen your reasoning:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;1. Start with Simple Problems:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Begin by solving simple problems using a structured approach. Break down tasks and analyze the steps to solve them.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;2. Practice Regularly:&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
Regular practice and writing code help reinforce programming logic. Experiment with different problems to understand how logic applies to diverse scenarios.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;3. Learn from Others’ Code:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Reviewing and understanding code written by experienced developers can provide insight into how logic is applied in different contexts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
Programming logic forms the foundation of coding. It’s the systematic approach of thinking and organizing instructions to create functional software. Embracing logical thinking, breaking down problems, and applying structured solutions are key components for any budding programmer.&lt;/p&gt;

&lt;p&gt;By grasping programming logic, beginners pave the way for a deeper understanding of programming languages and the ability to develop efficient and effective software solutions.&lt;/p&gt;

&lt;p&gt;Understanding programming logic is just the first step in an exciting journey towards becoming a proficient developer!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>career</category>
    </item>
  </channel>
</rss>
