<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Programming passion on Medium]]></title>
        <description><![CDATA[Stories by Programming passion on Medium]]></description>
        <link>https://medium.com/@programmingpassion?source=rss-5cbca6dbbaed------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*iG4poOPEL93kXo5nSvM-Yw.jpeg</url>
            <title>Stories by Programming passion on Medium</title>
            <link>https://medium.com/@programmingpassion?source=rss-5cbca6dbbaed------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 02:06:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@programmingpassion/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[I No Longer Use an IDE on New Projects]]></title>
            <link>https://medium.com/programming-passion/i-no-longer-use-an-ide-on-new-projects-e8940b87f27b?source=rss-5cbca6dbbaed------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8940b87f27b</guid>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ai-productivity]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Programming passion]]></dc:creator>
            <pubDate>Fri, 06 Nov 2026 00:01:02 GMT</pubDate>
            <atom:updated>2026-11-07T01:05:26.950Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building new software by talking to an AI agent is becoming the new norm.</h3><p><em>Building new software by talking to an AI agent is becoming the new norm.</em></p><p>In February 2024, Nvidia’s CEO Jensen Huang sat on stage at the World Government Summit in Dubai and said something that annoyed a lot of developers (<a href="https://www.tomshardware.com/tech-industry/artificial-intelligence/jensen-huang-advises-against-learning-to-code-leave-it-up-to-ai">source</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_rr5xbkeqytFtLc9I3iF4A.png" /><figcaption>Jensen Huang, CEO of Nvidia. Quote from the World Government Summit in Dubai, February 2024 (source: Tom’s Hardware).</figcaption></figure><p>Most senior software engineers found that exaggerated, a big claim made for a keynote stage. Two years later, I work exactly that way, and I didn’t notice the change until I looked back. AI models, the agent harnesses around them and their tools have become mature enough to make it real. <strong>On a new project, I don’t open an IDE anymore.</strong> No Xcode, no Visual Studio Code, no Android Studio. Everything I need is the Claude app.</p><p>Here is what that looks like in practice, and what it means for developers with years of experience behind them.</p><h3>My workday is a conversation</h3><p>This is how I work on my new projects every day. It has moved well past the hype and the viral demo videos in your social feed.</p><p>A new project starts with a chat, not a file. I describe what I want to build, the AI asks questions, and we discuss the solution: the architecture, the data model, the trade-offs, what goes in version one and what waits.</p><p>Once we agree, the agent gets the job done. It sets up the repo, writes the code, runs the build and the tests, reads the failures and fixes them. When the work is ready, it opens a pull request. The compilers and build tools still run underneath. The agent drives them, so I never open the editor that wraps them.</p><p><strong>The AI carries almost all of the effort. My part comes when it stops and sends me a message asking for input.</strong></p><p>Those messages are the interesting part of the job:</p><ul><li>A product decision: “When the app comes back online, should it sync offline edits right away, or ask first?”</li><li>An approval for a step that’s hard to undo, like a deploy or a merge.</li><li>Something only my hands can do, like signing in to an account.</li></ul><p>The agent has no problem texting me whenever it needs input. I answer on my phone, often in one line, and the work resumes right away. Most of my day goes to thinking about what to build, not typing it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SwSENhcZcU2MGfY2qs5S8w.png" /><figcaption>The agent does the long middle part on its own and comes back to me only for decisions.</figcaption></figure><h3>I give feedback on the product, not on the code</h3><p>The second change is how a product improves after the first version.</p><p>I use the app the way a user would. When something feels wrong, I say so in plain words, right where I noticed it: “The search field should stay at the top while I scroll.” Or: “The sign-up form asks for too much. Email is enough.”</p><p>The AI turns that into a change request: what it understood, what it plans to change, which parts of the system it touches, and how it will test the result. <strong>Nothing runs until I approve the plan.</strong> Then it executes, tests and ships the change, and I check it in the product again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ILZ7sGVexiYKUA2Oe4eJEg.png" /><figcaption>Continuous improvement: I own one step of the loop, the approval.</figcaption></figure><blockquote><em>💡 </em><strong><em>Tip:</em></strong><em> Ask for the plan before any code changes. Reviewing a ten-line plan takes a minute. Reviewing a 400-line diff takes an afternoon, and by then the agent has already gone in the wrong direction.</em></blockquote><h3>We have moved up a level before</h3><p>This shift has a familiar shape. Most developers today write Swift, Kotlin or TypeScript without knowing the assembly their code becomes, and very few have ever read the machine code. The compiler handles that level, so we can think at a higher one.</p><p><strong>AI agents are the next level of abstraction: you describe the solution, and the agent produces the code.</strong> New software development doesn’t need to go down to the programming language level any more than it needs to go down to assembly today. Reading code stays useful, the way reading assembly still helps when you chase a nasty bug.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qERbixt3-I80HPspmgLt1w.png" /><figcaption>Each layer lets developers stop thinking about the one below it.</figcaption></figure><p>The next generation of software engineers will start at this level. They will write far less code by hand than engineers who learned before AI, the same way most developers today have never written assembly. Their strength will be the solution, the design and the testing, not the syntax.</p><h3>Experience is a head start, if you know how agents work</h3><p>Years of software development are a big advantage here. You know what good architecture looks like, you can tell when a plan is wrong, and you know which tests matter. You review the agent’s plan the way a senior engineer reviews a teammate’s design, and the agent’s work gets much better for it.</p><p>That advantage depends on understanding AI agents properly: what context they need, when to let them run, and when to step in. <strong>Developers who learn to work with agents turn their experience into leverage.</strong></p><p>Without that understanding, the same experience becomes a handcuff on your brain. You read every line, rewrite the agent’s code in your own style, and keep the IDE open “just to check”. The work slows back down to your typing speed, and the experience that should push you forward pulls you back.</p><blockquote><em>Experience turns into leverage when you work with the agent, and into a handcuff when you work around it.</em></blockquote><h3>So, should you close your IDE?</h3><p>Not overnight, and not on every project. Legacy companies and legacy codebases are conservative to accept this way of working, for good reasons: security, compliance, tribal knowledge and fragile builds. Those systems need software developers for as long as they stay alive. A new project is the best place to start, because the agent gets a clean repo and you set the rules from day one.</p><p>Most of the time, don’t overthink it. Start your next small project in a chat instead of an editor, let the agent run, and step in only when it asks or when something looks wrong in the product. If you catch yourself opening the IDE, notice why. Usually the agent was missing context you could have given it in one sentence.</p><p>Have you built anything recently without opening an IDE? What made you reach for the editor again?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8940b87f27b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/programming-passion/i-no-longer-use-an-ide-on-new-projects-e8940b87f27b">I No Longer Use an IDE on New Projects</a> was originally published in <a href="https://medium.com/programming-passion">Programming lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SwiftUI and UIKit, Part 2: Three Solutions for the Rabbit and the Turtle Problem]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/programming-passion/swiftui-and-uikit-part-2-three-solutions-for-the-rabbit-and-the-turtle-problem-ce5f4a50f436?source=rss-5cbca6dbbaed------2"><img src="https://cdn-images-1.medium.com/max/2600/1*TaQDLucSNQu7TElnIVNVCw.png" width="2800"></a></p><p class="medium-feed-snippet">In Part 1, we found the problem. SwiftUI rebuilds cheap view structs on every update, but the UIKit views it hosts are heavy, and they&#x2019;re&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/programming-passion/swiftui-and-uikit-part-2-three-solutions-for-the-rabbit-and-the-turtle-problem-ce5f4a50f436?source=rss-5cbca6dbbaed------2">Continue reading on Programming lab »</a></p></div>]]></description>
            <link>https://medium.com/programming-passion/swiftui-and-uikit-part-2-three-solutions-for-the-rabbit-and-the-turtle-problem-ce5f4a50f436?source=rss-5cbca6dbbaed------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce5f4a50f436</guid>
            <category><![CDATA[uikit]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[swift-programming]]></category>
            <dc:creator><![CDATA[Programming passion]]></dc:creator>
            <pubDate>Wed, 04 Nov 2026 03:56:16 GMT</pubDate>
            <atom:updated>2026-11-04T03:56:32.191Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[SwiftUI and UIKit: The Problem with the Rabbit and the Turtle (Part 1)]]></title>
            <link>https://medium.com/programming-passion/swiftui-and-uikit-the-problem-with-the-rabbit-and-the-turtle-part-1-ac29ca5eb560?source=rss-5cbca6dbbaed------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac29ca5eb560</guid>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Programming passion]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 03:15:59 GMT</pubDate>
            <atom:updated>2026-11-02T03:16:38.788Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part 1 of 2: why a fast SwiftUI screen stutters when it hosts a UIKit view.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wnnjSVXkRAzhIPplP0GHyA.png" /></figure><p>You build a SwiftUI screen that scrolls smoothly. Then you add a map with MKMapView and UIViewRepresentable, and the screen starts to stutter every time you tap a filter. The frame rate starts to drop, and the app becomes less responsive. What is the problem here?</p><h3>The problem in one sentence</h3><p><strong>When a UIKit view takes more time to get ready, or to be torn down, it occupies the main thread longer than it should, and that is the same thread that has to draw the next frame.</strong></p><h3>SwiftUI views are cheap, UIKit views are not</h3><p>A SwiftUI View is a struct: a lightweight description of UI. SwiftUI rebuilds these structs every time state changes, and that&#39;s fine, because a struct costs almost nothing to create and throw away.</p><p>A UIView is a heavy object on the heap. It carries a CALayer, subviews, images, gesture recognizers and observers. Creating one takes real time, and so does destroying one.</p><h3>When SwiftUI creates a new UIKit view</h3><p><strong>SwiftUI keeps the same </strong><strong>UIView alive across state changes.</strong> Say the user picks another order, so coordinate changes. Three things happen:</p><ol><li>SwiftUI creates a new OrderMapView value holding the new coordinate. That&#39;s the cheap struct.</li><li>It keeps the existing MKMapView on screen. makeUIView doesn&#39;t run again.</li><li>It calls updateUIView with that existing map, so you can move it to the new coordinate.</li></ol><p>In code:</p><pre>struct OrderMapView: UIViewRepresentable {<br>    let coordinate: CLLocationCoordinate2D<br><br>    func makeUIView(context: Context) -&gt; MKMapView {<br>        MKMapView()   // runs when OrderMapView itself is created<br>    }<br><br>    func updateUIView(_ map: MKMapView, context: Context) {<br>        map.setCenter(coordinate, animated: true)   // runs on every update<br>    }<br>}</pre><p>SwiftUI creates a brand-new UIView, and destroys the old one, when the view leaves the hierarchy or gets a new identity. In a real app, that looks like this:</p><ul><li><strong>Switching layouts with </strong><strong>if/else.</strong> A Compact toggle shows the order map in a small card or full size. Each branch is a different view, so every flip destroys one MKMapView and creates another.</li><li><strong>Opening and closing a sheet.</strong> A product video plays in a sheet through a wrapped player view. Closing the sheet destroys the player view, and opening it again builds a new one.</li><li><strong>Pushing and popping a screen.</strong> A help article opens in a detail screen backed by WKWebView. Going back destroys the web view, and opening the next article creates a fresh one.</li><li><strong>Changing </strong><strong>.id().</strong> A map is tagged .id(selectedOrder.id) so it resets for each order. Every new selection gives it a new identity and a new MKMapView.</li><li><strong>Scrolling a list.</strong> A chart in each row of a List can be dismantled when its row scrolls off screen, and rebuilt when it scrolls back.</li></ul><p>Here’s the first case in code. It looks harmless:</p><pre>if isCompact {<br>    OrderMapView(coordinate: coordinate).frame(height: 120)<br>} else {<br>    OrderMapView(coordinate: coordinate)<br>}</pre><p>Every time isCompact flips, SwiftUI destroys one MKMapView and creates another, in the same frame.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ZRcJu1wM6zc8GiE0Ktgjw.png" /></figure><h3>Why that drops frames</h3><p>The main thread has a deadline: about 16.7 ms per frame at 60 Hz, and 8.3 ms on a 120 Hz ProMotion display. Every UIView is created and destroyed on the main thread (UIView is @MainActor). When that work doesn&#39;t fit inside the deadline, the frame is late, and the user sees a stutter.</p><blockquote><em>SwiftUI is fast. UIKit is heavy. And the lane they share is one main thread wide.</em></blockquote><p>It shows up in three ways:</p><ul><li><strong>Heavy allocation:</strong> the UIKit view is expensive to create, like a WKWebView or an MKMapView, or it loads heavy resources it owns, such as decoded images, video buffers or a parsed PDF.</li><li><strong>Heavy deallocation:</strong> the UIKit view is expensive to destroy, because its whole tree of layers, bitmaps and observers goes with it, along with the heavy resources it owns.</li><li><strong>Repeated recreation:</strong> SwiftUI creates and destroys the view again and again, so you pay both costs on every change.</li></ul><h3>What’s next</h3><p>The good news: each of these three cases has a fix, and none of them means giving up SwiftUI or rewriting your UIKit views.</p><p>In Part 2, we walk through the fix for each case, one at a time, with Swift code that works for any UIKit view you host in SwiftUI.</p><p><em>Follow so you don’t miss Part 2, and tell me in the comments which case you hit most often.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac29ca5eb560" width="1" height="1" alt=""><hr><p><a href="https://medium.com/programming-passion/swiftui-and-uikit-the-problem-with-the-rabbit-and-the-turtle-part-1-ac29ca5eb560">SwiftUI and UIKit: The Problem with the Rabbit and the Turtle (Part 1)</a> was originally published in <a href="https://medium.com/programming-passion">Programming lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Swift Modern Syntax You Might Have Missed]]></title>
            <link>https://medium.com/programming-passion/swift-modern-syntax-you-might-have-missed-1f62cdb1d038?source=rss-5cbca6dbbaed------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f62cdb1d038</guid>
            <category><![CDATA[swift-programming]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[ios-development]]></category>
            <dc:creator><![CDATA[Programming passion]]></dc:creator>
            <pubDate>Tue, 13 Oct 2026 05:42:30 GMT</pubDate>
            <atom:updated>2026-10-15T02:21:40.150Z</atom:updated>
            <content:encoded><![CDATA[<p>Swift evolves quickly, and with each release Apple quietly introduces syntax improvements that make code cleaner and more expressive. The problem is — not everyone catches them. Many iOS developers stick with patterns they learned years ago, unaware that simpler alternatives already exist.</p><p>Here are a few modern Swift syntax features that can tighten up your everyday code.</p><h3>Pattern Matching with if case</h3><p>When you have an enum with associated values, the classic approach is to add a computed property that switches over cases just to extract one value:</p><pre>enum State {<br>    case success<br>    case error(_ message: String)<br>}<br><br>extension State {<br>    var errorMessage: String? {<br>        switch self {<br>        case .error(let message): return message<br>        default: return nil<br>        }<br>    }<br>}<br><br>if let message = state.errorMessage {<br>    show(message)<br>}</pre><p>That works, but you’re writing a whole computed property just to unwrap a single case. Instead, use if case pattern matching to extract the associated value directly:</p><pre>if case .error(let message) = state {<br>    show(message)<br>}</pre><p>One line. No extra property. You can even combine it with other conditions using commas, just like a regular if let.</p><h3>If/Switch Expressions</h3><p>Before Swift 5.9, assigning a value based on a condition meant either declaring the variable first or using a ternary:</p><pre>let message: String<br><br></pre><pre>if state == .success {<br>    message = &quot;Success login&quot;<br>} else {<br>    message = &quot;Failure login&quot;<br>}</pre><p>The variable has to be declared separately, and the compiler can’t enforce that every branch assigns it. Starting in Swift 5.9, if and switch are expressions — they return a value:</p><pre>let message: String = if state == .success {<br>    &quot;Success login&quot;<br>} else {<br>    &quot;Failure login&quot;<br>}</pre><p>And it is same approach in the following switch expression</p><pre>let message: String = switch state {<br>    case .success: &quot;Success login&quot;<br>    case .failure: &quot;Failure login&quot;<br>}</pre><p>No return keyword needed. The compiler guarantees every branch produces a value of the same type. This works with switch too, and it&#39;s especially nice for initializing let constants where a ternary would be too cramped.</p><h3>Dictionary Default Subscript</h3><p>How often do you initialize a dictionary and then pre-populate keys with empty values before using them?</p><pre>var dict = [String: [Int]]()</pre><pre>// Pre-initialize before appending<br>dict[&quot;one&quot;] = []<br>dict[&quot;one&quot;]?.append(1)</pre><p>Swift’s subscript already supports a default parameter that returns (and inserts) a fallback value when the key is missing:</p><pre>dict[&quot;one&quot;, default: []].append(1)</pre><p>No need to check whether the key exists first, no optional unwrapping, no pre-initialization. This is particularly useful when building grouped collections — think groupBy without the ceremony.</p><h3>for...where Clause</h3><p>Filtering inside a loop usually looks like this — a guard with continue at the top of the body:</p><pre>for number in 0...10 {<br>    guard number % 2 == 0 else { continue }<br>    // Do something with even numbers<br>}</pre><p>It works, but the intent is buried inside the loop body. Swift lets you attach a where clause directly to the for statement:</p><pre>for number in 0...10 where number % 2 == 0 {<br>    // Do something with even numbers<br>}</pre><p>The filtering condition is declared right where the iteration is defined. It reads more like a sentence: “for every number from 0 to 10 <em>where</em> it’s even, do this.”</p><h3>Wrapping Up</h3><p>None of these are obscure language features — they’re all part of mainstream Swift. But because they don’t show up in most tutorials or legacy codebases, a lot of developers never pick them up.</p><p>Try replacing one old pattern at a time in your next PR. Once these become muscle memory, you’ll wonder how you ever typed all those extra lines.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f62cdb1d038" width="1" height="1" alt=""><hr><p><a href="https://medium.com/programming-passion/swift-modern-syntax-you-might-have-missed-1f62cdb1d038">Swift Modern Syntax You Might Have Missed</a> was originally published in <a href="https://medium.com/programming-passion">Programming lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Secure remote access to home localhost and bots]]></title>
            <link>https://medium.com/programming-passion/secure-remote-access-to-home-localhost-and-bots-bf03e4acafa8?source=rss-5cbca6dbbaed------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf03e4acafa8</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Programming passion]]></dc:creator>
            <pubDate>Tue, 24 Feb 2026 15:12:11 GMT</pubDate>
            <atom:updated>2026-02-24T15:12:11.394Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s “vibe coding” trend, anyone can quickly develop a website and run it on <strong>localhost</strong>, or spin up a small molt bot to automate tasks at home.</p><p>Along with this, there is a growing need to put that website on the public internet for demos, or to access the bot machine remotely.</p><p>You can do all of this from home without renting an AWS instance or paying a 5 USD per month subscription for a reverse VPS service.​</p><p>With a bit of router configuration, everything can be done at no extra cost.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*VZ2WV4xaaFYpZ8ORFg_jBg.jpeg" /></figure><blockquote>The devices used in this article are:</blockquote><blockquote>An <strong>Asus router</strong>, which provides Dynamic DNS and port forwarding.​</blockquote><blockquote>A <strong>Raspberry Pi 5</strong> running the localhost service or bot.​</blockquote><blockquote>A <strong>Mac laptop</strong> used to access the remote machine from the terminal.</blockquote><h3>Dynamic DNS</h3><p>Your home network is always assigned a public IP address, which identifies where you are on the internet.​ However, this public IP is usually dynamic, meaning it changes regularly, so you cannot rely on it staying the same.</p><p>To solve this, we use a <strong>Dynamic DNS (DDNS)</strong> service on the router.​<br>The router keeps updating the <strong>DDNS</strong> service with its latest public IP, and in return you get a stable domain name that always points to your home network.</p><p>Nowadays, many routers from manufacturers such as <strong>Asus</strong>, <strong>TP-Link</strong>, and others include free Dynamic DNS integration out of the box.</p><h3>Port forwarding</h3><p>The localhost service or bot in your home network has a private local IP address, such as 192.168.1.10</p><p>When a random connection arrives from the public internet, your router does not know which internal device should receive it, so it simply drops the connection.</p><p>Port forwarding tells the router what to do with those incoming connections.​ For example, when a connection arrives on a specific port from the internet, the router forwards it to the correct local machine and port (your localhost or bot).</p><p>In this tutorial, we will configure port forwarding for port 22, which is used by SSH.</p><h3>Localhost demo server</h3><p>If you already have a localhost service running, you can keep using it.</p><p>If not, you can spin up a quick demo web server with these commands:</p><pre>echo &#39;&lt;h1&gt;Hello World!&lt;/h1&gt;&#39; &gt; index.html<br><br>python3 -m http.server 8001<br><br>#This starts a simple HTTP server on port 8001 that serves the index.html file.</pre><h3>Config SSH keys on the localhost</h3><p>To access your machine securely over the internet, we will use SSH key authentication instead of passwords.​</p><h4>Generate a key pair (your laptop)</h4><p>Run this command on your laptop or main machine:</p><pre>ssh-keygen -t ed25519 -C &quot;your-email@example.com&quot; -f ~/.ssh/id_pi<br># Enter passphrase (optional, leave empty for full automation)<br># Creates: ~/.ssh/id_pi (private), ~/.ssh/id_pi.pub (public)</pre><p>This generates an SSH key pair that you will use to log in to your home machine or bot.</p><h4>Copy the public key to the Pi (or bot)</h4><p>Assuming your home device is reachable through your Dynamic DNS domain:</p><pre>ssh-copy-id -i ~/.ssh/id_pi.pub username@&lt;dynamic-dns-domain&gt;<br># Enter the device password once</pre><p>This installs your public key on the remote machine so it can trust your laptop.</p><h4>Test passwordless login</h4><p>Now test logging in with the key:</p><pre>ssh -i ~/.ssh/id_pi username@&lt;dynamic-dns-domain&gt;<br># You should log in without being asked for a password</pre><p>If this works, SSH key authentication is configured correctly.</p><h3>Access the bot with SSH</h3><p>Once SSH and port forwarding are configured, accessing your bot (running on a Mac mini M4 or a Raspberry Pi) is straightforward.</p><pre>ssh username@&lt;dynamic-dns-domain&gt;</pre><p>This connects from wherever you are on the internet to your home machine through the Dynamic DNS domain and forwarded SSH port.</p><h3>Access localhost through an SSH tunnel</h3><p>In development stage, you do not want to expose a web service directly to the public internet, but you still want to reach it remotely.</p><p>SSH port forwarding gives you a secure tunnel from your laptop to your localhost service at home.</p><p>From your laptop, run:</p><pre>ssh -N -L 8001:localhost:8001 username@&lt;dynamic-dns-domain&gt;</pre><p>Explanation:</p><ul><li>-N: Do not run a remote command, just keep the tunnel open.​</li><li>-L 8001:localhost:8000: Map your laptop’s port 8001 to port 8000 on the remote machine (where the demo server is running).​</li></ul><p>After this, open http://localhost:8001 in your browser, and you will see the website served from your home machine as if it were local.</p><h3>Enhance security with Fail2ban</h3><p>Because your SSH port is exposed to the internet, you should protect it against brute-force login attempts.</p><p>A lightweight way to do this on Linux is <strong>Fail2ban</strong>.</p><pre>#Install and enable Fail2ban:<br>sudo apt install fail2ban -y<br>sudo systemctl enable --now fail2ban</pre><p>Then configure a basic policy in /etc/fail2ban/jail.local</p><pre>[DEFAULT]<br>bantime = 600<br>maxretry = 3<br><br>[sshd]<br>enabled = true<br>port = ssh<br>filter = sshd<br>banaction = iptables-multiport</pre><p>This configuration bans an IP address for 10 minutes after 3 failed SSH login attempts.</p><p>Check banned IPs:</p><pre>sudo fail2ban-client status sshd<br># Shows currently banned IPs</pre><p>Unban an IP if necessary:</p><pre>sudo fail2ban-client set sshd unbanip &lt;IP&gt;<br># Unbans the given IP</pre><h3>Security notes</h3><p>Your Dynamic DNS domain effectively points directly to your home IP address.​</p><p>Keep these practices in mind:</p><ul><li>Avoid using the router’s DMZ feature; only configure port forwarding for the specific ports you actually need.</li><li>Do not share your Dynamic DNS domain publicly unless necessary.​</li><li>Use strong SSH keys and disable password authentication where possible.​</li><li>Keep your router firmware and home server up to date with security patches.</li><li>Place your exposed machine on a separate network segment, using a different subnet and, ideally, an isolated access point.</li></ul><p>With Dynamic DNS, port forwarding, and a few security precautions, you can safely access your localhost and bots from anywhere in the world without monthly cloud costs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf03e4acafa8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/programming-passion/secure-remote-access-to-home-localhost-and-bots-bf03e4acafa8">Secure remote access to home localhost and bots</a> was originally published in <a href="https://medium.com/programming-passion">Programming lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vibe Code anywhere with just an iPad]]></title>
            <link>https://medium.com/programming-passion/vibe-code-anywhere-with-just-an-ipad-5fedace2c279?source=rss-5cbca6dbbaed------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fedace2c279</guid>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[remote-working]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Programming passion]]></dc:creator>
            <pubDate>Fri, 30 Jan 2026 19:00:51 GMT</pubDate>
            <atom:updated>2026-01-30T20:06:41.496Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>In this tutorial, I’ll show you how to configure a working setup that lets you vibe code from anywhere on your local workstation.</blockquote><h3>Overview</h3><p>This diagram illustrates the complete vibe coding setup: a developer works remotely from any device through a browser-based IDE, connecting securely to a code-server hosted in a sandbox on your workstation via HTTPS. Your projects remain on home servers, providing flexibility and security.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*kr4p3WNUhxXPPGOwKx9JFg.jpeg" /><figcaption>Setup overview diagram</figcaption></figure><p>This setup includes a set of components:</p><ul><li><strong>Workstation</strong>: A Mac machine used for this demo</li><li><strong>Sandbox</strong>: An isolated workspace</li><li><strong>Code-Server</strong>: this is a self-host server placed on your workstation and allows you to access your code base remotely via a browser interface.</li><li><strong>Claude extension</strong>: This is an agentic AI component for vibe coding.</li><li><strong>Claude CLI</strong>: A command-line interface for Claude</li></ul><p>We’ll go through the components one by one in more detail.</p><h3>Workstation</h3><p><strong>Personal device: </strong>If you have a MacBook on hand, it’s okay to use it for experiment. However, to enhance your own security, it should consider to config either a sandbox, docker or virtual machine.</p><p><strong>Dedicate workstation</strong>: It’s best if you allocate a spare mac machine for this working setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*U8uTj4dcUSA-c5AsEtE1rg.png" /><figcaption>Mac mini M4 on discount</figcaption></figure><p>During price hike of DDRAM, and electronic components in 2026, Apple Mac Mini M4 is a real deal with hundred bucks discounts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*TLcwhkHALhwf9unQTQsLaQ.png" /><figcaption>Mac mini M4 on discount</figcaption></figure><p><strong>Cloud:</strong> Another option is to lease a machine on cloud, this is also a decent solution. It is flexible and the initiate cost is cheaper than Mac Mini M4 a lot.</p><h3>Sandbox</h3><p>Assuming this is your personal laptop, we have a good reason to set up a sandbox that contains the server, contents, scripts, and tools.</p><p><strong>Attention!</strong> In this tutorial, it introduces a user-based sandbox concept. This is not the ultimate security measure. Please consider higher security measures, such as docker, or virtual machine.</p><p><strong>Create a sandbox</strong></p><p>Create sandbox by entering this cmd in your command terminal</p><pre>sudo sysadminctl -addUser lab -fullName &quot;Sandbox&quot; -password &quot;sandbox123&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*TBS0KlV2cMd2W58IRpHzOQ.png" /><figcaption>Create a sandbox</figcaption></figure><p>We named the sandbox is lab , we can validate this creation by the following command</p><pre>ls /Users/<br><br>#If sandbox creation success, we see the lab user</pre><p><strong>Log in the sandbox</strong></p><p>Use the following command in the terminal to log in to the sandbox</p><pre>sudo su - lab<br><br>#Then enter your admin password</pre><p>Note: Don’t use the command su lab to sign in the sandbox, because you’ll be lack of permission for env setup later.</p><h3><strong>Sandbox environment setup</strong></h3><p>After signing in the sandbox, we needs to set up a few things for the sandbox environment, such as brew, zsh, claude</p><p><strong>Install brew</strong></p><p>Usually we use the bash command provided by brew to pull and install it. However it highly likely doesn’t work for this sandbox.</p><p>We’ll need to install brew manually. Let try this</p><pre>#Create directory that houses brew<br>mkdir ~/homebrew &amp;&amp; cd ~/homebrew<br><br>#Pull brew from github<br>git clone https://github.com/Homebrew/brew<br><br>#Config PATH<br>echo &#39;export PATH=&quot;$HOME/homebrew/brew/bin:$PATH&quot;&#39; &gt; ~/.zshrc<br><br>#Apply the config<br>source ~/.zshrc<br></pre><p>After all, let validate it by the commands</p><pre>#Check if brew is configured in PATH in zshrc<br>which brew<br><br>#Check brew version<br>brew -v</pre><h4>Install zsh</h4><p>This is optional step. Skip this step if you don’t use zsh</p><pre>brew install zsh</pre><h3>Code-server</h3><p>Code server is an open-source project (learn more here -&gt; <a href="https://github.com/coder/code-server">code-server</a> )</p><p>Code server is basically a server running on your machine, and it runs like a web server, so your can access your source code over the internet by using a web browser like Safari, Chrome, and so on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*outfXlubJ9LrW3KwLIrsLg.png" /><figcaption>Code server offers remote access to via a browser-based IDE</figcaption></figure><p>The GUI of code-server is exact as same as Visual Studio Code , so most of us is familiar with this.</p><p><strong>Install code-server</strong></p><p>Use brew to install the code-server, it is super easy</p><pre>brew install code-server</pre><p>The config of code-server is placed at /Users/lab/.config/code-server/config.yaml</p><pre>bind-addr: 127.0.0.1:8080<br>auth: password<br>password: cbbf4d5f60e55eb90649ff89<br>cert: false</pre><p>You might change the password with your own.</p><h4>Run code-server</h4><p>There are 2 ways to start this code-server, so use it as your plan.</p><pre>#1 - Start code-server manually<br>code-server<br><br>#2 - Start code-server as a background server<br>brew services start code-server</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*kvH8OW4xivYeotRKW9XVlQ.png" /><figcaption>start code-server</figcaption></figure><p>After startup, open a browser and try <a href="http://localhost:8080">http://localhost:8080</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*qMeGY2k8ghLLT9Pdz4nl_Q.png" /><figcaption>Access code-serve via browser</figcaption></figure><h3>Claude Code for vibe coding</h3><p>For vibe coding, there are many options with Visual Studio Code. Github Copilot is pre-installed with Code-Server, however you can also try with Claude Code, <a href="https://github.com/anomalyco/opencode">Open-Code</a>, or other vendors.</p><p><strong>Install Claude Code for VS Code</strong></p><p>The most straightforward way to install this Claude extension is via the extension marketplace.<br>In the IDE, just open marketplace from the left menu bar. Search for Claude Code for VS Code and install</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*O2EzNV9pD96AuVwzmnZa0g.png" /></figure><p><strong>Plan B — Install extension from VSIX file.</strong></p><p>Sometimes, you may get issues on pulling the Claude extension from marketplace. If this issue occurs repeatedly, the browser-based IDE will offer you an option to download the extension file.</p><p>Please download the file, place it in sandbox directory. Then you can select and install it from the IDE</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*_T-A8UwGpFB6wUnYR2Ml1g.png" /><figcaption>Install Claude Code from VSIX file</figcaption></figure><p><strong>Install Claude CLI</strong></p><p>In the IDE, We can access the terminal and execute any command on the workstation remotely. Therefore if we need to use Claude CLI, please feel free to install it.</p><p><strong>Attention!</strong> Don’t use brew install claude to install the Claude CLI , this will install the Claude application in the outside of sandbox unnecessarily.</p><p>Try this command instead</p><pre>curl -fsSL https://claude.ai/install.sh | bash</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*32lTWZ3vLKzyJ7foDMMk9A.png" /><figcaption>Install Claude CLI in sandbox</figcaption></figure><p>Then config the <strong>PATH</strong></p><pre>echo &#39;export PATH=&quot;$HOME/.local/bin:$PATH&quot;&#39; &gt;&gt; ~/.zshrc &amp;&amp; source ~/.zshrc</pre><h3>Plan B for Vibe Coding</h3><p>Claude code is the most superior agentic coding tool in the market by far, however even when you enroll the PRO subscription, you might reach the request limit some time.</p><p>In that situation, always have a backup plan. <a href="https://opencode.ai/"><strong>open-code</strong></a><strong> </strong>seems to be a very decent agentic AI coding tool for plan B, you can hook it up with any Gen AI model on the market or with your self-host model.</p><p>Open-code setup just takes a split of second by the following command</p><pre>curl -fsSL https://opencode.ai/install | bash &amp;&amp; source ~/.zshrc</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*cPBm-LS1uz_JWYBgastmUQ.png" /><figcaption>Open-code for vibe coding</figcaption></figure><h3>Give local access</h3><p>With the code-server running, in your <strong>local network </strong>you can access and vibe code via http://locallhost:8080, or <a href="http://your_mac_ip:8080">http://your_mac_ip:8080</a></p><p><strong>Note:</strong> However, if you can’t access the code-server from other machine in your local network, you might need to turn off firewall.</p><h3><strong>Remote access over internet</strong></h3><p>There are many different ways to expose the access in public internet, each with different pros and cons:</p><p><strong>Port-Forwarding</strong>: This is very simple by setting up Port-Forwarding in the network router, and point the ip and port to the machine that hosts the code-server. However, this way is the least secure with bare http protocol. Try upgrade the code-server with https, and a valid signed cert if possible.</p><p><strong>VPN</strong>: If your router supports VPN access to home network, so this is straight forward and secure. Check if your router supports VPN access. Asus routers, and TPLink routers usually have built-in VPN feature.</p><p><strong>Revert proxy</strong>: Some providers, like Cloud flare, provide revert proxy service, this is also secure. If you cannot access thru VPN, this is a decent option. However it requires extra steps to configure and set up.</p><h3>Conclusion</h3><p><strong>Attention!</strong> Before you expose your code-server to the public internet, take security seriously. Implement HTTPS, enable strong authentication, and establish secure access through VPN or reverse proxy. Monitor your logs, keep your software updated, and conduct a thorough security audit.</p><p>Your code, databases, and intellectual property remain only as secure as the measures you implement. The technology enables freedom, but security is your responsibility.</p><p>This setup is a practical foundation and anticipate the shift from traditional development — where vibe coding represents freedom: coding from anywhere while maintaining full IDE capabilities, and professional-grade productivityTroubleshooting.</p><p>Our future will be <strong>vibe working</strong>.</p><h3><strong>Troubleshooting issues</strong></h3><p>The following is some common issues you may encounter during the setup process, so check this out.</p><ul><li><strong>Code-Server’s port is occupied</strong></li></ul><p>The default port of code-server, 8080 is very common used by default. Therefore, you should change the port in the config.</p><p>If somehow, your port is still occupied, you can try the following command to find whom is using the port.</p><pre># Find what&#39;s using it<br>lsof -i :8080<br><br># Kill it (replace PID if needed)<br>kill $(lsof -t -i:8080)</pre><ul><li><strong>Command is not found</strong></li></ul><p>When install Claude, brew, or any tools in terminal. You can always use which to check if the installed tools are configured properly.</p><p>If which returns command not found, please check <strong>PATH </strong>in<strong> </strong><strong>~/.zshrc </strong>and reapply the config by <strong>source ~/.zshrc</strong>The Critical Security</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fedace2c279" width="1" height="1" alt=""><hr><p><a href="https://medium.com/programming-passion/vibe-code-anywhere-with-just-an-ipad-5fedace2c279">Vibe Code anywhere with just an iPad</a> was originally published in <a href="https://medium.com/programming-passion">Programming lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Most Developers Will Miss Out on the AI Race]]></title>
            <link>https://medium.com/programming-passion/most-of-developers-will-miss-out-on-the-ai-race-99196deeeac7?source=rss-5cbca6dbbaed------2</link>
            <guid isPermaLink="false">https://medium.com/p/99196deeeac7</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Programming passion]]></dc:creator>
            <pubDate>Mon, 19 Jan 2026 20:55:39 GMT</pubDate>
            <atom:updated>2026-11-09T23:18:23.276Z</atom:updated>
            <content:encoded><![CDATA[<p>Since OpenAI released its first mainstream LLM, ChatGPT, it quickly made a significant impact and reached around 100 million users within just a few months. That milestone kicked off an AI wave that everyone seemed eager to jump into. Yet within the software engineering community, the initial excitement was mixed with a strong dose of skepticism.</p><h3>Coffee‑Break Gossip About AI</h3><p>Over the years, chatting with senior dev friends (mostly 5–10 years of experience in front‑end, back‑end, mobile, and web), time has flown by and everyone has started to recognize AI and change their opinions. However, most still keep their old habits, using AI tools mainly as a substitute for Stack Overflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PKjGdBCNX8rX6ScFzIUn1A.png" /><figcaption>Software Engineers gossip on AI</figcaption></figure><p>There is a quiet wave of panic now, and almost nobody wants to miss out on the AI race. Developers are increasingly pulling AI‑powered tools like Cursor and Windsurf into their daily workflow, while many enterprises remain cautious but still roll out tools such as GitHub Copilot or experiment with custom, fine‑tuned LLMs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DRK4x-s4-8rLiVQhrLbQmg.png" /><figcaption>Why Software Engineers think AI can’t replace them</figcaption></figure><p>I’m kind of agree those factors are slowing down the AI renovation a bit. Despite that, it can’t alternate my feeling that AI transformation seems inevitable. AI gets better and improves itself every second, seamlessly, tirelessly, and soon, it becomes more capable than human beings and will fade away the technical barrier.</p><h3>What do you think about AI replacing us, or if it won’t any time soon? Leave your opinion here.</h3><p>Maybe you don’t see it as a career threat for now, that’s fine, but to anyone who has the same concern, I believe this puts in a big dent about the future career of Software development, where AI will play a huge role in the development process and further.</p><h3>Secure job in AI transformation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*Ia3y_X6xryTlc6ldo096uQ.png" /></figure><p>The old school mindset will soon become legacy in the future development where we no longer focus on writing code, but delegate tasks to AI and oversee the outcomes.</p><p>AI transform will completely change the software industry, and how the software is made the next 5 years. The job market and demand will shift along with this, seeking for the skillset, and mindset that fit for the new way of software development.</p><p>In 2026, especially in software development, it is a red flag when a software engineer still uses AI like a basic Q&amp;A dialog box. Treating AI this way is a poor way to leverage its real capabilities.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99196deeeac7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/programming-passion/most-of-developers-will-miss-out-on-the-ai-race-99196deeeac7">Most Developers Will Miss Out on the AI Race</a> was originally published in <a href="https://medium.com/programming-passion">Programming lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Swift Clean Code Practice — Dependency Injection]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/programming-passion/swift-clean-code-practice-dependency-injection-57660cd4f232?source=rss-5cbca6dbbaed------2"><img src="https://cdn-images-1.medium.com/max/600/1*u_wsv3bwt6pzl44yxyuXMg.png" width="600"></a></p><p class="medium-feed-snippet">Applying DI is a very practical approach to writing clean code&#x200A;&#x2014;&#x200A;this is not new, but still a game changer. You will regret not knowing&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/programming-passion/swift-clean-code-practice-dependency-injection-57660cd4f232?source=rss-5cbca6dbbaed------2">Continue reading on Programming lab »</a></p></div>]]></description>
            <link>https://medium.com/programming-passion/swift-clean-code-practice-dependency-injection-57660cd4f232?source=rss-5cbca6dbbaed------2</link>
            <guid isPermaLink="false">https://medium.com/p/57660cd4f232</guid>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[swift-programming]]></category>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Programming passion]]></dc:creator>
            <pubDate>Fri, 22 Aug 2025 04:09:46 GMT</pubDate>
            <atom:updated>2025-08-22T04:12:28.821Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Swift Clean Code Practice — Clean Up Repetitive Code with Property Wrappers]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/programming-passion/write-clean-swift-code-with-property-wrappers-4c6ece75d8db?source=rss-5cbca6dbbaed------2"><img src="https://cdn-images-1.medium.com/max/1536/1*mtIpSRwhZna5z4ajb7kSdw.png" width="1536"></a></p><p class="medium-feed-snippet">Property wrappers are changing the way we write properties, making them safer and cleaner with less effort. You&#x2019;ll regret not knowing this.</p><p class="medium-feed-link"><a href="https://medium.com/programming-passion/write-clean-swift-code-with-property-wrappers-4c6ece75d8db?source=rss-5cbca6dbbaed------2">Continue reading on Programming lab »</a></p></div>]]></description>
            <link>https://medium.com/programming-passion/write-clean-swift-code-with-property-wrappers-4c6ece75d8db?source=rss-5cbca6dbbaed------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c6ece75d8db</guid>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[swift-programming]]></category>
            <dc:creator><![CDATA[Programming passion]]></dc:creator>
            <pubDate>Thu, 21 Aug 2025 05:56:15 GMT</pubDate>
            <atom:updated>2026-11-09T23:01:21.071Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Why doesn’t the view refresh with nested ObservableObject]]></title>
            <link>https://medium.com/programming-passion/why-doesnt-the-view-refresh-with-nested-observableobject-24b77a1e4fb1?source=rss-5cbca6dbbaed------2</link>
            <guid isPermaLink="false">https://medium.com/p/24b77a1e4fb1</guid>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[objective-c]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <dc:creator><![CDATA[Programming passion]]></dc:creator>
            <pubDate>Mon, 06 Jan 2025 03:09:10 GMT</pubDate>
            <atom:updated>2025-01-06T03:09:10.611Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*KCgvoNjmLGyeo7UQ4tXGoQ.png" /></figure><p>In SwiftUI, It’s common practice to use a ViewModel as an ObservableObject and break up the business logic into smaller, nested ObservableObjects</p><p>Below is an example of how we structure a ViewModel with nested ObservableObjects.</p><pre>class ViewModel: ObservableObject {<br><br>  var cancellable: AnyCancellable?<br>  var nestedObservableObject = NestedObservableObject()<br><br>  func increase() {<br>    nestedObservableObject.count += 1<br>  }<br>}<br><br>class NestedObservableObject: ObservableObject {<br>  @Published var count = 0  <br>}</pre><p>We also use the ViewModel in ContentView for a quick demo</p><pre>struct ContentView: View {<br><br>  @StateObject var viewModel = ViewModel()<br><br>  var body: some View {<br>    VStack {<br>      Text(&quot;Count value: \(viewModel.nestedObservableObject.count)&quot;<br>      Button {<br>          viewModel.increase()<br>      } label: {<br>          Text(&quot;Increase&quot;)<br>      }<br>    }<br>  }<br>}</pre><p>We have an increase button that increments the count in the nested ObservableObject.</p><p>When we run the code, we quickly notice that the text is not redrawn as the button is tapped.</p><h4>How to fix?</h4><p>What is the problem here? The issue arises because ContentView observes the viewModel as one of its states, but not the nested observable object. As a result, when a published property of the nested observable object changes, ContentView is likely to miss the update.</p><p>To fix this, we need to chain the viewModel and its nested observable object together as follows.</p><pre><br>class ViewModel: ObservableObject {<br><br>  var cancellable: AnyCancellable?<br>  var nestedObservableObject = NestedObservableObject()<br><br>  init {<br>      cancellable = nestedObservableObject.objectWillChange.receive(on: DispatchQueue.main).sink { [unowned self] _ in<br>        objectWillChange.send()<br>      }<br>  }<br><br>  deinit {<br>      cancellable?.cancel()<br>  }<br><br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24b77a1e4fb1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/programming-passion/why-doesnt-the-view-refresh-with-nested-observableobject-24b77a1e4fb1">Why doesn’t the view refresh with nested ObservableObject</a> was originally published in <a href="https://medium.com/programming-passion">Programming lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>