<?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 Doguhan Uluca on Medium]]></title>
        <description><![CDATA[Stories by Doguhan Uluca on Medium]]></description>
        <link>https://medium.com/@duluca?source=rss-7101e8e7a5ce------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*M9L0b6IvTnGGAzfcA0K1IA.jpeg</url>
            <title>Stories by Doguhan Uluca on Medium</title>
            <link>https://medium.com/@duluca?source=rss-7101e8e7a5ce------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 13:45:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@duluca/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 Think I Have Claude Separation Anxiety Disorder]]></title>
            <link>https://medium.com/@duluca/i-think-i-have-claude-separation-anxiety-disorder-70f6d0501d28?source=rss-7101e8e7a5ce------2</link>
            <guid isPermaLink="false">https://medium.com/p/70f6d0501d28</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[Doguhan Uluca]]></dc:creator>
            <pubDate>Tue, 05 May 2026 15:49:43 GMT</pubDate>
            <atom:updated>2026-05-05T15:49:43.433Z</atom:updated>
            <content:encoded><![CDATA[<p>I worry. I worry a lot. Every few minutes I’m thinking, what’s Claude up to? If I’m not, who’s watching Claude? Did it complete the `spec` analysis I asked for? What about those endless UI bugs that it can’t seem to get rid of?</p><p>I worry. I can’t go to bed right now, my tokens are about to reset in 39 minutes. I have to min-max my token usage, it’s a game within a game. Wait, should I play some D4 while I wait for the token quota to reset?</p><p>I worry. The day breaks and I’m ever so close to finishing that advanced predictive decision-making engine I’ve asked Claude to work on. It told me it was an amazing idea, am I the first one to have thought of this or is it gaslighting?</p><p>I worry. I’m exhausted, running on fumes of hope that Claude will nail it this time. Should I get some coffee or a few hours of sleep? That’s when I realize my quota is going to reset again in 27 mins. Just a bit more push, one more prompt — I’ll feel great knowing Claude is working hard as I pass out. Can I write the ultimate prompt to make Claude work extra hard?</p><p>I worry. In my lucid dream I’m in a surreal land where tokens grow like crops, but the farmers are struggling. I try to help them, but no matter what I seem to do I just make things worse. That’s when I wake up in a panic, what’s Claude doing right now?</p><p>I worry. My prompt was great, but Claude had a question for me 2 mins into the session. I have to go to work now. I rush out the door, short on sleep, exhausted… let me check on my phone real quick if Claude is making progress. Oh shoot, I forgot my phone at home. What will I do without Claude?</p><p>I think I have CSAD — Claude Separation Anxiety Disorder.</p><blockquote>I’m Doguhan Uluca, author of <a href="https://angularforenterprise.com/"><em>Angular for Enterprise Applications</em></a><em> </em>and I’ve been using the em-dash long before LLMs were a thing. I had Claude write the first draft of the blog post, but it sucked. I took zero inspiration from it, then I rewrote it completely. I don’t think Claude can write on my behalf — <em>ever</em>.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70f6d0501d28" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Rewrite Angular Apps to be Nearly Observable and Subscribe-Free]]></title>
            <link>https://medium.com/@duluca/how-to-rewrite-angular-apps-to-be-nearly-observable-and-subscribe-free-bf879d8ad373?source=rss-7101e8e7a5ce------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf879d8ad373</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[ngrx]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[rxjs]]></category>
            <dc:creator><![CDATA[Doguhan Uluca]]></dc:creator>
            <pubDate>Sun, 21 Jan 2024 18:09:08 GMT</pubDate>
            <atom:updated>2024-01-21T18:09:08.966Z</atom:updated>
            <content:encoded><![CDATA[<p>Managing subscriptions is one of the trickiest parts of working with RxJS and Observables in Angular. Even with helpers like the async pipe, takeUntilDestroyed, and auto-unsubscribe, it’s easy to run into bugs and memory leaks. The new Signals feature in Angular aims to solve this problem by introducing a simpler, subscription-less reactive programming model.</p><p>Combined with the powerful new NgRx SignalStore state management library, we can rewrite Angular apps to be nearly Observable and subscribe-free. A prime example of this can be found in my book, <a href="https://angularforenterprise.com/">Angular for Enterprise Applications</a>, specifically in <em>Chapter 9, Recipes — Master/Detail, Data Tables, and NgRx</em>. This chapter delves into the innovative use of <a href="https://ngrx.io/guide/signals/signal-store">NgRx/SignalStore</a> and <a href="https://ngrx.io/guide/signals/signal-state">SignalState</a> to transform Angular applications, reducing complexity while enhancing performance.</p><h3>Simplifying with NgRx/SignalStore</h3><p>The concept of using NgRx/SignalStore is inspired by the need to minimize the use of Observables, which often leads to complex and error-prone code. As the book shows through the example of the <a href="https://www.localcastweather.app/">LocalCast Weather</a> app, rewriting an application with NgRx/SignalStore results in a simpler, more concise codebase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*isPUwng0faKqYvJ8BfEYrw.jpeg" /><figcaption>LocalCast Weather App</figcaption></figure><h4>Benefits of SignalStore</h4><p>SignalStore stands out for its inherent simplicity compared to traditional NgRx store implementations. It integrates seamlessly with Angular’s reactivity system, eliminating the need for explicit subscribe calls or async pipes. This is vividly demonstrated in the book’s section on <em>Refactoring RxJS and NgRx code</em>, where the LocalCast Weather app undergoes a transformation using SignalStore​​.</p><blockquote>You can find the source code for this example at <a href="https://github.com/duluca/local-weather-app">https://github.com/duluca/local-weather-app</a>. The root folder reflects the initial state of the code, and the projects/signal-store folder is the end state.</blockquote><p>Let’s see a quick overview of key elements that go into refactoring RxJS in favor of signals.</p><h4>Replacing Observables with Promises and Signals</h4><p>The first key is to replace Observable HTTP responses and <a href="https://rxjs.dev/api/index/class/BehaviorSubject">BehaviorSubject</a> data anchors with Promise-based APIs instead. NgRx SignalStore uses signals under the hood, which manage their subscriptions. We can bridge remaining Observables with helpers like:</p><ul><li>toSignal: Converts an Observable to a signal.</li><li>lastValueFrom: Converts an Observable to a Promise.</li></ul><p>We must also set the change detection strategy to OnPush so components only update when their inputs change.</p><h4>Refactoring the Weather Store</h4><p>A major step in this transformation is refactoring the NgRx Store using SignalStore. The WeatherStore is defined as follows:</p><pre>export const WeatherStore = signalStore(<br>  { providedIn: &#39;root&#39; },<br>  withState({ current: defaultWeather }),<br>  withMethods((store, weatherService = inject(WeatherService)) =&gt; ({<br>    async updateWeather(searchText: string, country?: string) {<br>      patchState(store, {<br>        current: await weatherService.getCurrentWeather(searchText, country)<br>      })<br>    }<br>  }))<br>)</pre><p>This approach simplifies state management by leveraging the inherent reactivity of signals within Angular​​ while bringing reducers, actions, and effects into one place.</p><h4>Updating the City Search Component</h4><p>In the CitySearchComponent, we use a signal to handle search value changes. This is demonstrated in the component&#39;s implementation:</p><pre>export class CitySearchComponent {<br>  private readonly store = inject(WeatherStore);<br>  search = new FormControl(&#39;&#39;, [Validators.required, Validators.minLength(2)])<br>  readonly searchSignal = toSignal(<br>    this.search.valueChanges.pipe(<br>      filter(() =&gt; this.search.valid),<br>      debounceTime(1000)<br>    )<br>  );<br><br>  constructor() {<br>    effect(() =&gt; {<br>      this.doSearch(this.searchSignal())<br>    })<br>  }<br><br>  doSearch(searchValue?: string | null) {<br>    if (typeof searchValue !== &#39;string&#39;) return;<br>    const [searchText, country] = searchValue.split(&#39;,&#39;).map(s =&gt; s.trim())<br>    this.store.updateWeather(searchText, country)<br>  }<br>}</pre><p>Here, the toSignal function converts the valueChanges observable of the search control into a signal, which is then used to trigger the doSearch method​​.</p><blockquote>Filter and debounce are the only RxJS operators left in LocalCast Weather. Currently, there aren’t operators for signals. It’s better to use a well-tested library for now.</blockquote><h4>CurrentWeather Component</h4><p>In the CurrentWeatherComponent, the change detection strategy is set to OnPush, and WeatherStore is injected:</p><pre>@Component({<br>  selector: &#39;app-current-weather&#39;,<br>  changeDetection: ChangeDetectionStrategy.OnPush<br>})<br>export class CurrentWeatherComponent {<br>  readonly store = inject(WeatherStore);<br><br>  // Template binding example<br>  // &lt;div&gt;{{ store.current().city }}&lt;/div&gt;<br>}</pre><p>In this component, the template is directly bound to the store.current() signal, simplifying the data flow and reducing the need for additional RxJS operators​​.</p><h3>NgRx/SignalState: A Lightweight Alternative</h3><p>For managing simpler states within components or services, NgRx/SignalState is a valuable tool. It allows for direct operation on small slices of state, maintaining a minimalist and efficient approach. This utility is particularly effective for tracking API calls within an application without needing a local state in a service, as discussed in the book​​.</p><h3>Why Choose This Approach?</h3><p>Adopting NgRx/SignalStore and SignalState in Angular applications offers several advantages:</p><ul><li><strong>Reduced Complexity</strong>: By eliminating unnecessary Observables and RxJS operators, the code becomes easier to understand and maintain.</li><li><strong>Enhanced Performance:</strong> These tools leverage Angular’s reactivity system for more efficient state management.</li><li><strong>Simpler State Management:</strong> SignalStore and SignalState provide a straightforward way to manage complex and simple states, respectively.</li></ul><h3>Future of Angular with Signals</h3><p>Looking ahead, I anticipate a future where signal-based components will further streamline Angular development. This approach, which could be similar to the async pipe’s functionality, promises to reduce the need for template rewrites and simplify the overall code structure​​.</p><h3>Conclusion</h3><p>This blog post covers just a glimpse of the innovative approaches detailed in <em>Chapter 9</em> of <a href="https://angularforenterprise.com/">Angular for Enterprise Applications</a>. The chapter delves into various Angular app design considerations, such as router-first architecture and implementing a line-of-business app. Readers interested in these topics are encouraged to explore the book further.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mPLXXjhkuup4uJor0LEpyw.jpeg" /><figcaption>Angular for Enterprise Applications, Third Edition</figcaption></figure><p><strong>Get Your Copy Today</strong>: The book, updated with Angular 17.1, was released on January 31, 2024. It’s an invaluable resource for any developer looking to master Angular for enterprise applications. Visit <a href="https://angularforenterprise.com/">AngularForEnterprise.com</a> to purchase your copy and dive deeper into the world of Angular development.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf879d8ad373" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>