<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: David Brooks</title>
    <description>The latest articles on Forem by David Brooks (@developerdave).</description>
    <link>https://forem.com/developerdave</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3705861%2F12dff343-328a-4efe-9ab4-b6050656f6dc.png</url>
      <title>Forem: David Brooks</title>
      <link>https://forem.com/developerdave</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/developerdave"/>
    <language>en</language>
    <item>
      <title>The First 90 Days as a Software Developer: What Actually Matters</title>
      <dc:creator>David Brooks</dc:creator>
      <pubDate>Tue, 13 Jan 2026 23:48:59 +0000</pubDate>
      <link>https://forem.com/developerdave/the-first-90-days-as-a-software-developer-what-actually-matters-55p5</link>
      <guid>https://forem.com/developerdave/the-first-90-days-as-a-software-developer-what-actually-matters-55p5</guid>
      <description>&lt;h2&gt;
  
  
  The First 90 Days as a Software Developer: What Actually Matters
&lt;/h2&gt;

&lt;p&gt;Your first job as a software developer can feel overwhelming.&lt;/p&gt;

&lt;p&gt;You finally made it — but now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The codebase is massive&lt;/li&gt;
&lt;li&gt;The tickets are vague&lt;/li&gt;
&lt;li&gt;Everyone else seems faster than you&lt;/li&gt;
&lt;li&gt;You’re worried about asking “dumb” questions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The good news?&lt;br&gt;&lt;br&gt;
Success in your first 90 days has very little to do with being the best coder on the team.&lt;/p&gt;

&lt;p&gt;Here’s what &lt;em&gt;actually&lt;/em&gt; matters when you’re getting started in a real-world engineering role.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Learn the Codebase, Not the Framework
&lt;/h2&gt;

&lt;p&gt;Junior developers often focus on mastering the tech stack first:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The framework&lt;/li&gt;
&lt;li&gt;The libraries&lt;/li&gt;
&lt;li&gt;The tooling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But what matters more early on is understanding &lt;strong&gt;how your team’s system works&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That means learning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Where data comes from&lt;/li&gt;
&lt;li&gt;How features flow through the app&lt;/li&gt;
&lt;li&gt;What parts of the system are fragile&lt;/li&gt;
&lt;li&gt;Which areas people avoid touching&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reading existing code — even when it’s messy — will teach you more than tutorials ever will.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Ask “Why” Before You Ask “How”
&lt;/h2&gt;

&lt;p&gt;It’s tempting to jump straight to implementation questions:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“How do I fix this bug?”&lt;br&gt;&lt;br&gt;
“How do I build this feature?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But better questions often start with &lt;strong&gt;why&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why does this work this way?&lt;/li&gt;
&lt;li&gt;Why was this decision made?&lt;/li&gt;
&lt;li&gt;Why is this edge case important?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding &lt;em&gt;why&lt;/em&gt; something exists helps you avoid breaking it — and leads to better solutions.&lt;/p&gt;

&lt;p&gt;Asking thoughtful questions is a strength, not a weakness.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Ship Small Wins Early
&lt;/h2&gt;

&lt;p&gt;You don’t need to land a massive feature in your first month.&lt;/p&gt;

&lt;p&gt;In fact, it’s better to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fix small bugs&lt;/li&gt;
&lt;li&gt;Improve logging&lt;/li&gt;
&lt;li&gt;Clean up minor UI issues&lt;/li&gt;
&lt;li&gt;Add tests in low-risk areas&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Small wins build trust quickly.&lt;/p&gt;

&lt;p&gt;They show your team that you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate the codebase&lt;/li&gt;
&lt;li&gt;Follow conventions&lt;/li&gt;
&lt;li&gt;Deliver without drama&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reliability beats heroics early on.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Communicate More Than You Think You Need To
&lt;/h2&gt;

&lt;p&gt;One of the fastest ways junior developers get into trouble is by staying quiet too long.&lt;/p&gt;

&lt;p&gt;If you’re:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Blocked&lt;/li&gt;
&lt;li&gt;Confused&lt;/li&gt;
&lt;li&gt;Unsure about scope&lt;/li&gt;
&lt;li&gt;Behind schedule&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Say something early.&lt;/p&gt;

&lt;p&gt;Good communication looks like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Posting regular updates&lt;/li&gt;
&lt;li&gt;Calling out risks ahead of time&lt;/li&gt;
&lt;li&gt;Asking for clarification before assumptions harden&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most managers would rather hear “I’m stuck” on day one than “I’m still working on it” a week later.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Your Job Is Not to Be Brilliant — It’s to Be Reliable
&lt;/h2&gt;

&lt;p&gt;Many junior developers feel pressure to prove themselves by being impressive.&lt;/p&gt;

&lt;p&gt;In reality, teams value developers who:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Finish what they start&lt;/li&gt;
&lt;li&gt;Write readable code&lt;/li&gt;
&lt;li&gt;Accept feedback well&lt;/li&gt;
&lt;li&gt;Improve consistently&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Being reliable builds confidence.&lt;br&gt;&lt;br&gt;
Confidence leads to autonomy.&lt;br&gt;&lt;br&gt;
Autonomy leads to better work.&lt;/p&gt;

&lt;p&gt;Brilliance can come later.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;The first 90 days aren’t about mastering everything — they’re about building trust.&lt;/p&gt;

&lt;p&gt;If your teammates know they can rely on you, you’re doing great.&lt;/p&gt;

&lt;p&gt;Focus on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Learning the system&lt;/li&gt;
&lt;li&gt;Communicating clearly&lt;/li&gt;
&lt;li&gt;Delivering steady progress&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The rest will come faster than you think.&lt;/p&gt;




&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;I’m a full-stack developer with a strong focus on frontend development. I write practical, real-world advice for early-career developers navigating their first few years in the industry.&lt;/p&gt;

&lt;p&gt;If you’re interested in technical writing or frontend development, feel free to connect with me on &lt;a href="http://linkedin.com/in/david-brooks-al" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>career</category>
      <category>codenewbie</category>
      <category>productivity</category>
    </item>
    <item>
      <title>What Junior Developers Get Wrong About “Clean Code”</title>
      <dc:creator>David Brooks</dc:creator>
      <pubDate>Tue, 13 Jan 2026 23:39:03 +0000</pubDate>
      <link>https://forem.com/developerdave/what-junior-developers-get-wrong-about-clean-code-hca</link>
      <guid>https://forem.com/developerdave/what-junior-developers-get-wrong-about-clean-code-hca</guid>
      <description>&lt;h2&gt;
  
  
  What Junior Developers Get Wrong About “Clean Code”
&lt;/h2&gt;

&lt;p&gt;If you’re a junior developer, you’ve probably heard the phrase &lt;em&gt;“clean code”&lt;/em&gt; thrown around a lot.&lt;/p&gt;

&lt;p&gt;Write clean code.&lt;br&gt;&lt;br&gt;
This isn’t clean.&lt;br&gt;&lt;br&gt;
Can you refactor this to be cleaner?&lt;/p&gt;

&lt;p&gt;Early on, it’s easy to internalize the idea that clean code means &lt;em&gt;clever&lt;/em&gt;, &lt;em&gt;abstract&lt;/em&gt;, or &lt;em&gt;impressive&lt;/em&gt;. In reality, many junior developers overcorrect—and end up making their code harder to understand, not easier.&lt;/p&gt;

&lt;p&gt;Let’s talk about what clean code actually means in real-world software teams, and what junior developers commonly get wrong.&lt;/p&gt;


&lt;h2&gt;
  
  
  1. Clean Code Is Not Clever Code
&lt;/h2&gt;

&lt;p&gt;One of the biggest traps junior developers fall into is trying to be &lt;em&gt;too smart&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;You learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Advanced language features&lt;/li&gt;
&lt;li&gt;Fancy one-liners&lt;/li&gt;
&lt;li&gt;Patterns that reduce lines of code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And suddenly this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ts

if (user &amp;amp;&amp;amp; user.isActive &amp;amp;&amp;amp; user.hasPermission('ADMIN')) {
  enableAdminPanel();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Becomes this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ts

user?.isActive &amp;amp;&amp;amp; user?.hasPermission?.('ADMIN') &amp;amp;&amp;amp; enableAdminPanel();

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Is it shorter? Yes.&lt;br&gt;
Is it more readable? For most teams — no.&lt;/p&gt;

&lt;p&gt;Clean code prioritizes clarity over cleverness. If someone has to slow down to understand it, you’re already losing.&lt;/p&gt;
&lt;h2&gt;
  
  
  Readability Beats DRY (Especially Early)
&lt;/h2&gt;

&lt;p&gt;“Don’t Repeat Yourself” is a great principle — but junior developers often apply it too aggressively.&lt;/p&gt;

&lt;p&gt;This happens a lot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ts 

function handleUserState(user: User) {
  return isActiveAdmin(user)
    ? getAdminConfig(user)
    : getDefaultConfig(user);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the reader has to jump:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To &lt;code&gt;isActiveAdmin&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Then to &lt;code&gt;getAdminConfig&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Then back again&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sometimes repetition is &lt;strong&gt;intentional clarity&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In real codebases, teams often prefer a bit of duplication if it keeps logic easy to follow. DRY is a guideline, not a law.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Over-Abstraction Is Usually a Smell
&lt;/h2&gt;

&lt;p&gt;A common junior instinct is to “future-proof” everything.&lt;/p&gt;

&lt;p&gt;You might think:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“This might change later, so I should abstract it now.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That often leads to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Interfaces with only one implementation&lt;/li&gt;
&lt;li&gt;Services that wrap a single function&lt;/li&gt;
&lt;li&gt;Config-driven logic no one actually asked for&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ts

interface ButtonBehavior {
  execute(): void;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When all you really needed was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ts

onClick() {
  saveForm();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Abstractions should exist to solve &lt;strong&gt;real problems&lt;/strong&gt;, not hypothetical ones. Premature abstraction is one of the fastest ways to make a codebase harder to understand and maintain.&lt;/p&gt;

&lt;p&gt;A good rule of thumb:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you can’t clearly explain why an abstraction exists today, it probably shouldn’t exist yet.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  4. Naming Is More Important Than Patterns
&lt;/h2&gt;

&lt;p&gt;Junior developers often focus heavily on &lt;em&gt;structure&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Design patterns&lt;/li&gt;
&lt;li&gt;Architecture diagrams&lt;/li&gt;
&lt;li&gt;Folder layouts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But experienced developers tend to obsess over &lt;strong&gt;naming&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Consider this function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ts

function processData(data: any) {}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ts

Now compare it to:

function calculateWeeklyStartGoals(jobs: Job[]) {}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second example immediately tells you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What the function does&lt;/li&gt;
&lt;li&gt;What kind of data it expects&lt;/li&gt;
&lt;li&gt;Why it exists&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Clear naming:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reduces the need for comments&lt;/li&gt;
&lt;li&gt;Makes code reviews faster&lt;/li&gt;
&lt;li&gt;Helps new teammates ramp up more easily&lt;/li&gt;
&lt;li&gt;Prevents misunderstandings before they happen&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before reaching for a new pattern or abstraction, ask yourself:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Would better names make this clearer?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In many cases, improving names does more for code quality than introducing additional structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Code Is for Humans, Not Your Resume
&lt;/h2&gt;

&lt;p&gt;A tough lesson many junior developers learn over time is that code is rarely judged in isolation.&lt;/p&gt;

&lt;p&gt;Your code will be read by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Teammates reviewing your pull request&lt;/li&gt;
&lt;li&gt;Engineers maintaining it months later&lt;/li&gt;
&lt;li&gt;Developers who didn’t write it in the first place&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal isn’t to show how much you know — it’s to make the next person successful.&lt;/p&gt;

&lt;p&gt;That usually means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Writing boring, predictable code&lt;/li&gt;
&lt;li&gt;Being explicit instead of clever&lt;/li&gt;
&lt;li&gt;Following team conventions&lt;/li&gt;
&lt;li&gt;Letting your code blend into the codebase&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;“Boring” code is often &lt;strong&gt;excellent&lt;/strong&gt; code.&lt;/p&gt;

&lt;p&gt;If someone can understand your changes quickly and confidently, you’ve done your job well — even if the solution isn’t the most impressive one you could have written.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Clean code isn’t about being impressive or using advanced language features. It’s about writing code that clearly communicates intent and behaves predictably over time.&lt;/p&gt;

&lt;p&gt;If you’re early in your career, focus less on writing “perfect” code and more on writing &lt;strong&gt;understandable&lt;/strong&gt; code. Clarity compounds. The developers who grow the fastest are the ones whose code is easiest to read, review, and maintain.&lt;/p&gt;

&lt;p&gt;You don’t need to be the smartest person on the team — you need to be the most reliable.&lt;/p&gt;




&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;I’m a full-stack developer with a strong focus on frontend development. I write practical, real-world advice for early-career developers navigating their first few years in the industry.&lt;/p&gt;

&lt;p&gt;If you’re interested in technical writing or frontend development, feel free to connect with me on &lt;a href="http://linkedin.com/in/david-brooks-al" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>career</category>
      <category>codequality</category>
    </item>
    <item>
      <title>5 Common Angular Pitfalls and How to Avoid Them</title>
      <dc:creator>David Brooks</dc:creator>
      <pubDate>Sun, 11 Jan 2026 22:49:42 +0000</pubDate>
      <link>https://forem.com/developerdave/5-common-angular-pitfalls-and-how-to-avoid-them-gp0</link>
      <guid>https://forem.com/developerdave/5-common-angular-pitfalls-and-how-to-avoid-them-gp0</guid>
      <description>&lt;h2&gt;
  
  
  Beware
&lt;/h2&gt;

&lt;p&gt;Angular is a powerful framework, but even experienced developers can fall into common traps that hurt performance, maintainability, or readability. Falling victim to these small issues can quietly fuel that all-too-familiar developer ailment: imposter syndrome.&lt;/p&gt;

&lt;p&gt;In this article, I’ll walk through &lt;strong&gt;five common Angular pitfalls&lt;/strong&gt; I see in real-world applications and show how to avoid them with practical examples and best practices.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Misusing Lifecycle Hooks (&lt;code&gt;ngOnInit&lt;/code&gt;, &lt;code&gt;ngOnChanges&lt;/code&gt;)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The problem:
&lt;/h3&gt;

&lt;p&gt;Many developers overuse &lt;code&gt;ngOnInit&lt;/code&gt; or put heavy logic in &lt;code&gt;ngOnChanges&lt;/code&gt;, causing unnecessary re-renders or complicated debugging.&lt;/p&gt;

&lt;h3&gt;
  
  
  The solution
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Keep lifecycle hooks focused on initialization or change detection that actually depends on input changes
&lt;/li&gt;
&lt;li&gt;Move business logic to &lt;strong&gt;services&lt;/strong&gt; instead of components&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Bad example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ts 


ngOnInit() {
  this.loadData();
  this.processData(); // heavy computation here
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Better example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ts


ngOnInit() {
  this.loadData();
}

private loadData() {
  this.dataService.getData().subscribe(data =&amp;gt; {
    this.processData(data);
  });
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Why it matters:
&lt;/h4&gt;

&lt;p&gt;Separating concerns keeps components lightweight, testable, and easier to maintain.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Overusing Two-Way Binding (&lt;code&gt;[(ngModel)]&lt;/code&gt;)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The problem
&lt;/h3&gt;

&lt;p&gt;Two-way binding is convenient, but overusing &lt;code&gt;[(ngModel)]&lt;/code&gt;—especially in larger forms—can lead to hidden side effects and messy validation logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  The solution
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;Reactive Forms&lt;/strong&gt; for anything non-trivial&lt;/li&gt;
&lt;li&gt;Reserve &lt;code&gt;ngModel&lt;/code&gt; for very simple inputs&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Reactive forms example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ts


form = new FormGroup({
  name: new FormControl('', Validators.required),
  email: new FormControl('', [
    Validators.required,
    Validators.email
  ])
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;html


&amp;lt;form [formGroup]="form"&amp;gt;
  &amp;lt;input formControlName="name" /&amp;gt;
  &amp;lt;input formControlName="email" /&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Why it matters:
&lt;/h4&gt;

&lt;p&gt;Reactive forms make validation, testing, and debugging much more predictable as your app grows.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Improper State Management (BehaviorSubject vs Signals)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The problem
&lt;/h3&gt;

&lt;p&gt;Many Angular applications rely heavily on &lt;code&gt;BehaviorSubject&lt;/code&gt; for all state, even when the state is simple. This can lead to unnecessary RxJS boilerplate and more complex code than needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  The solution
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;Signals&lt;/strong&gt; (Angular 16+) for simple reactive state&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;BehaviorSubject&lt;/code&gt; or &lt;strong&gt;NgRx&lt;/strong&gt; for shared or complex state&lt;/li&gt;
&lt;li&gt;Keep state logic in &lt;strong&gt;services&lt;/strong&gt;, not components&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Signals example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ts 


import { signal } from '@angular/core';

export class CounterService {
  counter = signal(0);

  increment() {
    this.counter.update(value =&amp;gt; value + 1);
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Why it matters:
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;If you’re already deep into NgRx, Signals won’t replace it—but they’re a great fit for local or service-level state.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Signals provide clean, readable reactivity without the overhead of observables when your state doesn’t require complex streams or operators. &lt;/p&gt;

&lt;h2&gt;
  
  
  4. Forgetting &lt;code&gt;trackBy&lt;/code&gt; in &lt;code&gt;*ngFor&lt;/code&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The problem
&lt;/h3&gt;

&lt;p&gt;When rendering lists without a &lt;code&gt;trackBy&lt;/code&gt; function, Angular destroys and recreates DOM elements whenever the list changes—even if only one item was updated. This can cause unnecessary re-renders and performance issues, especially with larger lists.&lt;/p&gt;

&lt;h3&gt;
  
  
  The solution
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Always provide a &lt;code&gt;trackBy&lt;/code&gt; function when iterating over collections&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Good practice example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;html


&amp;lt;li *ngFor="let item of items; trackBy: trackById"&amp;gt;
  {{ item.name }}
&amp;lt;/li&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ts


trackById(index: number, item: { id: number }) {
  return item.id;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Why it matters:
&lt;/h4&gt;

&lt;p&gt;Using trackBy ensures Angular only updates the elements that actually changed, significantly improving rendering performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Inefficient Change Detection
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The problem
&lt;/h3&gt;

&lt;p&gt;Default change detection can cause unnecessary checks across the component tree, which leads to degraded performance in larger applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  The solution
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;ChangeDetectionStrategy.OnPush&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Pass immutable data to components&lt;/li&gt;
&lt;li&gt;Avoid unnecessary template bindings&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ts


import { ChangeDetectionStrategy, Component, Input } from '@angular/core';

@Component({
  selector: 'app-user-card',
  templateUrl: './user-card.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class UserCardComponent {
  @Input() user!: User;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Why it matters:
&lt;/h4&gt;

&lt;p&gt;OnPush dramatically reduces unnecessary change detection cycles and helps keep your UI fast and responsive.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Key takeaways:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Avoid common lifecycle hook misuse
&lt;/li&gt;
&lt;li&gt;Prefer Reactive Forms over excessive &lt;code&gt;ngModel&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Use Signals for simple state
&lt;/li&gt;
&lt;li&gt;Optimize lists with &lt;code&gt;trackBy&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Boost performance with &lt;code&gt;OnPush&lt;/code&gt; change detection
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;I’m a full-stack developer with a strong focus on frontend development, specializing in Angular and technical writing. I write practical, example-driven guides based on real-world experience.&lt;/p&gt;

&lt;p&gt;If you’re looking for a freelance technical writer, feel free to connect with me on &lt;a href="http://linkedin.com/in/david-brooks-al" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>angular</category>
      <category>frontend</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
