<?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: youxufkhan</title>
    <description>The latest articles on DEV Community by youxufkhan (@youxufkhan).</description>
    <link>https://dev.to/youxufkhan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1462371%2Fadefdda4-a468-4875-acb7-fc156c6874a3.jpeg</url>
      <title>DEV Community: youxufkhan</title>
      <link>https://dev.to/youxufkhan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/youxufkhan"/>
    <language>en</language>
    <item>
      <title>I found Shahzor on the Internet Archive and brought it back to the browser</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Wed, 18 Nov 2026 18:04:03 +0000</pubDate>
      <link>https://dev.to/youxufkhan/i-found-shahzor-on-the-internet-archive-and-brought-it-back-to-the-browser-5f65</link>
      <guid>https://dev.to/youxufkhan/i-found-shahzor-on-the-internet-archive-and-brought-it-back-to-the-browser-5f65</guid>
      <description>&lt;p&gt;I searched Google for Shahzor, found two download links, and both were dead.&lt;/p&gt;

&lt;p&gt;If you grew up playing PC games in Pakistan in the late 90s or early 2000s, you might remember it. Shahzor was one of those games you could find at local CD shops. It was popular here, and I wanted to play it again.&lt;/p&gt;

&lt;p&gt;That turned into a search through the Internet Archive. Thankfully, Ahmad and Fatima's YouTube channel had uploaded a copy there. Someone had kept it available long enough for me to find it, years after the other links had stopped working.&lt;/p&gt;

&lt;p&gt;I've now made it playable in a browser. You can open it on a desktop, click Play Shahzor, and get back to the game.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://shahzor.yousufkhan.uk/" rel="noopener noreferrer"&gt;Play Shahzor&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Shahzor is a Pakistani DOS beat 'em up by BrainSoft from 1998 and 1999. You play as Captain Umer, fighting your way through Karachi. The programming and art are credited to Zia ul haq Ansari and Farrukh Amrohvi.&lt;/p&gt;

&lt;p&gt;I wanted other Pakistani millennials to be able to open a link and spend a little time with a game they remembered from the CD shop days. Finding the files was only part of that. Getting them running conveniently on a current computer was the next job.&lt;/p&gt;

&lt;p&gt;The browser version uses js-dos 8.5.4, with DOSBox compiled to WebAssembly. The original DOS executables run inside that emulator, along with the game's graphics and sound files.&lt;/p&gt;

&lt;p&gt;The loading path is fairly small.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The page waits for the player to click Play Shahzor, which also gives the browser permission to start audio.&lt;/li&gt;
&lt;li&gt;js-dos loads a bundle containing the game files, a DOSBox configuration, and a launcher.&lt;/li&gt;
&lt;li&gt;DOSBox mounts the bundle as its C: drive and runs the launcher.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The launcher opens the original menu and starts the game when you choose Start. After the game ends, it returns you to the menu.&lt;/p&gt;

&lt;p&gt;Some of the interesting work was in the details of that launcher. The original game expects to be started through its batch file. Launching the executables directly produces a fatal error. The browser launcher preserves the arguments the original batch file passes, so the menu and game start correctly.&lt;/p&gt;

&lt;p&gt;The picture needed some attention too. Shahzor uses 320×200 VGA graphics, which would have appeared on a 4:3 CRT. The browser frame keeps that 4:3 shape. DOSBox handles the hardware emulation, including the Sound Blaster audio the game expects.&lt;/p&gt;

&lt;p&gt;Keyboard shortcuts are another small reminder that this game comes from a different computing setup. Ctrl and Alt are game controls, and a browser or operating system can also use those keys. The page has a fullscreen button, with keyboard locking where the browser supports it.&lt;/p&gt;

&lt;p&gt;The site itself is plain HTML, CSS, and JavaScript, hosted on Cloudflare Workers with static assets. The emulator runs on the player's computer, so serving the game is mostly a matter of delivering the files.&lt;/p&gt;

&lt;p&gt;I added a new illustrated landing page, a larger game frame, and sharing buttons so people can send it to friends who remember it. The original title screen and menu are still inside the game.&lt;/p&gt;

&lt;p&gt;The copy I found is the 1999 demo, with two levels. After the second level, it shows the credits and returns to the menu. That's the version available on the site.&lt;/p&gt;

&lt;p&gt;If you want to play, use a desktop keyboard. Arrow keys move, Shift punches, and Ctrl jumps. Ctrl + Alt does a jump kick. The title screen takes two keypresses before the menu appears, which is how the original behaves.&lt;/p&gt;

&lt;p&gt;I'm grateful to Ahmad and Fatima's channel for uploading the files, and to the people behind js-dos and DOSBox for making this possible. The game itself is BrainSoft's work.&lt;/p&gt;

&lt;p&gt;I'd love to hear from people who remember buying or playing Shahzor. Did you get your copy from a CD shop too? And which other Pakistani games from that time do you still remember?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://shahzor.yousufkhan.uk/" rel="noopener noreferrer"&gt;Play it in your browser&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>webassembly</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>A GitHub repo with 767 stars and no code: how I spotted a fake installer campaign</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Wed, 11 Nov 2026 12:53:59 +0000</pubDate>
      <link>https://dev.to/youxufkhan/a-github-repo-with-767-stars-and-no-code-how-i-spotted-a-fake-installer-campaign-3628</link>
      <guid>https://dev.to/youxufkhan/a-github-repo-with-767-stars-and-no-code-how-i-spotted-a-fake-installer-campaign-3628</guid>
      <description>&lt;p&gt;A fake GitHub installer repo called &lt;code&gt;actual-multi-display-configurator&lt;/code&gt; looked wrong to me, so I checked it without cloning it or running a line. It turned out to be one of dozens built from the same template. I read everything through the &lt;a href="https://docs.github.com/en/rest" rel="noopener noreferrer"&gt;GitHub REST API&lt;/a&gt;, which only downloads text. I never opened the project's web page, and I never decoded the encoded script on it, so what follows about the payload is inference.&lt;/p&gt;

&lt;h2&gt;
  
  
  What looked off: stars without forks
&lt;/h2&gt;

&lt;p&gt;The repo was five days old and had 767 stars and zero forks. Real projects pick up forks as they pick up stars, because people use them. The owner account was created in 2024, had no followers, and had two public repos. The other one was created four minutes before this one.&lt;/p&gt;

&lt;p&gt;The profile also shows a Starstruck badge tied to this repo, a tier that needs 4,096 stars. The repo now shows 767. If that's right, more than 3,000 stars disappeared in days, which is what happens when GitHub bans a batch of fake accounts and their stars go with them. The badge outlived the stars.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Forh4yrkda8ox62hiniik.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Forh4yrkda8ox62hiniik.png" alt="GitHub repo page for actual-multi-display-configurator showing 767 stars and 0 forks" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The code is a prop
&lt;/h2&gt;

&lt;p&gt;The description promises a multi-monitor configuration installer. The repo contains no display code. &lt;code&gt;package.json&lt;/code&gt; is a Discord bot template named "sleek-kit", and &lt;code&gt;src/index.ts&lt;/code&gt; is five lines that log in a Discord client. The changelog says "Initial release." The README badges for "CI: PASSING" and "STAGE: VERIFIED" are static images from shields.io, so no CI is behind them.&lt;/p&gt;

&lt;h2&gt;
  
  
  A GitHub Actions workflow that fakes activity
&lt;/h2&gt;

&lt;p&gt;Inside &lt;code&gt;.github/workflows/&lt;/code&gt; sits a file with a random name, &lt;code&gt;xSwanPlIsEx.yml&lt;/code&gt;. It runs every hour, waits a random number of seconds, then appends one line to a marker file and commits it with a three-word message pulled from a list ("bug rollback feature (2678)", "notify upgrade style (7917)"). The commit log looks like a busy project. Nobody is writing code.&lt;/p&gt;

&lt;p&gt;This is the kind of thing that keeps a repo near the top of "recently updated" sorts and makes it look maintained to a casual visitor.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxyo395qjdn29h0fro8di.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxyo395qjdn29h0fro8di.png" alt="The hourly GitHub Actions workflow xSwanPlIsEx.yml and its automated commit history" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the payload probably lives: a ClickFix page
&lt;/h2&gt;

&lt;p&gt;The README's main call to action is a "PowerShell Setup Button" that links to the repo's GitHub Pages site. That page is &lt;code&gt;index.html&lt;/code&gt;, and it has a large base64 blob in a hidden input, several &lt;code&gt;atob()&lt;/code&gt; calls on encoded strings, and a script that rebuilds the page at load time. Nothing in the repository's code is malicious, which means a scan of the repo itself finds nothing.&lt;/p&gt;

&lt;p&gt;This pattern matches a technique usually called ClickFix: a fake "verify you are human" screen tells you to press Win+R and paste a command. The command pulls down an infostealer, which takes saved browser passwords, session cookies, crypto wallets, and tokens for services like Discord or GitHub. I have not confirmed that this particular page does that. Decoding it safely needs an isolated VM, and I haven't done that yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  It is a campaign, not one repo
&lt;/h2&gt;

&lt;p&gt;A GitHub code search for the same workflow text and marker file turned up five more repos with the same fingerprint. Then I looked at a "trending new repositories" list. About 28 entries shared the same shape: roughly 767 stars, about 287 new stars per day, four days old, mostly HTML, with names like "Autodesk Revit 2026 standalone", "Adobe Substance 3D studio", "Cellebrite UFED setup" and "Sketchup Pro pre-activated". Every title promises cracked paid software or a game trainer. The star counts being almost identical points to one botnet starring them all at once.&lt;/p&gt;

&lt;p&gt;I matched those 28 on the listing text and star numbers alone. I haven't yet checked each one for the same workflow or payload.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnzcu89nf1tlqcoolhsn1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnzcu89nf1tlqcoolhsn1.png" alt="Trending new repositories list with about 28 near-identical pre-activated installer repos at 767 stars" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Repos from the same campaign
&lt;/h2&gt;

&lt;p&gt;These 25 repos matched the pattern on the listing alone: new, about 767 stars, mostly HTML, and a title promising cracked paid software or a trainer. I have not checked each one for the workflow or payload, so treat them as suspected, not confirmed. I left them as plain text on purpose, so nobody lands on one by accident. Don't run anything from them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;bipro45/actual-multi-display-configurator&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;SK-Dev666/rust-external-trainer-tool&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rdeepak-wq121/quicken-deluxe-installer&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;thiagoaureliomartins-programador/chief-architect-premier&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;manjushree-iyer/soundpad-audio-suite&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;RolandoV3/metatrader-5-bot&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;leanislizarzado/ibm-spss-desktop-suite&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ayanprob/coreldraw-desktop-installer&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;arthurrossetocampos1-crypto/uttorent-desktop&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Malik-825/sketchup-pro-desktop&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Leno27-Adr/autodesk-revit-2026-standalone&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Forgavin/ultra-iso-desktop-setup&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Eriazeri/on1-photo-raw-max-config&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pastebin2019/multiaccountmanager-enhancement&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;App-MonicaWEB/auslogics-audio-studio-desktop&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;daiphu2708-crypto/melodyne-5-desktop-setup&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;shayannazar84-hero/honkai-star-rail-companion-suite&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tianjanahary05-source/reason-14-installer&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;woo20080623-cell/cinebench-desktop&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;angelonyn/chimera-desktop-suite&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hayfa1234/honkai-star-rail-enhancement-suite&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mahmoudtawfik1998/secure-pdf-document-processor&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;theonlyoneexocctical-beep/cellebrite-ufed-setup&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AleRibeiro44/archicad-desktop-setup&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;abdulmannanmalik13-wq/adobe-substance-3d-studio&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you see one of these in your own downloads, search history or browser history, follow the steps below.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to spot a fake GitHub installer repo (indicators)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Signal&lt;/th&gt;
&lt;th&gt;What you see&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Stars vs forks&lt;/td&gt;
&lt;td&gt;Hundreds of stars, zero forks, repo under a week old&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Description&lt;/td&gt;
&lt;td&gt;Crack language: "2026", "pre-activated", "standalone setup", "all features enabled"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Language&lt;/td&gt;
&lt;td&gt;Mostly HTML for a supposed desktop app&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Code&lt;/td&gt;
&lt;td&gt;Nothing to do with the stated purpose (here, a Discord bot template)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Commits&lt;/td&gt;
&lt;td&gt;One every hour from &lt;code&gt;github-actions[bot]&lt;/code&gt;, all touching one file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Download&lt;/td&gt;
&lt;td&gt;A button to a web page, not a release asset or readable source&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Owner&lt;/td&gt;
&lt;td&gt;New account, no followers, a second repo created minutes earlier&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  If you ran something from one
&lt;/h2&gt;

&lt;p&gt;Treat the machine as compromised. From a different, clean device, change passwords, revoke sessions and tokens, and check any crypto wallets. Don't just delete the file, since an infostealer has usually sent its data out by the time you notice.&lt;/p&gt;

&lt;p&gt;If you only looked at the repo page, you're fine. The danger is in the page the button opens and the command it asks you to paste.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to report fake installer repos on GitHub
&lt;/h2&gt;

&lt;p&gt;Report each repo through the "Report repository" option on GitHub and choose the malware category. See GitHub's guide to &lt;a href="https://docs.github.com/en/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam" rel="noopener noreferrer"&gt;reporting abuse or spam&lt;/a&gt;. Searching GitHub for an unusual marker file or workflow text, as I did, is a quick way to find siblings. If you maintain a package index, a software directory or a trending list, a filter on "fork count versus stars on a new repo" would have removed most of this cluster.&lt;/p&gt;

&lt;p&gt;I'm planning to decode the page's blob in a sandbox and confirm what it runs. If I do, I'll post the result.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>infosec</category>
      <category>security</category>
      <category>github</category>
    </item>
    <item>
      <title>Preen: An Open-Source Linux Cleaner and System Monitor</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Sun, 01 Nov 2026 19:22:47 +0000</pubDate>
      <link>https://dev.to/youxufkhan/preen-an-open-source-linux-cleaner-and-system-monitor-407j</link>
      <guid>https://dev.to/youxufkhan/preen-an-open-source-linux-cleaner-and-system-monitor-407j</guid>
      <description>&lt;p&gt;&lt;em&gt;Clean Linux caches, remove apps, analyze disk usage, and monitor system resources with Preen, an open-source Go CLI and Qt desktop app.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Old &lt;code&gt;node_modules&lt;/code&gt; folders, Python virtual environments, and Rust &lt;code&gt;target&lt;/code&gt; directories take up space long after a project stops being useful. Package caches and leftover app files add to the mess.&lt;/p&gt;

&lt;p&gt;I built &lt;a href="https://github.com/youxufkhan/preen" rel="noopener noreferrer"&gt;Preen&lt;/a&gt; to handle Linux cleanup and system monitoring in one application. It can remove caches and apps, inspect disk usage, and show system activity. You can use its Go CLI or a desktop interface built with KDE Kirigami and Qt6.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs9z8o8j7nwdwsqz2e9if.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs9z8o8j7nwdwsqz2e9if.png" alt="Preen desktop interface for cleaning Linux caches" width="800" height="525"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Clean Linux caches and old project builds
&lt;/h2&gt;

&lt;p&gt;Preen scans caches from tools including npm, pnpm, uv, pip, Cargo, and Go. Its project cleaner finds disposable folders such as &lt;code&gt;node_modules&lt;/code&gt;, &lt;code&gt;.venv&lt;/code&gt;, &lt;code&gt;target&lt;/code&gt;, and &lt;code&gt;.next&lt;/code&gt; in directories you choose.&lt;/p&gt;

&lt;p&gt;Start with a preview:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;preen clean --dry-run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To check your projects:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;preen purge --add-path ~/code
preen purge --dry-run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Beyond caches, Preen can uninstall apt, snap, Flatpak, and AppImage applications and flag leftover configuration files. It also finds downloaded installers, shows folder sizes, and handles maintenance tasks such as rebuilding font caches.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monitor system resources
&lt;/h2&gt;

&lt;p&gt;Preen reports CPU load, memory usage, disk and network activity, temperatures, and active processes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;preen status --watch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It doesn't run as a background daemon.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Preen handles deletion
&lt;/h2&gt;

&lt;p&gt;A cleanup tool needs clear limits. Preen validates deletion paths and blocks protected system directories and sensitive locations such as &lt;code&gt;~/.ssh&lt;/code&gt; and &lt;code&gt;~/.gnupg&lt;/code&gt;. It also rejects symlinks that lead outside allowed targets and skips working caches for detected active browsers and Electron apps.&lt;/p&gt;

&lt;p&gt;User cache cleanup runs with your normal permissions. System operations go through a Polkit helper with an explicit list of allowed actions.&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;--dry-run&lt;/code&gt; to review cleanup targets first. You can exclude paths or identifiers such as &lt;code&gt;apt-cache&lt;/code&gt; through &lt;code&gt;~/.config/preen/whitelist&lt;/code&gt; and inspect recent operations with:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  A Go CLI with an optional Qt desktop app
&lt;/h2&gt;

&lt;p&gt;The CLI uses only the Go standard library. Commands support &lt;code&gt;--json&lt;/code&gt; output, which the desktop app reads through a small C++ process bridge. Terminal users can install the CLI on its own.&lt;/p&gt;

&lt;p&gt;Secure file wiping and process controls such as &lt;code&gt;kill&lt;/code&gt; and &lt;code&gt;renice&lt;/code&gt; are outside its scope.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install Preen on Linux
&lt;/h2&gt;

&lt;p&gt;Use the installer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://youxufkhan.github.io/preen/install.sh &lt;span class="o"&gt;|&lt;/span&gt; sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run &lt;code&gt;preen clean --dry-run&lt;/code&gt; to see what it finds before removing anything.&lt;/p&gt;

&lt;p&gt;Preen is open source under GPL-3.0. The &lt;a href="https://github.com/youxufkhan/preen" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt; has the source, and the &lt;a href="https://youxufkhan.github.io/preen/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; covers setup and commands. Report bugs through &lt;a href="https://github.com/youxufkhan/preen/issues" rel="noopener noreferrer"&gt;GitHub issues&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>opensource</category>
      <category>go</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Banana Claude: generate and edit Gemini images inside Claude Code</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Mon, 26 Oct 2026 18:29:09 +0000</pubDate>
      <link>https://dev.to/youxufkhan/banana-claude-generate-and-edit-gemini-images-inside-claude-code-ppo</link>
      <guid>https://dev.to/youxufkhan/banana-claude-generate-and-edit-gemini-images-inside-claude-code-ppo</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/AgriciDaniel/banana-claude" rel="noopener noreferrer"&gt;Banana Claude&lt;/a&gt; is a free, open-source plugin for Claude Code by Agrici Daniel. It connects Claude Code to Google's Gemini image models so you can create and edit images without leaving your terminal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzizn74pg0shodqztew5n.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzizn74pg0shodqztew5n.gif" alt=" " width="640" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The interesting part is how it handles the gap between "I want an image" and "Gemini, here's my API call." Instead of firing off your one-line description and hoping it works, Banana Claude plans the image first. It writes a full creative brief, shows you the prompt it intends to send, tells you which model it picked and what it will cost, and waits. Nothing goes to Google until you say yes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it's worth installing
&lt;/h2&gt;

&lt;p&gt;I went through the &lt;a href="https://github.com/AgriciDaniel/banana-claude" rel="noopener noreferrer"&gt;project repository&lt;/a&gt; and three things stood out:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You approve every request before it costs anything.&lt;/strong&gt; The planning step runs locally. No prompt is sent to Gemini, and nothing is billed, until you review the plan and confirm (&lt;a href="https://github.com/AgriciDaniel/banana-claude/blob/main/README.md" rel="noopener noreferrer"&gt;README.md&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It installs clean.&lt;/strong&gt; The whole thing runs on standard Python with no extra packages. No dependency tangles, no venv surprises (&lt;a href="https://github.com/AgriciDaniel/banana-claude/blob/main/CLAUDE.md" rel="noopener noreferrer"&gt;CLAUDE.md&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your API key stays out of logs.&lt;/strong&gt; The key is masked in command output and your cost history is stored locally on your machine (&lt;a href="https://github.com/AgriciDaniel/banana-claude/blob/main/SECURITY.md" rel="noopener noreferrer"&gt;SECURITY.md&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F476jm0arot59gm5fjgcv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F476jm0arot59gm5fjgcv.jpg" alt="Banana Claude 6-step workflow" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/AgriciDaniel/banana-claude/blob/main/README.md" rel="noopener noreferrer"&gt;workflow&lt;/a&gt; is a six-step loop:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Ask.&lt;/strong&gt; Describe the image you want in plain English.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plan.&lt;/strong&gt; Claude turns your short idea into a detailed creative brief and picks the Gemini model that fits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review.&lt;/strong&gt; You see the final prompt, the chosen model, privacy settings, and an estimated cost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Approve.&lt;/strong&gt; One approval equals one image attempt. There are no hidden retries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create.&lt;/strong&gt; The tool generates the image and saves it to your folder.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check.&lt;/strong&gt; Claude inspects the result for problems (bad cropping, garbled text, visual glitches) so you can fix it, regenerate, or ship it.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Which Gemini models does it use?
&lt;/h3&gt;

&lt;p&gt;Banana Claude picks the model automatically based on the task (&lt;a href="https://github.com/AgriciDaniel/banana-claude/blob/main/skills/banana/SKILL.md" rel="noopener noreferrer"&gt;SKILL.md&lt;/a&gt;):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;When it's used&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Nano Banana 2.1 (default)&lt;/td&gt;
&lt;td&gt;Everyday images, edits, web-grounded facts, high-res output up to 4K&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nano Banana 2 Lite&lt;/td&gt;
&lt;td&gt;Quick 1K drafts, low-cost bulk work&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nano Banana Pro&lt;/td&gt;
&lt;td&gt;Complex scenes, strict brand styles, heavy text rendering&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;You need four things before installing &lt;a href="https://github.com/AgriciDaniel/banana-claude/blob/main/README.md" rel="noopener noreferrer"&gt;Banana Claude&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude Code version &lt;code&gt;2.1.199&lt;/code&gt; or newer&lt;/li&gt;
&lt;li&gt;Python &lt;code&gt;3.11&lt;/code&gt; or newer&lt;/li&gt;
&lt;li&gt;A Gemini API key linked to a billing-enabled Google AI account&lt;/li&gt;
&lt;li&gt;Mac, Linux, or Windows with WSL (standard Windows without WSL is not supported yet)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Installation
&lt;/h3&gt;

&lt;p&gt;Run these four commands inside Claude Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/plugin marketplace add AgriciDaniel/banana-claude
/plugin install banana-claude@banana-claude-marketplace
/plugin enable banana-claude@banana-claude-marketplace
/reload-plugins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then ask for an image:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/banana-claude:banana generate an urban 16:9 GitHub hero with clean left-side copy space
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What you can do with it
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fud2euntlm3vldzkyrhfw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fud2euntlm3vldzkyrhfw.jpg" alt="Terminal to studio-quality output" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With &lt;a href="https://github.com/AgriciDaniel/banana-claude/blob/main/skills/banana/SKILL.md" rel="noopener noreferrer"&gt;Banana Claude&lt;/a&gt;, you handle your visual workflow in one place:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Generate from scratch.&lt;/strong&gt; Blog covers, YouTube thumbnails, product shots, diagrams, social media graphics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Edit selectively.&lt;/strong&gt; Change one part of an image while keeping the rest intact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep characters consistent.&lt;/strong&gt; Continue a previous session or attach reference photos so a character or product looks the same across multiple shots.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compare models.&lt;/strong&gt; Test up to 3 prompts across 3 Gemini models at once to compare results.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Overlay text and logos locally.&lt;/strong&gt; AI misspells words constantly. Banana Claude can add your exact text, fonts, and logos through local compositing, so the spelling is always right.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Catch flaws before publishing.&lt;/strong&gt; Claude reviews the final image for composition, cropping, and visual glitches.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How it fits into a Claude Code workflow
&lt;/h2&gt;

&lt;p&gt;You stop switching windows. Your code, docs, and images all live in the same terminal session.&lt;/p&gt;

&lt;p&gt;You also stop writing elaborate prompts. Give a one-liner and Claude fills in the camera angle, lighting direction, and style details for you.&lt;/p&gt;

&lt;p&gt;Cost stays visible. You approve every request after seeing the price, so accidental generations don't happen. And because the tool can overlay local text and logos on top of AI-generated backgrounds, your visuals come out closer to production-ready without a separate design tool.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>gemini</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Stop Letting Agents Fill Your SSD With npm</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Thu, 08 Oct 2026 18:00:11 +0000</pubDate>
      <link>https://dev.to/youxufkhan/stop-letting-agents-fill-your-ssd-with-npm-47ff</link>
      <guid>https://dev.to/youxufkhan/stop-letting-agents-fill-your-ssd-with-npm-47ff</guid>
      <description>&lt;p&gt;Last week I asked an AI agent to prototype three small web apps. It spun up three Vite projects, configured Tailwind, and ran test builds.&lt;/p&gt;

&lt;p&gt;Thirty minutes in, my laptop showed a low disk space alert.&lt;/p&gt;

&lt;p&gt;The agent had downloaded three separate copies of React, Vite, TypeScript, and ESLint. Each project had its own 600 MB &lt;code&gt;node_modules&lt;/code&gt; directory. If you run multiple subagents or test throwaway ideas during the week, you lose dozens of gigabytes to duplicate JavaScript packages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpymixz2nzs1n1tzjun3n.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpymixz2nzs1n1tzjun3n.webp" alt="always-pnpm Dev.to Banner" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The default to npm
&lt;/h2&gt;

&lt;p&gt;Language models learn from millions of public repositories, tutorials, and issue threads that tell people to run &lt;code&gt;npm install&lt;/code&gt;. When an agent needs a library, it types &lt;code&gt;npm i&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can write "use pnpm" in your prompt. It works for a few messages. Then the context window rolls over, a subagent spawns without prompt history, or the model runs a one-off shell check and goes back to &lt;code&gt;npm&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hard links versus duplicate folders
&lt;/h2&gt;

&lt;p&gt;Standard npm isolates each project by copying every package into the local &lt;code&gt;node_modules&lt;/code&gt; folder. Five projects using TypeScript put five full copies of TypeScript on disk.&lt;/p&gt;

&lt;p&gt;pnpm writes packages once to a global store at &lt;code&gt;~/.local/share/pnpm/store&lt;/code&gt;. Projects link to those files using filesystem hard links. Ten projects using the same library version share one physical copy on disk.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuowzhm04a76c9ehzc1jp.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuowzhm04a76c9ehzc1jp.webp" alt="Storage Architecture: npm vs always-pnpm" width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Intercepting terminal commands
&lt;/h2&gt;

&lt;p&gt;I built &lt;a href="https://github.com/youxufkhan/always-webp" rel="noopener noreferrer"&gt;always-pnpm&lt;/a&gt; to stop fighting prompt instructions.&lt;/p&gt;

&lt;p&gt;The tool hooks directly into the agent runtime. When Antigravity, Claude Code, OpenCode, or Codex runs a shell command starting with &lt;code&gt;npm&lt;/code&gt; or &lt;code&gt;npx&lt;/code&gt;, &lt;code&gt;always-pnpm&lt;/code&gt; parses the string and rewrites it to &lt;code&gt;pnpm&lt;/code&gt; in under three milliseconds.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqcunc0y2bom9wz10gx6v.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqcunc0y2bom9wz10gx6v.webp" alt="Deterministic Hook Lifecycle Flow" width="800" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Agent proposal:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Command executed in your shell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm add express lodash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The model gets its packages, the project runs, and your drive stores those files once.&lt;/p&gt;

&lt;h2&gt;
  
  
  Command mapping
&lt;/h2&gt;

&lt;p&gt;The parser translates common flags and subcommands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;npm i -D &amp;lt;pkgs&amp;gt;&lt;/code&gt; becomes &lt;code&gt;pnpm add -D &amp;lt;pkgs&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;npx &amp;lt;cmd&amp;gt;&lt;/code&gt; becomes &lt;code&gt;pnpm dlx &amp;lt;cmd&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;npm ci&lt;/code&gt; becomes &lt;code&gt;pnpm install --frozen-lockfile&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;npm cache clean --force&lt;/code&gt; becomes &lt;code&gt;pnpm store prune&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;npm init &amp;lt;template&amp;gt;&lt;/code&gt; becomes &lt;code&gt;pnpm create &amp;lt;template&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Commands that only mention &lt;code&gt;npm&lt;/code&gt; inside strings or arguments, like &lt;code&gt;git commit -m "fix npm bug"&lt;/code&gt; or &lt;code&gt;grep -r "npm" .&lt;/code&gt;, stay untouched.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;p&gt;Run the installer to detect your agent runtimes and configure their native hooks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/youxufkhan/always-pnpm/main/scripts/install.sh &lt;span class="o"&gt;|&lt;/span&gt; bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also target specific agents directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Target Claude Code&lt;/span&gt;
./scripts/install.sh --claude

&lt;span class="c"&gt;# Target Antigravity&lt;/span&gt;
./scripts/install.sh --antigravity

&lt;span class="c"&gt;# Target OpenCode or Codex&lt;/span&gt;
./scripts/install.sh --opencode
./scripts/install.sh --codex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The repository and test suite are on GitHub: &lt;a href="https://github.com/youxufkhan/always-pnpm" rel="noopener noreferrer"&gt;github.com/youxufkhan/always-pnpm&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Reverse engineering Pioneer’s forgotten .lkd car stereo animations in Python</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Sat, 18 Jul 2026 15:07:28 +0000</pubDate>
      <link>https://dev.to/youxufkhan/reverse-engineering-pioneers-forgotten-lkd-car-stereo-animations-in-python-1djl</link>
      <guid>https://dev.to/youxufkhan/reverse-engineering-pioneers-forgotten-lkd-car-stereo-animations-in-python-1djl</guid>
      <description>&lt;h1&gt;
  
  
  I reverse-engineered the classic Pioneer "Dolphin" car stereo animations
&lt;/h1&gt;

&lt;p&gt;If you were into car audio in the early 2000s, you remember the "dolphin deck." Pioneer’s DEH-series stereos featured glowing blue OEL screens that played custom animations dolphins swimming, race cars, and EQ bars. Car audio fans from 2004 remember the "dolphin deck." You bought a DEH-series stereo for the glowing blue OEL screen. You loaded it with custom animations like swimming dolphins and race cars.&lt;/p&gt;

&lt;p&gt;When the hardware died, those animations died with it. They were stored in a proprietary &lt;code&gt;.lkd&lt;/code&gt; file format that modern computers can't read. &lt;/p&gt;

&lt;p&gt;I wanted to see them again, so I cracked the format and built &lt;strong&gt;Carozerra&lt;/strong&gt;, an open-source toolchain to bring them back.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decoding the .lkd format
&lt;/h2&gt;

&lt;p&gt;The file structure hides standard tech behind a proprietary wrapper:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Magic Header&lt;/strong&gt;: A 20-byte sequence (&lt;code&gt;zLKD&lt;/code&gt;) containing version and frame count data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compression&lt;/strong&gt;: Immediately following the header is a standard gzip stream. Decompressing this yields a TAR archive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payload&lt;/strong&gt;: Inside the TAR is a single 24-bit, bottom-up BGR Windows BMP measuring exactly 256x3840 pixels. This slices neatly into 60 individual 256x64 frames.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Building the Carozerra toolchain
&lt;/h2&gt;

&lt;p&gt;I built three ways to play and convert these files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Python CLI&lt;/strong&gt;: The &lt;code&gt;decode.py&lt;/code&gt; script unpacks the &lt;code&gt;.lkd&lt;/code&gt; files and converts the frames. I wrote a Pillow rendering pass to simulate the original OEL display's bloom and scanlines, outputting to GIF or MP4.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Linux Desktop App&lt;/strong&gt;: A PyQt6 application creates a frameless, transparent widget on your desktop. It maps the visual stereo knob directly to system volume via &lt;code&gt;wpctl&lt;/code&gt; (PipeWire).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web Player&lt;/strong&gt;: Decodes files natively in the browser using the &lt;code&gt;DecompressionStream&lt;/code&gt; API and renders the raw BMP bytes directly to an HTML canvas.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Community preservation
&lt;/h2&gt;

&lt;p&gt;After sharing the project on Reddit, the response from the r/CarAV and r/nostalgia communities was massive. Users even dug up old CD-ROMs containing lost &lt;code&gt;.lkd&lt;/code&gt; files, including the legendary race car animation, allowing us to archive them before they disappear forever.&lt;/p&gt;

&lt;p&gt;Code, preloaded classic animations, and releases are available on GitHub.&lt;/p&gt;

&lt;p&gt;Try the live web player: &lt;a href="https://carozerra.yousufkhan.uk/" rel="noopener noreferrer"&gt;https://carozerra.yousufkhan.uk/&lt;/a&gt;&lt;br&gt;
GitHub repo: &lt;a href="https://github.com/youxufkhan/carozerra" rel="noopener noreferrer"&gt;https://github.com/youxufkhan/carozerra&lt;/a&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>webdev</category>
      <category>reverseengineering</category>
      <category>python</category>
    </item>
    <item>
      <title>Cutting Through the Noise: The 2026 AI Coding Subscription Guide</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Sun, 28 Jun 2026 14:56:07 +0000</pubDate>
      <link>https://dev.to/youxufkhan/cutting-through-the-noise-the-2026-ai-coding-subscription-guide-2kb4</link>
      <guid>https://dev.to/youxufkhan/cutting-through-the-noise-the-2026-ai-coding-subscription-guide-2kb4</guid>
      <description>&lt;p&gt;AI coding tools are no longer just autocomplete widgets. In 2026, they are agentic ecosystems running complex multi file edits, terminal commands, and automated code reviews. The pricing model has changed completely. Many major platforms have abandoned flat fee unlimited access in favor of credit-based or rolling limit pricing.&lt;/p&gt;

&lt;p&gt;If you're trying to figure out which subscription is actually worth your money, this guide compares the cost, performance, and limits of the leading AI coding plans.&lt;/p&gt;




&lt;h2&gt;
  
  
  The 2026 Subscription Landscape at a Glance
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Platform / Plan&lt;/th&gt;
&lt;th&gt;Price (USD)&lt;/th&gt;
&lt;th&gt;Quota &amp;amp; Limits&lt;/th&gt;
&lt;th&gt;Primary Models&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;OpenCode Go&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$10/month ($5 first month)&lt;/td&gt;
&lt;td&gt;Generous 5-hour rolling request limits&lt;/td&gt;
&lt;td&gt;DeepSeek V4, Qwen3.7 Max, Kimi K2.7 Code&lt;/td&gt;
&lt;td&gt;Budget-conscious developers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;OpenCode Zen&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Pay-as-you-go ($20 start)&lt;/td&gt;
&lt;td&gt;Zero markup, per-request billing&lt;/td&gt;
&lt;td&gt;Curated &amp;amp; tested coding models&lt;/td&gt;
&lt;td&gt;Developers who hate subscriptions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Kilo Pass&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;From $19/month&lt;/td&gt;
&lt;td&gt;1:1 paid credits + up to 50% bonus credits&lt;/td&gt;
&lt;td&gt;500+ models via API/IDE&lt;/td&gt;
&lt;td&gt;Power users looking to maximize credit value&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Kilo Individual&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$0/month&lt;/td&gt;
&lt;td&gt;Bring Your Own Keys (BYOK), no platform markup&lt;/td&gt;
&lt;td&gt;Bring your own API keys&lt;/td&gt;
&lt;td&gt;Developers who want a free open-source IDE setup&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;GitHub Copilot Pro&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$10/month&lt;/td&gt;
&lt;td&gt;Unlimited autocomplete + $10 in AI Credits&lt;/td&gt;
&lt;td&gt;Custom GitHub Models, OpenAI, Anthropic&lt;/td&gt;
&lt;td&gt;Standard devs inside VS Code/GitHub ecosystem&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;GitHub Copilot Max&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$100/month&lt;/td&gt;
&lt;td&gt;Unlimited autocomplete + $100 in AI Credits&lt;/td&gt;
&lt;td&gt;Custom GitHub Models, OpenAI, Anthropic&lt;/td&gt;
&lt;td&gt;High-volume professional agent usage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Mistral Vibe Pro&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$14.99/month ($5.99 for students)&lt;/td&gt;
&lt;td&gt;Unlimited coding chat &amp;amp; async sandboxes&lt;/td&gt;
&lt;td&gt;Mistral Medium 3.5&lt;/td&gt;
&lt;td&gt;Devs needing cloud-teleported agents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ChatGPT Go&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$8/month (Ad-supported)&lt;/td&gt;
&lt;td&gt;Higher basic limits (no reasoning/Deep Research)&lt;/td&gt;
&lt;td&gt;GPT-5.2 Instant&lt;/td&gt;
&lt;td&gt;Casual users, lightweight scripting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ChatGPT Plus&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$20/month&lt;/td&gt;
&lt;td&gt;Standard rate limits for advanced reasoning&lt;/td&gt;
&lt;td&gt;GPT-5.5, Deep Research&lt;/td&gt;
&lt;td&gt;Developers needing general reasoning + coding&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Kimi Membership&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$19/month&lt;/td&gt;
&lt;td&gt;High-volume swarms &amp;amp; document-to-skill processing&lt;/td&gt;
&lt;td&gt;Kimi K2.6, Agent Swarms&lt;/td&gt;
&lt;td&gt;Visual dev (websites, slides) &amp;amp; swarm tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;MiniMax Token Plan&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;From $20/month (Tiers up to $120/mo)&lt;/td&gt;
&lt;td&gt;rolling 5-hour request windows (3 to 7 agents)&lt;/td&gt;
&lt;td&gt;MiniMax M3, frontier models&lt;/td&gt;
&lt;td&gt;Devs building parallel agent loops&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  1. The Credit Pioneers: Kilo &amp;amp; GitHub Copilot
&lt;/h2&gt;

&lt;p&gt;Credit-based usage is the dominant billing method for AI coding in 2026. Instead of flat-rate chat, you pay for what you consume.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;GitHub Copilot: The Transition to AI Credits&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;GitHub Copilot has split its billing into two tracks: &lt;strong&gt;unlimited basic autocomplete&lt;/strong&gt; and &lt;strong&gt;usage-based AI Credits&lt;/strong&gt; for advanced tasks (such as Copilot Chat, agents, and automated PR reviews).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Copilot Pro ($10/mo):&lt;/strong&gt; Gives you unlimited completions plus $10 in AI Credits.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Copilot Pro+ ($39/mo):&lt;/strong&gt; Comes with $39 in AI Credits.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Copilot Max ($100/mo):&lt;/strong&gt; Designed for heavy agent developers, offering $100 in AI Credits.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Copilot Business ($19/user/mo) &amp;amp; Enterprise ($39/user/mo):&lt;/strong&gt; Uses a pooled credit system. All credits are shared across your team rather than being locked to individual seats. If the pool runs dry, you pay $0.01 per additional AI credit, or you can set hard spend caps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Verdict:&lt;/strong&gt; If you only need inline autocomplete, the $10/mo Pro plan remains a bargain. But if you rely heavily on Copilot Workspace or automated reviews, the credits can vanish quickly, making the pooled Business plan or Kilo a more logical choice.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Kilo: The Zero-Markup BYOK Champion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Kilo takes a completely transparent approach. If you bring your own API keys (from OpenAI, Anthropic, Google, etc.), &lt;strong&gt;Kilo is $0/month&lt;/strong&gt; for individuals. They charge no markup on the underlying model provider rates.&lt;/p&gt;

&lt;p&gt;If you prefer a subscription, Kilo offers &lt;strong&gt;Kilo Pass&lt;/strong&gt; (Starter at $19/mo, Pro at $49/mo, Expert at $199/mo).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Your monthly fee converts &lt;strong&gt;1:1 into usage credits&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;  Kilo stacks free bonus credits on top: up to &lt;strong&gt;40% extra value&lt;/strong&gt; for monthly plans and &lt;strong&gt;50% extra value&lt;/strong&gt; for annual plans.&lt;/li&gt;
&lt;li&gt;  All first-time subscribers get a &lt;strong&gt;50% welcome bonus&lt;/strong&gt; in Month 1.&lt;/li&gt;
&lt;li&gt;  &lt;em&gt;Catch:&lt;/em&gt; Bonus credits expire at the end of your monthly billing cycle, while paid credits roll over.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Verdict:&lt;/strong&gt; Kilo is arguably the most user-friendly model on the market. They make their money by charging teams for security and collaboration, meaning individual developers get raw developer-rate access with massive bonus structures.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. The Rolling Limit Giants: OpenCode Go vs. Zen
&lt;/h2&gt;

&lt;p&gt;OpenCode has emerged as a major player by offering two distinct paths for developers: flat-rate subscriptions with request windows or zero-subscription pay-as-you-go.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;OpenCode Go: The High-Volume Subscription&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;For &lt;strong&gt;$10/month&lt;/strong&gt; ($5 for your first month), OpenCode Go offers rolling 5-hour request limits across a suite of frontier models.&lt;/p&gt;

&lt;p&gt;The request limits are highly generous:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;DeepSeek V4 Flash:&lt;/strong&gt; 31,650 requests / 5 hours (essentially unlimited for human speeds)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;MiniMax M3:&lt;/strong&gt; 9,600 requests / 5 hours (includes a 3x usage promo)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;DeepSeek V4 Pro:&lt;/strong&gt; 3,450 requests / 5 hours&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Qwen3.7 Plus:&lt;/strong&gt; 4,300 requests / 5 hours&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Kimi K2.7 Code:&lt;/strong&gt; 1,150 requests / 5 hours&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Qwen3.7 Max:&lt;/strong&gt; 950 requests / 5 hours&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;GLM-5.2:&lt;/strong&gt; 880 requests / 5 hours&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Verdict:&lt;/strong&gt; OpenCode Go is the best value plan for individual developers. For just $10/mo, you get access to top-tier reasoning models like Qwen3.7 Max and DeepSeek V4 Pro with limits you'll almost never hit in normal daily coding.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;OpenCode Zen: Pay-As-You-Go Gateway&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you hate monthly bills, OpenCode Zen requires a &lt;strong&gt;$20 minimum deposit&lt;/strong&gt; (plus a $1.23 card fee). It bills you only for the tokens you use with zero markup. It automatically tops up another $20 when your balance drops below $5.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Verdict:&lt;/strong&gt; Zen is perfect for developers who want a backup coding assistant or want to test specific open-source models without committing to a recurring fee.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. The Ecosystem Contenders: Mistral Vibe, Kimi, &amp;amp; OpenAI
&lt;/h2&gt;

&lt;p&gt;If you want a unified experience where the interface, CLI, and model are tightly integrated, these three options offer distinct agentic workflows.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Mistral Vibe: Cloud Teleportation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Mistral has rebranded Le Chat as &lt;strong&gt;Vibe&lt;/strong&gt;. For &lt;strong&gt;$14.99/month&lt;/strong&gt; (and only $5.99/mo for verified students), Vibe offers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Code Mode:&lt;/strong&gt; Built for terminal and VS Code project-wide feature building.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Teleporting Agents:&lt;/strong&gt; You can launch a coding task in Vibe, spin it up in an isolated cloud sandbox, and let it run asynchronously while you close your laptop. It will notify you with the finished diffs or PRs.&lt;/li&gt;
&lt;li&gt;  Powered by &lt;strong&gt;Mistral Medium 3.5&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Verdict:&lt;/strong&gt; Vibe's async cloud execution makes it the most advanced workflow for running long-horizon agent tasks without locking up your local terminal. At $14.99/mo, it is highly competitive.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;ChatGPT Go &amp;amp; Codex CLI&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;OpenAI has integrated its Codex engine directly into the ChatGPT ecosystem.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;ChatGPT Go ($8/mo):&lt;/strong&gt; Ad-supported, basic coding features using GPT-5.2 Instant. It doesn't support advanced reasoning models or Deep Research.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;ChatGPT Plus ($20/mo):&lt;/strong&gt; Full coding access, GPT-5.5, and OpenAI's Deep Research.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Codex CLI:&lt;/strong&gt; The terminal-native agent is available across all plans (including Free).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Verdict:&lt;/strong&gt; ChatGPT Go is too limited for professional developers. If you want OpenAI's best coding capabilities, you need the $20/mo Plus plan or the $100/mo Pro plan to get professional-grade rate limits.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Kimi Membership: Swarms &amp;amp; Visual Coding&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Moonshot AI's &lt;strong&gt;Kimi&lt;/strong&gt; costs &lt;strong&gt;$19/month&lt;/strong&gt; (reduced to $15/mo if billed annually). It is powered by Kimi K2.6.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Visual Coding:&lt;/strong&gt; Specialized in turning prompts into full-stack working websites, interactive elements, or styled presentations.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Agent Swarms:&lt;/strong&gt; Built to run massive parallel processing tasks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Verdict:&lt;/strong&gt; Kimi is excellent if your work involves front-end prototyping, rapid visual iteration, or data extraction. For pure systems programming or backend work, OpenCode or Kilo are better fits.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. MiniMax Token Plan: Built for Agent Loops
&lt;/h2&gt;

&lt;p&gt;MiniMax offers tiered plans designed around running parallel agent loops using their flagship &lt;strong&gt;MiniMax-M3&lt;/strong&gt; model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Plus ($20/mo):&lt;/strong&gt; Limits you to 3–4 concurrent agents. Best for personal projects.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Max ($50/mo):&lt;/strong&gt; Supports 4–5 concurrent agents. Designed for daily coding.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Ultra ($120/mo):&lt;/strong&gt; Supports 6–7 concurrent agents. Designed for complex, multi-agent orchestrations.&lt;/li&gt;
&lt;li&gt;  &lt;em&gt;Alternative:&lt;/em&gt; You can buy credit packages starting at $5 (5,000 credits) to pay purely on consumption.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Verdict:&lt;/strong&gt; If you are building applications that require multiple agents talking to each other in parallel, the MiniMax Ultra tier is built specifically to handle that concurrency. For standard single-agent coding, it is overpriced.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Verdict: Which Plan Should You Buy?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;If you are on a budget:&lt;/strong&gt; Get &lt;strong&gt;OpenCode Go&lt;/strong&gt; for $10/month. The combination of DeepSeek V4, Qwen3.7 Max, and Kimi K2.7 Code under generous 5-hour rolling windows is the best price-to-performance deal on the market.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;If you want model freedom and zero markup:&lt;/strong&gt; Go with &lt;strong&gt;Kilo (BYOK)&lt;/strong&gt;. If you spend more than $19/mo, sign up for &lt;strong&gt;Kilo Pass&lt;/strong&gt; to get up to 50% extra value in free credits.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;If you want hands-off, async coding:&lt;/strong&gt; Get &lt;strong&gt;Mistral Vibe Pro&lt;/strong&gt; for $14.99/month. The ability to teleport long-running tasks to the cloud sandbox is a massive productivity booster.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;If you are in an enterprise team:&lt;/strong&gt; Choose &lt;strong&gt;GitHub Copilot Business/Enterprise&lt;/strong&gt; for its pooled credit system and tight integration with GitHub repositories.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Stop Letting Your AI Agent Write Garbage: 5 Skills You Need Installed Right Now</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Fri, 26 Jun 2026 22:30:21 +0000</pubDate>
      <link>https://dev.to/youxufkhan/stop-letting-your-ai-agent-write-garbage-5-skills-you-need-installed-right-now-1lp8</link>
      <guid>https://dev.to/youxufkhan/stop-letting-your-ai-agent-write-garbage-5-skills-you-need-installed-right-now-1lp8</guid>
      <description>&lt;p&gt;If you use AI coding agents like Claude Code, Cursor, Opencode, Antigravity or Gemini out of the box, you've probably noticed a pattern. Sometimes they write brilliant code. Other times, they dive headfirst into a problem, make wild assumptions, and spit out 500 lines of bloated, over-engineered spaghetti code that takes hours to untangle.&lt;/p&gt;

&lt;p&gt;AI agents are incredibly powerful, but they lack discipline, taste, and a structured methodology. They act like enthusiastic junior developers who just drank three energy drinks.&lt;/p&gt;

&lt;p&gt;To fix this, you need &lt;strong&gt;agent skills&lt;/strong&gt; composable instructions, workflows, and guardrails that fundamentally change how your AI behaves.&lt;/p&gt;

&lt;p&gt;Here are five must-have agent skills you should install to turn your chaotic AI assistant into a disciplined, specialized engineering team.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/obra/superpowers" rel="noopener noreferrer"&gt;obra/superpowers&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt; Superpowers acts as a complete software development methodology for your agent. Instead of jumping straight to writing code, it forces the AI to step back, interview you about what you actually want, and write a digestible spec. Once you approve the spec, it generates an implementation plan (emphasizing Test-Driven Development) and spins up sub-agents to work through the tasks autonomously.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it's a must-have:&lt;/strong&gt; Without a system, AI agents get lost in the weeds of large projects. Superpowers brings order to the chaos. You need this because it stops the AI from guessing your intent and ensures it stays on track, even during long sessions of autonomous coding.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Agency Agents
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/msitarzewski/agency-agents" rel="noopener noreferrer"&gt;msitarzewski/agency-agents&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt; Instead of relying on a single, generic AI assistant, Agency Agents provides a roster of highly specialized, personality-driven AI "employees." Whether you need a Frontend Developer focused on Core Web Vitals, an Incident Response Commander, or a technical SEO Specialist, this repo gives you access to battle-tested workflows for specific roles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it's a must-have:&lt;/strong&gt; General-purpose prompts yield generic results. By loading a specific agent from the Agency, you force the AI to adopt the deep expertise and distinct deliverables of a senior specialist in that exact field. Use this when you need domain-specific expertise rather than a generic coding assistant.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Karpathy-Inspired Skills
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/multica-ai/andrej-karpathy-skills" rel="noopener noreferrer"&gt;multica-ai/andrej-karpathy-skills&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt; Derived from AI researcher Andrej Karpathy's observations on LLM coding pitfalls, this skill enforces four strict principles: Think Before Coding, Simplicity First, Surgical Changes, and Goal-Driven Execution. It requires the AI to explicitly state assumptions, write the absolute minimum required code, and clean up its own mess without touching unrelated files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it's a must-have:&lt;/strong&gt; AI models notoriously love to overcomplicate abstractions and silently change code they don't understand. You must install this to act as a strict tech lead that slaps the AI on the wrist whenever it tries to over-engineer a simple 50-line fix into a 1,000-line disaster.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Addy Osmani's Agent Skills
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/addyosmani/agent-skills" rel="noopener noreferrer"&gt;addyosmani/agent-skills&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt; Built by Chrome engineering leader Addy Osmani, this is a suite of production-grade engineering workflows triggered by simple slash commands (like &lt;code&gt;/spec&lt;/code&gt;, &lt;code&gt;/plan&lt;/code&gt;, &lt;code&gt;/build&lt;/code&gt;, &lt;code&gt;/test&lt;/code&gt;). It encodes the quality gates and best practices that senior engineers use, forcing the AI to validate its work incrementally rather than doing it all in one giant, unverified pass.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it's a must-have:&lt;/strong&gt; If you want enterprise-grade code quality, you need this. It ensures your agent doesn't skip testing or code review. You should use this to bring structured, predictable lifecycle management to every feature you build with AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Taste Skill
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/Leonxlnx/taste-skill" rel="noopener noreferrer"&gt;Leonxlnx/taste-skill&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt; Billed as the "Anti-Slop Frontend Framework," this skill upgrades the visual output of AI-built interfaces. Instead of the default boilerplate UI that looks like a generic dashboard from 2018, Taste Skill forces the agent to use premium layout patterns, strong typography, appropriate motion, and proper spacing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it's a must-have:&lt;/strong&gt; AI defaults to mediocre design. If you're building user-facing applications, installing Taste Skill is the difference between an app that looks like a cheap prototype and one that feels like a premium, thoughtfully crafted product. Use this to instantly elevate your frontend code without needing to constantly micromanage CSS padding and font weights.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bottom Line
&lt;/h2&gt;

&lt;p&gt;You wouldn't let a junior engineer commit straight to production without a spec, a plan, or a code review. Stop letting your AI do it. By installing these skills, you provide the guardrails necessary to get consistent, high-quality output. Install them, set your standards, and let the agents do the heavy lifting.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
      <category>tooling</category>
    </item>
    <item>
      <title>Free AI Coding CLI Tools in 2026: A Practical Guide</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Sat, 18 Apr 2026 15:56:52 +0000</pubDate>
      <link>https://dev.to/youxufkhan/free-ai-coding-cli-tools-in-2026-a-practical-guide-48ig</link>
      <guid>https://dev.to/youxufkhan/free-ai-coding-cli-tools-in-2026-a-practical-guide-48ig</guid>
      <description>&lt;p&gt;AI coding assistants have become essential in modern development workflows. But with the big players pivoting to paid models, finding a free or affordable option is getting harder. Here's what actually works and how to set it up in minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with Major AI Coding Tools
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://claude.com/code" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt;&lt;/strong&gt; remains the gold standard for CLI-based AI coding. It's powerful, well-integrated, and handles complex codebases beautifully. But the pay-as-you-go pricing adds up fast. If you're using it heavily throughout the day, the costs can surprise you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://gemini.google.com" rel="noopener noreferrer"&gt;Google Gemini&lt;/a&gt;&lt;/strong&gt; initially offered a generous free tier with their top models (Gemini 2.5 and 2.5 Pro). But recent quota changes have made free access significantly more restrictive. The writing is on the wall free tiers rarely survive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://qwen.ai" rel="noopener noreferrer"&gt;Qwen&lt;/a&gt;&lt;/strong&gt; (Alibaba's Qwen 2.5 Coder) offered a compelling free alternative through their CLI, but they ended their free tier just last week. If you were counting on it, too bad.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://openai.com/codex" rel="noopener noreferrer"&gt;OpenAI's Codex&lt;/a&gt;&lt;/strong&gt; is currently free but as the saying goes, "free until it isn't." The tier exists, but how long it lasts is anyone's guess.&lt;/p&gt;




&lt;h2&gt;
  
  
  Free and Open Source Alternatives That Actually Work
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Opencode CLI
&lt;/h3&gt;

&lt;p&gt;My personal favorite. Opencode offers &lt;strong&gt;free models through Opencode Zen&lt;/strong&gt; with surprisingly generous limits. The tool itself is open-source and you can use it for free, or upgrade to paid plans ($5-20/month) for higher limits and more models.&lt;/p&gt;

&lt;p&gt;What sets Opencode apart:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built-in skills system for specialized tasks&lt;/li&gt;
&lt;li&gt;Active plugin ecosystem&lt;/li&gt;
&lt;li&gt;Great documentation&lt;/li&gt;
&lt;li&gt;Runs locally with your choice of models&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Kilo CLI
&lt;/h3&gt;

&lt;p&gt;Another solid open-source option. Kilo routes through their gateway and includes built-in agents: Plan, Build, Debug, and Orchestrator. They offer decent free models without requiring a paid subscription.&lt;/p&gt;




&lt;h2&gt;
  
  
  Supercharge Opencode with Plugins
&lt;/h2&gt;

&lt;p&gt;One of Opencode's strengths is its plugin ecosystem. Here are three plugins worth adding:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/code-yeongyu/oh-my-openagent" rel="noopener noreferrer"&gt;oh-my-openagent&lt;/a&gt; (52.5k ⭐)
&lt;/h3&gt;

&lt;p&gt;Previously called "oh-my-opencode", this is a beast. It gives you a full AI dev team:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sisyphus&lt;/strong&gt; - Main orchestrator that plans, delegates to specialists, and drives tasks to completion&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hephaestus&lt;/strong&gt; - Autonomous deep worker for end-to-end execution&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prometheus&lt;/strong&gt; - Strategic planner that interviews you before touching code&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ultrawork&lt;/code&gt; command - one word, all agents activate and don't stop until done&lt;/li&gt;
&lt;li&gt;Hash-anchored edits - prevents stale-line errors&lt;/li&gt;
&lt;li&gt;Built-in MCPs (web search, official docs, GitHub search)&lt;/li&gt;
&lt;li&gt;Ralph Loop - self-referential loop that keeps working until 100% done&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/obra/superpowers" rel="noopener noreferrer"&gt;Superpowers&lt;/a&gt; (159k ⭐)
&lt;/h3&gt;

&lt;p&gt;A complete software development methodology. The workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;brainstorming&lt;/strong&gt; - Refines your idea before writing code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;using-git-worktrees&lt;/strong&gt; - Creates isolated workspace on new branch&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;writing-plans&lt;/strong&gt; - Breaks work into 2-5 minute tasks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;subagent-driven-development&lt;/strong&gt; - Dispatches agents per task with two-stage review&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;test-driven-development&lt;/strong&gt; - Enforces RED-GREEN-REFACTOR&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;requesting-code-review&lt;/strong&gt; - Reviews before continuing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;finishing-a-development-branch&lt;/strong&gt; - Verifies tests, presents merge options&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Skills include systematic-debugging, verification-before-completion, and writing-skills.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/msitarzewski/agency-agents" rel="noopener noreferrer"&gt;Agency&lt;/a&gt; (82k ⭐)
&lt;/h3&gt;

&lt;p&gt;50+ specialized agents across different divisions:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Engineering&lt;/strong&gt;: Frontend Developer, Backend Architect, AI Engineer, DevOps, Security Engineer, SRE, Database Optimizer, Technical Writer&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Design&lt;/strong&gt;: UI Designer, UX Researcher, Brand Guardian, Whimsy Injector, Visual Storyteller&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Marketing&lt;/strong&gt;: Growth Hacker, Content Creator, SEO Specialist, Twitter Engager, TikTok Strategist&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sales&lt;/strong&gt;: Outbound Strategist, Deal Strategist, Sales Engineer, Pipeline Analyst&lt;/p&gt;

&lt;p&gt;Each agent has personality, processes, and measurable deliverables.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Solution: One-Command Setup
&lt;/h2&gt;

&lt;p&gt;I got tired of manually configuring Opencode with the plugins and free models I wanted. So I built &lt;strong&gt;my-opencode-config&lt;/strong&gt; a tool that sets up everything in one command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installs Opencode with OhMyOpenagent&lt;/li&gt;
&lt;li&gt;Pre-configures Superpowers and Agency agents&lt;/li&gt;
&lt;li&gt;Sets up Gemini free models via OAuth&lt;/li&gt;
&lt;li&gt;Configures Opencode Zen free models&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Installation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx my-opencode-config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or check out the &lt;a href="https://github.com/youxufkhan/my-opencode-config" rel="noopener noreferrer"&gt;GitHub repo&lt;/a&gt; for more options.&lt;/p&gt;

&lt;p&gt;That's it. One command and you have a fully configured AI coding CLI with free models and premium plugins.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Use Daily
&lt;/h2&gt;

&lt;p&gt;For my daily coding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Opencode&lt;/strong&gt; as my primary CLI (configured via my-opencode-config)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kilo&lt;/strong&gt; as backup when I need different model quirks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code&lt;/strong&gt; for specific tasks where it shines&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Takeaway
&lt;/h2&gt;

&lt;p&gt;The landscape shifts fast. Free tiers come and go. But the tools above work today and my setup script gives you a running start without the configuration headaches.&lt;/p&gt;

&lt;p&gt;What are you using for AI-assisted coding? Drop your favorites in the comments.&lt;/p&gt;




</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
      <category>coding</category>
    </item>
    <item>
      <title>Getting Started with TypeScript: Type Annotations &amp; Type Inference (Part I)</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Mon, 08 Jul 2024 15:43:10 +0000</pubDate>
      <link>https://dev.to/youxufkhan/getting-started-with-typescript-type-annotations-type-inference-part-i-2mgg</link>
      <guid>https://dev.to/youxufkhan/getting-started-with-typescript-type-annotations-type-inference-part-i-2mgg</guid>
      <description>&lt;p&gt;Type annotations and type inference are two different systems in typescript but in this post we will talk about them in parallel. &lt;/p&gt;

&lt;h2&gt;
  
  
  Type Annotations
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Code we add to tell TypeScript what type of value a variable will refer to&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;We tell typescript the type&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Type Inference
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Typescript tries to figure out what type of value a variable refers to&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Typescript guesses the type&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;The type annotation system is kind of at odds with the type inference, so we are going to first understand type annotations and then come along and understand how type inference comes into play.&lt;/p&gt;

&lt;p&gt;To make things a little bit more complicated, know that these two different features apply slightly differently to&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Variables&lt;/li&gt;
&lt;li&gt;Functions&lt;/li&gt;
&lt;li&gt;Objects&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's first talk about how they are applied to Variables, By Examples&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="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;apples&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this simple example &lt;strong&gt;:number&lt;/strong&gt; is type annotation.&lt;/p&gt;

&lt;p&gt;If we were to set the value of apples to a boolean we would get an error in  this case.&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;apples&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Error: Type 'boolean' is not assignable to type 'number'.ts(2322)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fumdgh57fvdwnjbj33ntr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fumdgh57fvdwnjbj33ntr.png" alt=" " width="602" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Similarly,&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="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;apples&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;apples&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'asdas
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Type 'string' is not assignable to type 'number'.ts(2322)&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq617r9iwg7brxjwnvu6i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq617r9iwg7brxjwnvu6i.png" alt=" " width="513" height="140"&gt;&lt;/a&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="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;banana&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// type inference&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;banana&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt; &lt;span class="c1"&gt;// type annotation&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;banana&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="c1"&gt;// type annotation&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the declaration and initialization are on the same line without type annotation, typescript will figure out the type of variable for us&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Variable declaration]      [Variable initialization]
     const        color   =               red
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Objects:&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="c1"&gt;//Type inference&lt;/span&gt;
 &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;point&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Type annotation&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;point&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Functions:&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="c1"&gt;//Type inference&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;logNumber&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nb"&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="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Type annotation&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;logNumber&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// [(i: number) =&amp;gt; void] is the annotation here&lt;/span&gt;
    &lt;span class="nb"&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="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When to use annotations with functions&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Function that returns 'any' type
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'{"x": 10, "y": 20}'&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;coordinates&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&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="n"&gt;coordinates&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// {x:10, y:20}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We need to understand how JSON.parse works for different values&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Passed Value&lt;/th&gt;
&lt;th&gt;JSON.parse()&lt;/th&gt;
&lt;th&gt;Return Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;'false'&lt;/td&gt;
&lt;td&gt;JSON.parse()&lt;/td&gt;
&lt;td&gt;boolean&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;'4'&lt;/td&gt;
&lt;td&gt;JSON.parse()&lt;/td&gt;
&lt;td&gt;number&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;'{"value:5"}'&lt;/td&gt;
&lt;td&gt;JSON.parse()&lt;/td&gt;
&lt;td&gt;{value:name}&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;'{"name":"alex"}'&lt;/td&gt;
&lt;td&gt;JSON.parse()&lt;/td&gt;
&lt;td&gt;{name:string}&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Typscript decides to set return type to any, meaning it has no idea what type will be returned.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why and when to use type annotation or type inference
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Type inference
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;When we declare a variable on one line then initialize it later&lt;/li&gt;
&lt;li&gt;When we want a variable to have a type that cant be inferred&lt;/li&gt;
&lt;li&gt;When a function returns the 'any' type and we need to clarify the value&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Type inference
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Always&lt;/li&gt;
&lt;li&gt;When we  declare a variable on one line and initialize it later&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lets wrap the first part of type annotations and type inference in typescript. We will discuss it further in next post. 💯&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Getting Started with TypeScript: Types</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Sun, 12 May 2024 19:57:20 +0000</pubDate>
      <link>https://dev.to/youxufkhan/getting-started-with-typescript-types-4ono</link>
      <guid>https://dev.to/youxufkhan/getting-started-with-typescript-types-4ono</guid>
      <description>&lt;h2&gt;
  
  
  Type
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is Type?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Easy way to refer to different properties + functions that a value has&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's learn from an example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;"red"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;What do you see above, it's a string. That's right. But also&lt;br&gt;
It is a value that has all the properties + methods that we assume that a string has &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Properties + Methods a 'string' has in JS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;charAt(), charCodeAt(), concat(), includes(), endsWith(), indexOf(), lastlndexOf(), localeCompare(), match(), length and so on....&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I hope you understand from the above example what a type is.&lt;/p&gt;
&lt;h2&gt;
  
  
  Categories of Types
&lt;/h2&gt;

&lt;p&gt;In the world of typescript there are two different categories of types.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Primitive Types&lt;/li&gt;
&lt;li&gt;Object Types&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Primitive Types
&lt;/h2&gt;

&lt;p&gt;Primitive types are all the basic types you might guess.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;number&lt;/li&gt;
&lt;li&gt;string&lt;/li&gt;
&lt;li&gt;boolean&lt;/li&gt;
&lt;li&gt;symbol&lt;/li&gt;
&lt;li&gt;void&lt;/li&gt;
&lt;li&gt;null&lt;/li&gt;
&lt;li&gt;undefined&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Object Types
&lt;/h2&gt;

&lt;p&gt;These are any types you create or any other types that are built into language itself.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;functions&lt;/li&gt;
&lt;li&gt;classes&lt;/li&gt;
&lt;li&gt;arrays &lt;/li&gt;
&lt;li&gt;Objects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why do we care about types?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Types are used by the Typescript Compiler to analyze our code for errors&lt;/li&gt;
&lt;li&gt;Types allow other engineers to understand what values are flowing around our codebase&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Examples of Types&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;today&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I created a variable that is an instance of a Date object, if I hover of that variable my code editor will tell me the type of value this variable is pointing at.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;const today: Date&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Typescript can now use this information to decide what we can do with this variable. For example if we use this variable and put a dot at the end, I will see my autocomplete pop up here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcuz8tug0qhl3niw75hkw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcuz8tug0qhl3niw75hkw.png" alt="Typescript" width="535" height="299"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is listing out all the different functions and properties a Date object has. Typescript knows that because it has internal definition of what a Date is.&lt;/p&gt;

&lt;p&gt;Similarly if we try to reference a value that a doesn't exist in the Date object, we will immediately see an error.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffnwpm0xunu1oskhitb3v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffnwpm0xunu1oskhitb3v.png" alt="Typescript" width="555" height="142"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now lets create a plain JavaScript Object.&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;getAge&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&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="kt"&gt;number&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If I hover over the variable now, it will show all the properties and the method the object has.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4z4bbessekg6uwfh5bsg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4z4bbessekg6uwfh5bsg.png" alt="Typescript" width="299" height="228"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope by these examples you have the basic idea of types in TypeScript. We will discuss more about each of these in the later posts.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>learning</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Getting Started with TypeScript: A Quick Introduction From JavaScript to TypeScript!</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Thu, 02 May 2024 17:29:08 +0000</pubDate>
      <link>https://dev.to/youxufkhan/getting-started-with-typescript-a-quick-introduction-from-javascript-to-typescript-d4f</link>
      <guid>https://dev.to/youxufkhan/getting-started-with-typescript-a-quick-introduction-from-javascript-to-typescript-d4f</guid>
      <description>&lt;p&gt;As I dive into mastering TypeScript this month, I'll be sharing my journey here, keeping it concise and easy to follow. So, let's kick things off with the very basics. I'm assuming you have a basic grasp of JavaScript.&lt;/p&gt;

&lt;p&gt;Here's a short JavaScript snippet to start with:&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;axios&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'axios'&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="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'https://jsonplaceholder.typicode.com/todos/1'&lt;/span&gt;

&lt;span class="n"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;ID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;completed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completed&lt;/span&gt;
    &lt;span class="nb"&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="sb"&gt;`
        The todo with ID: ${ID}
        has a title of: ${title}
        is it finished?: ${completed}
    `&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="p"&gt;)&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simple, right? This code just sends an HTTP request using axios and fetches a single todo object from the &lt;a href="https://jsonplaceholder.typicode.com/" rel="noopener noreferrer"&gt;jsonplaceholder&lt;/a&gt; API.&lt;/p&gt;

&lt;p&gt;Now, let's rewrite this in basic TypeScript. First, we can use ES6 module syntax to import axios:&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="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;axios&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'axios'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we'll define a type for the url variable:&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'https://jsonplaceholder.typicode.com/todos/1'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, onto the main part of our code:&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="n"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nc"&gt;Todo&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;ID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;completed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completed&lt;/span&gt;
    &lt;span class="nb"&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="sb"&gt;`
        The todo with ID: ${ID}
        has a title of: ${title}
        is it finished?: ${completed}
    `&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="p"&gt;)&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice in the above snippet, we've assigned the response data to the todo variable but as Todo. You might be wondering, what's Todo? Well, here's where interfaces come into play. We'll explicitly define a Todo interface:&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="kd"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;Todo&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;completed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Boolean&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it! Here's how it all looks finally in TypeScript.&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="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;axios&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'axios'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'https://jsonplaceholder.typicode.com/todos/1'&lt;/span&gt;

&lt;span class="kd"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;Todo&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;completed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Boolean&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nc"&gt;Todo&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;ID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;completed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completed&lt;/span&gt;
    &lt;span class="nb"&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="sb"&gt;`
        The todo with ID: ${ID}
        has a title of: ${title}
        is it finished?: ${completed}
    `&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="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before we wrap up, let's quickly highlight the core differences we introduced in the TypeScript version of our code. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Type Annotations&lt;/strong&gt;: We added type annotations to variables, enhancing code clarity and catching potential errors early.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interface Definition&lt;/strong&gt;: Introducing the Todo interface allowed us to specify the structure of our data, promoting better code organization and type safety.&lt;/p&gt;

&lt;p&gt;In this post, I started with a simple JavaScript snippet fetching data from an API using axios. Then, we gradually migrated it to TypeScript, introducing some of the basic syntax of TypeScript.&lt;/p&gt;

&lt;p&gt;Don't worry if you don't understand some of the terminologies or concepts used here; this is just a short introduction post. In the next post, we'll dive into basic concepts and terminologies to ensure everyone's on the same page. Stay tuned for more TypeScript adventures!&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>javascript</category>
      <category>learning</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
