<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lin Aung</title>
    <description>The latest articles on DEV Community by Lin Aung (@devlinaung).</description>
    <link>https://dev.to/devlinaung</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%2F1121732%2F436e388a-ee21-4d1a-b569-06b149cf5216.png</url>
      <title>DEV Community: Lin Aung</title>
      <link>https://dev.to/devlinaung</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devlinaung"/>
    <language>en</language>
    <item>
      <title>I Got Tired of Running OpenSSL Commands, So I Built a CLI for JWK Generation</title>
      <dc:creator>Lin Aung</dc:creator>
      <pubDate>Fri, 27 Feb 2026 08:46:16 +0000</pubDate>
      <link>https://dev.to/devlinaung/i-got-tired-of-running-openssl-commands-so-i-built-a-cli-for-jwk-generation-4dgm</link>
      <guid>https://dev.to/devlinaung/i-got-tired-of-running-openssl-commands-so-i-built-a-cli-for-jwk-generation-4dgm</guid>
      <description>&lt;p&gt;There's a certain kind of frustration that only developers know. When you need to do something relatively simple, but the tooling forces you through 4 manual steps, terminal commands you have to Google every time, and output files you're not sure are formatted correctly.&lt;/p&gt;

&lt;p&gt;That's exactly what happened to me with JWK keys.&lt;/p&gt;

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

&lt;p&gt;I was integrating with a service that required keys in &lt;strong&gt;JWK (JSON Web Key) format&lt;/strong&gt;. Not PEM. JWK.&lt;/p&gt;

&lt;p&gt;I already knew how to generate a key pair with OpenSSL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openssl ecparam &lt;span class="nt"&gt;-name&lt;/span&gt; prime256v1 &lt;span class="nt"&gt;-genkey&lt;/span&gt; &lt;span class="nt"&gt;-noout&lt;/span&gt; &lt;span class="nt"&gt;-out&lt;/span&gt; private.pem
openssl ec &lt;span class="nt"&gt;-in&lt;/span&gt; private.pem &lt;span class="nt"&gt;-pubout&lt;/span&gt; &lt;span class="nt"&gt;-out&lt;/span&gt; public.pem
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But converting those PEM files to JWK? That's where it got annoying. I ended up writing a one-off Node.js script, manually constructing the JWK object, double-checking that the &lt;code&gt;kty&lt;/code&gt;, &lt;code&gt;crv&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;y&lt;/code&gt;, &lt;code&gt;d&lt;/code&gt; fields were all correct, and saving the output.&lt;/p&gt;

&lt;p&gt;It worked. But I thought: I'm probably going to need to do this again. And I don't want to redo this every time.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;&lt;a href="https://www.npmjs.com/package/jwk-cli-tool" rel="noopener noreferrer"&gt;jwk-cli-tool&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What It Does
&lt;/h2&gt;

&lt;p&gt;It's an interactive CLI that handles the full workflow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generate a new PEM key pair (EC or RSA)&lt;/li&gt;
&lt;li&gt;Convert PEM files to JWK JSON format&lt;/li&gt;
&lt;li&gt;Or do both in one flow&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You get four files at the end: &lt;code&gt;*.private.pem&lt;/code&gt;, &lt;code&gt;*.public.pem&lt;/code&gt;, &lt;code&gt;*.private.jwk.json&lt;/code&gt;, and &lt;code&gt;*.public.jwk.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Supported algorithms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;EC&lt;/strong&gt;: ES256, ES384, ES512&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RSA&lt;/strong&gt;: RS256, RS384, RS512&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Use It
&lt;/h2&gt;

&lt;p&gt;No installation needed. Just run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx jwk-cli-tool
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll get an interactive menu:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;? What would you like to do?
&amp;gt; Generate new PEM key pair
  Generate JWK JSON files
  Exit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From there it walks you through naming the key, picking the algorithm, and choosing whether to generate fresh PEM files or use existing ones from your &lt;code&gt;/keys&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;The generated files land in &lt;code&gt;keys/&lt;/code&gt; for PEM files and &lt;code&gt;outputs/&lt;/code&gt; for JWK JSON files. Both folders are created automatically if they don't exist. If a key name already exists, it asks before overwriting.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Quick Look at the Output
&lt;/h2&gt;

&lt;p&gt;Running through the flow for an ES256 key produces something like this for the public JWK:&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;"kty"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"EC"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"use"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"sig"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"alg"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ES256"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"kid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"myapp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"crv"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"P-256"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"x"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"y"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0"&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;The private JWK includes the &lt;code&gt;d&lt;/code&gt; parameter on top of that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;p&gt;Built with Node.js and TypeScript, using &lt;code&gt;@inquirer/prompts&lt;/code&gt; for the TUI and Node's built-in &lt;code&gt;crypto&lt;/code&gt; module. No heavy external crypto dependencies.&lt;/p&gt;

&lt;p&gt;The outputs write to &lt;code&gt;process.cwd()&lt;/code&gt;, so wherever you run &lt;code&gt;npx jwk-cli-tool&lt;/code&gt; from, that's where your &lt;code&gt;keys/&lt;/code&gt; and &lt;code&gt;outputs/&lt;/code&gt; folders appear.&lt;/p&gt;

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

&lt;p&gt;The project is open source:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/dev-lin2/jwk-cli-tool" rel="noopener noreferrer"&gt;github.com/dev-lin2/jwk-cli-tool&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;npm&lt;/strong&gt;: &lt;a href="https://www.npmjs.com/package/jwk-cli-tool" rel="noopener noreferrer"&gt;npmjs.com/package/jwk-cli-tool&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;PRs and feedback welcome. If there are algorithms or features you'd find useful (EdDSA/Ed25519, JWKS array output, non-interactive flag mode for CI pipelines) feel free to open an issue.&lt;/p&gt;

&lt;p&gt;Sometimes the best tools come from solving your own problem. Hopefully this saves someone else the same 30 minutes of OpenSSL googling.&lt;/p&gt;

</description>
      <category>jwk</category>
      <category>node</category>
      <category>opensource</category>
    </item>
    <item>
      <title>I Built a Pixel Art CV Template (Open Source)</title>
      <dc:creator>Lin Aung</dc:creator>
      <pubDate>Mon, 16 Feb 2026 03:55:37 +0000</pubDate>
      <link>https://dev.to/devlinaung/i-built-a-pixel-art-cv-template-open-source-3ing</link>
      <guid>https://dev.to/devlinaung/i-built-a-pixel-art-cv-template-open-source-3ing</guid>
      <description>&lt;p&gt;&lt;strong&gt;A retro-styled portfolio website built with React and TypeScript that you can customize in minutes&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Another Portfolio Template?
&lt;/h2&gt;

&lt;p&gt;Let's be honest - most developer portfolios look the same. Clean, minimal, professional... and boring.&lt;/p&gt;

&lt;p&gt;I wanted something different. Something that shows personality while still being functional. So I built a pixel art CV website that combines retro aesthetics with modern web technologies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;a href="https://pixel-cv-seven.vercel.app" rel="noopener noreferrer"&gt;pixel-cv-seven.vercel.app&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/dev-lin2/pixel-cv" rel="noopener noreferrer"&gt;github.com/dev-lin2/pixel-cv&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  What Makes This Different?
&lt;/h2&gt;
&lt;h3&gt;
  
  
  🎮 Pixel Art Aesthetic
&lt;/h3&gt;

&lt;p&gt;Retro 8-bit style UI that stands out without being gimmicky. Perfect for developers who grew up on classic games or just appreciate the aesthetic.&lt;/p&gt;
&lt;h3&gt;
  
  
  📝 JSON-Driven Content
&lt;/h3&gt;

&lt;p&gt;Your entire CV lives in a single &lt;code&gt;cv.json&lt;/code&gt; file. No need to touch React components to update your experience, skills, or projects.&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;"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;"Your Name"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Your Title"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"bio"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Your bio here"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"experience"&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="err"&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;"skills"&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="err"&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;"projects"&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="err"&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;h3&gt;
  
  
  ⚡ Modern Tech Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React&lt;/strong&gt; - Component-based UI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TypeScript&lt;/strong&gt; - Type safety and better DX&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vite&lt;/strong&gt; - Lightning-fast builds&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tailwind CSS&lt;/strong&gt; - Utility-first styling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Framer Motion&lt;/strong&gt; - Smooth animations&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📱 Fully Responsive
&lt;/h3&gt;

&lt;p&gt;Works seamlessly on desktop, tablet, and mobile devices.&lt;/p&gt;




&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Clone the repo
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/dev-lin2/pixel-cv.git
&lt;span class="nb"&gt;cd &lt;/span&gt;pixel-cv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Install dependencies
&lt;/h3&gt;



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

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Update your content
&lt;/h3&gt;

&lt;p&gt;Edit &lt;code&gt;public/cv.json&lt;/code&gt; with your information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Personal details (name, title, email, location)&lt;/li&gt;
&lt;li&gt;Bio&lt;/li&gt;
&lt;li&gt;Work experience&lt;/li&gt;
&lt;li&gt;Skills&lt;/li&gt;
&lt;li&gt;Projects&lt;/li&gt;
&lt;li&gt;Education&lt;/li&gt;
&lt;li&gt;Social links&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Customize branding
&lt;/h3&gt;

&lt;p&gt;Replace &lt;code&gt;public/logo.png&lt;/code&gt; with your own logo&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Run locally
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  6. Deploy
&lt;/h3&gt;

&lt;p&gt;Build for production:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Deploy to Vercel, Netlify, or any static hosting platform.&lt;/p&gt;




&lt;h2&gt;
  
  
  Project Structure
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pixel-cv/
├── public/
│   ├── cv.json          # Your CV data
│   └── logo.png         # Your logo/favicon
├── src/
│   ├── components/      # React components
│   ├── App.tsx          # Main app component
│   └── main.tsx         # Entry point
├── index.html
└── package.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Key Features Explained
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Data-Driven Design
&lt;/h3&gt;

&lt;p&gt;The entire homepage is rendered from &lt;code&gt;cv.json&lt;/code&gt;. This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ No code changes needed for content updates&lt;/li&gt;
&lt;li&gt;✅ Easy to maintain&lt;/li&gt;
&lt;li&gt;✅ Version control your CV&lt;/li&gt;
&lt;li&gt;✅ Multiple CVs for different roles (just swap the JSON file)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pixel Perfect UI
&lt;/h3&gt;

&lt;p&gt;Using custom fonts and carefully crafted components to achieve that authentic retro look while keeping the code clean and maintainable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Performance Optimized
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Vite for instant HMR during development&lt;/li&gt;
&lt;li&gt;Optimized production builds&lt;/li&gt;
&lt;li&gt;Lazy loading for images&lt;/li&gt;
&lt;li&gt;Smooth animations without jank&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Customization Tips
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Change Color Scheme
&lt;/h3&gt;

&lt;p&gt;The pixel aesthetic uses a limited color palette. You can customize colors in &lt;code&gt;tailwind.config.ts&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pixel-primary&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#your-color&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pixel-secondary&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#your-color&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="c1"&gt;// ... more colors&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Add New Sections
&lt;/h3&gt;

&lt;p&gt;Want to add a "Certifications" or "Publications" section? &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Add the data to &lt;code&gt;cv.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create a new component&lt;/li&gt;
&lt;li&gt;Import and render it in &lt;code&gt;App.tsx&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Modify Animations
&lt;/h3&gt;

&lt;p&gt;All animations are handled by Framer Motion. Tweak timing, easing, and effects in the component files.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Open Source?
&lt;/h2&gt;

&lt;p&gt;I believe good tools should be accessible to everyone. Not every developer has time to build a portfolio from scratch, but everyone deserves a unique one.&lt;/p&gt;

&lt;p&gt;This template is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Free to use&lt;/li&gt;
&lt;li&gt;✅ No attribution required (though appreciated!)&lt;/li&gt;
&lt;li&gt;✅ Open to contributions&lt;/li&gt;
&lt;li&gt;✅ MIT licensed&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;Some features I'm considering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Dark/light mode toggle&lt;/li&gt;
&lt;li&gt;[ ] Multiple CV templates (JSON-driven theming)&lt;/li&gt;
&lt;li&gt;[ ] Blog integration&lt;/li&gt;
&lt;li&gt;[ ] Print-friendly version&lt;/li&gt;
&lt;li&gt;[ ] Multi-language support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Got ideas?&lt;/strong&gt; Open an issue or submit a PR!&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It Out
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Demo:&lt;/strong&gt; &lt;a href="https://pixel-cv-seven.vercel.app" rel="noopener noreferrer"&gt;pixel-cv-seven.vercel.app&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/dev-lin2/pixel-cv" rel="noopener noreferrer"&gt;github.com/dev-lin2/pixel-cv&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you use this template, I'd love to see what you build! Drop a link in the comments below.&lt;/p&gt;

&lt;p&gt;And if you find it useful, a ⭐ on GitHub would mean a lot!&lt;/p&gt;




&lt;h2&gt;
  
  
  Tech Stack Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;React 18&lt;/li&gt;
&lt;li&gt;TypeScript&lt;/li&gt;
&lt;li&gt;Vite&lt;/li&gt;
&lt;li&gt;Tailwind CSS&lt;/li&gt;
&lt;li&gt;Framer Motion&lt;/li&gt;
&lt;li&gt;Lucide React (icons)&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Happy coding! 🎮✨&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>cv</category>
      <category>resume</category>
      <category>react</category>
    </item>
    <item>
      <title>4 TailwindCSS Features You’re Probably Sleeping On 😴 (With Playground Demo)</title>
      <dc:creator>Lin Aung</dc:creator>
      <pubDate>Mon, 08 Sep 2025 09:15:18 +0000</pubDate>
      <link>https://dev.to/devlinaung/4-tailwindcss-features-youre-probably-sleeping-on-with-playground-demo-3ag8</link>
      <guid>https://dev.to/devlinaung/4-tailwindcss-features-youre-probably-sleeping-on-with-playground-demo-3ag8</guid>
      <description>&lt;p&gt;Most people use Tailwind for the basics: flex, grid, spacing, colors. Cool.&lt;br&gt;
But Tailwind is hiding some ridiculously useful tricks that can save you custom CSS and even JavaScript.&lt;/p&gt;

&lt;p&gt;I've picked 4 features that I rarely see people talk about — and I bundled them into one live playground demo so you can poke at right now 👉 &lt;a href="https://play.tailwindcss.com/7utBRutgHA" rel="noopener noreferrer"&gt;Playground link&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;1. &lt;code&gt;group&lt;/code&gt; &amp;amp; &lt;code&gt;peer&lt;/code&gt;: Style Without JavaScript&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ever wanted to show a button on hover? Or expand a section when a checkbox is checked? Normally you’d need JS. With group and peer, you don’t.&lt;/p&gt;

&lt;p&gt;Hover card (group)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"group border rounded-xl p-4 bg-white shadow hover:shadow-md"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"flex justify-between"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"font-medium"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Project Alpha&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"h-4 w-4 transition-transform group-hover:translate-x-1"&lt;/span&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 20 20"&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;path&lt;/span&gt; &lt;span class="na"&gt;d=&lt;/span&gt;&lt;span class="s"&gt;"M7 5l5 5-5 5"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"mt-3 opacity-0 group-hover:opacity-100 transition text-sm text-indigo-600 underline"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    Open
  &lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Accordion (peer)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"faq"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"checkbox"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"peer hidden"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"faq"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"flex justify-between cursor-pointer"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;What is Alpha?&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"h-4 w-4 transition peer-checked:rotate-180"&lt;/span&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 20 20"&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;path&lt;/span&gt; &lt;span class="na"&gt;d=&lt;/span&gt;&lt;span class="s"&gt;"M5 8l5 5 5-5"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"grid grid-rows-[0fr] peer-checked:grid-rows-[1fr] transition-all"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"overflow-hidden text-sm mt-2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;No JS. Just peer-checked ✨&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Perfect for cards, FAQs, menus — all without writing a single line of JavaScript.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;2. &lt;code&gt;prose&lt;/code&gt;: One Class for Blog-Ready Typography&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ever dropped a wall of text into your site and thought “this looks… bad”?&lt;br&gt;
That’s where &lt;code&gt;prose&lt;/code&gt; from the typography plugin comes in.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;article&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"prose prose-slate bg-white p-6 rounded-xl border shadow"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Designing Calm UIs&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&lt;/span&gt;Calm design&lt;span class="nt"&gt;&amp;lt;/strong&amp;gt;&lt;/span&gt; means less noise and clearer hierarchy.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Checklist&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;One clear action per screen&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Use space, not borders&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Let color mean something&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;3. &lt;code&gt;line-clamp&lt;/code&gt;: Control Text Overflow in Style&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Product cards, blog previews, news feeds — they all need text cutoffs. Stop writing custom CSS, Tailwind has your back.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;article&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"border rounded-xl p-4 bg-white"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h3&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"font-semibold line-clamp-1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Cutting churn with better onboarding&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"text-sm text-slate-600 line-clamp-2 mt-1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    We redesigned the first session with better defaults, progressive
    disclosure, and less decision fatigue. The results? Way less churn.
  &lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Your titles never wrap too long, your descriptions never explode the card. Clean and controlled.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;4. Arbitrary Values &amp;amp; Variants: Little Superpowers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes you just need that exact size or want to style only a specific child on hover. Tailwind lets you break the rules with square brackets.&lt;/p&gt;

&lt;p&gt;Exact sizing&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"h-[36px] w-[36px] rounded-lg bg-gradient-to-br from-indigo-300 to-indigo-600"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Target child on hover&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"flex items-center gap-2 hover:[&amp;amp;&amp;gt;svg]:translate-x-1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  Open report
  &lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"h-4 w-4 transition"&lt;/span&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 20 20"&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;path&lt;/span&gt; &lt;span class="na"&gt;d=&lt;/span&gt;&lt;span class="s"&gt;"M7 5l5 5-5 5"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 Super handy for prototypes, micro-interactions, and “just one pixel more” tweaks.&lt;/p&gt;




&lt;p&gt;Grab the Playground 🎮&lt;/p&gt;

&lt;p&gt;I combined all these into one minimal page so you can explore, screenshot, and copy-paste.&lt;br&gt;
Here’s the link again: &lt;a href="https://play.tailwindcss.com/7utBRutgHA" rel="noopener noreferrer"&gt;https://play.tailwindcss.com/7utBRutgHA&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Wrapping Up&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Tailwind is way more than spacing utilities. Features like group, peer, prose, line-clamp, and arbitrary variants are the “oh wow” tools that make you faster and your UI cleaner.&lt;/p&gt;

&lt;p&gt;Next time you’re about to write custom CSS, ask: “Can Tailwind do this already?”&lt;br&gt;
Chances are — yup, it can.&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>css</category>
    </item>
    <item>
      <title>SOLID principles in PHP</title>
      <dc:creator>Lin Aung</dc:creator>
      <pubDate>Thu, 24 Aug 2023 07:04:45 +0000</pubDate>
      <link>https://dev.to/devlinaung/solid-principles-in-php-363j</link>
      <guid>https://dev.to/devlinaung/solid-principles-in-php-363j</guid>
      <description>&lt;h2&gt;
  
  
  What is SOLID?
&lt;/h2&gt;

&lt;p&gt;You may have already heard this term &lt;code&gt;**SOLID**&lt;/code&gt; in almost every job descriptions and wonder why it is important. Well the SOLID principles are a set of five design guidelines aimed at making software designs more understandable, flexible, and maintainable. These principles are widely used in object-oriented programming, although they can also be applied in other paradigms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pillars of SOLID principles
&lt;/h2&gt;

&lt;p&gt;The acronym SOLID stands for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Single Responsibility Principle (SRP)&lt;/li&gt;
&lt;li&gt;Open-Closed Principle (OCP)&lt;/li&gt;
&lt;li&gt;Liskov Substitution Principle (LSP)&lt;/li&gt;
&lt;li&gt;Interface Segregation Principle (ISP)&lt;/li&gt;
&lt;li&gt;Dependency Inversion Principle (DIP)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1) Single Responsibility Principle
&lt;/h2&gt;

&lt;p&gt;A class should have only one reason or purpose to serve. It means the class should have only one responsibility. I'll show one by one with PHP examples.&lt;br&gt;
&lt;/p&gt;

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

// Shouldn't do
class Report {
    public function generate() {
        // generating report
    }

    public function saveToFile($filename) {
        // save report to file
    }
}

// Should do
class Report {
    public function generate() {
        // generating report
    }
}

class ReportSaver {
    public function saveToFile(Report $report, $filename) {
        // save report to file
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2) Open-Close Principle
&lt;/h2&gt;

&lt;p&gt;Instances should be open for extension but close for modification. This mean instances (classes,functions,modules or etc.,) can be extendable by another instance but shouldn't allow direct modification to them.&lt;br&gt;
&lt;/p&gt;

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

// Shouldn't do
class Rectangle {
    public $width;
    public $height;
}

function area($rectangle) {
    return $rectangle-&amp;gt;width * $rectangle-&amp;gt;height;
}

// Should do
interface Shape {
    public function area();
}

class Rectangle implements Shape {
    public $width;
    public $height;

    public function area() {
        // w * h
    }
}

class Circle implements Shape {
    public $radius;

    public function area() {
        // πr2
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3) Liskov Substitution Principle
&lt;/h2&gt;

&lt;p&gt;This mean that objects of a superclass should be replaceable with objects of a subclass without affecting the correctness of the program. What does that mean? Well let's see the example code for clarifications.&lt;br&gt;
&lt;/p&gt;

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

// Shouldn't do
class Animal {
    public function jump() {
        // code for jumping
    }
}

class Snail extends Animal {
    public function jump() {
        // Sanil can't jump
    }
}

// Good example
abstract class Animal {
    abstract public function eat();
}

class Snail extends Bird {
    public function eat() {
        // every animal can eat
    }
}

class Tiger extends Bird {
    public function eat() {
        // every animal can eat
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4) Interface Segregation Principle
&lt;/h2&gt;

&lt;p&gt;We shouldn't force the instances to implement the interfaces that they don't use. We should make the interface flexible for most cases.&lt;br&gt;
&lt;/p&gt;

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

// Shouldn't do
interface Human {
    public function walk();
    public function swim(); // not everyone can swim
}

// Should do
interface Walkable {
    public function walk();
}

interface Swimmable {
    public function swim();
}

class People implements Walkable, Swimmable {
    public function walk() {
        // walking
    }

    public function swim() {
        // swimming
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5) Dependency Inversion Principle
&lt;/h2&gt;

&lt;p&gt;This principle aims to decouple high-level modules (which provide complex functionality) from low-level modules (which provide basic functionality) by introducing an abstraction layer between them. This allows both high-level and low-level modules to depend on abstractions rather than on solid implementations, making the system more flexible, extensible, and maintainable.&lt;br&gt;
&lt;/p&gt;

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

// Shouldn't do
class Book {
    public function getContent() {
        // return contents
    }
}

class Printer {
    public function printBook(Book $book) {
        $content = $book-&amp;gt;getContent();
        // print the content
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see in above example, &lt;strong&gt;Printer&lt;/strong&gt; class is depending on &lt;strong&gt;Book&lt;/strong&gt; object and can only print for the &lt;strong&gt;Book&lt;/strong&gt;. What if there is another class called &lt;strong&gt;Article&lt;/strong&gt; that may want to print? We shouldn't modify the &lt;strong&gt;Printer&lt;/strong&gt; class to accept more objects. Instead we provide the abstractions between them.&lt;br&gt;
&lt;/p&gt;

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

// Should do
interface Printable {
    public function getContent();
}

class Book implements Printable {
    public function getContent() {
        return "This is the book content";
    }
}

class Article implements Printable {
    public function getContent() {
        return "This is the article content";
    }
}

class Printer {
    public function printContent(Printable $printable) {
        $content = $printable-&amp;gt;getContent();
        echo "Printing content: " . $content;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In PHP, these principles help in creating a clean codebase that is easier to debug, understand, and expand. Given that PHP applications often evolve over time, applying SOLID principles can dramatically ease the pain of growth and maintenance.&lt;/p&gt;

</description>
      <category>php</category>
      <category>solidprinciples</category>
      <category>oop</category>
    </item>
  </channel>
</rss>
