<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Fuszti</title><description>Notes from an AI engineer on agentic coding, tools, and building things.</description><link>https://fuszti.com/</link><language>en</language><item><title>My Agentic Coding Stack: 3 Essential MCP Servers</title><link>https://fuszti.com/my-agentic-coding-stack-3-essential-mcp-servers/</link><guid isPermaLink="true">https://fuszti.com/my-agentic-coding-stack-3-essential-mcp-servers/</guid><description>Discover the 3 MCP servers that power my agentic coding workflow: Context7, Playwright, and Linear. Design systems where AI agents build products</description><pubDate>Thu, 21 Aug 2025 15:26:27 GMT</pubDate><content:encoded>&lt;h2&gt;The Joy of Agentic Coding&lt;/h2&gt;
&lt;p&gt;I have to say upfront: agentic coding with AI tools like Claude Code is genuinely joyful. Watching Claude implement features, fix bugs, and even write tests feels almost magical. There’s something deeply satisfying about describing what you want and seeing working code emerge.&lt;/p&gt;
&lt;p&gt;But here’s what I learned the hard way - when you completely let go of the reins and expect everything to just work without any effort on your part, that’s when frustration hits. You’re not writing code anymore, but you’re definitely still working. The question is: where exactly do you fit in the loop?&lt;/p&gt;
&lt;h2&gt;My Test-Driven Development Experiment&lt;/h2&gt;
&lt;p&gt;When I first started with Claude Code, I tried following Anthropic’s early advice about running eight terminal windows for test-driven development. I was actually excited about this - I genuinely loved TDD when I was coding manually.&lt;/p&gt;
&lt;p&gt;The setup was elegant in theory: one terminal for writing tests, another for implementation, a third for running tests, and so on. Claude would write failing tests first, then implement features to make them pass.&lt;/p&gt;
&lt;p&gt;What happened was… educational. I ended up with hundreds of tests, but as I kept adding new features to my projects, the development moved forward while the tests didn’t reflect the evolving reality. I fell into the classic TDD trap - writing tests at the wrong abstraction level that ended up constraining rather than enabling development.&lt;/p&gt;
&lt;p&gt;Looking back, I think I skipped or poorly handled the refactoring phases. The tests became anchors instead of safety nets.&lt;/p&gt;
&lt;h2&gt;Two Approaches: Short Iterations vs Long Agentic Sessions&lt;/h2&gt;
&lt;p&gt;Through experimentation, I’ve identified two distinct approaches to using Claude Code:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Short Iterations -&lt;/strong&gt; &lt;a href=&quot;https://x.com/chipro/status/1945527700808184115&quot;&gt;&lt;strong&gt;Tightly Supervised&lt;/strong&gt;&lt;/a&gt;: You actively monitor what Claude is doing, interrupt when needed, and course-correct frequently. This feels safer but can be slower.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Long Agentic Coding Sessions -&lt;/strong&gt; &lt;a href=&quot;https://www.youtube.com/@indydevdan&quot;&gt;&lt;strong&gt;Trust and Verify&lt;/strong&gt;&lt;/a&gt;: Let Claude run for extended periods, only stepping in when it specifically asks for help or feedback. Much faster when it works, but requires better upfront setup.&lt;/p&gt;
&lt;p&gt;I’ve gravitating toward the longer sessions, but with a crucial realization: the human-in-the-loop moments are absolutely critical in agentic coding. It’s not about micromanaging the code - it’s about being strategic about where you add value.&lt;/p&gt;
&lt;h2&gt;My Human-in-the-Loop Workflow Design&lt;/h2&gt;
&lt;p&gt;After months of iteration, here’s where I’ve found I add the most value:&lt;/p&gt;
&lt;h3&gt;1. Requirements and Feature Ideas (Human-Led)&lt;/h3&gt;
&lt;p&gt;I define what I want to build, but I don’t jump straight into implementation. Instead, I use the Linear MCP server to generate detailed tickets with user stories, acceptance criteria, and technical guidance. Claude analyzes the current codebase and provides implementation direction, but I make the strategic decisions about what features matter.&lt;/p&gt;
&lt;h3&gt;2. Implementation (Claude-Led with Strategic Tools)&lt;/h3&gt;
&lt;p&gt;This is where the MCP servers shine. Claude handles the actual coding using:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Context7 MCP&lt;/strong&gt;: For up-to-date documentation and best practices&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Playwright MCP&lt;/strong&gt;: For browser testing and validation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linear MCP&lt;/strong&gt;: For referencing requirements and updating progress&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I’ve learned that web searches alongside Context7 really boost implementation accuracy. Yes, this introduces some prompt injection risk, but I catch those during validation.&lt;/p&gt;
&lt;h3&gt;3. Validation and Pull Requests (Human-Led)&lt;/h3&gt;
&lt;p&gt;Here’s where I invest my time: I don’t do detailed code reviews line-by-line. Instead, I pull the code, run it, test it manually, and see if it actually solves the problem I defined. The GitHub Actions run automatically, but I focus on whether the feature works as intended.&lt;/p&gt;
&lt;h2&gt;The Magic of Playwright Testing&lt;/h2&gt;
&lt;p&gt;The Playwright MCP server creates something I didn’t expect - a genuine closed-loop development cycle. When Claude can control a real browser, fill forms, click buttons, and read console errors, it can debug and iterate without me.&lt;/p&gt;
&lt;p&gt;This enables those longer agentic sessions I mentioned. Instead of me manually testing and reporting back what’s broken, Claude can test its own work and fix issues autonomously. It’s actually faster than the old feedback loop.&lt;/p&gt;
&lt;h2&gt;What I Use and Why&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Context7&lt;/strong&gt;: Eliminates the guesswork about current library APIs and patterns. When I say “use Context7” in my prompts, Claude gets real, up-to-date documentation instead of making educated guesses.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Playwright MCP&lt;/strong&gt;: For web applications (which I typically build), this handles the testing and validation that would otherwise require constant manual intervention.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Linear MCP&lt;/strong&gt;: Forces me to think through features before building them. The structured approach has made my projects more focused and less prone to feature creep.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    &quot;mcpServers&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        &quot;context7&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;          &quot;type&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &quot;sse&quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;          &quot;url&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &quot;https://mcp.context7.com/sse&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        }&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        &quot;linear&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;          &quot;command&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &quot;npx&quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;          &quot;args&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;            &quot;-y&quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;            &quot;mcp-remote&quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;            &quot;https://mcp.linear.app/sse&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;          ]&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        }&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        &quot;playwright&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;          &quot;command&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; &quot;npx&quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;          &quot;args&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; [&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;            &quot;-y&quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;            &quot;@executeautomation/playwright-mcp-server&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;          ]&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;My .mcp.json&lt;/p&gt;
&lt;h2&gt;Areas I’m Still Exploring&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Sub-agents&lt;/strong&gt;: I’ve experimented with parallel development using separate backend and frontend agents. When they work, they’re fantastic for research tasks since they can run simultaneously. The challenge is getting them to not over-engineer everything. I think this comes down to better prompting, which I’m still figuring out.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Larger Codebases&lt;/strong&gt;: My experience is mostly with MVP-style projects. I honestly don’t know how well this workflow scales to complex, enterprise-level applications.&lt;/p&gt;
&lt;h2&gt;The Broader MCP Ecosystem&lt;/h2&gt;
&lt;p&gt;Looking at what others are building gives me confidence this agentic coding approach has legs. IndyDevDan is betting his next decade on agentic software. Microsoft shipped an official Playwright MCP server. Linear built their own MCP integration. Upstash’s Context7 is being adopted across multiple AI platforms.&lt;/p&gt;
&lt;p&gt;The Model Context Protocol is solving something fundamental - instead of every AI tool needing custom integrations for every service, we get universal connectors. One Linear integration works with Claude, Cursor, Windsurf, and whatever launches next month.&lt;/p&gt;
&lt;h2&gt;What’s Working for Me&lt;/h2&gt;
&lt;p&gt;The sweet spot I’ve found is being very intentional about requirements upfront, letting Claude handle implementation with good tooling, then being thorough about validation. I’m not trying to control every line of code - I’m designing a system where Claude can succeed. This is the new job of a developer.&lt;/p&gt;
&lt;p&gt;Most importantly, I’ve stopped expecting perfection without effort. Agentic coding is incredibly powerful, but it’s still development. The joy comes from the collaboration, not from complete automation.&lt;/p&gt;
&lt;h2&gt;Still Learning&lt;/h2&gt;
&lt;p&gt;This workflow probably has tons of room for optimization. I’m definitely not doing everything optimally, and I’m sure there are obvious improvements I’m missing. But for the first time, I feel like I have a sustainable approach to AI-assisted development that actually ships working software.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;What patterns are you finding in your own AI development workflow? I’d love to hear what’s working for others in this space.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>tutorial</category></item><item><title>Getting Started with Claude Code: A No-BS Guide for Hesitant Developers</title><link>https://fuszti.com/claude-code-setup-guide-2025/</link><guid isPermaLink="true">https://fuszti.com/claude-code-setup-guide-2025/</guid><description>Complete Claude Code setup guide for developers. Learn installation, authentication, prompt writing, and real usage patterns. Stop procrastinating, start coding with AI in 5 minutes.</description><pubDate>Thu, 24 Jul 2025 22:13:26 GMT</pubDate><content:encoded>&lt;p&gt;Look, I’ve been using AI coding tools since they first appeared. I’ve seen the evolution from the early experiments to today’s sophisticated assistants. But here’s what I keep noticing: there are tons of smart developers who’ve heard about Claude Code, maybe even bookmarked it, but just… haven’t actually tried it yet.&lt;/p&gt;
&lt;p&gt;It’s not skepticism—it’s that familiar developer pattern of “I’ll check it out when I have time” or “I’ll set it up for the next project.” The barrier isn’t doubt, it’s that initial setup friction combined with the classic procrastination of trying something new when your current workflow is “good enough.”&lt;/p&gt;
&lt;p&gt;So this guide is for you—the person who’s already convinced these tools are useful but just needs someone to walk you through getting started without the usual tutorial fluff.&lt;/p&gt;
&lt;h2&gt;What is Claude Code?&lt;/h2&gt;
&lt;p&gt;Claude Code is Anthropic’s AI-powered coding assistant that runs directly in your terminal. Unlike other AI coding tools, Claude Code understands your entire codebase and can execute commands, edit files, and manage git workflows through natural language prompts.&lt;/p&gt;
&lt;h2&gt;Start Small: Your Home Projects Are the Perfect Excuse&lt;/h2&gt;
&lt;p&gt;Here’s the thing: you don’t need a massive enterprise codebase to see why Claude Code is worth your time. Actually, starting with a small home project is better because you can focus on the tool itself without getting distracted by complex business logic.&lt;/p&gt;
&lt;p&gt;You know that side project you’ve been meaning to build? Or that automation script sitting in your mental todo list? Perfect. That’s your testing ground.&lt;/p&gt;
&lt;p&gt;The breakthrough moment isn’t about the code Claude writes—it’s realizing you can have a technical conversation about your entire project context without manually explaining everything. It’s like having a colleague who actually read all the documentation and remembers every file in your repo.&lt;/p&gt;
&lt;h3&gt;The Installation Reality Check&lt;/h3&gt;
&lt;p&gt;Let me save you some time: the installation is straightforward. The complexity you’re imagining doesn’t exist.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What you actually need:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;macOS 10.15+, Ubuntu 20.04+, or Windows 10+ (with WSL)&lt;/li&gt;
&lt;li&gt;Node.js 18 or newer&lt;/li&gt;
&lt;li&gt;About 5 minutes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;The actual steps:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you don’t have Node.js yet:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;# Ubuntu/Debian:&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;curl&lt;/span&gt;&lt;span&gt; -fsSL&lt;/span&gt;&lt;span&gt; https://deb.nodesource.com/setup_20.x&lt;/span&gt;&lt;span&gt; |&lt;/span&gt;&lt;span&gt; sudo&lt;/span&gt;&lt;span&gt; -E&lt;/span&gt;&lt;span&gt; bash&lt;/span&gt;&lt;span&gt; -&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;sudo&lt;/span&gt;&lt;span&gt; apt&lt;/span&gt;&lt;span&gt; install&lt;/span&gt;&lt;span&gt; -y&lt;/span&gt;&lt;span&gt; nodejs&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;# macOS with Homebrew:&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;brew&lt;/span&gt;&lt;span&gt; install&lt;/span&gt;&lt;span&gt; node&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The one thing that catches people off guard—you need to configure npm to avoid permission headaches:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;mkdir&lt;/span&gt;&lt;span&gt; -p&lt;/span&gt;&lt;span&gt; ~/.npm-global&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;npm&lt;/span&gt;&lt;span&gt; config&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;span&gt; prefix&lt;/span&gt;&lt;span&gt; ~/.npm-global&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;echo&lt;/span&gt;&lt;span&gt; &apos;export PATH=~/.npm-global/bin:$PATH&apos;&lt;/span&gt;&lt;span&gt; &amp;gt;&amp;gt;&lt;/span&gt;&lt;span&gt; ~/.bashrc&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;source&lt;/span&gt;&lt;span&gt; ~/.bashrc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then the magic command:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;npm&lt;/span&gt;&lt;span&gt; install&lt;/span&gt;&lt;span&gt; -g&lt;/span&gt;&lt;span&gt; @anthropic-ai/claude-code&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Never use &lt;code&gt;sudo npm install -g&lt;/code&gt;. I know it seems like the obvious fix when you get permission errors, but it creates more problems than it solves.&lt;/p&gt;
&lt;p&gt;Check everything worked:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;claude&lt;/span&gt;&lt;span&gt; doctor&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;The Login Process&lt;/h3&gt;
&lt;p&gt;When you first run &lt;code&gt;claude&lt;/code&gt; in your project directory, it’s going to ask you to authenticate. The process is clean:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;claude&lt;/code&gt; in your project&lt;/li&gt;
&lt;li&gt;It opens your browser for OAuth&lt;/li&gt;
&lt;li&gt;Pick your Claude subscription or API billing&lt;/li&gt;
&lt;li&gt;Authorize the connection&lt;/li&gt;
&lt;li&gt;Back to your terminal—you’re ready&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you already have a Claude Pro subscription ($20/month), just use that. The billing works on sessions and message limits, not individual tokens, so you will not be charged after the tokens.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;&quot; width=&quot;1080&quot; height=&quot;1920&quot; src=&quot;https://fuszti.com/_astro/image.CsULoxC2_Z15uzJ7.webp&quot; /&gt;&lt;/p&gt;
&lt;p&gt;It is worth to use your subscription, I have $100 subscription, but the token based cost would be almost $1000.&lt;/p&gt;
&lt;h2&gt;Writing Prompts That Work&lt;/h2&gt;
&lt;p&gt;The common mistake isn’t being too vague—it’s not giving Claude the context to make good decisions. Claude Code is excellent at inferring what you want, but it’s even better when you explain your thinking.&lt;/p&gt;
&lt;p&gt;Instead of: “Build me a web scraper”&lt;/p&gt;
&lt;p&gt;Try: “I want to scrape product prices from an e-commerce site to track price changes over time. I’m thinking Python with requests and BeautifulSoup. I’ll need to store the data somewhere simple—probably just a CSV for now. The scraper should run daily and handle basic error cases like timeouts.”&lt;/p&gt;
&lt;p&gt;You’re not writing specs—you’re explaining your intent and constraints.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The key insight:&lt;/strong&gt; explicitly ask Claude to research things you’re unsure about. Something like: “I’m not sure what the best practices are for rate limiting web scraping—search the web for current approaches and factor that into the solution.”&lt;/p&gt;
&lt;p&gt;Claude Code is an agentic tool, which means it can use web search, run commands, and chain actions together. When you ask it to research something, it actually goes and finds current information, then incorporates that into your code. It’s like having a coding partner who’s really good at staying current with best practices.&lt;/p&gt;
&lt;h2&gt;Practical Tips That Matter&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;About testing:&lt;/strong&gt; Claude has a habit of using mocks in tests, and sometimes those mocks end up testing nothing useful. Be specific: “Write tests that actually exercise the real functionality without mocking the core logic.”&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;About the CLAUDE.md file:&lt;/strong&gt; When you start Claude Code in a project, it creates this file automatically. It contains Claude’s analysis of your project, and you can add your own instructions for how you want Claude to behave. Commit it to your repo so your whole team benefits.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;About MCP servers:&lt;/strong&gt; These are powerful integrations that let Claude connect to external services. Skip them for your first project—they add setup complexity, and you want that first positive experience to happen quickly.&lt;/p&gt;
&lt;h2&gt;Scaling Up to Real Codebases&lt;/h2&gt;
&lt;p&gt;Once I got comfortable with Claude Code on small projects, I wanted to try it on a larger codebase. That’s when I learned about the &lt;code&gt;claude init&lt;/code&gt; command.&lt;/p&gt;
&lt;p&gt;This command is kind of magical—it scans your entire repository, understands the structure and dependencies, and creates a comprehensive project overview. I was worried it would consume a crazy amount of tokens, but it’s actually quite reasonable.&lt;/p&gt;
&lt;p&gt;The workflow that’s working for me:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;claude init&lt;/code&gt; to let Claude understand the project&lt;/li&gt;
&lt;li&gt;Start with a small feature request to test the waters&lt;/li&gt;
&lt;li&gt;Gradually work up to more complex changes&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Pro tip for larger projects:&lt;/strong&gt; Try it on an open-source repository first. Something like BookStack or any project you’re familiar with. Open-source repos often have clear feature requests in their issues, so you don’t have to think up what to build—you can just pick something and see how Claude handles it. &lt;a href=&quot;https://fuszti.com/using-ai-coding-tools-for-faster-development-example/&quot;&gt;I did the same with the cursor in last year.&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;How to Actually Use Claude Code (Real Patterns That Work)&lt;/h2&gt;
&lt;p&gt;After extensive use across various projects, here are the interaction patterns that consistently deliver results:&lt;/p&gt;
&lt;h3&gt;Think Like a Project Manager, Not a Code Requester&lt;/h3&gt;
&lt;p&gt;Don’t just ask for code—manage the development process. Start with your vision and break it down:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;# High-level project start&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; &quot;I want to build a webapp where I can log different measurements of my life&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;# Then get specific with tasks  &lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; &quot;Please fix the message sending. Now we have chat history. So the backend should get the current open chat history all messages&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The key is moving from vision to specific, actionable tasks that Claude can execute.&lt;/p&gt;
&lt;h3&gt;Master the Art of Context Provision&lt;/h3&gt;
&lt;p&gt;Your most effective prompts include logs, error messages, and current broken output. Don’t just say “it’s broken”—show exactly what’s happening:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;# Instead of: &quot;The authentication isn&apos;t working&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;# Do this:&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; &quot;The login is failing with this error: [paste full stack trace]&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt; Expected: User should be redirected to dashboard after login&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt; Actual: Getting 401 error and staying on login page&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt; Here&apos;s the current auth middleware code: [paste relevant code]&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Pro insight:&lt;/strong&gt; Large blocks of console logs and precise behavior descriptions are gold. Claude excels when you provide the full debugging context.&lt;/p&gt;
&lt;h3&gt;Embrace the Iteration Process&lt;/h3&gt;
&lt;p&gt;Treat Claude like a hands-on developer teammate. The magic happens in the back-and-forth:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;# First attempt&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; &quot;Build user authentication for this Express app&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;# After testing&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; &quot;Okay, there&apos;s progress. But the JWT token isn&apos;t being stored properly in the frontend. The cookie is setting but the auth state isn&apos;t updating&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;# Continue refining&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; &quot;Why is the logout not clearing the token? I can see it&apos;s still in localStorage after clicking logout&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Reality check:&lt;/strong&gt; The first answer is rarely perfect. Plan for 3-5 iterations on any meaningful feature.&lt;/p&gt;
&lt;h3&gt;Talk Like You’re Managing a Developer&lt;/h3&gt;
&lt;p&gt;Be direct and specific about requirements. When something doesn’t work, express the frustration—it actually helps Claude understand priority and urgency:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; &quot;This is still not working. The requirements are clear: while the content between the code blocks is streaming, show a loading spinner. Why is this so complex?&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Don’t be overly polite. Be clear about what you need and when Claude misses the mark.&lt;/p&gt;
&lt;h3&gt;Use Session Management Commands Strategically&lt;/h3&gt;
&lt;p&gt;These aren’t just utilities—they’re workflow tools:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;# Check your spend regularly, especially on larger projects&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; /cost&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;# Clear context when switching between different parts of a project&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; /clear&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;# Compact long conversations to maintain focus  &lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; /compact&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;# When debugging gets messy, start fresh but keep the project context&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; /init&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Key insight:&lt;/strong&gt; Use &lt;code&gt;/compact&lt;/code&gt; when your conversation gets long but you want to keep the project context. Use &lt;code&gt;/clear&lt;/code&gt; when switching to a completely different feature or problem area.&lt;/p&gt;
&lt;h3&gt;Handle Full-Stack Development Systematically&lt;/h3&gt;
&lt;p&gt;Claude can work across your entire stack, but organize the work:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;# Database layer first&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; &quot;Create the user schema and migration for PostgreSQL&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;# Backend API next  &lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; &quot;Build the REST endpoints for user CRUD operations&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;# Frontend integration&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; &quot;Create the React components that consume these APIs&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;# Infrastructure  &lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; &quot;Update the Docker configuration to include the new database requirements&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Work in layers rather than jumping between frontend/backend randomly.&lt;/p&gt;
&lt;h3&gt;Debug With Precision&lt;/h3&gt;
&lt;p&gt;When things break, provide the complete picture. Here it is one example, when I developed an AI assistant that used WebScoket for the communication:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; &quot;The real-time chat isn&apos;t working. Here&apos;s what I&apos;m seeing:&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt; 1. WebSocket connection establishes successfully (confirmed in dev tools)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt; 2. Messages send from frontend (I can see them in network tab)  &lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt; 3. Backend receives messages (console.log shows them arriving)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt; 4. But messages aren&apos;t broadcasting to other clients&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt; Here&apos;s the socket.io server code: [paste code]&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt; Here&apos;s the client connection: [paste code]&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;&amp;gt; Console errors: [paste any errors]&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Advanced tip:&lt;/strong&gt; When debugging complex features, break down what’s working vs. what’s broken. This helps Claude focus on the actual problem area.&lt;/p&gt;
&lt;p&gt;The goal is treating Claude like a skilled developer who needs good requirements and feedback, not a magic code generator.&lt;/p&gt;
&lt;h2&gt;The Bottom Line&lt;/h2&gt;
&lt;p&gt;Claude Code isn’t about replacing your coding skills—it’s about removing friction from your development process. It remembers context you forget, spots patterns you miss, and handles routine tasks so you can focus on the interesting problems.&lt;/p&gt;
&lt;p&gt;The setup is straightforward, the costs are reasonable, and the learning curve is gentle. Pick a small project you’ve been putting off, install Claude Code, and start a conversation with your codebase. The worst that happens is you get some code written.&lt;/p&gt;
</content:encoded><category>tutorial</category></item><item><title>Cursor vs Windsurf: $68M vs $243M</title><link>https://fuszti.com/cursor-vs-windsurf-68m-vs-243m/</link><guid isPermaLink="true">https://fuszti.com/cursor-vs-windsurf-68m-vs-243m/</guid><description>Compare how OpenAI-backed Cursor ($68M) and Kleiner Perkins-backed Windsurf ($243M) compete in the AI code editor market. Investor analysis reveals their strategies.</description><pubDate>Mon, 23 Dec 2024 17:18:24 GMT</pubDate><content:encoded>&lt;p&gt;The AI code tools market is expected to be worth &lt;a href=&quot;https://www.marketsandmarkets.com/Market-Reports/ai-code-tools-market-239940941.html&quot;&gt;$12.6B by 2028&lt;/a&gt;. There are tons of AI coding tools out there. They try to make coding tasks faster by helping human developers or automating entire workflows. The most famous tool is probably GitHub Copilot. But instead of the Goliath, let’s focus on two other players who are loud in my bubble.&lt;/p&gt;
&lt;p&gt;I’ve used Cursor daily for a year now. Everyone at &lt;a href=&quot;https://fuszti.com/cursor-vs-windsurf-68m-vs-243m/palindrom.ai&quot;&gt;Palindrom&lt;/a&gt; uses Cursor. A couple of months ago, Windsurf from Codeium gained traction on social media, and many YouTube videos and X threads compared which one is the better AI code editor. Feature-wise, both deliver very similar capabilities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;VSCode forks, so you can use your favorite VSCode extensions in their code editor too&lt;/li&gt;
&lt;li&gt;There is an integrated chat panel where you can talk with the AI about the codebase&lt;/li&gt;
&lt;li&gt;They offer autonomous code editing by the AI, where the AI selects the right files and changes them based on your prompt&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Instead of performance comparison, let’s look behind the product and investigate them from the business perspective.&lt;/p&gt;
&lt;h2&gt;Importance of The Investors&lt;/h2&gt;
&lt;p&gt;There were a lot of utopian ideas at the beginning of the internet. Everybody could achieve success if they created good value. Like Friedman thought in his book, titled &lt;a href=&quot;https://en.wikipedia.org/wiki/The_World_Is_Flat&quot;&gt;The World Is Flat&lt;/a&gt;, a small dev team from India could compete with much larger companies because of the internet.&lt;/p&gt;
&lt;p&gt;Indeed new companies were born in that era. Some of them disappeared, like &lt;a href=&quot;https://en.wikipedia.org/wiki/Netscape&quot;&gt;Netscape&lt;/a&gt;, which is basically the Mozilla Organization in its previous life, some of them still exist like Google, Amazon or later Facebook. As &lt;a href=&quot;https://pogatsa.substack.com/p/digital-capitalism&quot;&gt;Pogi shows&lt;/a&gt; these companies succeeded largely because they raised huge amounts of investor money at the perfect time, not just because they had the best technology or were the most innovative.&lt;/p&gt;
&lt;p&gt;What will happen in the AI space? The next big thing in AI in the next couple of years will be AI coding. Or at least it seems so. Let’s explore the current AI coding companies’ investors and try to find out who will win.&lt;/p&gt;
&lt;h2&gt;Investment Rounds&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.startups.com/articles/series-funding-a-b-c-d-e&quot;&gt;The different stages of business have their own investment rounds.&lt;/a&gt; Each round represents a different maturity level for the startup. The first phase is seed funding, when the startup gets funding for its idea from angel investors.&lt;/p&gt;
&lt;p&gt;The first round when venture capitals show up is Series A, when the startup gets money for demonstrating the potential to grow and generate revenue.&lt;/p&gt;
&lt;p&gt;At Series B, the startup has proven market fit. They have customers. They raise money to scale up.&lt;/p&gt;
&lt;p&gt;Series C is about expanding to new markets, acquiring other businesses, or developing new products.&lt;/p&gt;
&lt;h2&gt;Behind Cursor&lt;/h2&gt;
&lt;p&gt;Anysphere, the company behind Cursor, &lt;a href=&quot;https://x.com/amanrsanger/status/1615539968772050946&quot;&gt;announced their product&lt;/a&gt; in January 2023, when everyone was excited about ChatGPT. The product arrived at the perfect time - developers wanted to experiment with AI tools.&lt;/p&gt;
&lt;p&gt;The investment history of Cursor tells us about a fast-growing company. &lt;a href=&quot;https://www.cursor.com/blog/openai-fund&quot;&gt;They got their seed funding&lt;/a&gt; - $8M - from OpenAI’s startup fund in 2023, and some notable angel investors joined like GitHub’s former CEO Nat Friedman and Dropbox co-founder Arash Ferdowsi.&lt;/p&gt;
&lt;p&gt;By August 2024, &lt;a href=&quot;https://www.cursor.com/blog/series-a&quot;&gt;they raised $60M&lt;/a&gt; in Series A led by Andreessen Horowitz (a16z). The fascinating part is who joined this round. Besides Thrive Capital, we can find Jeff Dean, Google’s chief scientist at DeepMind, and Noam Brown from OpenAI among the investors. Also, the founders of successful tech companies like Stripe, GitHub, Ramp, and Perplexity showed interest in the company.&lt;/p&gt;
&lt;p&gt;Their main investor, &lt;a href=&quot;https://a16z.com/&quot;&gt;Andreessen Horowitz&lt;/a&gt; (a16z), is not just another VC firm. Their portfolio shows they know how to spot the next big thing in tech. They invested early in Facebook, Instagram, and GitHub - all of which turned into massive successes. They were also early believers in Airbnb, Coinbase, and Slack.&lt;/p&gt;
&lt;p&gt;The caliber of individual investors - especially from the AI field - suggests a strong belief in their technical approach. This shows in their recent moves too, like the &lt;a href=&quot;https://www.cursor.com/blog/supermaven&quot;&gt;team up with Supermaven&lt;/a&gt; to improve their code completion capabilities. They’re clearly betting that technical excellence, backed by AI expertise, will be the key to winning the developer tools race.&lt;/p&gt;
&lt;p&gt;As of summer 2024, they have &lt;a href=&quot;https://a16z.com/announcement/investing-in-cursor&quot;&gt;thousands of users&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Behind Codeium&lt;/h2&gt;
&lt;p&gt;The company Codeium, behind the Windsurf product line, took a different path from their competitor. &lt;a href=&quot;https://codeium.com/blog/beta-launch-announcement&quot;&gt;They launched their VS Code extension&lt;/a&gt; in November 2022, basically at the same time when ChatGPT was released. In the first half year, they positioned themselves as a real enterprise option in the AI coding field, focusing on code privacy opportunities and on-premise deployment.&lt;/p&gt;
&lt;p&gt;Their company, developing the new Windsurf product, has raised &lt;a href=&quot;https://codeium.com/blog/series-c-annoucement&quot;&gt;$243 million after their Series C round&lt;/a&gt;, reaching a $1.25 billion post-money valuation. The investment rounds came quickly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Series A: April 2022&lt;/li&gt;
&lt;li&gt;Series B: January 2024&lt;/li&gt;
&lt;li&gt;Series C: August 2024&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Their investor lineup reads like a history book of tech investing. &lt;a href=&quot;https://www.kleinerperkins.com/&quot;&gt;Kleiner Perkins&lt;/a&gt; isn’t just one of Silicon Valley’s oldest VC firms - they spotted and backed companies that defined entire eras of technology. &lt;a href=&quot;https://www.kleinerperkins.com/case-study/amazon/&quot;&gt;They invested in Amazon when it was just an online bookstore&lt;/a&gt;, &lt;a href=&quot;https://www.kleinerperkins.com/case-study/google/&quot;&gt;Google when search engines weren’t a big deal yet&lt;/a&gt;, and backed newer success stories like &lt;a href=&quot;https://www.kleinerperkins.com/case-study/spotify/&quot;&gt;Spotify&lt;/a&gt;. They also have a keen eye for transformative software tools - they invested in Figma, which &lt;a href=&quot;https://news.adobe.com/news/news-details/2023/adobe-and-figma-mutually-agree-to-terminate-merger-agreement&quot;&gt;Adobe almost acquired for $20 billion&lt;/a&gt;, and Coursera, which revolutionized online education. They even invested in Netscape, which started the browser wars in the ’90s.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.generalcatalyst.com/&quot;&gt;General Catalyst&lt;/a&gt; brings a different kind of experience. They’re known for backing transformative companies like Airbnb and Stripe, but recently they’ve made a massive $8B bet on AI investments. Their portfolio includes other AI companies like Mistral AI, showing they understand where the technology is heading. The third investor, &lt;a href=&quot;https://greenoaks.com/&quot;&gt;GreenOaks Capital&lt;/a&gt;, founded in 2012, rounds out their investor list with expertise in global internet investments and B2B services.&lt;/p&gt;
&lt;p&gt;Codeium has 800,000+ active users and 1,000+ enterprise customers, &lt;a href=&quot;https://www.anthropic.com/customers/codeium&quot;&gt;according to Anthropic&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Foundational model providers like Anthropic and OpenAI are quickly becoming the equivalents of cloud giants such as Google, AWS, and Microsoft. Meanwhile, the successful product companies built on top of these AI platforms—akin to how Netflix and Uber leveraged cloud infrastructure—are still in their early stages. The next few years may well be the era in which new, large-scale AI product companies emerge and reshape the market.&lt;/p&gt;
</content:encoded></item><item><title>Building Robust AI Applications: A Multi-Level Testing Strategy for the Modern Developer</title><link>https://fuszti.com/building-robust-ai-applications-a-multi-level-testing-strategy-for-the-modern-developer/</link><guid isPermaLink="true">https://fuszti.com/building-robust-ai-applications-a-multi-level-testing-strategy-for-the-modern-developer/</guid><description>Learn how to implement robust testing strategies for AI-generated code. Discover techniques to ensure reliability when using advanced AI coding assistants like Cursor.</description><pubDate>Fri, 04 Oct 2024 17:41:31 GMT</pubDate><content:encoded>&lt;p&gt;In the rapidly evolving landscape of software development, AI-powered code editors are revolutionizing how we write code. While tools like GitHub Copilot have made waves, more advanced AI assistants like Cursor are pushing the boundaries even further, generating more code and often of higher quality. This leap in AI capabilities brings a new challenge: how do we maintain code reliability and quality when AI is producing code at unprecedented speeds? The answer is not new, it lies in a robust, multi-level testing strategy.&lt;/p&gt;
&lt;h2&gt;The AI Code Generation Revolution&lt;/h2&gt;
&lt;p&gt;AI-powered code editors have surpassed the capabilities of early tools like GitHub Copilot. Today’s advanced AI assistants can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Generate larger code blocks&lt;/li&gt;
&lt;li&gt;Understand context more deeply&lt;/li&gt;
&lt;li&gt;Produce more accurate and efficient code&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;While this accelerates development, it also increases the need for thorough testing. Let’s explore a testing strategy designed to keep pace with AI-generated code.&lt;/p&gt;
&lt;h2&gt;Multi-Level Testing: Your Shield Against AI-Induced Bugs&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Model-Level Testing: Verifying AI-Generated Units&lt;/li&gt;
&lt;li&gt;Module-Level Testing: Ensuring Cohesion of AI and Human Code&lt;/li&gt;
&lt;li&gt;System-Level Testing: Validating the Entire AI-Augmented Application&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Non-AI Example: Layered Application Architecture&lt;/h2&gt;
&lt;p&gt;Before diving into AI-specific challenges, let’s understand the foundation of a typical web application architecture:&lt;/p&gt;
&lt;p&gt;Repository Layer: Handles direct interactions with the database (DB).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Purpose: Provides an abstraction over data access.&lt;/li&gt;
&lt;li&gt;Operations: Exposes basic CRUD (Create, Read, Update, Delete) operations on data entities.&lt;/li&gt;
&lt;li&gt;Example methods: GetById(), Add(), Update(), Delete()&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Service Layer: Contains business logic and orchestrates the use of repositories.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Purpose: Implements higher-level application functionality and business processes.&lt;/li&gt;
&lt;li&gt;Operations: Exposes business operations that may involve multiple data operations or complex logic.&lt;/li&gt;
&lt;li&gt;Example methods: RegisterUser(), PlaceOrder(), GenerateReport()&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;API Layer: Exposes endpoints for client applications to interact with your service.&lt;/p&gt;
&lt;p&gt;This layered architecture provides several benefits:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Decoupling: Business logic is separated from data access details.&lt;/li&gt;
&lt;li&gt;Abstraction: The service layer acts as a facade over the repositories.&lt;/li&gt;
&lt;li&gt;Flexibility: Changes in one layer won’t necessarily affect other layers.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;The Problem&lt;/h2&gt;
&lt;p&gt;In traditional development, maintaining this architecture and ensuring each layer functions correctly is challenging but manageable. However, with the introduction of advanced AI-powered code editors like Cursor, which can generate code across all these layers at unprecedented speeds, new challenges arise:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Volume and Complexity: AI can quickly generate large amounts of code across all layers, making manual review and testing impractical.&lt;/li&gt;
&lt;li&gt;Architectural Integrity: Ensuring AI-generated code adheres to the intended architecture and doesn’t blur the lines between layers.&lt;/li&gt;
&lt;li&gt;Consistency: AI might generate slightly different implementations for similar problems across different parts of the application.&lt;/li&gt;
&lt;li&gt;Edge Cases and Error Handling: AI may overlook rare scenarios or proper error handling, especially in complex business logic.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Implementing the Strategy&lt;/h2&gt;
&lt;p&gt;Service Layer Testing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Objective: Verify that AI-generated business logic works correctly&lt;/li&gt;
&lt;li&gt;Approach: Use mock objects to isolate and test AI-created functions&lt;/li&gt;
&lt;li&gt;Benefit: Quickly catch logical errors in AI-generated code&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;API Endpoint Testing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Objective: Ensure AI-generated endpoints integrate seamlessly&lt;/li&gt;
&lt;li&gt;Approach: Automated tests for each AI-created or modified endpoint&lt;/li&gt;
&lt;li&gt;Benefit: Maintain API reliability despite rapid AI-driven changes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The AI-Specific Challenge:&lt;/p&gt;
&lt;p&gt;As AI generates more complex code, traditional testing methods may fall short. Consider:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Probabilistic Outputs: AI might generate slightly different code each time&lt;/li&gt;
&lt;li&gt;Edge Cases: AI may overlook rare scenarios humans would consider&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To address these, incorporate:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Fuzzy Assertions: Allow for minor variations in AI-generated code&lt;/li&gt;
&lt;li&gt;Extensive Edge Case Testing: Proactively identify and test boundary conditions&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Extending the Strategy to AI Applications&lt;/p&gt;
&lt;p&gt;As we move from traditional applications to those incorporating AI components, especially Large Language Models (LLMs), our testing strategy needs to evolve. The probabilistic nature of AI and its reliance on vast amounts of data introduce new complexities.&lt;/p&gt;
&lt;h2&gt;The Challenge of AI Testing&lt;/h2&gt;
&lt;p&gt;Testing AI applications involves a paradigm shift:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Testing vs. Evaluation:
&lt;ul&gt;
&lt;li&gt;Traditional Testing: Focuses on verifying code correctness (e.g., does function X return the expected output?).&lt;/li&gt;
&lt;li&gt;AI Evaluation: Measures the performance of AI models (e.g., accuracy, precision, recall).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Blurring the Lines: Modern AI development often integrates testing and evaluation. For instance, you might define tests that require the model’s performance to meet certain thresholds.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Testing Strategy for AI Apps&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Model-Level Evaluation (Prompt Evaluation):&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Objective: Assess the AI model’s outputs to ensure they meet desired performance criteria. Approach: Utilize specialized tools for prompt engineering and evaluation:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Braintrust:&lt;/strong&gt; A comprehensive suite of tools designed for testing and evaluating language models, with features focused on red teaming, pentesting, and security scanning. It allows developers to detect vulnerabilities like prompt injections, PII leaks, and more, making it a valuable resource for ensuring LLM security.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Promptfoo:&lt;/strong&gt; A tool built for systematic testing and evaluation of language model (LLM) prompts. It enables users to create test cases, evaluate LLM outputs side-by-side, and automate assessments. Its integration with CI/CD pipelines and support for various LLM APIs like OpenAI, Anthropic, and custom models make it flexible and powerful for improving prompt quality&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;System-Level Testing:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Objective: Verify that the AI component integrates well within the larger application. Approach:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Test interactions between the AI model and other system components (data pipelines, user interfaces, databases).&lt;/li&gt;
&lt;li&gt;Implement end-to-end tests that simulate real-world usage scenarios.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Best Practices for AI Application Testing&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Define Clear Metrics: Establish specific, measurable criteria for what constitutes success for your AI model (e.g., response relevance, factual correctness, tone consistency).&lt;/li&gt;
&lt;li&gt;Automate Evaluation: Incorporate AI model evaluations into your continuous integration/continuous deployment (CI/CD) pipeline. Tools like Braintrust can be integrated to run automated tests on your AI components.&lt;/li&gt;
&lt;li&gt;Set Performance Thresholds: Use evaluation results to create pass/fail criteria for your tests. For example, “The model must achieve at least 90% accuracy on this test set.”&lt;/li&gt;
&lt;li&gt;Version Control for Prompts&lt;/li&gt;
&lt;li&gt;Diverse Test Data: Ensure your test datasets cover a wide range of scenarios, including edge cases and potential biases.&lt;/li&gt;
&lt;li&gt;Monitor Live Performance: Implement logging and monitoring for your AI model in production, allowing you to catch and address performance degradation quickly.&lt;/li&gt;
&lt;li&gt;Regular Re-evaluation: As your AI model or the data it’s trained on evolves, regularly re-run your evaluation suite to ensure continued performance.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;By incorporating these AI-specific testing and evaluation strategies alongside the traditional testing approaches we discussed earlier, you can build robust AI applications that not only function correctly at a code level but also deliver reliable, high-quality AI-driven features. This comprehensive approach allows you to harness the power of advanced AI coding assistants like Cursor while maintaining stringent quality controls across your entire application.&lt;/p&gt;
&lt;h2&gt;The Hidden Superpower: Rapid AI Code Verification&lt;/h2&gt;
&lt;p&gt;With AI generating code at high speeds, your testing strategy becomes a crucial feedback loop:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Instant Validation: Immediately verify AI-generated code against requirements&lt;/li&gt;
&lt;li&gt;Consistency Checks: Ensure AI’s code aligns with project standards&lt;/li&gt;
&lt;li&gt;Error Prevention: Catch potential issues before they proliferate through AI suggestions&lt;/li&gt;
&lt;li&gt;Iterative Enhancement: Use test results to improve AI prompts and outputs&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Staying Ahead in the AI Coding Era&lt;/h2&gt;
&lt;p&gt;As AI-powered editors like Cursor surpass the capabilities of tools like GitHub Copilot, a robust testing strategy is no longer optional—it’s essential. By implementing multi-level testing tailored for AI-generated code, developers can harness the full potential of AI assistance while maintaining high standards of code quality and reliability.&lt;/p&gt;
&lt;p&gt;Remember: In this new era of AI-augmented development, the most successful teams will be those who can match the speed of AI with the thoroughness of their testing strategies.&lt;/p&gt;
</content:encoded></item><item><title>The AI Gold Rush: Why Your ChatGPT-Powered Dreams Aren&apos;t Paying $1,350 a Day</title><link>https://fuszti.com/chatgpt-business-myths-debunked/</link><guid isPermaLink="true">https://fuszti.com/chatgpt-business-myths-debunked/</guid><description>Debunking AI get-rich-quick schemes: Learn why ChatGPT-powered businesses aren&apos;t the easy money-makers they&apos;re hyped to be.</description><pubDate>Wed, 25 Sep 2024 20:20:48 GMT</pubDate><content:encoded>&lt;p&gt;In the fast-paced digital bazaar of the 21st century, yet another fables is heard in the corridors of YouTube and TikTok: “Get rich quick with AI!” It seems as if the words of this enchanting melody are saying that the profits are ready to be taken out of the computer monitors and into your wallet, even though it is just a fantasy. However, what can we understand by being “successful” in the time of artificial intelligence and e-commerce? Let’s be inspired by Socrates who once commented, “I only know that I know that I know nothing.” and let’s apply this philosophy to the AI age akin to the forty-niners gold-rush times.&lt;/p&gt;
&lt;h3&gt;The AI Business Bonanza: A Critical Overview&lt;/h3&gt;
&lt;p&gt;This “Book of Dead AI Business Ideas” that we would put together today is the bootstrap of a style book of crazy money-making ideas that only reflect their arguments in graphic design software, but actually they bring only digital dusts. These with-it pitchmen imply that the whole heroic business is to accomplish the ChatGPT task and in return to get a handsome profit of $1,350 per day, which happens to be the same as an ATM machine distributing money every time of the day. Of course, I am kidding, but seriously what if it was that easy to use prompts and have a software give us profits instead of hard work, is what one has to ask?&lt;/p&gt;
&lt;p&gt;And in any case, Selah, how easy it was, wouldn’t everybody already be living the dream and rocking on their personal islands?&lt;/p&gt;
&lt;h3&gt;The Siren Song of Easy Money&lt;/h3&gt;
&lt;p&gt;All over YouTube, the internet is teemed with DIY videos that clam the key to wealth is just AI technology:&lt;/p&gt;
&lt;p&gt;“Generate thousands of product ideas with one prompt!”&lt;/p&gt;
&lt;p&gt;“Create an Etsy empire with AI-designed T-shirts!”&lt;/p&gt;
&lt;p&gt;“Build a Shopify store that prints money while you sleep!”&lt;/p&gt;
&lt;p&gt;These online quacks play on our greed by promising financial independence, self-expression and the magic of making money while we don’t do anything. In other words, as it was well said by Horace, the Latin lyric poet, “He who is greedy is always in want.”&lt;/p&gt;
&lt;h3&gt;The Dangers of Instant Success as a Mirage&lt;/h3&gt;
&lt;p&gt;Consider this real-world example: A 16-year-old boy, inspired by TikTok “self-made teen millionaires,” convinced his mother to spend half her salary on a pair of sneakers he believed he could flip for profit. This anecdote illustrates the harmful impact of e-commerce gurus and their deceptive narratives. These influencers showcase their businesses, creating the illusion that success is solely about products, while obscuring the critical role of distribution and marketing.&lt;/p&gt;
&lt;p&gt;The reality is intuitive: no teenager should risk their family’s financial stability on a get-rich-quick scheme. The true path to business success is far more complex and demanding than simply acquiring a product to resell.&lt;/p&gt;
&lt;h3&gt;The Intricacies of Online Businesses that One Never Knows About&lt;/h3&gt;
&lt;p&gt;Successful online companies employ knowledge that goes beyond handling technical issues or AI-(artificial intelligence) generated material. Let’s look at some of them, e.g., these sobering statistics that act as if to say that there are many different aspects to reach e-commerce success. According to a recent Forbes article on small business statistics (&lt;a href=&quot;https://www.forbes.com/advisor/business/small-business-statistics/&quot;&gt;https://www.forbes.com/advisor/business/small-business-statistics/&lt;/a&gt;):&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Survival Rates:&lt;/strong&gt; Only about 50% of small businesses survive for five years or more. The point is that it is much better to run a business that really works in the long term instead of looking for a short-term quick fix.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Financial Management:&lt;/strong&gt; 29% of small businesses fail because they run out of cash. This points out the need for careful financial planning and finding ways to make money instead of the current methods of distribution and marketing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Home-Based Opportunities:&lt;/strong&gt; 50% of small business are home-based, implying that you are not compelled to acquire a huge physical premise in order to establish a prosperous online business. However, the concomitant of this is increased competition in the digital space.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Digital Marketing:&lt;/strong&gt; 74% of small businesses use social media for marketing. Meanwhile, such a number proves the crucial role that companies can play via their presence on the web, it also underlines the importance of advertising practices that are the most authentic and ethical amid the over-crowded digital space.&lt;/p&gt;
&lt;p&gt;The data successfully conveys that the key to success in online deals is not the quick yield of returns or track resources that can be sold off. It requires the sustainability of ways, creation of real bonds, and the adaptation of the merchandising of our goods to satisfy the real customer needs ethically and responsibly. The long and meaningful way is not the one with the shortcuts, but the one with the hard work, study, and good distribution tactics.&lt;/p&gt;
&lt;h3&gt;The Epicurean Trap of AI Business&lt;/h3&gt;
&lt;p&gt;Many AI business gurus advocate what we might call an “Epicurean” approach to entrepreneurship. In philosophy, Epicureanism suggests that the highest good is pleasure and the absence of pain. Similarly, these gurus promise maximum profits with minimum effort.&lt;/p&gt;
&lt;p&gt;Nonetheless, this perspective is flawed both in the field of business and in addressing some of the more meaningful challenges of life. The philosopher Miguel de Unamuno refuted the approach of viewing death from the Epicurean’s point of view, he grounded his argument in the idea that contending with the battles of life is the most preferable option to avoiding them. The intrinsic value of business is not the commission of problems skillfully dodged but the emotionally engaged solutions.&lt;/p&gt;
&lt;p&gt;Just as Unamuno advocated for a deeper and more engaged approach to life and death, we must also practice such introspection in business and show our dedication, willingness, and ability to solve complex problems. The road to meaningful success is not through short-cuts but through the hard work and still learning.&lt;/p&gt;
&lt;h3&gt;The Moral Aspects with Get-Rich-Quick Schemes&lt;/h3&gt;
&lt;p&gt;However, the moral side must not be overlooked too. Many of these AI schemes are in business as they are not solving real problems; most of the time they create artificial needs and manipulate the existing weaknesses. As entrepreneurs, we should ask ourselves: are we contributing value to society, or are we merely extracting wealth through clever marketing?&lt;/p&gt;
&lt;h3&gt;The Scenic Community to Real Triumph&lt;/h3&gt;
&lt;p&gt;So, what’s the aspiring entrepreneur to do in this age of AI and automation? First, recognize that while AI tools can enhance productivity, they’re not a substitute for business acumen. Second, focus on distribution: how will you reach your customers? How will you stand out in a crowded marketplace?&lt;/p&gt;
&lt;p&gt;Try not to allow the events of the past to slip from your mind, as George Santayana so famously said, “Those who cannot remember the past are condemned to repeat it.” Let’s not recreate the dot-com bubble or cry over the crypto siren. Rather, let’s take AI-led business with the fervour of Unamuno and the discerning of Socrates, both recognizing the pros and cons.&lt;/p&gt;
&lt;p&gt;Keep in mind, real success in online business is not about how soon you can produce but rather, about how effectively you can distribute. It’s not about chasing trends; it’s about creating lasting value. And most importantly, it’s not about getting rich quick; it’s about building a sustainable business that generates real income through solving real problems.&lt;/p&gt;
&lt;h3&gt;Help me find the most ridiculous tutorials&lt;/h3&gt;
&lt;p&gt;Are you tired of seeing misleading “get-rich-quick with AI” schemes? Let’s create a “Wall of Awareness” to educate others about these deceptive practices. Share in the comments below examples of AI business tutorials or courses that promised unrealistic results. By collecting these stories, we can help to aspire entrepreneurs avoid costly mistakes and focus on building genuine, sustainable businesses. Together, we can promote ethical entrepreneurship in the AI age.&lt;/p&gt;
</content:encoded></item><item><title>Boosting Development Speed with AI Coding Tools: A Practical Example</title><link>https://fuszti.com/using-ai-coding-tools-for-faster-development-example/</link><guid isPermaLink="true">https://fuszti.com/using-ai-coding-tools-for-faster-development-example/</guid><description>Discover how AI coding tools like Cursor Code Editor and Codium AI can accelerate your development process. Learn how to implement features, automate test generation, and refine code efficiently with practical examples and detailed insights.</description><pubDate>Tue, 23 Jul 2024 17:45:55 GMT</pubDate><content:encoded>&lt;p&gt;At the &lt;a href=&quot;https://www.palindrom.ai/&quot;&gt;Palindrom&lt;/a&gt;, we do not just develop and mentor the AI based solutions, but using tons of existing tools in our daily job. I have been using AI coding tools for at least six months in my day-to-day tasks. In this blog post, I want to show a real-life example of how an AI engineer uses AI for coding in an existing project.&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Problem: Challenges in Implementing a Book Sorting Feature with AI Assistance&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;In the &lt;a href=&quot;https://github.com/BookStackApp/BookStack&quot;&gt;BookStack&lt;/a&gt; application, a feature request was made to add a sorting option by popularity for the books view. Popularity would be measured by how often a book gets opened or loaded. This feature aims to improve user experience by allowing users to easily find the most accessed books, enhancing the utility of the application, especially for those managing large volumes of content. The challenge involved integrating this sorting functionality into both the frontend and backend systems while ensuring accurate data handling and efficient performance.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Original Feature Request&lt;/strong&gt;: &lt;a href=&quot;https://github.com/BookStackApp/BookStack/issues/1712&quot;&gt;Sorting option “Popularity”&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Used AI coding tools&lt;/h2&gt;
&lt;h3&gt;&lt;strong&gt;Cursor Code Editor:&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;The Cursor code editor offers powerful features like the Ctrl+K editing mode, which allows developers to directly modify code with AI assistance. This mode leverages the current file context to provide relevant suggestions and presents a diff view for reviewing changes. Additionally, the Ctrl+Shift+L chat panel mode enables interactive AI conversations within the editor, helping developers debug, refactor, and understand their code more efficiently.&lt;/p&gt;
&lt;h3&gt;Codium AI:&lt;/h3&gt;
&lt;p&gt;Codium AI’s test generator UI streamlines test creation by automating the process. Initiating test generation through the UI opens an advanced panel that lists detected behaviours and generates corresponding tests. Developers can refine these tests, add new ones, and run them directly within their development environment. This ensures comprehensive test coverage and improves code reliability, significantly reducing the manual effort required for writing and maintaining tests.&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Implementing the Popularity Sorting Feature with AI Tools&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Understanding and Implementing Complex Features:&lt;/strong&gt; The task required sorting books by various criteria such as name, creation date, and update date, and now by popularity. Implementing this feature involved both frontend display logic and backend data handling. I am not an experienced php developer. And the codebase is totally new to me. But the feature request references an existing feature, that is a good starting point to figure it out what I should do.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AI Approach:&lt;/strong&gt; Using Cursor, I can ask how the “Popular books” section works on the webpage. (Please don’t forget to use the “with codebase” context, that makes AI search in the codebase itself instead generating a general answer.) Exploring the answer, I found a crucial function, called &lt;em&gt;popularForList&lt;/em&gt;, that I could use the next prompt. A very effective method to guide the AI is showing examples. So when I asked, how I could implement the feature, I selected the &lt;em&gt;popularForList&lt;/em&gt; function and I added to the chat with CTRL+SHIFT+L. It is a good example, how the view count is used in the codebase.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;&quot; width=&quot;383&quot; height=&quot;1157&quot; src=&quot;https://fuszti.com/_astro/Screenshot-from-2024-07-22-16-28-20.Bzt8f33b_Z4KWMm.webp&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Generating Tests&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Creating tests to ensure the sorting functionality worked correctly was another challenge.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AI Approach:&lt;/strong&gt; Codium AI generated unit tests based on the described behaviour, covering sorting by name, creation date, and now popularity. Despite challenges like parsing HTML instead of JSON, AI tools were crucial in managing these complexities.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Integrating Tests and Handling Dependencies:&lt;/strong&gt; But the problem is that the unit tests have a predefined test database. They are more like integration tests. Which is fine, I like the real-like looking tests. The generated tests by the Codium AI assumed they are totally independent unit tests.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AI Approach:&lt;/strong&gt; Cursor helped me to debugging the issue and adding the proper php lines to get isolated tests. But I had to realize, the frontend uses different endpoint for the for sorting, than my book entity tests. AI coding tools or not, realizing this took too much time… It is what it is. I specified the prompt in Cursor to using the proper endpoint in the tests brought me the good direction.&lt;/p&gt;
&lt;p&gt;I got some tests for sorting name, and creation time. These features were already implemented before my work, but they had no tests. So I added them. &lt;a href=&quot;https://www.codium.ai/blog/revolutionizing-test-automation-with-codium-ai-for-open-source-php-projects/&quot;&gt;Codium AI is pretty useful, when you want to augment your existing tests.&lt;/a&gt; I think this feature of it that I use most of the time.&lt;/p&gt;
&lt;h2&gt;Final touch&lt;/h2&gt;
&lt;p&gt;The code analyser that is connected to the repository was not satisfied with the code I pushed. The method that I changed became too long. But I just copied the code analyser message after I selected the method and pasted into the CTRL+K edit mode. It wrote the necessary helper functions to decrease the length of the method.&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;This experiment demonstrates the significant benefits of AI tools like Cursor and Codium AI in software development. By automating repetitive tasks, generating context-specific suggestions, and assisting with test creation, these tools help developers focus on more complex and creative aspects of their projects. Embracing AI in your development workflow can lead to enhanced productivity, better code quality, and a more streamlined development process. As AI technology continues to evolve, its integration into software development will undoubtedly become even more indispensable. I leave here the pull request, if you want to see the final code that the AI wrote: &lt;a href=&quot;https://github.com/BookStackApp/BookStack/pull/5132&quot;&gt;https://github.com/BookStackApp/BookStack/pull/5132&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/BookStackApp/BookStack/issues/1712&quot;&gt;Original Feature Request&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/BookStackApp/BookStack&quot;&gt;BookStack Repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.codium.ai/blog/revolutionizing-test-automation-with-codium-ai-for-open-source-php-projects/&quot;&gt;Codium AI blogpost&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/BookStackApp/BookStack/pull/5132&quot;&gt;My pull request&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.cursor.com/&quot;&gt;Cursor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.codium.ai/&quot;&gt;Codium AI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><category>tutorial</category></item><item><title>Can AI Outsmart Church?</title><link>https://fuszti.com/can-ai-outsmart-church/</link><guid isPermaLink="true">https://fuszti.com/can-ai-outsmart-church/</guid><description>Let me show you the ChatGPT is not exception from the halting problem. I demonstrate it on the knapsack problem.</description><pubDate>Mon, 16 Oct 2023 20:16:18 GMT</pubDate><content:encoded>&lt;p&gt;Today, AI isn’t just limited to voice assistants or smart homes; it’s venturing into the realm of coding. Numerous AI tools, primarily powered by LLMs, are emerging to generate code. GitHub’s Copilot was one of the pioneers in this space. Yet, like all code, it’s essential that AI-generated scripts are checked and validated to ensure they function correctly. This aligns with the traditional approach in professional coding, where every piece of code is reviewed by peers. What makes LLMs stand out is their vast exposure to a plethora of code samples online. This vast knowledge helps them predict the next step in a coding sequence. Surprisingly, they can even tackle challenging algorithmic problems, like the knapsack issue, a famous NP-hard problem. But can the AI solve the problem for given input?&lt;/p&gt;
&lt;h2&gt;Knapsack problem&lt;/h2&gt;
&lt;p&gt;Given a set of items, each with a weight and a value, determine the number of each item to include in a knapsack so that the total weight doesn’t exceed a given weight capacity while maximizing the total value.&lt;/p&gt;
&lt;h2&gt;Program Guesses the Output of Another Program&lt;/h2&gt;
&lt;p&gt;American mathematician &lt;a href=&quot;https://en.wikipedia.org/wiki/Alonzo_Church&quot;&gt;Alonzo Church&lt;/a&gt; found problems, that can not be decided by algorithms. Predicting whether a program will run indefinitely or eventually stop is undecidable. This means that based on its code, a program can’t determine if another program will terminate. This is known as the halting problem. A primary complication related to this issue is self-reference, reminiscent of dilemmas such as Gödel’s incompleteness theorem and the computation of Kolmogorov complexity. Suppose we have a hypothetical function H(p, i) that indicates whether program p will terminate for input i in a finite amount of time. Then consider a function, g.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;def&lt;/span&gt;&lt;span&gt; g&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;x&lt;/span&gt;&lt;span&gt;):&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    if&lt;/span&gt;&lt;span&gt; h&lt;/span&gt;&lt;span&gt;(i,i):&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        loop_forever&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    else&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        return&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now, reflect on the paradox of g(g). If h(g, g) returns true, indicating termination in finite time, it would lead to a never-ending loop, which contradicts its output. Conversely, if h(g, g) is false, suggesting the function runs indefinitely, it would terminate, which is also contradictory. Due to this paradox, we cannot assume the existence of a program that reliably predicts another program’s termination within a finite timeframe.&lt;/p&gt;
&lt;h2&gt;Can ChatGPT Guess The Output of Another Program?&lt;/h2&gt;
&lt;p&gt;I gently asked the ChatGPT to write a Python code, that solves the knapsack problem. It writes the correct code. After I asked to guess the output of the code it wrote on given inputs.&lt;/p&gt;
&lt;p&gt;My experiments are not well designed evaluation. I had 9 different size knapsack problems. The first 3 problem had maximum 10 items, the others were much bigger problems with thousands of items. ChatGPT imidiately started to interpret the big input as a totally different data, like temprature values. I had to prompt engineer to keep its focus on the original problem. After that it still failed with finding the correct solution. So I just tested one big input.&lt;/p&gt;
&lt;p&gt;You find the 3 small problems at the end of the blogpost. The 3-item problems were succesfully solved by ChatGPT, but the 10-item problem was failed. The predicted sum of units was over the capacity and I tried to explain this to it, but the 2nd or 3rd trials were also fails.&lt;/p&gt;
&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Problem 1&lt;/strong&gt;:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Capacity&lt;/strong&gt;: 4 units&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Items&lt;/strong&gt;:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Value = 1,&lt;br /&gt;Weight = 4&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Value = 2,&lt;br /&gt;Weight = 5&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Value = 3,&lt;br /&gt;Weight = 1&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Problem 2&lt;/strong&gt;:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Capacity&lt;/strong&gt;: 3 units&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Items&lt;/strong&gt;:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Value = 1,&lt;br /&gt;Weight = 4&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Value = 2,&lt;br /&gt;Weight = 5&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Value = 3,&lt;br /&gt;Weight = 6&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;&lt;strong&gt;Problem 3&lt;/strong&gt;:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Capacity&lt;/strong&gt;: 50 units&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Items&lt;/strong&gt;:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Value = 17,&lt;br /&gt;Weight = 36&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Value = 14,&lt;br /&gt;Weight = 33&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Value = 2,&lt;br /&gt;Weight = 3&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Value = 10,&lt;br /&gt;Weight = 18&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Value = 14,&lt;br /&gt;Weight = 42&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Value = 5,&lt;br /&gt;Weight = 45&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Value = 12,&lt;br /&gt;Weight = 46&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Value = 10,&lt;br /&gt;Weight = 46&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Value = 19,&lt;br /&gt;Weight = 20&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Value = 5,&lt;br /&gt;Weight = 28&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;You can fit only the item 3 in the Problem 1, so the value you can put in the knapsack is 3. In the Problem 2 each item has bigger weight, than the capacity, so the result is 0. Problem 3 is left as an exercise for the reader.&lt;/p&gt;
</content:encoded></item><item><title>Midjourney is just a brush?</title><link>https://fuszti.com/midjourney-is-brush/</link><guid isPermaLink="true">https://fuszti.com/midjourney-is-brush/</guid><description>From Michelangelo to AI: A creative journey in digital art. Why can you say that an AI generated image is art?</description><pubDate>Sat, 18 Feb 2023 15:52:40 GMT</pubDate><content:encoded>&lt;p&gt;Over the past month and a half, I have been working with stable diffusion models, exploring both their technical and creative potential as “AI artists.” As I reflected on this term, I realized that the design of these deep learning models brings together several years of professional breakthroughs, with training on enormous amounts of images and fine-tuning techniques. Although the AI can generate astonishing images, making it generate what I want is a lot of work. In this article, I want to share some of my thoughts on the creative process involved, not as a tutorial or a step-by-step guide, but as a reflection on my own experiences.&lt;/p&gt;
&lt;h2&gt;The kid who hated to draw&lt;/h2&gt;
&lt;p&gt;As a child, I often had to do drawing tasks in kindergarten, which I hated, especially when it came to drawing people. Most of the people around me were white, and whenever I tried to draw their faces using a brown pencil, they turned out black. Even when I copied other kids’ techniques and used a pink pencil, it still looked unnatural. But it’s fine, everybody did the same.&lt;/p&gt;
&lt;p&gt;Then something happened. It was a general drawing session in the kindergarten, but different. We got red paper. And it made me so exited. It was so interesting. The task was to draw our gymnastics lessons, where we wore white T-shirts. Of course, my drawings were still weird and unnatural, like a kid’s drawing, but when I tried to use the pink pencil trick on the faces, it didn’t work. You can imagine how the pink color looked on red paper. So my entire drawing career as a five-year-old boy was a tragedy.&lt;/p&gt;
&lt;h2&gt;Later nothing has changed&lt;/h2&gt;
&lt;p&gt;I enjoyed school and was good at math, but I still struggled with art. I remember origami-ing a ship with a chimney for a technics lesson and receiving a 3 out of 5 grade, which was my worst grade at the time. I followed the instructions carefully, but the result was not what it was supposed to look like.&lt;/p&gt;
&lt;p&gt;My fiancée also points out how bad my photos are. Once, I stopped on a bridge to take a picture of the big moon in the night sky. I thought it would be simple.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You see the big moon with your eyes.&lt;/li&gt;
&lt;li&gt;You put the camera to your eyes, so the camera sees the same.  &lt;/li&gt;
&lt;li&gt;Take a picture&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;But no matter how hard I tried, the huge moon always turned out small in my photos. I have a collection of photos of small moons from the past years. This is an example of how different observers see the world in different ways.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;&quot; width=&quot;2040&quot; height=&quot;1150&quot; src=&quot;https://fuszti.com/_astro/330929251_582532060402402_8497416275460420650_n.BA1ZJ9J1_Z2wNNyX.webp&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Absolutely bad picture about the moon&lt;/p&gt;
&lt;h2&gt;Directing short film&lt;/h2&gt;
&lt;p&gt;In secondary school, I directed a short film about the Hungarian revolution of 1848. The task was to create a few-minute movie with a given narrator speech. My feelings about the result are mixed. I didn’t know enough about politics at that age, so my concept was a simple poor-rich conflict, which was too superficial. My friends and I played the roles, which was what it was. But I enjoyed the process of directing.&lt;/p&gt;
&lt;p&gt;I have always preferred movies to theater because they seem more real to me, even with their visual effects. The loud speaking and exaggerated gestures in theater seem too artificial. But as I became an adult, I learned that the language of theater is not meant to copy reality, and that movies are far, far away from reality, even with their characters. Many characters are simple archetypes, without any real personality.&lt;/p&gt;
&lt;p&gt;Whatever that experience that I directed a film, where the cameraman records the picture well. The images don’t looked like a 5-year-old kid’s drawing meant a lot to me.&lt;/p&gt;
&lt;h2&gt;The joy for me in AI artist processes&lt;/h2&gt;
&lt;p&gt;I believe you can discover what AI art is for now. AI art has the potential to create visually appealing results. I mainly focus on high-level creative processes rather than line drawing, color techniques, etc. Unlike photography, I do not have to travel to the target object’s location.&lt;/p&gt;
&lt;p&gt;Of course, it requires new skills to put together a good dataset for fine-tuning. For instance, my initial cover photo idea was Michelangelo painting on a computer screen with brushes. I had to find the appropriate prompt for text-to-image conversion, fix the resulting image using image-to-image translation, and then outpaint to fit the cover photo size. I used Midjourney to get a base image, then input a stable diffusion v1.5 model for the image-to-image process.&lt;/p&gt;
&lt;p&gt;Creating good AI arts are not different to any other arts. You have to be a good craftsman in the art’s own technics. You have to be able to define something, you want to show, not just on level of the prompt, but on the level of message you want to convey through your image. Perhaps you can not deliver as many messages as Hieronymus Bosch did in one painting &lt;strong&gt;yet&lt;/strong&gt;. The artists always used the available tools in their era. We live an era, where the AI is an available tool.&lt;/p&gt;
</content:encoded></item><item><title>The best ways to validate your SaaS business idea</title><link>https://fuszti.com/market-validation-techniques/</link><guid isPermaLink="true">https://fuszti.com/market-validation-techniques/</guid><description>I have been big fan of small feedback loops in development and research.</description><pubDate>Wed, 16 Nov 2022 21:09:23 GMT</pubDate><content:encoded>&lt;p&gt;I have been big fan of small feedback loops in development and research. This mindset will be beneficial if you work machine learning. After reading the &lt;a href=&quot;https://www.amazon.com/Start-Small-Stay-Developers-Launching/dp/0615373968&quot;&gt;Start small, stay small&lt;/a&gt; book, the most important one from &lt;a href=&quot;https://fuszti.com/my-5-take/&quot;&gt;my takeaways&lt;/a&gt; was the way how I can implement the feedback loop mindset in the early stages of a business.&lt;/p&gt;
&lt;h2&gt;What others do&lt;/h2&gt;
&lt;p&gt;I cherry-picked some technics from &lt;a href=&quot;https://microconf.com/state-of-indie-saas&quot;&gt;Microconf’s survey&lt;/a&gt; to get an overview.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;33% Built a prototype or MVP&lt;/li&gt;
&lt;li&gt;20% Asked their audience&lt;/li&gt;
&lt;li&gt;9% No validation&lt;/li&gt;
&lt;li&gt;9% Pre-sales&lt;/li&gt;
&lt;li&gt;9% Verbal commitments&lt;/li&gt;
&lt;li&gt;7% Copied a competitor&lt;/li&gt;
&lt;li&gt;7% Landing page&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Most of the time building an MVP costs too much time. By definition an MVP delivers value for the customer. That means you created the first version of your product. Therefore, you will make money from it if you reach the market. &lt;strong&gt;But there can be a huge chance that the market does not exist or is too small&lt;/strong&gt;. You should follow the causality, and you should build your product after you have signals about that you can find paying customer.&lt;/p&gt;
&lt;p&gt;Having an audience is an &lt;a href=&quot;https://www.goodreads.com/book/show/50714359-the-unfair-advantage&quot;&gt;unfair advantage&lt;/a&gt;. No validation is not validation. Pre-sales is a two-edged sword, I would skip that now. Instead, in this post I’m highlighting the last 3 technics.&lt;/p&gt;
&lt;h2&gt;Landing page&lt;/h2&gt;
&lt;p&gt;Create a mini sales site for your (unstarted) product. Most of the paying customers are not who see your product at first time. Therefore, the goal of your sales site is to convince the reader that your product is worth of their attention. But convincing to buy it immediately is an irrational acceptance. Just convince them to check the updates and subscribe on the product’s newsletter on the landing page.&lt;/p&gt;
&lt;p&gt;Rob’s advices in the Start small, stay small book:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In a successful sales website, every page has a single, primary call to action. That is, an action you want your user to take.&lt;/strong&gt;&lt;br /&gt;
Further best practices for the Sales Site:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Everything should be within &lt;strong&gt;2 clicks&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Make buttons look like buttons. Make your buttons so clickable that people can’t help but click them. :D&lt;/li&gt;
&lt;li&gt;No One reads. &lt;strong&gt;Text is a terrible selling tool; audio, video and images are always better.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The most popular no-code solution for this is the &lt;a href=&quot;https://webflow.com/&quot;&gt;Webflow&lt;/a&gt;. It is worth not just in the case when you lack of coding skill, but you can save time on web design and the deployment / hosting parts too. You may avoid the sales site building if you organize online meetups or presentation in the topic of your business idea. And you can estimate the number of potential customers based on the number of viewers.&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;You need traffic to your site, read some tips about how&lt;/summary&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=31U9X_XD63c&quot;&gt;Rob’s video&lt;/a&gt; mentions some channels that you can use generate traffic on your sales site.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.indiehackers.com/&quot;&gt;Indie Hackers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://microconf.com/connect&quot;&gt;https://microconf.com/connect&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.reddit.com/&quot;&gt;Reddit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.quora.com/&quot;&gt;Quora&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Beyond the traffic you can get, there are many useful feedbacks about your idea on the channels above. For further tricks you can read the instructions on &lt;a href=&quot;https://www.thegrowthlist.co/growth-tactics&quot;&gt;Growthlist&lt;/a&gt;.&lt;/p&gt;
&lt;/details&gt;
&lt;h2&gt;Verbal commitments&lt;/h2&gt;
&lt;p&gt;You can make cold calls, just scheduling coffee with people who may be interested in your product on LinkedIn. But you can ask the opinions in your network. An example for an email from &lt;a href=&quot;https://youtu.be/31U9X_XD63c?t=650&quot;&gt;Rob&lt;/a&gt; that you can send to someone in your network:&lt;/p&gt;
&lt;p&gt;“I have a question for you: would you be up for giving me your thoughts on an idea that I’m exploring?&lt;/p&gt;
&lt;p&gt;[2-line description]&lt;/p&gt;
&lt;p&gt;I’m not looking for general feedback, but more of a ‘would you pay $X per month for this service if it had features…?’”&lt;/p&gt;
&lt;h2&gt;Reimplement something that has been existed&lt;/h2&gt;
&lt;p&gt;This is a sneaky lifehack. You can skip the idea validation part by this. As a company increases the feature set of its product, its ability to focus on specific use cases is decreased. So, if you find an existing products’ use-case  that you would like to rebuild better and offer it cheaper, then you will be able to sell. The demand for that is already proven by the existence of the feature in another profitable product.&lt;/p&gt;
&lt;p&gt;Where you can browse existing SaaS companies?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.producthunt.com/&quot;&gt;https://www.producthunt.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://growthlist.co/b2b-saas&quot;&gt;https://growthlist.co/b2b-saas&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.saasmag.com/saas-1000/&quot;&gt;https://www.saasmag.com/saas-1000/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://appsumo.com/&quot;&gt;Appsumo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I recommend &lt;a href=&quot;https://www.youtube.com/watch?v=38f6Vp3fO3o&amp;amp;t=290s&quot;&gt;this video&lt;/a&gt;, if you are interested in this way.&lt;/p&gt;
</content:encoded></item><item><title>My 3 Takeaways From a Startup Guide</title><link>https://fuszti.com/startup-guide/</link><guid isPermaLink="true">https://fuszti.com/startup-guide/</guid><description>Rob Walling has already built several startups. I highlight my 3 takeaways from his book &quot;A Developer&apos;s Guide to Launching a Startup&quot;</description><pubDate>Sun, 13 Nov 2022 10:52:54 GMT</pubDate><content:encoded>&lt;p&gt;Rob Walling is a serial entrepreneur, who has already built several startups. &lt;a href=&quot;https://www.youtube.com/c/MicroConf/featured&quot;&gt;His YouTube channel&lt;/a&gt; delivers many good practices about how you can build SaaS businesses as a microentrepreneur. His book &lt;a href=&quot;https://www.amazon.com/Start-Small-Stay-Developers-Launching/dp/0615373968&quot;&gt;Start Small, Stay Small: A Developer’s Guide to Launching a Startup&lt;/a&gt;  is a decent startup guide. It is like your first week in a new job. It presents to you the different tasks you will face while you building a startup on the business side.&lt;/p&gt;
&lt;h2&gt;0. The core idea&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;An entrepreneur is a dreamer. A manager focuses on &lt;a href=&quot;https://www.investopedia.com/terms/r/returnoninvestment.asp&quot;&gt;ROI&lt;/a&gt;. A technician creates the product. You need to provide each role for a business.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Most of us from the target audience of the book probably think that coding is something like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;Gigachad meme about wrong mindset from the introduction in startup guide book.&quot; width=&quot;888&quot; height=&quot;500&quot; src=&quot;https://fuszti.com/_astro/6zrcgz.DkVfZeJW_2nPKFj.webp&quot; /&gt;&lt;/p&gt;
&lt;p&gt;But the reality is the following. The user will use the program you write. A good CI/CD provides the product to the user. Marketing informs the potential user about the product. The market provides the potential user itself. Like a Hungarian folk tale (with subtitles).  The conclusion is the following priority list that makes your startup successful.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Market&lt;/li&gt;
&lt;li&gt;Marketing&lt;/li&gt;
&lt;li&gt;Aesthetic&lt;/li&gt;
&lt;li&gt;Functionality&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;1. Market validation&lt;/h2&gt;
&lt;p&gt;The idea is not the hard part. I know, each success story begins with The Idea, which is only necessary, but not sufficient. The end result is sufficient because of the people who demand and &lt;strong&gt;pay&lt;/strong&gt; for it. And the hard part is that you have to implement the idea to provide something for the users they want.&lt;/p&gt;
&lt;p&gt;If you have read the &lt;a href=&quot;https://www.amazon.com/Lean-Startup-Entrepreneurs-Continuous-Innovation/dp/0307887898&quot;&gt;Lean Startup&lt;/a&gt;, then you will be familiar with the importance of untested hypothesis. If you haven’t, then let me suggest the habit to collect data to accept or reject your presumption instead of just believing in them.  So what you can do in &lt;a href=&quot;https://www.thoughtworks.com/insights/articles/how-implement-hypothesis-driven-development&quot;&gt;Hypothesis-driven development&lt;/a&gt;, you have to do in making business decisions. And your very first assumption has to be that there are enough people who will pay for the implemented idea. Following the lean way, you should avoid the waste. And building a product for that nobody pays is definitely a waste.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Hey, if you want to build something just for fun, then do it. But then you can not expect people to pay for it. Because building something just for fun is just a test for the hypothesis “I will enjoy building this thing”.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;2. Take your time seriously&lt;/h2&gt;
&lt;p&gt;The buzzword “work-life balance” hides many things. My initial mindset always promoted my work hours in my 9-5 job as it is. I sold those hours to a company. So I was bad at finding the correct sales speech about doing anything I want in my professional life. Out of my working hours I wanted to spend time with further professional questions, but I also wanted to spend time with my girlfriend and friends. So I quit. Therefore, I get back the all 168 hours on a week. As my best friend phrases, I invest into my entrepreneurship all the money that I haven’t earned since I quit.&lt;/p&gt;
&lt;p&gt;How can you estimate your time if you are not paid after working hours? Rob’s technic is the perfect solution this. Define an hourly rate that feels okay, with that you can calculate when you have to decide something is worth to do by yourself or not.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;Suprising face on payment rate mindset from the startup guide book.&quot; width=&quot;2000&quot; height=&quot;1035&quot; src=&quot;https://fuszti.com/_astro/pexels-oliver-schmid-4394294-1.DjhK-oHl_Z1t9pzP.webp&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Let&apos;s have a fictive hour rate payment, what a good idea!&lt;/p&gt;
&lt;p&gt;Seriously, this method represents well the initial goal of itself. You need solutions for the essential problems, but you need implementations to achieve the solutions. Is it essential to have precise conversion between your time and money? No, it isn’t. Is it essential to make decisions how to do something? Yes, it is. Does it help to evaluate the situation and encourage you to choose a way how you do the next step: outsource that, implement by yourself, how you define your requirements for the next tasks? Yes it does. And that’s enough, finding a precise way how you measure your time in money is a waste of time. So it’s waste of money.&lt;/p&gt;
&lt;h2&gt;3. Route of the customer to buy your product&lt;/h2&gt;
&lt;p&gt;You must have a sales site. The book provides a pretty decent page architecture for it. How you can encourage the user to take actions on your site.  But the main message of the book is the route of the customer to buy your product.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;People who see your URL&lt;/li&gt;
&lt;li&gt;Site visitors&lt;/li&gt;
&lt;li&gt;Prospects, who are interested in your features&lt;/li&gt;
&lt;li&gt;Buyers, who are convinced in that your product will help them&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And no, most of the buyers are not visitors that land your site first time. &lt;strong&gt;You have to optimize your site for the users to come back later&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;And here it comes the importance of the newsletters. Your sale site has to convince the user about that your product is worthy for her email address. (Be fair, and use the email address for the purpose you got, inform the user transparently about your product!)&lt;/p&gt;
&lt;p&gt;Maintaining the traffic to your product is essential. The offered strategy by the book is the following.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A mailing list: it’s a marketing requirement for startups&lt;/li&gt;
&lt;li&gt;A blog, podcast or vlog&lt;/li&gt;
&lt;li&gt;Organic search&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The book gives some hints about the SEO (search engine optimization) for reaching more potential customer. I think this topic is so huge and character wasting to start that in this post.&lt;/p&gt;
&lt;h2&gt;Further things that I did not mention but are in the book&lt;/h2&gt;
&lt;p&gt;The journey on that you can develop the skill of outsourcing. Practical advices about how to find and work with virtual assistants. What happens after you launch the startup: automatization or selling the startup? And beyond the “theory” the book contains multiple examples to prove its statements.&lt;/p&gt;
&lt;h2&gt;Do I recommend the book?&lt;/h2&gt;
&lt;p&gt;Yes. It is old, but gold (it’s written in 2011). After reading it I noticed on myself I am able to define next steps to start a business somewhere. It introduced different buzzwords and topics that I should focus on. After all I am onboarded in my new job, being an entrepreneur. Now I am just the new colleague who is not productive in the first half year. :)&lt;/p&gt;
</content:encoded></item><item><title>How to create your React Native devcontainer with REST API</title><link>https://fuszti.com/how-to-create-your-react-native-devcontaiener-with-rest-api/</link><guid isPermaLink="true">https://fuszti.com/how-to-create-your-react-native-devcontaiener-with-rest-api/</guid><description>My container fetish A long time ago, in secondary school my computer was a Swiss army knife.</description><pubDate>Thu, 03 Nov 2022 11:20:29 GMT</pubDate><content:encoded>&lt;h2&gt;My container fetish&lt;/h2&gt;
&lt;p&gt;A long time ago, in secondary school my computer was a Swiss army knife. I had to install everything I needed, even if I needed it only for a weekend. The worst part is that when you install a python package for that one file in one project, you hit the pip install, and then keep the packages forever. I always thought “ah man, I should clean this”. Then I met with Docker. Wrap your dependencies in one image. I thought “hm, interesting, but is it an issue to install those dependencies?” Then I worked in a team, where we had a development container, and each random package that we ever used was in a Docker image. And I thought “wow, interesting”. Then I played some round with a game, called Kubernetes, where the hardware became something like the air for the sound. It was only just a medium. My thought was “wow, it’s amazing”.&lt;/p&gt;
&lt;p&gt;So if you want to get the reasons why you should use Docker, you can find the answer on the internet. Just type “why I should use Docker” in your favourite search engine. I am just a notorious containerizing person. So when I decided to create my first mobile app, then I knew that my first step to start the development is creating a devcontainer.&lt;/p&gt;
&lt;h2&gt;My uneducated guess&lt;/h2&gt;
&lt;p&gt;I have never created mobile app before. But I made some experiments with the React JS and I had some work with REST API writing. So I chose the lazy solution, I wanted the React Native to be part in my stack. I started to catch up the basics of the web dev by taking &lt;a href=&quot;https://www.udemy.com/course/the-complete-web-development-bootcamp&quot;&gt;Angela’s course&lt;/a&gt; where the backend was written in express. I used that in a hackathon previously, so I thought the best opportunity is to rest my basic FastAPI knowledge and use express. I knew all thing that I need is just creating a typical Node JS docker image. I think it’s pretty common in web development.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;&quot; width=&quot;2000&quot; height=&quot;1333&quot; src=&quot;https://fuszti.com/_astro/nodejspic.Brm8RU_9_ZCRDjj.webp&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;The final test that I want to pass&lt;/h2&gt;
&lt;p&gt;I assumed I would do multiple projects with React Native, so I decided I create a template repository for this. I always define some test tasks as a goal when I create a Docker image. Being totally newbie in React Native, I looked around on the internet. What could be better goal for a React Native devcontainer, than being able to run the Hello World React Native project? I read &lt;a href=&quot;https://aihalapathirana.medium.com/hello-world-react-native-df14662a22c6&quot;&gt;how I can start with the React Native Hello World app&lt;/a&gt;. I had no experience with the debugging in this field, so I exclude that from the scope.&lt;/p&gt;
&lt;p&gt;I usually use the vscode while coding. It supports the &lt;a href=&quot;https://code.visualstudio.com/docs/devcontainers/containers&quot;&gt;dockerized dev environments&lt;/a&gt;, so I focus on creating a vscode dev environment, so I follow the .devcontainer folder convention, use the Microsoft dev images without regret.&lt;/p&gt;
&lt;h2&gt;“Keep It Simple Stupid” principle saved me&lt;/h2&gt;
&lt;p&gt;To be honest, my goal was not so simple as I described above. I overthought. I wanted a devcontainer, where I can run my React Native app in an Android emulator. I could run the Android Studio in the container with UI, but to create an emulator, run my code on that was too big bite for me. After that I realized the expo’s solution with running the app on my phone via the expo app is so simple, and so enough for me. And the recipe for this had been already on the internet. Following &lt;a href=&quot;https://dev.to/mandraketech/developing-on-expo-with-ios-using-vscode-and-docker-5hf&quot;&gt;Navneet’s instructions&lt;/a&gt;, I created my dev container. The Hello World app ran, everything was totally fine.  But later when I tried to run my custom app, instead of the Hello World, the expo app on my phone could not connect to the server.&lt;/p&gt;
&lt;h2&gt;The Missing Piece&lt;/h2&gt;
&lt;p&gt;&lt;img alt=&quot;&quot; width=&quot;640&quot; height=&quot;427&quot; src=&quot;https://fuszti.com/_astro/missing_piece.B4odgCZ1_12YbfP.webp&quot; /&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;Error starting ngrok: Please install @expo/ngrok@^4.1.0 and try again, or try using another hosting method like lan or localhost&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;While running expo start –tunnel&lt;/p&gt;
&lt;p&gt;It was strange, because the @expo/ngrok package was installed in the container. But the solution was simple. The ```expo start –tunnel``` runs the ngrok to create the tunnel, and somehow my default timeout threshold was too small. So I just added a line to my Dockerfile to increase the timeout threshold.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;RUN&lt;/span&gt;&lt;span&gt; yarn --network-timeout 100000&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The last demand was the REST API. I wanted to run the backend server in the same container at least during the development phase. I ran my express backend with the ```node app.js``` command. Everything was fine, the only question was how could I reach the backend from the frontend. Well, the ports are forwarded from the container, so I was able to reach the backend via localhost:&amp;lt;given_ports&amp;gt;. But while the app is running on my phone, this is not enough, because the localhost means your smartphone’s localhost. But as I said, everything is forwarded, so I just used my computer’s LAN IP address as an address in the frontend code.&lt;/p&gt;
&lt;p&gt;That’s it folks. That was the story of my first containerized React Native + Express development environment. A basic Node JS Microsoft vscode Docker image is fine, just install the expo and the expo/ngrok in it. And be careful with the timeout threshold.&lt;/p&gt;
</content:encoded></item><item><title>Creating fake news detector with Hugging Face for the first shot</title><link>https://fuszti.com/create-fake-news-detector-for-the-first-shot/</link><guid isPermaLink="true">https://fuszti.com/create-fake-news-detector-for-the-first-shot/</guid><description>I finished the Natural Language Specialization on the Coursera, so I wanted to find a small scope task, where I can try out some models about it.</description><pubDate>Fri, 24 Jun 2022 07:06:35 GMT</pubDate><content:encoded>&lt;p&gt;I finished the &lt;a href=&quot;https://www.coursera.org/specializations/natural-language-processing?&quot;&gt;Natural Language Specialization&lt;/a&gt; on the Coursera, so I wanted to find a small scope task, where I can try out some models about it. The fake news detection seems something that has use-cases nowadays. I would like to experiment in other languages as well, but first, let’s see in English.&lt;/p&gt;
&lt;h3&gt;What did I get from the NLP specialization?&lt;/h3&gt;
&lt;p&gt;I had already worked with the word2vec model and I had been familiar with LSTM and other recurrent networks. So the first 3 courses was a kind of recap for me, but I really liked the way it was put together. It helped me to interpret the statistical motivations behind the LSTM based word2vec models, so called seq2seq model. The last course was fascinating. It guided me through the attention, transformers topics and introduced the current state-of-the-art NLP models, like BERT, T5, GPT-2 and GPT-3.&lt;/p&gt;
&lt;h3&gt;What is the Hugging Face?&lt;/h3&gt;
&lt;p&gt;Understanding a paper doesn’t mean that you can reproduce easily the results of that on the machine learning field. There can be many reasons behind it: you can’t reach the original dataset, you don’t have enough computational resources, the small implementation tricks aren’t it the paper, etc. The &lt;a href=&quot;https://huggingface.co/&quot;&gt;Hugging Face&lt;/a&gt; helps a lot in these details. It is an open-source toolset to build NLP models fast and efficient. You can download pre-trained complex models and use the original tokenization, and you can reach many valuable NLP datasets.&lt;/p&gt;
&lt;h3&gt;What was my initial goal?&lt;/h3&gt;
&lt;p&gt;There are articles that you read and shout “oh what a stupid fake bullshit”. So the idea is simple: create a model, that can decide that the article is real or fake. Sounds easy, just a binary classification… until you ask yourself what the fake news means. How can I label my data, how can I verify the labels if I use someone else’s dataset? The two side of the politics use the fake news on different “facts”. What can I be sure about? To calm myself down, I could say: science. But even after the results of an experiment is the same n times, can I be sure if I’m going to get the same result the next occasion? Okay, then there is the math. I can be pretty sure about the math. True or false. The math works. What is true, that must be true. It comes from the axioms. And the axioms work until &lt;a href=&quot;https://en.wikipedia.org/wiki/G%C3%B6del&apos;s_incompleteness_theorems&quot;&gt;Gödel asked&lt;/a&gt;, do they?&lt;/p&gt;
&lt;p&gt;Okay, we got too far. I just wanted to try the fancy NLP models. The fake news topic has big potential, but there are challenges to get a fair enough service. Firstly I need a feedback loop, so that I can iterate my solution. So the first milestone is just getting a dataset with news and labels,  do a transfer learning  with a pre-trained model and calculate the accuracy. So the relaxation of my initial goal postpones the definition of the correctness and requires only the first experiments with the Hugging Face framework. It is only a prototype of a code base that can run training and evaluation on a custom dataset.&lt;/p&gt;
&lt;h3&gt;What dataset did I use?&lt;/h3&gt;
&lt;p&gt;I chose the most ranked &lt;a href=&quot;https://www.kaggle.com/datasets/clmentbisaillon/fake-and-real-news-dataset?datasetId=572515&amp;amp;searchQuery=download&quot;&gt;fake news dataset&lt;/a&gt; on Kaggle. It labeled the data based on the publishers. Is it ethically good? Perhaps not, but I think that most of the people, including me, use the same heuristic on the internet. Because of focusing on the pipeline, I just read in the True.csv and False.csv with pandas and print out some examples, but I didn’t put too much effort to explore the data.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;fake_news &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; pd&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;read_csv&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&quot;Fake.csv&quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;real_news &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; pd&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;read_csv&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&quot;True.csv&quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;def&lt;/span&gt;&lt;span&gt; print_news&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;article&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt; print_max_line_length&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;20&lt;/span&gt;&lt;span&gt;):&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;f&lt;/span&gt;&lt;span&gt;&quot;title: &lt;/span&gt;&lt;span&gt;{&lt;/span&gt;&lt;span&gt;article[&lt;/span&gt;&lt;span&gt;&apos;title&apos;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;f&lt;/span&gt;&lt;span&gt;&quot;date: &lt;/span&gt;&lt;span&gt;{&lt;/span&gt;&lt;span&gt;article[&lt;/span&gt;&lt;span&gt;&apos;date&apos;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;f&lt;/span&gt;&lt;span&gt;&quot;subject: &lt;/span&gt;&lt;span&gt;{&lt;/span&gt;&lt;span&gt;article[&lt;/span&gt;&lt;span&gt;&apos;subject&apos;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&quot;text:&quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    for&lt;/span&gt;&lt;span&gt; word_count&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt; word &lt;/span&gt;&lt;span&gt;in&lt;/span&gt;&lt;span&gt; enumerate&lt;/span&gt;&lt;span&gt;(article[&lt;/span&gt;&lt;span&gt;&apos;text&apos;&lt;/span&gt;&lt;span&gt;].&lt;/span&gt;&lt;span&gt;split&lt;/span&gt;&lt;span&gt;()):&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        if&lt;/span&gt;&lt;span&gt; word_count &lt;/span&gt;&lt;span&gt;%&lt;/span&gt;&lt;span&gt; print_max_line_length &lt;/span&gt;&lt;span&gt;==&lt;/span&gt;&lt;span&gt; 0&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;            print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&quot;&quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        print&lt;/span&gt;&lt;span&gt;(word, end&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&quot; &quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;details&gt;
&lt;summary&gt;Sample from the fake news&lt;/summary&gt;
&lt;p&gt;title: Donald Trump Sends Out Embarrassing New Year’s Eve Message; This is Disturbing &lt;/p&gt;
&lt;p&gt;date: December 31, 2017 &lt;/p&gt;
&lt;p&gt;subject: News &lt;/p&gt;
&lt;p&gt;text: &lt;/p&gt;
&lt;p&gt;Donald Trump just couldn t wish all Americans a Happy New Year and leave it at that. Instead, he had to give a shout out to his enemies, haters and the very dishonest fake news media. The former reality show star had just one job to do and he couldn t do it. As our Country rapidly grows stronger and smarter, I want to wish all of my friends, supporters, enemies, haters, and even the very dishonest Fake News Media, a Happy and Healthy New Year, President Angry Pants tweeted. 2018 will be a great year for America! As our Country rapidly grows stronger and smarter, I want to wish all of my friends, supporters, enemies, haters, and even the very dishonest Fake News Media, a Happy and Healthy New Year. 2018 will be a great year for America! Donald J. Trump (@realDonaldTrump) December 31, 2017Trump s tweet went down about as welll as you d expect.What kind of president sends a New Year s greeting like this despicable, petty, infantile gibberish? Only Trump! His lack of decency won t even allow him to rise above the gutter long enough to wish the American citizens a happy new year! Bishop Talbert Swan (@TalbertSwan) December 31, 2017no one likes you Calvin (@calvinstowell) December 31, 2017Your impeachment would make 2018 a great year for America, but I ll also accept regaining control of Congress. Miranda Yaver (@mirandayaver) December 31, 2017Do you hear yourself talk? When you have to include that many people that hate you you have to wonder? Why do the they all hate me? Alan Sandoval (@AlanSandoval13) December 31, 2017Who uses the word Haters in a New Years wish?? Marlene (@marlene399) December 31, 2017You can t just say happy new year? Koren pollitt (@Korencarpenter) December 31, 2017Here s Trump s New Year s Eve tweet from 2016.Happy New Year to all, including to my many enemies and those who have fought me and lost so badly they just don t know what to do. Love! Donald J. Trump (@realDonaldTrump) December 31, 2016This is nothing new for Trump. He s been doing this for years.Trump has directed messages to his enemies and haters for New Year s, Easter, Thanksgiving, and the anniversary of 9/11. pic.twitter.com/4FPAe2KypA Daniel Dale (@ddale8) December 31, 2017Trump s holiday tweets are clearly not presidential.How long did he work at Hallmark before becoming President? Steven Goodine (@SGoodine) December 31, 2017He s always been like this . . . the only difference is that in the last few years, his filter has been breaking down. Roy Schulze (@thbthttt) December 31, 2017Who, apart from a teenager uses the term haters? Wendy (@WendyWhistles) December 31, 2017he s a fucking 5 year old Who Knows (@rainyday80) December 31, 2017So, to all the people who voted for this a hole thinking he would change once he got into power, you were wrong! 70-year-old men don t change and now he s a year older.Photo by Andrew Burton/Getty Images.&lt;/p&gt;
&lt;/details&gt;
&lt;h3&gt;Concerns about the dataset&lt;/h3&gt;
&lt;p&gt;There is a &lt;a href=&quot;https://www.kaggle.com/datasets/clmentbisaillon/fake-and-real-news-dataset/discussion/167815?datasetId=572515&amp;amp;searchQuery=download&quot;&gt;good discussion&lt;/a&gt; about the concerns with the dataset. For example the publisher’s name is at the beginning of each real news. It makes the classification trivial. So I added a simple preprocess to the data loading to delete the relevant part of the text at the beginning.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;def&lt;/span&gt;&lt;span&gt; preprocess_text&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;example&lt;/span&gt;&lt;span&gt;):&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    text &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; example&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;&quot;text&quot;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    original_len &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; len&lt;/span&gt;&lt;span&gt;(text)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    splits &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; text&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;split&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&quot; -&quot;&lt;/span&gt;&lt;span&gt;, maxsplit&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    text_without_publisher &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; splits&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span&gt; if&lt;/span&gt;&lt;span&gt; len&lt;/span&gt;&lt;span&gt;(splits)&lt;/span&gt;&lt;span&gt; &amp;gt;&lt;/span&gt;&lt;span&gt; 1&lt;/span&gt;&lt;span&gt; else&lt;/span&gt;&lt;span&gt; splits&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    new_len &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; len&lt;/span&gt;&lt;span&gt;(text_without_publisher)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    if&lt;/span&gt;&lt;span&gt; original_len &lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; new_len &lt;/span&gt;&lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span&gt; 35&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        example&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;&quot;text&quot;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span&gt; =&lt;/span&gt;&lt;span&gt; text_without_publisher&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    return&lt;/span&gt;&lt;span&gt; example&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;How did I use Hugging Face?&lt;/h3&gt;
&lt;p&gt;The biggest challenge for me was to wrap the custom dataset in a Hugging Face dataset. I followed their &lt;a href=&quot;https://huggingface.co/docs/transformers/training&quot;&gt;tutorial&lt;/a&gt;, which makes many things easy, but they used a dataset already integrated in Hugging Face. I naively tried to convert the pandas DataFrame to a native python object to use that for initialization… Anyway, I was wrong, it is much simpler as you see below. I had to merge the two DataFrame objects, one for fake news, one for real news into one DataFrame with a “label” column, then I could create a Dataset object by calling datasets.Dataset.from_pandas function.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;from&lt;/span&gt;&lt;span&gt; datasets &lt;/span&gt;&lt;span&gt;import&lt;/span&gt;&lt;span&gt; Dataset&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;def&lt;/span&gt;&lt;span&gt; convert_to_dataset_format&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;fake_news&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt; real_news&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt; fake_news_label&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt; real_news_label&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;):&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    fake_news&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;&quot;label&quot;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span&gt; =&lt;/span&gt;&lt;span&gt; fake_news_label&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    real_news&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;&quot;label&quot;&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;span&gt; =&lt;/span&gt;&lt;span&gt; real_news_label&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    all_data &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; pd&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;concat&lt;/span&gt;&lt;span&gt;((fake_news, real_news))&lt;/span&gt;&lt;span&gt;[[&lt;/span&gt;&lt;span&gt;&quot;text&quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt; &quot;label&quot;&lt;/span&gt;&lt;span&gt;]]&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    dataset &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; Dataset&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;from_pandas&lt;/span&gt;&lt;span&gt;(all_data)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    return&lt;/span&gt;&lt;span&gt; dataset&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;def&lt;/span&gt;&lt;span&gt; dummy_dataset_split&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;data_frame&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt; ratio&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;None&lt;/span&gt;&lt;span&gt;):&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    if&lt;/span&gt;&lt;span&gt; ratio &lt;/span&gt;&lt;span&gt;is&lt;/span&gt;&lt;span&gt; None&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        ratio &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;span&gt;&quot;train&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; 0.7&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt; &quot;test&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; 0.3&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    index_to_split &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; int&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;len&lt;/span&gt;&lt;span&gt;(data_frame) &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt; ratio[&lt;/span&gt;&lt;span&gt;&quot;train&quot;&lt;/span&gt;&lt;span&gt;])&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    return&lt;/span&gt;&lt;span&gt; data_frame&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;loc&lt;/span&gt;&lt;span&gt;[:&lt;/span&gt;&lt;span&gt;index_to_split&lt;/span&gt;&lt;span&gt;,:].&lt;/span&gt;&lt;span&gt;copy&lt;/span&gt;&lt;span&gt;(),&lt;/span&gt;&lt;span&gt; data_frame&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;loc&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;index_to_split&lt;/span&gt;&lt;span&gt;:,:].&lt;/span&gt;&lt;span&gt;copy&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;split_data_frame &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; dummy_dataset_split&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;fake_news_train&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt; fake_news_test &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; split_data_frame&lt;/span&gt;&lt;span&gt;(fake_news)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;real_news_train&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt; real_news_test &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; split_data_frame&lt;/span&gt;&lt;span&gt;(real_news)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;dataset &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;span&gt;&quot;train&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; convert_to_dataset_format&lt;/span&gt;&lt;span&gt;(fake_news_train, real_news_train),&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        &quot;test&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; convert_to_dataset_format&lt;/span&gt;&lt;span&gt;(fake_news_test, real_news_test)}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here it comes the first cool feature of the Hugging Face. The tokenization in NLP uses several heuristics and intuitions: what kind of word you need to throw out, how to handle the word endings (which is so important in the most of non-English language), etc. We get the same tokenizer that was used at training of the original model.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;from&lt;/span&gt;&lt;span&gt; transformers &lt;/span&gt;&lt;span&gt;import&lt;/span&gt;&lt;span&gt; AutoTokenizer&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;tokenizer &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; AutoTokenizer&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;from_pretrained&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&quot;bert-base-cased&quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;def&lt;/span&gt;&lt;span&gt; tokenize_function&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;examples&lt;/span&gt;&lt;span&gt;):&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    return&lt;/span&gt;&lt;span&gt; tokenizer&lt;/span&gt;&lt;span&gt;(examples[&lt;/span&gt;&lt;span&gt;&quot;text&quot;&lt;/span&gt;&lt;span&gt;], padding&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&quot;max_length&quot;&lt;/span&gt;&lt;span&gt;, truncation&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;True&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;dataset &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;span&gt;&quot;train&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; dataset&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;&quot;train&quot;&lt;/span&gt;&lt;span&gt;].&lt;/span&gt;&lt;span&gt;map&lt;/span&gt;&lt;span&gt;(preprocess_text, batched&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;False&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;                      &quot;test&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; dataset&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;&quot;test&quot;&lt;/span&gt;&lt;span&gt;].&lt;/span&gt;&lt;span&gt;map&lt;/span&gt;&lt;span&gt;(preprocess_text, batched&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;False&lt;/span&gt;&lt;span&gt;)}&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;print&lt;/span&gt;&lt;span&gt;(dataset[&lt;/span&gt;&lt;span&gt;&quot;train&quot;&lt;/span&gt;&lt;span&gt;][&lt;/span&gt;&lt;span&gt;3000&lt;/span&gt;&lt;span&gt;])&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;tokenized_datasets &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;span&gt;&quot;train&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; dataset&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;&quot;train&quot;&lt;/span&gt;&lt;span&gt;].&lt;/span&gt;&lt;span&gt;map&lt;/span&gt;&lt;span&gt;(tokenize_function, batched&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;True&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;                      &quot;test&quot;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt; dataset&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;&quot;test&quot;&lt;/span&gt;&lt;span&gt;].&lt;/span&gt;&lt;span&gt;map&lt;/span&gt;&lt;span&gt;(tokenize_function, batched&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;True&lt;/span&gt;&lt;span&gt;)}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Results&lt;/h3&gt;
&lt;p&gt;The things are really straightforward from here, because I just followed the mentioned tutorial. You can rerun my &lt;a href=&quot;https://colab.research.google.com/drive/1IFPFm8oI7wrMqEZLmuXoDLUtTIwB41xY?usp=sharing&quot;&gt;notebook&lt;/a&gt; if you are interested in the whole code. I trained and evaluated on a small subset, just to see that the code is running. The test accuracy was around 0.98 in both cases: where I used the publisher eraser preprocess and where I didn’t. Does it say anything about the model’s performance? Nope. We only wrapped the custom dataset that now can be used within the Hugging Face framework. Which is fine. We have a basis to begin the building of a meaningful fake news detector in some circumstances. We will see the necessary conditions later.&lt;/p&gt;
</content:encoded></item></channel></rss>