<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Taha ziani</title>
    <description>The latest articles on Forem by Taha ziani (@0xtz).</description>
    <link>https://forem.com/0xtz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F248540%2Faaca4c37-f4e7-47aa-9598-3e74b8f7b443.png</url>
      <title>Forem: Taha ziani</title>
      <link>https://forem.com/0xtz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/0xtz"/>
    <language>en</language>
    <item>
      <title>ChatGPT 5 vs Claude Sonnet: AI Coding Skills Compared</title>
      <dc:creator>Taha ziani</dc:creator>
      <pubDate>Tue, 16 Sep 2025 10:04:17 +0000</pubDate>
      <link>https://forem.com/0xtz/chatgpt-5-vs-claude-sonnet-ai-coding-skills-compared-24jg</link>
      <guid>https://forem.com/0xtz/chatgpt-5-vs-claude-sonnet-ai-coding-skills-compared-24jg</guid>
      <description>&lt;p&gt;What is the &lt;em&gt;future of coding&lt;/em&gt;? It is &lt;strong&gt;not just&lt;/strong&gt; about human ingenuity but also a &lt;strong&gt;battle between AI giants&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Imagine two giant models, OpenAI's &lt;strong&gt;GPT-5&lt;/strong&gt; and Anthropic's &lt;strong&gt;Claude Sonnet&lt;/strong&gt;, competing to build a game. One delivers &lt;em&gt;careful, rule-following&lt;/em&gt; solutions. The other is &lt;em&gt;fast&lt;/em&gt; and creates &lt;em&gt;visually stunning&lt;/em&gt; designs.&lt;br&gt;
Yet, &lt;em&gt;neither one is perfect&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;This is a glimpse into how AI shapes the tools we use to solve problems in our day-to-day life. This includes designing UIs and managing business decisions. As a developer, I rely more on AI to finish boring tasks. But which model &lt;strong&gt;truly gives the best results&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;In this comparison, we break down the &lt;strong&gt;strengths, weaknesses, and surprising quirks&lt;/strong&gt; of GPT-5 and Claude Sonnet. We look at token efficiency, pricing, and their ability to handle complex tasks like authentication. You will discover how these models compare in real-world situations. Whether you are a developer who wants &lt;strong&gt;precision&lt;/strong&gt; or &lt;strong&gt;speed&lt;/strong&gt;, or just curious about how AI models solve problems, this will help you understand the trade-offs. By the end, you might ask not just which model is better, but what &lt;strong&gt;&lt;em&gt;better&lt;/em&gt;&lt;/strong&gt; really means in the world of AI development.&lt;/p&gt;
&lt;h2&gt;
  
  
  Key Features of ChatGPT 5 and Claude Sonnet
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;GPT-5&lt;/strong&gt; is OpenAI's latest model. It is built for &lt;strong&gt;&lt;em&gt;advanced reasoning&lt;/em&gt;&lt;/strong&gt; and can adapt to many different challenges. It uses a routing system to handle tasks in the best way possible. This makes it a &lt;strong&gt;versatile tool&lt;/strong&gt; for developers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude Sonnet&lt;/strong&gt; is known for its &lt;strong&gt;&lt;em&gt;raw speed&lt;/em&gt;&lt;/strong&gt; and for creating outputs that look &lt;strong&gt;&lt;em&gt;visually refined&lt;/em&gt;&lt;/strong&gt;. It is for developers who want &lt;strong&gt;efficiency&lt;/strong&gt; and &lt;strong&gt;beautiful design&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Both models help with coding and problem-solving, but they work in &lt;strong&gt;dramatically different ways&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Performance in Building a Multiplayer Tic-Tac-Toe Game
&lt;/h2&gt;

&lt;p&gt;We tested their coding skills by asking both models to create a multiplayer tic-tac-toe game. The results showed &lt;strong&gt;clear strengths and weaknesses&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GPT-5&lt;/strong&gt;: Made a &lt;strong&gt;&lt;em&gt;functional and robust&lt;/em&gt;&lt;/strong&gt; solution. However, its interface was &lt;em&gt;visually basic&lt;/em&gt; and needed more design work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Sonnet&lt;/strong&gt;: Created a &lt;strong&gt;&lt;em&gt;polished interface&lt;/em&gt;&lt;/strong&gt; but sometimes added &lt;em&gt;unnecessary fields&lt;/em&gt;, making the code more complex.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both models had &lt;em&gt;minor coding errors&lt;/em&gt; a reminder that &lt;strong&gt;human review is always required&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Impact of Rule Adherence on Model Performance
&lt;/h2&gt;

&lt;p&gt;We tested how well the models followed specific rules. The models behaved &lt;strong&gt;very differently&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GPT-5&lt;/strong&gt;: Was &lt;em&gt;slower&lt;/em&gt; but &lt;strong&gt;&lt;em&gt;more deliberate&lt;/em&gt;&lt;/strong&gt;. It often gave &lt;em&gt;thoughtful and detailed&lt;/em&gt; solutions that followed the rules closely.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Sonnet&lt;/strong&gt;: Was &lt;em&gt;blazing fast&lt;/em&gt; but sometimes &lt;strong&gt;&lt;em&gt;struggled with conventions&lt;/em&gt;&lt;/strong&gt;. This led to small mistakes in its output.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These differences show how each model's &lt;strong&gt;built-in style&lt;/strong&gt; affects its work.&lt;/p&gt;
&lt;h2&gt;
  
  
  Challenges in Authentication Implementation
&lt;/h2&gt;

&lt;p&gt;Tasks like adding login systems were &lt;strong&gt;surprisingly challenging&lt;/strong&gt; for both models. The results showed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Both models had problems with environment variables. These issues needed &lt;em&gt;manual fixes&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GPT-5&lt;/strong&gt;: Used web searches to help. This often led to &lt;strong&gt;&lt;em&gt;more complete and reliable&lt;/em&gt;&lt;/strong&gt; solutions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Sonnet&lt;/strong&gt;: Was fast but sometimes made functions that were &lt;strong&gt;&lt;em&gt;incomplete or less reliable&lt;/em&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This shows that &lt;strong&gt;authentication is complex&lt;/strong&gt;. Developers must always check the AI's output.&lt;/p&gt;
&lt;h2&gt;
  
  
  Token Efficiency and Cost Implications
&lt;/h2&gt;

&lt;p&gt;How a model uses &lt;strong&gt;tokens&lt;/strong&gt; affects its &lt;strong&gt;cost&lt;/strong&gt;. This comparison showed different patterns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GPT-5&lt;/strong&gt;: Used &lt;em&gt;more tokens&lt;/em&gt; because of its &lt;strong&gt;&lt;em&gt;detailed thinking process&lt;/em&gt;&lt;/strong&gt;. This often led to &lt;em&gt;higher-quality outputs&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Sonnet&lt;/strong&gt;: Used &lt;em&gt;fewer tokens&lt;/em&gt; but relied heavily on its context window. However, its &lt;em&gt;higher price per token&lt;/em&gt; is a key factor.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This shows the &lt;strong&gt;trade-off&lt;/strong&gt; between &lt;strong&gt;&lt;em&gt;deep reasoning&lt;/em&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;em&gt;token efficiency&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Pricing and Cost Analysis: Getting the Most Bang for Your Buck
&lt;/h2&gt;

&lt;p&gt;Let's talk money! 💰 &lt;strong&gt;Cost is a massive factor&lt;/strong&gt; when you're choosing an AI model for your projects. You want power, but you also need to keep an eye on the budget.&lt;/p&gt;

&lt;p&gt;Here’s the latest pricing breakdown (but remember: &lt;em&gt;prices can change, so always double-check the official sources!&lt;/em&gt;).&lt;/p&gt;
&lt;h3&gt;
  
  
  Side-by-Side Price Tag 🏷️
&lt;/h3&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;Input Price (per 1M tokens)&lt;/th&gt;
&lt;th&gt;Output Price (per 1M tokens)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;GPT-5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$1.25&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$10.00&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Claude Sonnet&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$3.00&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$15.00&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  The Output Cost, Visualized 📊
&lt;/h3&gt;

&lt;p&gt;Seeing the difference in output cost really puts things into perspective:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cost for 1 Million Output Tokens&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$20 |
$15 |            █
$10 |    █       █
 $5 |    █       █
 $0 +--------------------
        GPT-5  Claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;So, what does this mean for you?&lt;/strong&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GPT-5&lt;/strong&gt; is like a &lt;strong&gt;budget-friendly bulk store&lt;/strong&gt;. The &lt;em&gt;price per token is lower&lt;/em&gt;, which is fantastic for large, complex tasks where you need deep, high-quality reasoning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Sonnet&lt;/strong&gt; might have a &lt;em&gt;higher price per token&lt;/em&gt;, but its ability to sometimes &lt;strong&gt;use fewer tokens overall&lt;/strong&gt; on shorter tasks can make its total cost competitive for quick jobs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The bottom line?&lt;/strong&gt; Your choice ultimately depends on your project's specific &lt;strong&gt;needs and budget&lt;/strong&gt;. If you prioritize cost-efficiency on big projects, GPT-5 has the edge. For quick, token-light tasks, Claude might be your guy!&lt;/p&gt;

&lt;h2&gt;
  
  
  Strengths and Weaknesses of Each Model
&lt;/h2&gt;

&lt;p&gt;The comparison shows &lt;strong&gt;clear strengths and weaknesses&lt;/strong&gt; for each model:&lt;/p&gt;

&lt;h4&gt;
  
  
  🤔 GPT-5: The Deliberate Thinker
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;✅ Strengths&lt;/strong&gt;: &lt;em&gt;Advanced reasoning&lt;/em&gt;, &lt;em&gt;careful problem-solving&lt;/em&gt;, &lt;em&gt;high-quality outputs&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;❌ Weaknesses&lt;/strong&gt;: &lt;em&gt;Slower&lt;/em&gt;, &lt;em&gt;uses more tokens&lt;/em&gt;, &lt;em&gt;sometimes makes errors&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  ⚡ Claude Sonnet: The Speed Artist
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;✅ Strengths&lt;/strong&gt;: &lt;em&gt;Extremely fast&lt;/em&gt;, &lt;em&gt;creates visually appealing outputs&lt;/em&gt;, &lt;em&gt;uses tokens efficiently&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;❌ Weaknesses&lt;/strong&gt;: &lt;em&gt;Inconsistent with schemas&lt;/em&gt;, &lt;em&gt;methods are less reliable&lt;/em&gt;, &lt;em&gt;sometimes gives incomplete solutions&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Choosing the Right Model for Your Needs
&lt;/h2&gt;

&lt;p&gt;So, which one is for you? The answer is: &lt;strong&gt;it depends&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose &lt;strong&gt;GPT-5&lt;/strong&gt; if your project needs &lt;strong&gt;&lt;em&gt;accuracy, complex reasoning, and detailed outputs&lt;/em&gt;&lt;/strong&gt;. It is the &lt;strong&gt;thinker&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Choose &lt;strong&gt;Claude Sonnet&lt;/strong&gt; if your project needs &lt;strong&gt;&lt;em&gt;speed, visual appeal, and quick iterations&lt;/em&gt;&lt;/strong&gt;. It is the &lt;strong&gt;artist&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both models are still improving. More testing will give us better insights into their skills, helping developers make &lt;strong&gt;smarter choices&lt;/strong&gt; in the future.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Up next: What exactly is a GPT, and how does it differ from other AI models?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;🏓 &lt;a href="https://blog.0xtz.me/articles/chatgpt-5-vs-claude-sonnet-ai-coding-skills-compared" rel="noopener noreferrer"&gt;full article, and more are coming soon&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>chatgpt</category>
      <category>anthropic</category>
      <category>programming</category>
    </item>
    <item>
      <title>Mangle: Google's Bold Take on Database Programming</title>
      <dc:creator>Taha ziani</dc:creator>
      <pubDate>Tue, 16 Sep 2025 09:56:30 +0000</pubDate>
      <link>https://forem.com/0xtz/mangle-googles-bold-take-on-database-programming-23l1</link>
      <guid>https://forem.com/0xtz/mangle-googles-bold-take-on-database-programming-23l1</guid>
      <description>&lt;p&gt;Google introduced &lt;a href="https://github.com/google/mangle" rel="noopener noreferrer"&gt;Mangle&lt;/a&gt;, a new open-source programming language that extends the classic logic-based language &lt;a href="https://en.wikipedia.org/wiki/Datalog" rel="noopener noreferrer"&gt;Datalog&lt;/a&gt; for modern &lt;strong&gt;deductive databases&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Implemented as a &lt;code&gt;Go&lt;/code&gt; package, Mangle is designed to make it easier to query and reason about data spread across multiple sources.&lt;/p&gt;

&lt;p&gt;At its core, Mangle builds on Datalog, a declarative logic programming language with roots in database theory. While traditional Datalog is powerful for expressing complex queries, it often lacks features needed for real-world applications. Mangle bridges this gap by introducing practical extensions while keeping the accessibility and simplicity of its predecessor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Features and Extensions
&lt;/h2&gt;

&lt;p&gt;Mangle enhances Datalog with features that are essential for modern development, security, and data analysis:&lt;/p&gt;

&lt;h3&gt;
  
  
  Recursive Rules
&lt;/h3&gt;

&lt;p&gt;A hallmark of Datalog, fully supported in Mangle. Recursive rules allow developers to express transitive relationships, like tracing a project's dependency tree or mapping access rights across a hierarchy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Uniform Data Access
&lt;/h3&gt;

&lt;p&gt;Mangle can treat multiple data sources as one logical database. It can pull facts from files, APIs, or databases, letting developers join information seamlessly without worrying about where it comes from.&lt;/p&gt;

&lt;h3&gt;
  
  
  Aggregation and Function Calls
&lt;/h3&gt;

&lt;p&gt;Mangle supports aggregation functions (e.g., &lt;code&gt;count&lt;/code&gt;, &lt;code&gt;sum&lt;/code&gt;) and external function calls.&lt;br&gt;
This makes it easier to run computations and integrate logical queries with existing code or business logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  Optional Type Checking
&lt;/h3&gt;

&lt;p&gt;Unlike plain Datalog, Mangle gives developers the option to add type safety when needed. This helps balance flexibility with reliability, especially for larger projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical Applications
&lt;/h2&gt;

&lt;p&gt;Mangle is not just a research toy—it's useful for real-world problems:&lt;/p&gt;

&lt;h3&gt;
  
  
  Vulnerability Detection
&lt;/h3&gt;

&lt;p&gt;Security teams can write rules like 'a project is vulnerable if it depends on a library with a known CVE'. Mangle can then recursively scan dependency graphs to flag issues. This makes it great for software supply chain security.&lt;/p&gt;

&lt;h3&gt;
  
  
  Software Dependency Analysis
&lt;/h3&gt;

&lt;p&gt;Mangle is a natural fit for analysing &lt;a href="https://www.cisa.gov/sbom" rel="noopener noreferrer"&gt;Software Bill of Materials (SBOMs)&lt;/a&gt;. It can help enforce versioning policies, detect deprecated libraries, or find projects relying on outdated dependencies.&lt;/p&gt;

&lt;h3&gt;
  
  
  Knowledge Graph Modeling
&lt;/h3&gt;

&lt;p&gt;Mangle works well with knowledge graphs. By representing entities and relationships as logical facts, developers can uncover hidden connections and run advanced reasoning over complex datasets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation and Developer Accessibility
&lt;/h2&gt;

&lt;p&gt;Mangle is shipped as a &lt;a href="https://pkg.go.dev/github.com/google/mangle" rel="noopener noreferrer"&gt;Go library&lt;/a&gt;. This means developers can embed it directly into apps and tools—no need for a separate runtime or database. The approach keeps things lightweight while putting deductive querying directly in the hands of developers.&lt;/p&gt;

&lt;p&gt;It's worth noting that Google clearly states, &lt;em&gt;“This is not an officially supported Google product.”&lt;/em&gt; So it's experimental, but still a powerful tool for anyone exploring deductive database programming.&lt;/p&gt;




&lt;p&gt;In short: Mangle combines the elegance of Datalog with the practical features needed today. Whether you're a developer, SRE, or security engineer, it opens up new ways to reason about messy, distributed information—from vulnerabilities to knowledge graphs.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://blog.0xtz.me/" rel="noopener noreferrer"&gt;Check out my blog for more&lt;/a&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>google</category>
      <category>sql</category>
    </item>
  </channel>
</rss>
