<?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>DEV Community: Damian Demasi</title>
    <description>The latest articles on DEV Community by Damian Demasi (@colocodes).</description>
    <link>https://dev.to/colocodes</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%2F420036%2Ff296ad9d-37e0-4c30-a4f7-84e5c5455d14.png</url>
      <title>DEV Community: Damian Demasi</title>
      <link>https://dev.to/colocodes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/colocodes"/>
    <language>en</language>
    <item>
      <title>Claude Code Crash Course</title>
      <dc:creator>Damian Demasi</dc:creator>
      <pubDate>Sun, 29 Mar 2026 06:21:51 +0000</pubDate>
      <link>https://dev.to/colocodes/claude-code-crash-course-m3o</link>
      <guid>https://dev.to/colocodes/claude-code-crash-course-m3o</guid>
      <description>&lt;p&gt;The first time you look at Claude Code closely, it can feel like a box full of parts that all seem important, but not obviously related.&lt;/p&gt;

&lt;p&gt;You see &lt;code&gt;CLAUDE.md&lt;/code&gt;. Then rules. Then skills. Then hooks. Then subagents. Then MCP servers. Then… the list goes on. Then context management, planning before coding, verifying outputs, and avoiding letting the session turn into a mess. At first glance, it is easy to think: &lt;em&gt;why are there so many pieces just to get an AI coding workflow working well?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;But after spending some time with these concepts, I think the answer is actually pretty simple.&lt;/p&gt;

&lt;p&gt;Claude Code is not one thing. It is a small operating system for AI-assisted development.&lt;/p&gt;

&lt;p&gt;And like any good system, different parts exist for different jobs.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Start here. Claude Code needs memory, structure, and reach&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A good mental model is this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;CLAUDE.md&lt;/code&gt; and rules shape behaviour.&lt;/li&gt;
&lt;li&gt;Skills package reusable know-how.&lt;/li&gt;
&lt;li&gt;Hooks enforce automatic actions.&lt;/li&gt;
&lt;li&gt;Subagents isolate work.&lt;/li&gt;
&lt;li&gt;MCP servers connect Claude to the outside world.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That is the big picture (mainly, because there is more to it, but this is enough to get us started).&lt;/p&gt;

&lt;p&gt;Once you see it that way, the moving parts stop feeling random. They start feeling like layers. The interesting part is not learning each feature in isolation, but understanding &lt;strong&gt;what problem each one solves, and what happens when you try to use the wrong one for that problem&lt;/strong&gt;. &lt;a href="https://code.claude.com/docs/en/overview" rel="noopener noreferrer"&gt;Anthropic’s docs&lt;/a&gt; make that distinction pretty clear. &lt;code&gt;CLAUDE.md&lt;/code&gt; gives persistent instructions, rules can scope those instructions more precisely, skills extend Claude with reusable playbooks, hooks provide deterministic automation, subagents work in separate contexts with their own tools and prompts, and MCP is the bridge to external tools, data sources, and APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;code&gt;CLAUDE.md&lt;/code&gt; and rules. The behavioural layer&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If I had to pick the first thing to set up in Claude Code, it would be this.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;CLAUDE.md&lt;/code&gt; is where you put persistent instructions that Claude should carry into every session for a project, for your personal workflow, or even across an organisation. &lt;a href="https://code.claude.com/docs/en/memory#claude-md-files" rel="noopener noreferrer"&gt;The docs&lt;/a&gt; describe it as plain markdown that Claude reads at the start of every session. They also make an important point that is easy to miss: these instructions are context, not hard enforcement. So if the file is vague, bloated, or contradictory, performance drops. Anthropic recommends keeping it specific, concise, and well-structured, with a rough target of under &lt;code&gt;200&lt;/code&gt; lines per file.&lt;/p&gt;

&lt;p&gt;That last bit matters more than it seems.&lt;/p&gt;

&lt;p&gt;A lot of people treat instruction files like a dumping ground. They keep adding preferences, workflows, architecture notes, testing conventions, edge cases, and random reminders until the thing becomes unreadable. Then they wonder why the agent follows it inconsistently. The problem is not that the model is “bad at instructions.” The problem is that the instruction layer is carrying too much weight.&lt;/p&gt;

&lt;p&gt;That is where &lt;strong&gt;rules&lt;/strong&gt; come in.&lt;/p&gt;

&lt;p&gt;For larger projects, Anthropic recommends organising instructions inside &lt;code&gt;.claude/rules/&lt;/code&gt;, and those rules can even be path-specific so they only load when Claude is working in matching areas of the codebase. That means you do not need every frontend rule, testing rule, security note, and data migration convention loaded all the time. You can scope them. In other words, &lt;code&gt;CLAUDE.md&lt;/code&gt; should define the broad operating principles of the project, while &lt;strong&gt;rules&lt;/strong&gt; help keep that guidance modular and targeted.&lt;/p&gt;

&lt;p&gt;So, if you want one simple distinction:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Use &lt;code&gt;CLAUDE.md&lt;/code&gt; for shared default behaviour. Use rules when the project is getting too big for one instruction file to stay sharp.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Skills. The reusable playbook layer&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This is where Claude Code starts getting interesting.&lt;/p&gt;

&lt;p&gt;A skill is not just “more instructions.” A skill is a packaged capability. &lt;a href="https://code.claude.com/docs/en/skills#extend-claude-with-skills" rel="noopener noreferrer"&gt;Anthropic defines skills&lt;/a&gt; around a &lt;code&gt;SKILL.md&lt;/code&gt; file. Claude can load a skill automatically when it is relevant, or you can invoke it directly with a slash command (&lt;code&gt;/&lt;/code&gt;) based on the skill name (&lt;code&gt;/my_skill&lt;/code&gt;). Skills can also include frontmatter, supporting files, argument handling, restricted tool access, and even subagent execution.&lt;/p&gt;

&lt;p&gt;That changes the way you should think about them.&lt;/p&gt;

&lt;p&gt;A rule says, “here is how we do things around here.”&lt;/p&gt;

&lt;p&gt;A skill says, “when this kind of task appears, here is the exact playbook to follow.”&lt;/p&gt;

&lt;p&gt;That is a huge difference.&lt;/p&gt;

&lt;p&gt;For example, suppose your team has a repeatable workflow for debugging flaky tests, preparing release notes, reviewing API design, or migrating components from one pattern to another. You &lt;em&gt;could&lt;/em&gt; try to cram that into &lt;code&gt;CLAUDE.md&lt;/code&gt;, but then every session pays the context cost whether that workflow is relevant or not. Skills solve that by staying optional and task-focused. Anthropic explicitly positions them that way &lt;a href="https://code.claude.com/docs/en/skills#extend-claude-with-skills" rel="noopener noreferrer"&gt;in the docs&lt;/a&gt; and even notes that for task-specific instructions that do not need to live in context all the time, skills are the better fit.&lt;/p&gt;

&lt;p&gt;This is one of those places where the abstraction really clicks.&lt;/p&gt;

&lt;p&gt;A good Claude Code setup is not just about telling the model how your codebase works, but about identifying &lt;strong&gt;which workflows deserve to become first-class tools&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That is what skills are.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Hooks. The enforcement layer&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If &lt;code&gt;CLAUDE.md&lt;/code&gt; and skills are about guidance, &lt;strong&gt;hooks&lt;/strong&gt; are about guarantees.&lt;/p&gt;

&lt;p&gt;Anthropic &lt;a href="https://code.claude.com/docs/en/hooks-guide#automate-workflows-with-hooks" rel="noopener noreferrer"&gt;describes hooks&lt;/a&gt; as user-defined shell commands that run at specific points in Claude Code’s lifecycle. Their wording is important here: hooks provide &lt;strong&gt;deterministic control&lt;/strong&gt;. In other words, they are for the things that &lt;strong&gt;must happen, every time, without relying on the model to remember or choose correctly&lt;/strong&gt;. The best practices guide reinforces the same distinction: unlike &lt;code&gt;CLAUDE.md&lt;/code&gt;, which is advisory, hooks are deterministic and guarantee the action happens.&lt;/p&gt;

&lt;p&gt;That makes hooks the right tool for a very specific category of problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run formatting after edits.&lt;/li&gt;
&lt;li&gt;Block writes to protected files.&lt;/li&gt;
&lt;li&gt;Send a notification when Claude needs input.&lt;/li&gt;
&lt;li&gt;Reinject context after compaction.&lt;/li&gt;
&lt;li&gt;Audit configuration changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hooks are workflow mechanics. If you try to solve these mechanics with prompts alone, you are basically &lt;strong&gt;hoping&lt;/strong&gt; the model behaves. Hooks exist so you do not need hope.&lt;/p&gt;

&lt;p&gt;This is also where a lot of AI workflows quietly become trustworthy. Not because the model got smarter, but because some parts of the workflow stopped depending on the model entirely.&lt;/p&gt;

&lt;p&gt;That is a pattern worth paying attention to.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The more a task sounds like “always do X when Y happens,” the more likely it belongs in a hook, not in a prompt.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Subagents. The isolation layer&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Subagents are one of the clearest signs that Claude Code is built for agentic work, not just chat.&lt;/p&gt;

&lt;p&gt;Anthropic &lt;a href="https://code.claude.com/docs/en/sub-agents#create-custom-subagents" rel="noopener noreferrer"&gt;describes subagents&lt;/a&gt; as specialised AI assistants that run in their own context window, with their own system prompt, tool access, and permissions. Claude can delegate work to them when a task matches the subagent’s description, and the subagent works independently before returning the result. The docs also point out why this matters: subagents preserve context, enforce constraints, specialise behaviour, and can route work to different models.&lt;/p&gt;

&lt;p&gt;In long coding sessions, context gets polluted fast. Research, false starts, logs, file reads, debugging dead ends, and exploratory thoughts all pile into the same conversation. Anthropic’s &lt;a href="https://code.claude.com/docs/en/best-practices" rel="noopener noreferrer"&gt;best practices page&lt;/a&gt; repeatedly emphasises that context is the most important resource to manage, because performance degrades as the context window fills.&lt;/p&gt;

&lt;p&gt;Subagents are how you stop every task from becoming everyone’s problem:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Need a security pass across many files? Use a security reviewer subagent.&lt;/li&gt;
&lt;li&gt;Need research on a subsystem before implementation? Delegate it.&lt;/li&gt;
&lt;li&gt;Need a focused investigation that should not clutter the main thread? Subagent.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I think this is one of the most underrated shifts in AI coding workflows. The question is no longer just “what should the model do?” It is also “&lt;strong&gt;which context should do it?&lt;/strong&gt;”&lt;/p&gt;

&lt;p&gt;That is a different level of workflow design.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;MCP servers. The reach layer&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Without MCP, Claude Code is mostly limited to the local environment and whatever tools it already has access to. With MCP, it can reach out.&lt;/p&gt;

&lt;p&gt;Anthropic &lt;a href="https://code.claude.com/docs/en/mcp#connect-claude-code-to-tools-via-mcp" rel="noopener noreferrer"&gt;describes MCP,&lt;/a&gt; the Model Context Protocol, as an open standard that lets Claude Code connect to external tools and data sources through MCP servers. Their examples include issue trackers, monitoring platforms, databases, design tools, and workflow automation systems. They also note an important security warning: third-party MCP servers are not universally verified, and untrusted servers can introduce prompt injection or other risks.&lt;/p&gt;

&lt;p&gt;This is where Claude Code stops being “an assistant in my repo” and starts becoming “an agent in my workflow.” That sounds exciting, and it is. But it also changes the stakes.&lt;/p&gt;

&lt;p&gt;Once Claude can read tickets, inspect production signals, query a database, read Figma, or draft emails, the design problem becomes larger than coding. You are now designing an operational system. Permissions matter. Trust boundaries matter. Server choice matters. Tool access matters.&lt;/p&gt;

&lt;p&gt;So while MCP is easily the most expansive capability in the stack, it is also the one that benefits most from restraint.&lt;/p&gt;

&lt;p&gt;Just because Claude &lt;em&gt;can&lt;/em&gt; connect to everything does not mean it should.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How these parts fit together in practice&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Here is the cleanest way I can describe the whole stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;CLAUDE.md&lt;/code&gt; tells Claude how to behave by default.&lt;/li&gt;
&lt;li&gt;Rules narrow that guidance by topic or path.&lt;/li&gt;
&lt;li&gt;Skills package repeatable expertise or workflows.&lt;/li&gt;
&lt;li&gt;Hooks automate mandatory actions.&lt;/li&gt;
&lt;li&gt;Subagents keep big or noisy tasks isolated.&lt;/li&gt;
&lt;li&gt;MCP servers connect Claude to outside systems.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A practical workflow might look like this:&lt;/p&gt;

&lt;p&gt;Your &lt;code&gt;CLAUDE.md&lt;/code&gt; defines coding standards, project conventions, and preferred commands. A rule file adds stricter guidance for the &lt;code&gt;/api&lt;/code&gt; directory. A skill gives Claude your internal release checklist. A hook runs linting after edits and blocks writes to a protected migration folder. A subagent handles security review in its own context. MCP connects Claude to GitHub, Jira, Sentry, and your database.&lt;/p&gt;

&lt;p&gt;At that point, Claude Code is no longer just reacting to prompts, but operating inside a designed environment. And I think that is the real lesson here.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The quality of the workflow does not come from one magical feature. It comes from &lt;strong&gt;putting the right responsibility in the right layer&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Best practices that actually matter&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Anthropic’s &lt;a href="https://code.claude.com/docs/en/best-practices" rel="noopener noreferrer"&gt;best practices page&lt;/a&gt; covers a lot, but a few ideas stand out because they connect directly to all the moving parts above.&lt;/p&gt;

&lt;p&gt;First, give Claude &lt;strong&gt;a way to verify its work&lt;/strong&gt;. Tests, screenshots, and expected outputs dramatically improve results because Claude can check itself instead of making you the only feedback loop.&lt;/p&gt;

&lt;p&gt;Second, &lt;strong&gt;explore first, then plan, then code&lt;/strong&gt;. Anthropic recommends separating research and planning from implementation, especially for tasks that touch multiple files or unfamiliar areas. That maps nicely to &lt;a href="https://code.claude.com/docs/en/permission-modes#start-and-use-plan-mode" rel="noopener noreferrer"&gt;&lt;strong&gt;plan mode&lt;/strong&gt;&lt;/a&gt;, but also to skills and subagents when you want a more structured workflow.&lt;/p&gt;

&lt;p&gt;Third, provide &lt;strong&gt;specific context&lt;/strong&gt;. Reference files, constraints, patterns, and symptoms. Claude can infer a lot, but it cannot read your mind (yet 😅).&lt;/p&gt;

&lt;p&gt;And finally, &lt;strong&gt;manage context aggressively&lt;/strong&gt;. Use &lt;code&gt;/clear&lt;/code&gt; between unrelated tasks and avoid stuffing persistent instructions with everything under the sun.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Most of Claude Code’s “moving parts” are really context management tools in disguise.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Closing thoughts&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When people first look at Claude Code, they often ask which feature matters most. I think that is the wrong question.&lt;/p&gt;

&lt;p&gt;The better question is: &lt;strong&gt;what kind of problem am I trying to solve?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the problem is persistent guidance, reach for &lt;code&gt;CLAUDE.md&lt;/code&gt; and rules.&lt;/li&gt;
&lt;li&gt;If the problem is reusable know how, reach for skills.&lt;/li&gt;
&lt;li&gt;If the problem is guaranteed automation, reach for hooks.&lt;/li&gt;
&lt;li&gt;If the problem is isolation and focus, reach for subagents.&lt;/li&gt;
&lt;li&gt;If the problem is external connectivity, reach for MCP.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is when the system starts making sense.&lt;/p&gt;

&lt;p&gt;Claude Code does not become powerful because it has many parts. It becomes powerful when each part has a clear job. And honestly, that is probably the deeper pattern behind good AI workflows in general. Not more prompts. Not more cleverness. Better boundaries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical takeaway:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start with a small, sharp &lt;code&gt;CLAUDE.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Add rules only when the project needs more structure&lt;/li&gt;
&lt;li&gt;Turn repeated workflows into skills&lt;/li&gt;
&lt;li&gt;Use hooks for anything that must happen every time&lt;/li&gt;
&lt;li&gt;Use subagents to protect context&lt;/li&gt;
&lt;li&gt;Add MCP carefully, with trust and permissions in mind&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Which part of Claude Code feels most useful to you right now: rules, skills, hooks, subagents, or MCP servers, and why?&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>InboxGuilt and the Tone Dial Feature</title>
      <dc:creator>Damian Demasi</dc:creator>
      <pubDate>Sat, 07 Mar 2026 07:39:20 +0000</pubDate>
      <link>https://dev.to/colocodes/inboxguilt-and-the-tone-dial-feature-393i</link>
      <guid>https://dev.to/colocodes/inboxguilt-and-the-tone-dial-feature-393i</guid>
      <description>&lt;p&gt;The Monday standup starts like they all do. Cameras on. Microphones half muted. Someone is chewing like they’re trying to hide it. Someone else has the haunted look of a person who woke up to a calendar invite titled “Quick sync” with no agenda.&lt;/p&gt;

&lt;p&gt;Then Milo, the founder of InboxGuilt, joins the call ten minutes late, already mid sentence.&lt;/p&gt;

&lt;p&gt;“Ok. Great. Love the energy. I’m going to keep this short.”&lt;/p&gt;

&lt;p&gt;He never keeps it short.&lt;/p&gt;

&lt;p&gt;He shares his screen. A slide deck appears with one title in 64pt font:&lt;/p&gt;

&lt;p&gt;TONE DIAL&lt;/p&gt;

&lt;p&gt;Under it, a single line.&lt;/p&gt;

&lt;p&gt;Make the nudges feel personal. Make them feel… inevitable.&lt;/p&gt;

&lt;p&gt;Milo grins like he’s proud of himself, which is always a bad sign.&lt;/p&gt;

&lt;p&gt;“Here’s the thing,” he says. “We have product market fit. People are paying to be shamed by an email robot. That’s incredible. But we have a problem.”&lt;/p&gt;

&lt;p&gt;He clicks to the next slide. It is a screenshot of an angry customer email.&lt;/p&gt;

&lt;p&gt;Subject: “Your app is being rude to my entire company.”&lt;/p&gt;

&lt;p&gt;Milo reads it out loud, dramatically.&lt;/p&gt;

&lt;p&gt;“‘We asked for gentle reminders. Your system wrote, and I quote, ‘This has been pending long enough to qualify for a loyalty program.’ Our CEO received that. Please advise.’”&lt;/p&gt;

&lt;p&gt;A couple of people laugh. Mostly because the line is good. Mostly because the CEO thing is terrifying.&lt;/p&gt;

&lt;p&gt;Milo points at the email.&lt;/p&gt;

&lt;p&gt;“This is feedback. This is engagement. This is… opportunity.”&lt;/p&gt;

&lt;p&gt;He clicks again.&lt;/p&gt;

&lt;p&gt;Now it’s a simple UI mock. A slider with five notches:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Friendly&lt;/li&gt;
&lt;li&gt;Supportive&lt;/li&gt;
&lt;li&gt;Firm&lt;/li&gt;
&lt;li&gt;Manager energy&lt;/li&gt;
&lt;li&gt;Consultant with a smile&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;He circles it like he’s revealing a cure for procrastination.&lt;/p&gt;

&lt;p&gt;“The Tone Dial,” he says. “Admins pick a default tone for the org. Team leads can pick tone for their team. Users can choose a personal preference if the admin allows it. Everyone gets nudges that match their culture.”&lt;/p&gt;

&lt;p&gt;He pauses.&lt;/p&gt;

&lt;p&gt;“And,” he adds, “it is a paid feature.”&lt;/p&gt;

&lt;p&gt;That wakes everyone up.&lt;/p&gt;

&lt;p&gt;Milo keeps going. “This is a platform moment. This is how we stop accidentally emailing HR violations. This is how we increase retention. This is how we upsell.”&lt;/p&gt;

&lt;p&gt;He flips to another slide. It’s a chart that goes up and to the right. Nobody knows what the y axis is. Nobody asks.&lt;/p&gt;

&lt;p&gt;He turns back to the camera.&lt;/p&gt;

&lt;p&gt;“So. I need someone to ship it this week. Ideally today. No pressure.”&lt;/p&gt;

&lt;p&gt;You feel your stomach tighten. It is the physical sensation of a Jira ticket being assigned in real time.&lt;/p&gt;

&lt;p&gt;Milo looks straight at you on the call.&lt;/p&gt;

&lt;p&gt;“Perfect. You.”&lt;/p&gt;

&lt;p&gt;A ping pops up. Jira. New ticket assigned.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IG 482. Implement Tone Dial for Nudge Generation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You click it. It is somehow both vague and terrifying.&lt;/p&gt;

&lt;p&gt;Acceptance criteria, as written by Milo:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add the Tone Dial setting to the admin dashboard.&lt;/li&gt;
&lt;li&gt;Store the setting per org, per team, and optionally per user.&lt;/li&gt;
&lt;li&gt;Update the nudge generation pipeline so the AI follows the selected tone.&lt;/li&gt;
&lt;li&gt;Ensure we do not send anything that could get us sued.&lt;/li&gt;
&lt;li&gt;Roll out behind a feature flag.&lt;/li&gt;
&lt;li&gt;Add analytics tracking for Tone Dial usage.&lt;/li&gt;
&lt;li&gt;Make it feel delightful.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You scroll down. There is a final note.&lt;/p&gt;

&lt;p&gt;“Also, no breaking changes pls. We have a demo Thursday.”&lt;/p&gt;

&lt;p&gt;You look back at the call. Milo is already wrapping up, which means he’s about to add one more thing.&lt;/p&gt;

&lt;p&gt;“One last detail,” he says. “This is important.”&lt;/p&gt;

&lt;p&gt;He leans in like he’s sharing a secret.&lt;/p&gt;

&lt;p&gt;“I do not want the Tone Dial to just change adjectives. I want it to change the intent. Friendly is like, ‘Hey, you got this.’ Consultant with a smile is like, ‘Sharing for visibility that you said you’d do this yesterday.’ Same facts. Different emotional damage.”&lt;/p&gt;

&lt;p&gt;He smiles again. The kind of smile that belongs in a case study.&lt;/p&gt;

&lt;p&gt;“Ok. That’s it. Ship it.”&lt;/p&gt;

&lt;p&gt;The call ends.&lt;/p&gt;

&lt;p&gt;Your inbox pings. InboxGuilt is emailing you a nudge. It has your name in it, which feels personal in the worst way.&lt;/p&gt;

&lt;p&gt;Subject: Quick nudge&lt;/p&gt;

&lt;p&gt;Body: “Just flagging that you are now the owner of IG 482. No rush. Unless you consider Thursday a rush.”&lt;/p&gt;

&lt;p&gt;You stare at it for a second.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy241jiyv41yy0fpnuuuq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy241jiyv41yy0fpnuuuq.png" alt=" " width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then you open Cursor.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://side-quest-engineering-fi3openmg-colocodes-projects.vercel.app/posts/demo-adventure" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fop6yxl6qdnd80ulpmenn.png" alt=" " width="800" height="222"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cursor</category>
      <category>ai</category>
      <category>vibecoding</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The Power of Microtools: How AI and "Vibe Coding" Are Changing the Way We Build</title>
      <dc:creator>Damian Demasi</dc:creator>
      <pubDate>Wed, 18 Jun 2025 11:58:59 +0000</pubDate>
      <link>https://dev.to/colocodes/the-power-of-microtools-how-ai-and-vibe-coding-are-changing-the-way-we-build-5df8</link>
      <guid>https://dev.to/colocodes/the-power-of-microtools-how-ai-and-vibe-coding-are-changing-the-way-we-build-5df8</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; We’re no longer limited to using generic productivity tools. With the rise of AI-assisted coding and platforms like v0, Bolt, Cursor, and Windsurf, it’s now possible to build simple, custom tools (microtools) that fit the way you think and work. This shift is not just about convenience; it marks a deeper change in how we relate to software. We’re moving from using tools to making them. These tools aren’t always clean or scalable, but they let you solve your own problems without waiting for someone else to build the solution. That said, real programming knowledge still matters, especially when you're building something meant to last. AI gives us speed and leverage, but it’s skilled developers who make things work.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Organizing your ideas, tasks, or notes often means using a general-purpose app like Notion, Evernote, or Trello. These tools are sleek and flexible, but they come with an unspoken rule: you have to adjust your workflow to match how the tool wants you to think. They are powerful, but often lack the flexibility to fully adapt to your specific needs or preferences.&lt;/p&gt;

&lt;p&gt;Now, something is shifting. AI has made it easier than ever to experiment, automate, and create lightweight custom tools on your own. With AI copilots, natural language interfaces, and frictionless development environments, you can quickly build &lt;strong&gt;microtools&lt;/strong&gt;, which are small, purpose-built scripts or apps tailored to your personal workflows.&lt;/p&gt;

&lt;p&gt;These tools aren’t designed for scale or mass appeal. They’re meant for you. That specificity is powerful, but it also comes with limits. They might break easily, lack polish, or be hard to maintain. Still, for solving niche or personal problems, they might do the job far better than a bloated all-in-one platform.&lt;/p&gt;

&lt;p&gt;Instead of changing your habits to fit someone else's design, now you can create simple tools that match the way you already think and get things done. This shift is not just about replacing the tools you already use. It's about gaining control over how those tools work for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is "Vibe Coding"?
&lt;/h2&gt;

&lt;p&gt;This new ability to quickly shape tools around your own thinking wouldn’t be possible without a shift in how we write code. That shift is best captured by the term "vibe coding.”&lt;/p&gt;

&lt;p&gt;If you're not familiar with the term "vibe coding," here's a quick overview. The phrase was coined by computer scientist Andrej Karpathy, co-founder of OpenAI and former head of AI at Tesla, in early 2025. Vibe coding refers to a conversational, hands-off approach to programming that uses large language models to do the heavy lifting. Instead of writing code line by line, Karpathy explained it as: "I just see things, say things, run things, and copy-paste things, and it mostly works.”&lt;/p&gt;

&lt;p&gt;Vibe coding is about getting quick, functional results from natural language prompts, with the AI generating most of the code. It's a fast, expressive, and surprisingly productive way to build, especially for throwaway weekend projects or exploratory ideas. That said, Karpathy himself noted its limitations. AI tools don’t always understand or fix bugs, and sometimes you're left experimenting until something works.&lt;/p&gt;

&lt;p&gt;Vibe coding is not so much about writing perfectly structured code. It's more about moving quickly, trying things out, and learning through doing. You give up a bit of accuracy and detailed control so that you can experiment and make progress faster. For many people who build things, that trade-off feels worth it. It’s the perfect bridge between idea and execution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Now?
&lt;/h2&gt;

&lt;p&gt;The ecosystem of AI-powered tools has exploded, making the idea-to-app pipeline smoother than ever. What once took days now happens in hours, thanks to new platforms designed with builders, not just developers, in mind.&lt;/p&gt;

&lt;p&gt;Take &lt;strong&gt;v0 by Vercel&lt;/strong&gt;, for example (or Bolt, Lovable, and many others). It lets you generate not just UI components or full pages, but entire full-stack apps using natural language prompts. Want a dashboard with a few charts, a login screen, and a backend to store user data? Just describe it. v0 responds with React and Tailwind CSS code, and good business logic structured around a Next.js app. Once you're done, you can deploy straight to Vercel, with all the scalability and performance it provides.&lt;/p&gt;

&lt;p&gt;For those who prefer to work closer to the code, tools like &lt;strong&gt;Cursor&lt;/strong&gt; and &lt;strong&gt;Windsurf&lt;/strong&gt; are redefining the developer experience. Both are forks of Visual Studio Code with built-in AI enhancements. They offer features like smart code generation, contextual refactoring, and natural language queries over your codebase.&lt;/p&gt;

&lt;p&gt;You don’t need to start from scratch anymore. You can describe your app, vibe-code your way to a working version, and refine it with professional-grade tools.&lt;/p&gt;

&lt;p&gt;This is why now is different. The boundary between idea and implementation is dissolving, and the time it takes to go from concept to working prototype has never been shorter.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Shift: From Platforms to Personal Systems
&lt;/h2&gt;

&lt;p&gt;Here’s the real unlock:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We’re moving from using tools to making them.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Instead of changing our behavior to fit the structure of existing apps, we now have the chance to design tools that match our individual needs. This may seem like a small shift, but it represents a big change in how we use and relate to technology.&lt;/p&gt;

&lt;p&gt;For example, I used to track the progress on a personal programming project using Notion. I spent time trying to configure it to reflect the exact structure I needed to track the progress effectively, but it always felt like I was bending my process to fit someone else’s system. Now, I have a custom-built app I made in about half a weekend. It tracks and measures progress exactly how I want, lives online with its own database, and best of all, it’s shareable and open source. That means anyone can use it, and if they want, they can fork it and adapt it to suit their own workflow.&lt;/p&gt;

&lt;p&gt;Even better, someone who doesn’t know how to tweak the code can still build their own version. With tools like v0 or Bolt, all they need is a clear idea and a few natural language prompts. Whether they want to replicate my app or build something entirely new, the entry point has never been more accessible.&lt;/p&gt;

&lt;p&gt;In short, the tools are no longer the limit. Our creativity is.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How I Replaced Notion with a Custom Tool Built Using v0&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Let me give you a concrete example. As I mentioned before, one of the microtools I built was designed to help me track progress on a side project more intuitively. It’s a dynamic task management app that runs on Next.js that lets you create projects with distinct areas and specific work items under each one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsf6hh8rbrlwzlmuupjit.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsf6hh8rbrlwzlmuupjit.png" alt="Image description" width="800" height="571"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each project has a central dashboard featuring a progress bar that updates in real time as you mark items complete. This makes it easy to get a visual snapshot of how far along you are and estimate how much work still remains. You can add tasks, assign them to areas, sort them, and even import or export your data.&lt;/p&gt;

&lt;p&gt;Everything is backed by Supabase, which handles both user authentication and database storage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw2yce5bfwof6k569xjad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw2yce5bfwof6k569xjad.png" alt="Image description" width="800" height="571"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And here’s the part that still surprises me: I built it all using &lt;strong&gt;v0 by Vercel&lt;/strong&gt; over half a weekend. What would have taken days of boilerplate setup and manual UI coding came together almost effortlessly with the help of AI.&lt;/p&gt;

&lt;p&gt;This tool is now part of my daily workflow. It fits how I think, helps me stay on track, and reminds me that solving a personal pain point can be both useful and satisfying.&lt;/p&gt;

&lt;p&gt;The best part? It’s not trying to be a full SaaS app. It doesn’t need to be. It’s just what I needed, and that’s the beauty of microtools.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can try out this app, called Project Pulse, by visiting &lt;a href="https://www.projectpulse.tools/" rel="noopener noreferrer"&gt;https://www.projectpulse.tools/&lt;/a&gt; and creating an account. If you're interested in exploring or modifying the code, the full source is available at &lt;a href="https://github.com/Colo-Codes/micro-app-project-progress-tracker" rel="noopener noreferrer"&gt;https://github.com/Colo-Codes/micro-app-project-progress-tracker&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0g46hfakv2d3p6bd63jb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0g46hfakv2d3p6bd63jb.png" alt="Image description" width="800" height="571"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’d love to hear your thoughts: &lt;strong&gt;how would you use it, and what changes or improvements would you make?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  But Don’t Get It Twisted: Knowledge Still Matters
&lt;/h2&gt;

&lt;p&gt;Vibe coding is fun. It’s powerful. And it’s a great entry point. But there’s a ceiling.&lt;/p&gt;

&lt;p&gt;Sooner or later, you’ll want to tweak that AI-generated component beyond what the prompt allows. Or you’ll hit a bug the copilot can’t fix. Or maybe you’ll want to optimize performance or build complex logic that requires actual software understanding.&lt;/p&gt;

&lt;p&gt;That’s when real programming knowledge makes all the difference.&lt;/p&gt;

&lt;p&gt;Despite all the AI hype, &lt;strong&gt;manual coding is far from dead&lt;/strong&gt;. If anything, it’s more relevant than ever. &lt;/p&gt;

&lt;p&gt;Being able to read and tweak code turns you from a passive user into an active true creator. It’s what lets you move from “good enough” to “exactly right.”&lt;/p&gt;

&lt;p&gt;If you combine a builder’s mindset with foundational coding skills, you become incredibly effective.&lt;/p&gt;

&lt;p&gt;And if you find yourself enjoying this kind of tinkering and building, that might be a sign it’s time to dive deeper. You could build a real career doing this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don’t Ship Vibes to Production
&lt;/h2&gt;

&lt;p&gt;Vibe coding is excellent for small projects, weekend experiments, or solving specific personal problems. But it’s not a replacement for the structured practices required in professional software development.&lt;/p&gt;

&lt;p&gt;If you're building something for yourself or validating an idea, vibe coding is a superpower. But when you’re working on production-grade software, especially if it will be used by real users, integrated into workflows, or scaled across teams, you need more than vibes. You need engineering discipline.&lt;/p&gt;

&lt;p&gt;Professional projects demand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scalable architecture and maintainable code&lt;/li&gt;
&lt;li&gt;Version control, testing, and CI/CD pipelines&lt;/li&gt;
&lt;li&gt;Code reviews, documentation, and shared conventions&lt;/li&gt;
&lt;li&gt;Performance considerations, security, and edge case handling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is why vibe coding alone won’t cut it. You can use it to get started, but sustainable software requires real skills and best practices.&lt;/p&gt;

&lt;p&gt;Companies don’t hire developers just to write AI prompts. They hire developers who understand the tools deeply and can apply them intelligently. When the software you build needs to be reliable, secure, and scalable, that depth matters.&lt;/p&gt;

&lt;p&gt;AI is powerful. But experienced developers are what make it valuable.&lt;/p&gt;

&lt;p&gt;So by all means, vibe-code your next side project or internal tool. But when it’s time to go pro, put on your engineering hat.&lt;/p&gt;

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

&lt;p&gt;You don’t need to ship polished products. You don’t need to think in SaaS terms. You just need to &lt;strong&gt;solve your own problems&lt;/strong&gt;, in your own way.&lt;/p&gt;

&lt;p&gt;That’s the heart of microtools and vibe coding.&lt;/p&gt;

&lt;p&gt;And with AI now helping us bridge the gap between idea and implementation, the only real limit is your curiosity.&lt;/p&gt;




&lt;p&gt;📬 Subscribe to my &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;newsletter&lt;/a&gt; for more insights on learning, coding, and making cool stuff.&lt;/p&gt;

&lt;p&gt;💬 Or drop by &lt;a href="https://twitter.com/DamianDemasi" rel="noopener noreferrer"&gt;X&lt;/a&gt; and say hi.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>vibecoding</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to Learn Python Faster and Easier with This Notion Template</title>
      <dc:creator>Damian Demasi</dc:creator>
      <pubDate>Wed, 14 Feb 2024 19:00:00 +0000</pubDate>
      <link>https://dev.to/colocodes/how-to-learn-python-faster-and-easier-with-this-notion-template-1ghe</link>
      <guid>https://dev.to/colocodes/how-to-learn-python-faster-and-easier-with-this-notion-template-1ghe</guid>
      <description>&lt;p&gt;Do you want to learn Python or improve your skills in this popular programming language? If so, you might be interested in the &lt;a href="https://www.coursera.org/specializations/python" rel="noopener noreferrer"&gt;Python for Everybody Specialization course on Coursera&lt;/a&gt;. It’s a great way to master the basics of Python and explore its applications in data analysis, web development, and more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Python Notes Template
&lt;/h2&gt;

&lt;p&gt;But what if you need some extra help or guidance along the way? Don’t worry, I’ve got you covered. I have created a &lt;strong&gt;Notion template&lt;/strong&gt; that contains all the notes I made while doing the &lt;a href="https://www.coursera.org/specializations/python" rel="noopener noreferrer"&gt;Python for Everybody Specialization&lt;/a&gt; course (80 different topics, to be exact 😅). These notes are clear, concise, and easy to follow. You can use them to &lt;strong&gt;support your learning journey in Python&lt;/strong&gt; or as a &lt;strong&gt;standalone reference&lt;/strong&gt; to understand Python concepts better.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.devnotes.to/templates/python-notes" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr14an0da2p9jt02se52v.png" alt="Python Notes template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sounds good? Then download the &lt;strong&gt;free&lt;/strong&gt; template from &lt;a href="https://www.devnotes.to/templates/python-notes" rel="noopener noreferrer"&gt;this link&lt;/a&gt; and let me show you how to access and use these notes.&lt;/p&gt;

&lt;p&gt;First, you need to click on the “Python Notes” page in the main “Python Notes” template. This will take you to the Python Notes database, where you can find all the information you need.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe2rdcnxlpffjyqrop7pt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe2rdcnxlpffjyqrop7pt.png" alt="Python Notes template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Python Notes template database has different views that you can switch between depending on your preferences and goals.&lt;/p&gt;

&lt;h3&gt;
  
  
  Topics
&lt;/h3&gt;

&lt;p&gt;This is the default view, showing an ordered list of cards. These cards have my notes on each of the 80 topics covered in the course. It’s best to access them in the order they appear so you can build your knowledge step by step, in order.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4n10mjn7ug2fgn2tspx8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4n10mjn7ug2fgn2tspx8.png" alt="Python Notes template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you click on a card, you’ll find a note explaining the concepts covered in a specific class. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5t2uzxkf6yfgcoh8gyx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5t2uzxkf6yfgcoh8gyx.png" alt="Python Notes template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At the bottom of the note, you’ll see a list of references in the form of cards. These references usually point to the class where the concept in the note was explained and other resources that can help you learn more about that specific concept.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhf0ldgz6f7rfmrn42c0x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhf0ldgz6f7rfmrn42c0x.png" alt="Python Notes template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Topic by Area
&lt;/h3&gt;

&lt;p&gt;This view shows the list of topics conveniently organised by area of knowledge, such as variables, functions, loops, files, etc. You can use this view to focus on a specific area or review what you have learned.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1bi8qn53eq7i6z07ol0s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1bi8qn53eq7i6z07ol0s.png" alt="Python Notes template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Study Progress
&lt;/h3&gt;

&lt;p&gt;This view helps you track your learning progress and stay motivated. Here, you can move cards across the “Not Started,” “In Progress,” and “Done” columns, showing the step each Python topic has reached in your learning journey.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frei314d5x5joy266yoed.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frei314d5x5joy266yoed.png" alt="Python Notes template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Topics Table
&lt;/h3&gt;

&lt;p&gt;This view provides a detailed view of how the notes are organized and their properties. This view is useful for creating new notes, editing their properties, and managing the overall composition of the Python Notes database.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fww3yzcdyaj81ztk2l9yd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fww3yzcdyaj81ztk2l9yd.png" alt="Python Notes template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s it! You’re ready to use the Python Notes template and boost your Python skills. I hope you find it useful and enjoyable. If you have any questions or feedback, feel free to leave a comment or &lt;a href="https://twitter.com/DamianDemasi" rel="noopener noreferrer"&gt;contact me&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Download the template &lt;a href="https://www.devnotes.to/templates/python-notes" rel="noopener noreferrer"&gt;by clicking here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Advanced Template
&lt;/h2&gt;

&lt;p&gt;But... what if you want to go &lt;strong&gt;deeper&lt;/strong&gt; into your learning journey? 🤔 Well, then you can get the advanced version of the Python Notes template! The &lt;strong&gt;Python Notes and Questions&lt;/strong&gt; advanced template expands on the 80 topics offered in the free version with &lt;strong&gt;375 related questions&lt;/strong&gt; and two game-changing techniques: &lt;strong&gt;spaced repetition&lt;/strong&gt; and &lt;strong&gt;interleaving learning&lt;/strong&gt;. This template is not free but, trust me, it's worth every dollar you pay for it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.devnotes.to/templates/python-notes-and-questions" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr10fq1vpae6u2ks9c1mo.png" alt="Python Notes and Questions Template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Get the &lt;a href="https://www.devnotes.to/templates/python-notes-and-questions" rel="noopener noreferrer"&gt;advanced Python Notes and Questions template here&lt;/a&gt;!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Why Questions?
&lt;/h3&gt;

&lt;p&gt;Do you want to learn more effectively and efficiently? If so, you should try answering questions about what you are studying. Answering questions is crucial for learning, especially when you use the spaced repetition technique. Let me explain why.&lt;/p&gt;

&lt;p&gt;When you respond to questions about a topic, you're &lt;strong&gt;recalling information&lt;/strong&gt; from your memory to form an answer. This practice of recalling helps you remember and reinforces your understanding of the topic, making it easier to grasp the information. It also helps you identify any gaps in your knowledge that you need to fill.&lt;/p&gt;

&lt;p&gt;This Python Notes and Questions template implements two techniques to help you better grasp the concepts you are learning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spaced Repetition, and&lt;/li&gt;
&lt;li&gt;Interleaving learning&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's see how these techniques work and why they are useful.&lt;/p&gt;

&lt;h3&gt;
  
  
  Spaced Repetition
&lt;/h3&gt;

&lt;p&gt;When you are trying to learn a new subject, such as Python programming, you might be tempted to read a book or watch a video course and try to learn everything in one go. However, this is not the most effective way to truly understand a subject. Research shows that you will forget most of what you learned after a short time, unless you review it periodically.&lt;/p&gt;

&lt;p&gt;The most effective way to learn and remember something is to use &lt;strong&gt;spaced repetition&lt;/strong&gt;. This means going back to review the material over time, at intervals that are based on how well you remember it. When you answer questions about a topic at different times, it helps your memory. It's like giving your brain a friendly reminder about the important details right when you might be starting to forget them.&lt;/p&gt;

&lt;p&gt;The following image shows how spaced repetition works. The red line represents how much you remember over time if you review the material just once. The green lines represent how much you retain when you review the material periodically. As you can see, each time you review, you remember more and forget less. This way, you can achieve long-term retention of the information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhbnrq61wbc67bp21iaqy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhbnrq61wbc67bp21iaqy.png" alt="Spaced Repetition"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Spaced_repetition" rel="noopener noreferrer"&gt;&lt;em&gt;Source of image&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Spaced_repetition" rel="noopener noreferrer"&gt;Spaced repetition&lt;/a&gt; is a scientifically-backed learning technique (often employed with flashcards) to optimise the process of acquiring and retaining information. The underlying principle is based on the psychological phenomenon known as the "spacing effect," where the review of material is strategically spaced out over time to enhance memory retention.&lt;/p&gt;

&lt;h3&gt;
  
  
  Interleaved Learning
&lt;/h3&gt;

&lt;p&gt;Another technique that can boost your learning is interleaving, or mixing up different topics or problem types. You might think that it is easier and more efficient to focus on one topic or problem type at a time, until you master it. However, this is not the case. &lt;a href="https://www.scientificamerican.com/article/the-interleaving-effect-mixing-it-up-boosts-learning/?ssp=1&amp;amp;darkschemeovr=1&amp;amp;setlang=en&amp;amp;cc=AU&amp;amp;safesearch=moderate" rel="noopener noreferrer"&gt;Studies show&lt;/a&gt; that interleaving, or alternating between topics, can improve your learning outcomes and problem-solving skills in the long run.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr6o0vusmah1cubs81jwy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr6o0vusmah1cubs81jwy.png" alt="Interleaved Learning"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Why is interleaving effective? Because it challenges your brain to switch between different kinds of information and tasks. This makes you pay more attention and think more deeply. It also helps you see the connections and differences between the topics or problems. This way, you can develop a more flexible and robust understanding of the subject.&lt;/p&gt;

&lt;p&gt;Interleaving is especially useful when you are learning subjects that involve problem-solving, such as math, science, or programming. For example, if you are learning Python, instead of doing exercises on one topic, such as loops, you can mix up exercises on loops, variables, functions, and so on. This will help you apply your knowledge to different situations and avoid getting stuck in a rut.&lt;/p&gt;

&lt;h3&gt;
  
  
  Python Notes and Questions Template
&lt;/h3&gt;

&lt;p&gt;Now that you know how spaced repetition and interleaving can help you learn better, you might be wondering how to use them in practice. Well, you are in luck, because I have designed &lt;a href="https://www.devnotes.to/templates/python-notes-and-questions" rel="noopener noreferrer"&gt;this Python Notes and Questions template&lt;/a&gt; with these ideas in mind.&lt;/p&gt;

&lt;p&gt;This template contains a collection of questions that cover various topics and levels of difficulty in Python programming. By answering these questions regularly, you can practice spaced repetition and interleaving, and improve your Python skills.&lt;/p&gt;

&lt;p&gt;Answering questions regularly, especially with spaced repetition, in an interleaved manner, is like exercising your brain. It makes the information stick, helping you learn and remember things for a longer time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Python Questions Template User Guide
&lt;/h3&gt;

&lt;p&gt;Before you start using the Questions template for the first time, you need to do one simple thing. Click on the "Reset Questions Config" button. This button will automatically set up the dates in the template to start counting from the date you begin using it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2z23sy2zwrsj5sr40yhu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2z23sy2zwrsj5sr40yhu.png" alt="Python Notes and Questions template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After clicking the "Reset Questions Config" button, a confirmation pop-up will appear in case you clicked it accidentally. You can click "Continue" to confirm, or "Cancel" to go back.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F276jsv8m772b7gs98qta.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F276jsv8m772b7gs98qta.png" alt="Python Notes and Questions template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you confirm the "Reset Questions Config" button action, you're ready to start using the questions. Now, click on the "Python Questions" page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fox8uim13zh1izyd6gf43.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fox8uim13zh1izyd6gf43.png" alt="Python Notes and Questions template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first view you'll see is the "Recall Today" view. Here, you'll find a series of cards with questions. These questions cover various topics, implementing interleaved learning.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjkjp0hlzdaahwtnsbuw1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjkjp0hlzdaahwtnsbuw1.png" alt="Python Notes and Questions template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Try answering the questions out loud, provide examples when possible, and make your own notes. After answering, click on the card containing your answer. This will reveal the correct answer, which is a summarised version of the note related to the question found on the Python Notes page of this template.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkpahfy4kxgwmviskz13m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkpahfy4kxgwmviskz13m.png" alt="Python Notes and Questions template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Below the answer, you'll find the "Source" section, containing a link to the actual note related to the question.&lt;/p&gt;

&lt;p&gt;You can return to the question by clicking on the button highlighted in the image below or by pressing the &lt;code&gt;ESC&lt;/code&gt; key on your keyboard.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F12xvhuzm6l2qd5xdn4mx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F12xvhuzm6l2qd5xdn4mx.png" alt="Python Notes and Questions template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After checking your answer with the provided one, you'll have two possible outcomes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your answer was &lt;strong&gt;incorrect&lt;/strong&gt;: This means you need to revisit this question soon. Click the "Incorrect" button in the "Recall" section to mark the question for review again soon.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fswgqc3u2f0b33d3tjgt3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fswgqc3u2f0b33d3tjgt3.png" alt="Python Notes and Questions template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Your answer was &lt;strong&gt;correct&lt;/strong&gt;: This means you understand the question well. You'll revisit it in the future, and how far in the future will depend on the "Question Level." All questions start at level &lt;strong&gt;&lt;code&gt;0&lt;/code&gt;&lt;/strong&gt;. Increase their level by clicking on one of the five-level buttons in the "Recall" section:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the question level is &lt;strong&gt;&lt;code&gt;0&lt;/code&gt;&lt;/strong&gt;, and your answer is correct, click "Level 1" to increase its level,&lt;/li&gt;
&lt;li&gt;If the question level is &lt;strong&gt;&lt;code&gt;1&lt;/code&gt;&lt;/strong&gt;, and your answer is correct, click "Level 2," and so on.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As the "Question Level" increases, the time gap to revisit the question will also increase, implementing the &lt;strong&gt;Spaced Repetition&lt;/strong&gt; technique.&lt;/p&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbrumxoyv0qc2xagrxvxl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbrumxoyv0qc2xagrxvxl.png" alt="Python Notes and Questions template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see how the questions spread over time in the "Recall Calendar" view.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhtzd1saemgtyb2rw5ttu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhtzd1saemgtyb2rw5ttu.png" alt="Python Notes and Questions template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you prefer to sort the questions by difficulty, use the "Questions by Difficulty" view.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ojj4sqdzh0pgj2pqa5q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ojj4sqdzh0pgj2pqa5q.png" alt="Python Notes and Questions template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, you can view all the questions at once in the "Questions Table" view. This view is useful for performing administrative tasks on the Questions database, such as adding new questions or deleting ones you don't need.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvz7ahcpyiqmafoc81j1w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvz7ahcpyiqmafoc81j1w.png" alt="Python Notes and Questions template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  One more thing
&lt;/h2&gt;

&lt;p&gt;If you ever find that some topics, questions, or pages are missing in any of the templates, don’t forget to look at the bottom of the page. Notion sometimes hides extra information, so you’ll need to click on “Show more” (or something similar) to reveal the rest of the items.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9unmpe508dx55chf1rfa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9unmpe508dx55chf1rfa.png" alt="Python Notes and Questions template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing thoughts
&lt;/h2&gt;

&lt;p&gt;That's all for now! I hope you had fun reading this and that you are finding the templates I shared with you helpful for learning Python.&lt;/p&gt;

&lt;p&gt;See you in the next one! 🖖&lt;/p&gt;




&lt;p&gt;🗞️ &lt;strong&gt;NEWSLETTER -&lt;/strong&gt; &lt;em&gt;If you want to hear about my latest articles and interesting software development content, &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;subscribe to my newsletter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;🐦 &lt;strong&gt;TWITTER/X -&lt;/strong&gt; &lt;em&gt;Follow me on &lt;a href="https://twitter.com/DamianDemasi" rel="noopener noreferrer"&gt;Twitter/X&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/damiandemasi" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1641530738382%2FWt_2bHGsXK.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>beginners</category>
      <category>learning</category>
    </item>
    <item>
      <title>Python Project: Analysing Australia's Migration Trends and Economic Impact</title>
      <dc:creator>Damian Demasi</dc:creator>
      <pubDate>Wed, 07 Feb 2024 08:58:52 +0000</pubDate>
      <link>https://dev.to/colocodes/python-project-analysing-australias-migration-trends-and-economic-impact-315c</link>
      <guid>https://dev.to/colocodes/python-project-analysing-australias-migration-trends-and-economic-impact-315c</guid>
      <description>&lt;h2&gt;
  
  
  Python for Everybody Capstone Project
&lt;/h2&gt;

&lt;p&gt;In my recently completed Python for Everybody course, we wrapped up with a capstone project that got me diving into data exploration.&lt;/p&gt;

&lt;p&gt;Recently, my attention was caught by discussions and news bits talking about how international migration shakes up Australia's job and housing scenes. So, with my curiosity fired up, I decided to dig into the data, hoping to discover connections between international migration and the trends in these markets.&lt;/p&gt;

&lt;p&gt;Being an international migrant myself, I've got a personal stake in understanding how Australia's migration policies and the flow of immigrants play out in the country's economy. &lt;/p&gt;

&lt;p&gt;Fortunately, Australia boasts an incredible data gold mine: the Australian Bureau of Statistics (ABS). I managed to search their data and find information about &lt;a href="https://www.abs.gov.au/statistics/people/population/overseas-migration/2022-23-financial-year" rel="noopener noreferrer"&gt;Overseas Migration&lt;/a&gt;, &lt;a href="https://www.abs.gov.au/statistics/labour/employment-and-unemployment/labour-force-australia/nov-2023" rel="noopener noreferrer"&gt;Labour Force&lt;/a&gt;, &lt;a href="https://www.abs.gov.au/statistics/people/housing/housing-occupancy-and-costs/2019-20" rel="noopener noreferrer"&gt;Housing Occupancy and Costs&lt;/a&gt;, and &lt;a href="https://www.abs.gov.au/statistics/economy/price-indexes-and-inflation/total-value-dwellings/latest-release#:~:text=The%20number%20of%20residential%20dwellings%20in%20Australia%20rose%20by%2052%2C300,%2419%2C200%20to%20%24925%2C400%20this%20quarter." rel="noopener noreferrer"&gt;Total Value of Dwellings&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I initially intended to perform the following tasks with this data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Database Integration:&lt;/strong&gt; Import the data into a database for efficient querying and analysis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visualization:&lt;/strong&gt; Generate maps, charts, and graphs to represent migration and economic data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Economic Impact Analysis:&lt;/strong&gt; Understand the economic impact of migration on housing and job markets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Correlation Analysis:&lt;/strong&gt; Identify potential correlations between migration, labour force, and housing data.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Discover the power of knowledge! Grab my newest free Notion template, packed with detailed &lt;strong&gt;notes on 80 specific topics&lt;/strong&gt; covered during my journey through the University of Michigan's 'Python for Everybody' course on Coursera. Ready to level up your Python skills? &lt;a href="https://www.devnotes.to/templates/python-notes" rel="noopener noreferrer"&gt;Click here now&lt;/a&gt;!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.devnotes.to/templates/python-notes" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffgsujcd1zgopzlay1387.png" alt="Python Notes Notion Template"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Picking the Data Source
&lt;/h2&gt;

&lt;p&gt;When I first dug into the data from the ABS, I noticed they had it neatly laid out in both MS Excel and CSV formats. Seemed like it could be pretty straightforward to handle, perhaps with a handy Python script.&lt;/p&gt;

&lt;p&gt;The topics I was interested in were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.abs.gov.au/statistics/people/population/overseas-migration/2022-23-financial-year" rel="noopener noreferrer"&gt;Overseas Migration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.abs.gov.au/statistics/labour/employment-and-unemployment/labour-force-australia/nov-2023" rel="noopener noreferrer"&gt;Labour Force&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.abs.gov.au/statistics/people/housing/housing-occupancy-and-costs/2019-20" rel="noopener noreferrer"&gt;Housing Occupancy and Costs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.abs.gov.au/statistics/economy/price-indexes-and-inflation/total-value-dwellings/latest-release#:~:text=The%20number%20of%20residential%20dwellings%20in%20Australia%20rose%20by%2052%2C300,%2419%2C200%20to%20%24925%2C400%20this%20quarter." rel="noopener noreferrer"&gt;Total Value of Dwellings&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But then, I found out there was another door to this data exploration – an API provided by the ABS. This meant I could easily fetch the data using Python, push it into a database, and then dive into analysis mode. As the API provides an XML response, I could be using &lt;code&gt;ElementTree&lt;/code&gt; to parse it.&lt;/p&gt;

&lt;p&gt;After trying to build an API request on my own, I stumbled upon a tool that the Australian Bureau of Statistics provides to explore data called &lt;a href="https://www.abs.gov.au/about/data-services/data-explorer" rel="noopener noreferrer"&gt;Stat Data Explorer&lt;/a&gt;. What's neat about it is that it lets you visually explore the data and even generates the right API request for the info you've seen.&lt;/p&gt;

&lt;p&gt;So, I ditched the idea of using the initial data from the Excel files and opted to pick out the juiciest datasets for my analysis using this cool tool.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; you can take a more technical look at how I used the Stat Data Explorer and the API endpoints I got by taking a read to the &lt;code&gt;README.md&lt;/code&gt; file in &lt;a href="https://github.com/Colo-Codes/ossu-01-introduction-to-programming-python-for-everybody/tree/main/capstone_project" rel="noopener noreferrer"&gt;my GitHub repository&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Building a Data Fetching Script
&lt;/h2&gt;

&lt;p&gt;I kicked things off by creating a nifty Python script called &lt;code&gt;data_getter.py&lt;/code&gt; to get the data from the Australian Bureau of Statistics API. As I mentioned earlier, since the data dances in XML format, I enlisted the help of the &lt;code&gt;xml.etree.ElementTree&lt;/code&gt; module to untangle its secrets 😅.&lt;/p&gt;

&lt;p&gt;For the analysis, I set my sights on the period from 2011 to 2022. Why, you ask? Well, that's because the data for the number of residential dwellings is only available from 2011 onwards, and there was no migration data for 2023 at the moment of working on this project.&lt;/p&gt;

&lt;p&gt;Once I processed the XML data, I tucked it neatly into an SQLite database named &lt;code&gt;capstone.sqlite&lt;/code&gt;. Why SQLite? Because it's lightweight and easy to use (and the database that we have been using throughout the course).&lt;/p&gt;

&lt;p&gt;After analysing it for a while, and a bit of trial and error, I came up with an Entity-Relationship Diagram (ERD) for the database that looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F29v650plan6utmciwaxc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F29v650plan6utmciwaxc.png" alt="Entity-Relationship Diagram (ERD)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you are following along with the code in &lt;a href="https://github.com/Colo-Codes/ossu-01-introduction-to-programming-python-for-everybody/tree/main" rel="noopener noreferrer"&gt;my repository&lt;/a&gt;, you can test the data-fetching script by running &lt;code&gt;python3 data_getter.py&lt;/code&gt; in your terminal.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Building a Data Normalization Script
&lt;/h2&gt;

&lt;p&gt;Once I fetched the data, I spotted a little quirk – it wasn't playing nice in terms of consistency. The count of homes came in quarters, but the job scene spilled the beans monthly. So, I decided to bring order to the chaos and normalize the data, all cosy and snug in a yearly fashion, just like our migration data.&lt;/p&gt;

&lt;p&gt;It was now the turn of another Python script: &lt;code&gt;data_normaliser.py&lt;/code&gt;. This script not only handles the data makeover but also inserts the revamped data into a squeaky-clean database named &lt;code&gt;capstone_normalised.sqlite&lt;/code&gt;. This polished database is all set to steal the spotlight for the grand finale – the analysis and visualization of our data tale.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Analysis
&lt;/h2&gt;

&lt;p&gt;Now that our data is all neat and tidy, it was time to roll up our sleeves and dive into the world of analysis and visualization. To kick things off, I created a Python script called &lt;code&gt;data_stats.py&lt;/code&gt; that churned out some essential statistics to explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Migration

&lt;ul&gt;
&lt;li&gt;Year with highest migration&lt;/li&gt;
&lt;li&gt;Year with lowest migration&lt;/li&gt;
&lt;li&gt;Average Migration per year&lt;/li&gt;
&lt;li&gt;Average Migration per state&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Employment ratio

&lt;ul&gt;
&lt;li&gt;Year with highest employment ratio&lt;/li&gt;
&lt;li&gt;Year with lowest employment ratio&lt;/li&gt;
&lt;li&gt;Average employment ratio per year&lt;/li&gt;
&lt;li&gt;Average employment ratio per state&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Dwellings (quantity)

&lt;ul&gt;
&lt;li&gt;Year with highest dwellings number&lt;/li&gt;
&lt;li&gt;Year with lowest dwellings number&lt;/li&gt;
&lt;li&gt;Average dwellings number per year&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Dwellings (price)

&lt;ul&gt;
&lt;li&gt;Year with highest dwelling price&lt;/li&gt;
&lt;li&gt;Year with lowest dwelling price&lt;/li&gt;
&lt;li&gt;Average dwelling price per year&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Note that you can test this script by running &lt;code&gt;python3 data_stats.py&lt;/code&gt; in your terminal if you are following along.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is an example of the output of the script:&lt;/p&gt;


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

&lt;p&gt;➜  capstone_project git:(main) ✗ python3 data_stats.py&lt;br&gt;
Getting migration data from database...&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;== ---------------------------------------- ==
   Migration statistics
== ---------------------------------------- ==
Highest Migration year was 2022 with 422,230 migrations.
Lowest Migration year was 2020 with -20,370 migrations.
    The Migration variation between the highest and lowest year is about 20.73 times the lowest year.
Average Migration per year is 45,061 migrations.
Average Migration per state is:
    New South Wales: 70,884 migrations
    Victoria: 61,682 migrations
    Queensland: 29,642 migrations
    South Australia: 11,857 migrations
    Western Australia: 21,871 migrations
    Tasmania: 2,165 migrations
    Northern Territory: 1,685 migrations
    Australian Capital Territory: 2,979 migrations
    Australia: 202,784 migrations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Getting employment ratios data from database...&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;== ---------------------------------------- ==
   Employment Ratio statistics
== ---------------------------------------- ==
Highest Employment Ratio year was 2017 with 73 %.
Lowest Employment Ratio year was 2013 with 55 %.
    The Employment Ratio variation between the highest and lowest year is about 1.33 times the lowest year.
Average Employment Ratio per year is 62 %.
Average Employment Ratio per state is:
    New South Wales: 60 %
    Victoria: 61 %
    Queensland: 61 %
    South Australia: 58 %
    Western Australia: 64 %
    Tasmania: 56 %
    Northern Territory: 70 %
    Australian Capital Territory: 68 %
    Australia: 61 %
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Getting dwelling numbers data from database...&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;== ---------------------------------------- ==
   Dwelling Number statistics
== ---------------------------------------- ==
Highest Dwelling Number year was 2022 with 10,907 (x1000) dwellings.
Lowest Dwelling Number year was 2011 with 74 (x1000) dwellings.
    The Dwelling Number variation between the highest and lowest year is about 147.39 times the lowest year.
Average Dwelling Number per year is 2,201 (x1000) dwellings.
Average Dwelling Number per state is:
    New South Wales: 3,080 (x1000) dwellings
    Victoria: 2,545 (x1000) dwellings
    Queensland: 1,976 (x1000) dwellings
    South Australia: 764 (x1000) dwellings
    Western Australia: 1,049 (x1000) dwellings
    Tasmania: 241 (x1000) dwellings
    Northern Territory: 81 (x1000) dwellings
    Australian Capital Territory: 166 (x1000) dwellings
    Australia: 9,909 (x1000) dwellings
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Getting dwelling prices data from database...&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;== ---------------------------------------- ==
   Dwelling Mean Prices statistics
== ---------------------------------------- ==
Highest Dwelling Mean Prices year was 2022 with 1,170 (x1000) AUD.
Lowest Dwelling Mean Prices year was 2012 with 297 (x1000) AUD.
    The Dwelling Mean Prices variation between the highest and lowest year is about 3.94 times the lowest year.
Average Dwelling Mean Prices per year is 576 (x1000) AUD.
Average Dwelling Mean Prices per state is:
    New South Wales: 810 (x1000) AUD
    Victoria: 671 (x1000) AUD
    Queensland: 514 (x1000) AUD
    South Australia: 453 (x1000) AUD
    Western Australia: 551 (x1000) AUD
    Tasmania: 401 (x1000) AUD
    Northern Territory: 473 (x1000) AUD
    Australian Capital Territory: 671 (x1000) AUD
    Australia: 645 (x1000) AUD
&lt;/code&gt;&lt;/pre&gt;

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

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Data Visualisation&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;Moving on, I built a Python script named &lt;code&gt;data_visualiser.py&lt;/code&gt; to whip up some captivating visualizations. Here's the end result:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A snazzy 2D chart laying out the data landscape on a national scale.&lt;/li&gt;
&lt;li&gt;Four dynamic 3D charts, giving us a state-level peek into the data dimensions across Australia.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At first, I gave the &lt;code&gt;3d.js&lt;/code&gt; library a shot for the charts, but it struggled when I tried to juggle multiple data dimensions in the same graph. Not to worry, I pivoted to the &lt;code&gt;plotly.js&lt;/code&gt; library, and it played nice, letting me plot those dimensions, but not without breaking a sweat 😓.&lt;/p&gt;

&lt;p&gt;Oh, by the way, you can view these charts live online by &lt;a href="https://projects-p4e.damiandemasi.com/capstone_project/charts.htm" rel="noopener noreferrer"&gt;clicking here&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;The result was a grand chart focusing on Migration, Employment Ratio, Dwelling Quantity, and Mean Price nationwide. This beauty allowed me to dissect how these variables dance together and catch any trends. Now, mind you, correlation in this chart doesn't automatically mean causation – there's a whole orchestra of factors for a proper analysis. But for our project's sake, the plotted data paints quite the picture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://projects-p4e.damiandemasi.com/capstone_project/charts.htm" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmd5gut7rjdgj6bj80n7f.png" alt="2D Chart"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In 2020, a noticeable dip in migrations coincided with the aftermath of COVID-19, leading to a significant decline in the Employment Ratio—hinting at a rise in unemployment. The drop in employment is likely a result of the pandemic's impact on the job market rather than a direct consequence of decreased migration. Meanwhile, the number of available homes continued its steady growth, while the average dwelling price started a descent as it approached 2020.&lt;/p&gt;

&lt;p&gt;As we stepped into 2021 and 2022, witnessing a resurgence in migration as Australia reopened its borders, a parallel spike in both the Employment Ratio and mean dwelling prices caught my eye. Interestingly, the number of dwellings maintained its consistent growth. The surge in mean dwelling prices during these years could be attributed to the increased influx of migrants, and the fact that the &lt;strong&gt;number of dwellings remained unaltered in its tendency&lt;/strong&gt;, creating a higher demand for houses.&lt;/p&gt;

&lt;p&gt;Interestingly, as migration gained momentum in 2021 and 2022, the Employment Ratio also showed improvement, suggesting that the increase in migration didn't negatively impact employment.&lt;/p&gt;

&lt;p&gt;I dug into creating four more 3D charts, each showcasing the dynamics of Migration, Employment Ratio, Dwelling Quantity, and Mean Price across different states in Australia. These charts unveil interesting insights, like migrants showing a preference for New South Wales and Victoria. These states seem to play a significant role in the growing number of available homes. Meanwhile, the Northern Territory experiences a more gradual increase in dwelling prices, and its employment market appears to be in robust shape.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://projects-p4e.damiandemasi.com/capstone_project/charts.htm" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw8viz88b3lkj31vnk2iu.png" alt="3D Charts"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://projects-p4e.damiandemasi.com/capstone_project/charts.htm" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv9vcdrn0lerc0o7inmuu.png" alt="3D Charts"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Employing a 2D line chart for a nationwide data overview proved effective in uncovering trends and correlations, aligning with the initial goal when first exploring the data. The use of 3D graphs to compare states added a dynamic and engaging layer to the analysis, offering a deeper understanding of the data dynamics across different regions.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: if you are following along, you can generate these charts by running &lt;code&gt;python3 data_visualiser.py&lt;/code&gt; in your terminal and then opening the &lt;code&gt;charts.htm&lt;/code&gt; file in your browser. The raw data for the charts can be found in the &lt;code&gt;charts.js&lt;/code&gt; file.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;p&gt;The lessons learned from this project will undoubtedly have a positive impact on my future endeavours. It served as a platform to apply my recently learned skills in Python, SQL databases, data analysis, visualization, and interpretation. Despite the occasional challenges of navigating through real-world data, it significantly enhanced my problem-solving abilities. In essence, this project has been a valuable learning journey, contributing significantly to my growth as a software engineer.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Discover the power of knowledge! Grab my newest free Notion template, packed with detailed &lt;strong&gt;notes on 80 specific topics&lt;/strong&gt; covered during my journey through the University of Michigan's 'Python for Everybody' course on Coursera. Ready to level up your Python skills? &lt;a href="https://www.devnotes.to/templates/python-notes" rel="noopener noreferrer"&gt;Click here now&lt;/a&gt;!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.devnotes.to/templates/python-notes" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffgsujcd1zgopzlay1387.png" alt="Python Notes Notion Template"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;🗞️ &lt;strong&gt;NEWSLETTER -&lt;/strong&gt; &lt;em&gt;If you want to hear about my latest articles and interesting software development content, &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;subscribe to my newsletter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;🐦 &lt;strong&gt;TWITTER/X -&lt;/strong&gt; &lt;em&gt;Follow me on &lt;a href="https://twitter.com/DamianDemasi" rel="noopener noreferrer"&gt;Twitter/X&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/damiandemasi" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1641530738382%2FWt_2bHGsXK.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>database</category>
      <category>coding</category>
    </item>
    <item>
      <title>Navigating Mutability and Reference Issues in JavaScript</title>
      <dc:creator>Damian Demasi</dc:creator>
      <pubDate>Mon, 27 Feb 2023 09:30:50 +0000</pubDate>
      <link>https://dev.to/colocodes/navigating-mutability-and-reference-issues-in-javascript-1lip</link>
      <guid>https://dev.to/colocodes/navigating-mutability-and-reference-issues-in-javascript-1lip</guid>
      <description>&lt;h3&gt;
  
  
  Mutability
&lt;/h3&gt;

&lt;p&gt;Mutability refers to the ability of a value or data structure to be changed after it has been created.&lt;/p&gt;

&lt;h3&gt;
  
  
  Primitive values are immutable
&lt;/h3&gt;

&lt;p&gt;Primitive values (&lt;code&gt;string&lt;/code&gt;, &lt;code&gt;number&lt;/code&gt;, &lt;code&gt;bigint&lt;/code&gt;, &lt;code&gt;boolean&lt;/code&gt;, &lt;code&gt;undefined&lt;/code&gt;, &lt;code&gt;symbol&lt;/code&gt; and &lt;code&gt;null&lt;/code&gt;) are immutable, which means that they cannot be changed once created.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;myString&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello, world!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="c1"&gt;// Attempting to mutate (change) the string:&lt;/span&gt;
&lt;span class="nx"&gt;myString&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;J&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; 'J'&lt;/span&gt;

&lt;span class="c1"&gt;// Proof that strings are immutable, because it didn't change:&lt;/span&gt;
&lt;span class="nx"&gt;myString&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; 'Hello, world!'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The string &lt;code&gt;"Hello, world!"&lt;/code&gt; will always be &lt;code&gt;"Hello, world!"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;We can change the value to which the variable is grasping (a new string that also will be immutable), but the string itself (the value) will remain the same (immutable):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;myString&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello, world!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="nx"&gt;myString&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; 'Hello, world!'&lt;/span&gt;

&lt;span class="nx"&gt;myString&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hey, world!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; 

&lt;span class="nx"&gt;myString&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; 'Hey, world!'&lt;/span&gt;

&lt;span class="nx"&gt;myString&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;X&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; 'X'&lt;/span&gt;

&lt;span class="nx"&gt;myString&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; 'Hey, world!'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Objects are mutable
&lt;/h3&gt;

&lt;p&gt;Objects are mutable, as they can be modified:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Object creation&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Sarah&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// Change the value of a property&lt;/span&gt;
&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Add a new property&lt;/span&gt;
&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gender&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Female&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Delete a property&lt;/span&gt;
&lt;span class="k"&gt;delete&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; {&lt;/span&gt;
&lt;span class="c1"&gt;//     "name": "Sarah",&lt;/span&gt;
&lt;span class="c1"&gt;//     "gender": "Female"&lt;/span&gt;
&lt;span class="c1"&gt;// }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this scenario, an object is mutable because we can change its properties.&lt;/p&gt;

&lt;p&gt;If the object properties are other objects, their values will be mutable, whereas if they are primitive values, their values will be immutable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;X&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="nx"&gt;person&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; {&lt;/span&gt;
&lt;span class="c1"&gt;//     "name": "Sarah",&lt;/span&gt;
&lt;span class="c1"&gt;//     "gender": "Female"&lt;/span&gt;
&lt;span class="c1"&gt;// }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Even though an object is mutable, its properties might not be.&lt;/p&gt;

&lt;p&gt;We can make an object immutable by using the &lt;code&gt;Object.freeze()&lt;/code&gt; function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Object creation&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Sarah&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;freeze&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Connor&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;enemy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;T-1000&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="nx"&gt;person&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; {&lt;/span&gt;
&lt;span class="c1"&gt;// {&lt;/span&gt;
&lt;span class="c1"&gt;//     "name": "Sarah",&lt;/span&gt;
&lt;span class="c1"&gt;//     "age": 30&lt;/span&gt;
&lt;span class="c1"&gt;// }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The reference confusion in objects
&lt;/h3&gt;

&lt;p&gt;When we assign a &lt;strong&gt;primitive&lt;/strong&gt; value to a variable, we are making that variable point to a primitive value in the memory of the machine. We can then assign the variable to another variable, thus making the second variable grasp the first one, and, by extension, &lt;strong&gt;reference&lt;/strong&gt; the same value.&lt;/p&gt;

&lt;p&gt;If we wanted to change the value of the second variable, ss we cannot change primitive values (they are immutable), we could assign a new value. By doing so, the second variable will be &lt;strong&gt;referencing&lt;/strong&gt; a new value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;variable1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hello&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;variable2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;variable1&lt;/span&gt;

&lt;span class="nx"&gt;variable2&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;variable1&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; true&lt;/span&gt;

&lt;span class="nx"&gt;variable2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bye&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="nx"&gt;variable2&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;variable1&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; false&lt;/span&gt;

&lt;span class="nx"&gt;variable1&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; 'hello'&lt;/span&gt;

&lt;span class="nx"&gt;variable2&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; 'bye'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With objects, the behaviour is a bit different. We can assign an object to a variable, which means that the variable grasps the object, or has a &lt;strong&gt;reference&lt;/strong&gt; to it. If we then assign that variable to another variable, the new variable will grasp the first one and, by extension, &lt;strong&gt;reference&lt;/strong&gt; the same object. As objects are mutable, a change in the object will affect both variables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;object1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;value1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;abc&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;value2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;123&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;object2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;object1&lt;/span&gt;

&lt;span class="nx"&gt;object2&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;object1&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; true&lt;/span&gt;

&lt;span class="nx"&gt;object2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;xyz&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="nx"&gt;object1&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; {&lt;/span&gt;
&lt;span class="c1"&gt;//     "value1": "xyz",&lt;/span&gt;
&lt;span class="c1"&gt;//     "value2": 123&lt;/span&gt;
&lt;span class="c1"&gt;// }&lt;/span&gt;

&lt;span class="nx"&gt;object2&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; {&lt;/span&gt;
&lt;span class="c1"&gt;//     "value1": "xyz",&lt;/span&gt;
&lt;span class="c1"&gt;//     "value2": 123&lt;/span&gt;
&lt;span class="c1"&gt;// }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the other hand, we can define a new object in the second variable, and thus make it not reference the same object as the first one. One thing to note is that, even if all the object properties are the same, these two objects will be different:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;object1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;value1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;abc&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;value2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;123&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;object2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;value1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;abc&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;value2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;123&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;object2&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;object1&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; false&lt;/span&gt;

&lt;span class="nx"&gt;object2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;xyz&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="nx"&gt;object1&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; {&lt;/span&gt;
&lt;span class="c1"&gt;//     "value1": "abc",&lt;/span&gt;
&lt;span class="c1"&gt;//     "value2": 123&lt;/span&gt;
&lt;span class="c1"&gt;// }&lt;/span&gt;

&lt;span class="nx"&gt;object2&lt;/span&gt;
&lt;span class="c1"&gt;// -&amp;gt; {&lt;/span&gt;
&lt;span class="c1"&gt;//     "value1": "xyz",&lt;/span&gt;
&lt;span class="c1"&gt;//     "value2": 123&lt;/span&gt;
&lt;span class="c1"&gt;// }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://eloquentjavascript.net/04_data.html#h_C3n45IkMhg" rel="noopener noreferrer"&gt;Eloquent JavaScript: Mutability&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Mutable" rel="noopener noreferrer"&gt;MDN: Mutable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Immutable" rel="noopener noreferrer"&gt;MDN: Immutable&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks for reading, and see you next time! 👋&lt;/p&gt;




&lt;p&gt;🗞️ &lt;strong&gt;NEWSLETTER -&lt;/strong&gt; &lt;em&gt;If you want to hear about my latest articles and interesting software development content, &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;subscribe to my newsletter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;🐦 &lt;strong&gt;TWITTER -&lt;/strong&gt; &lt;em&gt;Follow me on &lt;a href="https://twitter.com/DamianDemasi" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/damiandemasi" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1641530738382%2FWt_2bHGsXK.png" alt="Buy Me A Coffee" width="178" height="50"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Cover photo by Ivana Cajina on Unsplash&lt;/em&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>discuss</category>
      <category>modding</category>
    </item>
    <item>
      <title>Learning how to code: with our special guest, Ron</title>
      <dc:creator>Damian Demasi</dc:creator>
      <pubDate>Wed, 12 Oct 2022 20:08:59 +0000</pubDate>
      <link>https://dev.to/colocodes/learning-how-to-code-with-our-special-guest-ron-3on1</link>
      <guid>https://dev.to/colocodes/learning-how-to-code-with-our-special-guest-ron-3on1</guid>
      <description>&lt;p&gt;Let me introduce you to Ron, an ordinary person like you and me, except that he was born into a world of magic. Life led Ron to experience many adventures when he was young. Still, he somehow ended up working as a manager in a retail wizarding joke emporium, a job he ultimately got tired of. As he wanted to start working in something more rewarding, he began investigating a possible career in programming and, more specifically, in web development.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1664918691712%2FzxWerUoVl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1664918691712%2FzxWerUoVl.png" alt="image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This content is also available on my YouTube channel, and you can &lt;a href="https://youtu.be/0LOj90PjN-Y" rel="noopener noreferrer"&gt;watch it here&lt;/a&gt;:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/0LOj90PjN-Y"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;But Ron knows he has some problems with his study techniques: he doesn’t know how to improve his weakest points, often thinks that tests are a waste of time, and constantly takes feedback incorrectly.&lt;/p&gt;

&lt;p&gt;In this article, we will help Ron by teaching him how to attack his weakest points to improve them, how he can learn by testing himself about programming concepts and allow feedback to improve his coding skills.&lt;/p&gt;

&lt;p&gt;This article is the second one about distilling the concepts presented in the book &lt;a href="https://amzn.to/3PNLqJM" rel="noopener noreferrer"&gt;Ultralearning by Scott Yong&lt;/a&gt;. I apply those concepts to learning programming, as I believe they are very useful. If you wish to know more about these topics, I recommend reading the book.&lt;/p&gt;

&lt;p&gt;I will publish at least two more learning principles applied to programming in the upcoming article, so you might want to &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;subscribe to my newsletter&lt;/a&gt; get a notification when it's published.&lt;/p&gt;

&lt;p&gt;OK, let's help Ron with the first principle: Drills.&lt;/p&gt;

&lt;h2&gt;
  
  
  Drills: Attack Your Weakest Point
&lt;/h2&gt;

&lt;p&gt;As soon as Ron sat down and opened his online course about programming, he felt overwhelmed by the complexity of the topics he wanted to learn. According to the book, applying a "divide and conquer" approach is the best way to overcome these challenges.&lt;/p&gt;

&lt;p&gt;Ron could break down complex topics into smaller pieces, understand them, practice them, and once he masters those small parts, put them back together.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1664919723762%2F1xvYXhK6c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1664919723762%2F1xvYXhK6c.png" alt="Screen Shot 2022-10-05 at 08.10.39.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The key idea behind drills is to choose critical concepts and practice them. Drills build up from the principle of Directness, discussed in my previous article, but it goes a bit deeper, with a narrower focus.&lt;/p&gt;

&lt;p&gt;Suppose we start by putting into practice a programming concept through directness. In that case, we could then find the most complex components that produce the most significant impact on the main concept and create drills, which are essentially practice sessions, to improve them. After we have completed our practice sessions, we can go back to the central concept and see if we understand it better.&lt;/p&gt;

&lt;p&gt;Ron finds it difficult to transfer this idea into practice, so let's give him a couple of tactics he can use to design his drills.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tactic 1: Components
&lt;/h3&gt;

&lt;p&gt;In this tactic, we will find ways to drill (practice) only one specific component of the concept or skill we are learning.&lt;/p&gt;

&lt;p&gt;As it turns out, Ron has problems understanding the structure of HTML documents. In this case, he could practice small pieces of the HTML structure, such as the &lt;a href="https://www.w3.org/TR/html4/struct/global.html" rel="noopener noreferrer"&gt;HTML version information&lt;/a&gt;. Once he has practised this piece until it comes natural to him, he can move on to other elements, thus growing his knowledge and expertise about HTML.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tactic 2: Copycat
&lt;/h3&gt;

&lt;p&gt;Sometimes we will need to practice a part of a concept that's not easy to reproduce by itself. In these situations, we could copy the features we don't want to practice to focus on the parts we do.&lt;/p&gt;

&lt;p&gt;Ron wants to practice some HTML form elements, such as &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt;. To do this properly, he will need to write a lot of HTML code just to reach the section in which he can finally introduce a &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; element and practice its sub-elements: &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;The label element&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;
            Click on one of the text labels to toggle the related radio button:
        &lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"/action_page.php"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"radio"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"html"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"fav_language"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"HTML"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"html"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;HTML&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&amp;lt;br&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"radio"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"css"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"fav_language"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"CSS"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;CSS&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&amp;lt;br&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt;
                &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"radio"&lt;/span&gt;
                &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"javascript"&lt;/span&gt;
                &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"fav_language"&lt;/span&gt;
                &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"JavaScript"&lt;/span&gt;
            &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"javascript"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;JavaScript&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&amp;lt;br&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;br&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"Submit"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By using the copycat tactic, Ron can just copy and paste the code needed to build an empty form and build on top of that, practising the elements he wants to learn.&lt;/p&gt;

&lt;p&gt;Building on this concept, and once Ron gains more knowledge about versioning systems, he could even use Git to create branches of his code and practice parts of it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tactic 3: The Programming Dojo
&lt;/h3&gt;

&lt;p&gt;Another way to practice specific code concepts is to have a programming session around a coding challenge. Websites like &lt;a href="https://www.codewars.com/" rel="noopener noreferrer"&gt;CodeWars&lt;/a&gt; offer many coding challenges we can use to practice our coding skills and improve.&lt;/p&gt;

&lt;p&gt;In websites like this one, Ron is not only going to write code but also look at other muggles', I mean people's, solutions, something that will teach him about the different ways a programming challenge can be solved.&lt;/p&gt;

&lt;p&gt;🧑‍💻 Here is a list of sites to practice code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.codewars.com/" rel="noopener noreferrer"&gt;CodeWars&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/" rel="noopener noreferrer"&gt;LeetCode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://coderbyte.com/" rel="noopener noreferrer"&gt;CoderByte&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.codechef.com/" rel="noopener noreferrer"&gt;CodeChef&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.hackerrank.com/" rel="noopener noreferrer"&gt;HackerRank&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's now help Ron to overcome his preconceptions about tests and use them as a learning tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Retrieval: Test to Learn
&lt;/h2&gt;

&lt;p&gt;Ron is used to thinking about testing as a way to assess knowledge when, in fact, it's also a way of creating it. We should test ourselves before we feel confident, even if we don't know all the answers, because doing this will prepare our minds to pay attention to information that looks like a solution when we learn it later.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/ZaRz2080kt4Yg/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/ZaRz2080kt4Yg/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ron is used to spending long hours passively reviewing his highlights on books and notes, hoping that something will stick to his memory, but this is not what retrieval is about. Retrieval is closing the book and trying to answer questions about the topic we just learned. This is why it's essential to build our own projects in programming because it's here when we discover what we know and don't know.&lt;/p&gt;

&lt;p&gt;If we have the answers to what we want to retrieve, such as the book's answer keys, we can compare our recalled knowledge with the actual correct answers, thus improving our understanding and retention.&lt;/p&gt;

&lt;p&gt;Ron is taking a course on JavaScript, and the instructor says, after showing how something is built, "OK, now you try to build this functionality". Ron should try to build it without taking a second look at how the instructor did it and Googling things he doesn't know or remembers. After he finishes creating it, he can continue watching the course and compare his solution with the solution provided by the instructor. This will trigger several "aha!" moments for Ron, keeping him engaged in the learning activities.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/VwUquCGtIatGg/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/VwUquCGtIatGg/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ron should avoid doing simple retrieval, such as answering multiple-choice questions. He should try to do open retrieval: writing as much as he knows about a specific topic. This is the best method to make the most of his retrieval activities. For more details about the scientific proof behind this, read chapter 8 of the book Ultralearning.&lt;/p&gt;

&lt;p&gt;Ron asks for some tactics about how to put the retrieval concept into practice, so let's take a look at the following ones.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tactic 1: Free recall
&lt;/h3&gt;

&lt;p&gt;After reading a book section or learning a new concept, we could try to write down everything we remember on a blank piece of paper. Doing this will help us to remember these concepts later.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tactic 2: The question-book method
&lt;/h3&gt;

&lt;p&gt;We often take notes during our learning process to highlight things that we consider to be important. A better way of taking notes is to write them down as questions to be answered later.&lt;/p&gt;

&lt;p&gt;I actually did this when I was doing a Udemy course about JavaScript. As the course introduced concepts, I wrote them down on a Notion database in the form of questions. This is how I managed to write 318 questions (with their answers) and have them ready for my recall sessions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1664960586267%2Fp3I_uAPTM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1664960586267%2Fp3I_uAPTM.png" alt="Screen Shot 2022-10-05 at 19.32.32.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example, instead of writing "Type coercion is…" we could write "What is type coercion?" and refer to where we can find the answer. In this example, a link to a blog post in FreeCodeCamp will suffice: "Type coercion is the process of converting a value from one type to another (such as string to number)."&lt;/p&gt;

&lt;p&gt;But I have a disclaimer to do, and I'm sure Ron is going to relate to this: even though I have all these questions, I'm still struggling to find time and energy to do some recall on them. So, don't be like me, and find time to answer the questions! 😅&lt;/p&gt;

&lt;h3&gt;
  
  
  Tactic 3: Self-generated challenges
&lt;/h3&gt;

&lt;p&gt;As we go through our learning material, we could create challenges for ourselves to solve later. For example, if we are learning about APIs, we could create a challenge to use an API.&lt;/p&gt;

&lt;p&gt;We could create a list of all these challenges to address later and have our own repository of code examples we could use in the future.&lt;/p&gt;

&lt;p&gt;Let's now help Ron overcome his tendency to take feedback in the wrong way.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/rjiRFTZ0NIdi/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/rjiRFTZ0NIdi/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Feedback: Don't Dodge the Punches
&lt;/h2&gt;

&lt;p&gt;During our learning process, we are going to find feedback. It could come from other people expressing their opinions, but more often than not, it will come from a computer: our code doesn't work as expected.&lt;/p&gt;

&lt;p&gt;We shouldn't let our egos get in the way of this feedback. On the one hand, we can think that as our program is not working, we are not suitable to be programmers. Or on the other hand, believe that we are great programmers because we got our "Hello, world" code working on the first try.&lt;/p&gt;

&lt;p&gt;Ron usually feels reluctant to share his code with others as he will face criticism. The bad news is that others must review our code, as this is a standard practice in the programming industry. Here we should remember the concept of having a growth mindset (as I discussed in the first article of this series) and don't take feedback or criticism in the wrong way. Feedback is what makes us better programmers.&lt;/p&gt;

&lt;p&gt;Let's give Ron some tactics to improve his response to feedback and use it in the best way possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tactic 1: Noise cancellation
&lt;/h3&gt;

&lt;p&gt;Every time we receive feedback, it will be made of a constructive and noisy part. We should learn to disregard the noise and focus on the constructive part.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1664959773391%2Fe6EFIRMd_.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1664959773391%2Fe6EFIRMd_.png" alt="Screen Shot 2022-10-05 at 19.18.32.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example, someone can comment about Ron's code: "You are not good in programming because you forgot to clear the timeout in this React component. You should go back to selling magic jokes…". The constructive part of this feedback is that Ron should pay more attention to clearing timeouts in his code to avoid memory leaks, for example. The noise is the first and last part of this feedback, a subjective judgement someone made about Ron's capabilities as a programmer, and he should disregard that, as the person giving the feedback probably doesn't know Ron well. He can't possibly write code without making mistakes (that's why our code needs to be reviewed by peer programmers and pass quality assurance tests).&lt;/p&gt;

&lt;h3&gt;
  
  
  Tactic 2: Hitting the difficulty sweet spot
&lt;/h3&gt;

&lt;p&gt;We need the computer's feedback when writing code, as it will tell us if the code is working or not. If Ron makes too many mistakes, or too few, he should decrease or increase the difficulty of the project he's working on to get helpful feedback.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tactic 3: Metafeedback
&lt;/h3&gt;

&lt;p&gt;This kind of feedback is not about the code we are writing but the overall success of the strategy we use to learn how to code.&lt;/p&gt;

&lt;p&gt;Ron could experiment with different study methods, comparing and contrasting them. The best way to make this comparison is to test himself: does he learns more with method A or B? Which method takes more time? Which method is the most likely he will use in his study activities?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/FCeqsn7FF2xIQ/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/FCeqsn7FF2xIQ/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing thoughts
&lt;/h2&gt;

&lt;p&gt;Coming to an end in this article, I hope we have given Ron a good idea about how he can improve his weakest points, learn effectively by testing himself and constructively take feedback to improve his coding skills. I'm sure Ron now feels more confident about learning how to program.&lt;/p&gt;

&lt;p&gt;I want to remind you that there are at least two more principles I'll cover in the coming article, so you might want to &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;subscribe to my newsletter&lt;/a&gt; to get a notification when it's published.&lt;/p&gt;

&lt;p&gt;Have you ever felt like Ron did? Which one of the covered principles resonated most with you? Please leave your answer in the comments so we can discuss more about it.&lt;/p&gt;

&lt;p&gt;Thanks for reading, and see you next time! 👋&lt;/p&gt;




&lt;p&gt;🗞️ &lt;strong&gt;NEWSLETTER -&lt;/strong&gt; &lt;em&gt;If you want to hear about my latest articles and interesting software development content, &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;subscribe to my newsletter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;🐦 &lt;strong&gt;TWITTER -&lt;/strong&gt; &lt;em&gt;Follow me on &lt;a href="https://twitter.com/DamianDemasi" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/damiandemasi" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1641530738382%2FWt_2bHGsXK.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Learning how to code: the first 3 steps</title>
      <dc:creator>Damian Demasi</dc:creator>
      <pubDate>Wed, 21 Sep 2022 21:37:14 +0000</pubDate>
      <link>https://dev.to/colocodes/learning-how-to-code-the-first-3-steps-59en</link>
      <guid>https://dev.to/colocodes/learning-how-to-code-the-first-3-steps-59en</guid>
      <description>&lt;p&gt;In this post, I’m going to cover the concepts described in the book Ultralearning, and describe the first three principles:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Metalearning,&lt;/li&gt;
&lt;li&gt; Focus, and&lt;/li&gt;
&lt;li&gt; Directness&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This content is also available on my YouTube channel, and you can &lt;a href="https://youtu.be/adCxUDCe-aw" rel="noopener noreferrer"&gt;watch it here&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/adCxUDCe-aw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Ultralearning is a book written by Scott Yong, and in it, he presents several principles that we can apply to learn difficult topics, such as programming. If you wish to know more about these topics, I highly recommend you read the book.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1663664171168%2Fu5gQc4l8P.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1663664171168%2Fu5gQc4l8P.png" alt="image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’m going to publish at least 5 more learning principles applied to programming in the upcoming posts, so you might want to &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;subscribe to my newsletter&lt;/a&gt; to get a notification when they are out.&lt;/p&gt;

&lt;p&gt;By now, you are probably wondering what is ultralearning. It’s basically a strategy for gaining skills and knowledge that is both self-directed and intense. It’s not passive or entertaining, as could be conveniently watching a tutorial whilst relaxing on the couch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/bDTtPo3HyEluE/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/bDTtPo3HyEluE/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instead, it’s systematic and iterative. It’s the difference between wishful thinking (“oh… it would be nice to learn how to program, so let’s watch some YouTube videos about it”) and massive action (“as I’m convinced that I want to learn to program, I’m going to devote myself to that task”).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/fQZX2aoRC1Tqw/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/fQZX2aoRC1Tqw/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When applying the ultralearning principles, we are going to be learning by doing what we want to learn (this concept is called “directness”) and starting way before we are ready. This means that we are going to start programming in a new language from day 1. We will want to get instant feedback (the code is throwing error messages or not compiling), and in this way, we will know what needs to be corrected and improved. A clear example of this is taking a programming course on &lt;a href="https://www.freecodecamp.org/learn" rel="noopener noreferrer"&gt;freeCodeCamp&lt;/a&gt; (which I highly recommend): you’ll start coding from the beginning, even though you don’t know much about code.&lt;/p&gt;

&lt;p&gt;But why would we want to invest all that effort in order to learn to code? Learning a skill in a deep way like this can provide a sense of purpose in life because developing skills is meaningful.&lt;/p&gt;

&lt;p&gt;One of the main themes throughout the book is having a challenge: a project on which we are going to be working on during our learning process. In our case, this project could be building a specific website or app whilst we are learning how to code. This will help to learn with purpose.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/AWv3UAFkgz39u/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/AWv3UAFkgz39u/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, it’s important to keep in mind that if some principles or approaches are not working, we should reassess them and change what needs to be changed.&lt;/p&gt;

&lt;p&gt;OK, enough introduction. Let’s start with the first principle: Metalearning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Metalearning
&lt;/h2&gt;

&lt;p&gt;Our learning journey will start by drawing a map of what learning programming looks like. Here we should be interested in knowing how programming knowledge is acquired and structured.&lt;/p&gt;

&lt;p&gt;But you don’t have to start from scratch. I’ve built a Notion template summarising the core topics involved in web development, a list of roadmaps and topics that are related to programming. You can &lt;a href="https://mailchi.mp/77b7cbf1b03a/web-development-notion-template" rel="noopener noreferrer"&gt;download that template&lt;/a&gt; and modify it as you wish, expanding it according to your needs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1663664711812%2FVfcoJfbLU.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1663664711812%2FVfcoJfbLU.png" alt="image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Going back to the principle of Metalearning, do your best to answer these three questions: “why?”, “what?”, and “how?”.&lt;/p&gt;

&lt;h3&gt;
  
  
  “Why?”
&lt;/h3&gt;

&lt;p&gt;In my first post in this series, I talked about the importance of having a clear why. What’s the motivation to learn to program? To help answer this question, you can talk to programmers already doing what you want to do and ask them what they like most (and least) about their jobs.&lt;/p&gt;

&lt;h3&gt;
  
  
  “What?”
&lt;/h3&gt;

&lt;p&gt;Build a list of knowledge and abilities you need to acquire. You can start with the Notion template I shared with you and build on top of it. Create lists of the concepts (ideas that need to be understood but not memorised), facts (things that need to be memorised), and procedures (anything that needs to be practised, actions to be performed).&lt;/p&gt;

&lt;h3&gt;
  
  
  “How?”
&lt;/h3&gt;

&lt;p&gt;To find out the how, you can use two methods:&lt;/p&gt;

&lt;h4&gt;
  
  
  Method 1: Benchmarking
&lt;/h4&gt;

&lt;p&gt;Find references on how people are learning to code. Look at the curricula used in universities, tables of content in online courses and books, and roadmaps (like the ones included in the Notion template). Try to find good quality materials.&lt;/p&gt;

&lt;h4&gt;
  
  
  Method 2: Emphasise and exclude
&lt;/h4&gt;

&lt;p&gt;Considering why you want to learn to program, double down on the areas that are in line with your why. For example, you could want to learn web development to build an app to track tasks during different progress stages, like in Kanban methodology, so double down on web technologies and avoid learning low-level programming languages, like C, or game engines. &lt;/p&gt;

&lt;p&gt;Once you have a clear idea about how to answer the “why”, the “what” and the “how”, it’s time to focus.&lt;/p&gt;

&lt;h2&gt;
  
  
  Focus
&lt;/h2&gt;

&lt;p&gt;I covered this concept in the second post of this series when I spoke about Deep Work, but this is such an important principle that’s also present in the book Ultralearning.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/MdGUUTVHk7s1BA5Pyk/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/MdGUUTVHk7s1BA5Pyk/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We need to develop the ability to concentrate. We need to allocate portions of time in which we are going to be learning and make it easy to do so.&lt;/p&gt;

&lt;p&gt;The most common struggles to focus happen when we are starting (we procrastinate) and when we need to maintain our focus (we get distracted).&lt;/p&gt;

&lt;h3&gt;
  
  
  Procrastination
&lt;/h3&gt;

&lt;p&gt;To help cope with procrastination you can establish deadlines to help us start working on what needs to be done. It’s important to be able to recognise that we are procrastinating. We need to remember that the thing that’s unpleasant about the task is just the impulse, the first few minutes of it. Once we start doing the task (studying programming), the unpleasant sensation decreases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/jkPTSxuolA5jy/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/jkPTSxuolA5jy/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A technique that can help us here is the Pomodoro timer: set 25 minutes to do the task and allow yourself to rest for 5 minutes after that. Repeat as many times as necessary.&lt;/p&gt;

&lt;p&gt;Another useful technique is to use small checkpoints: we can start studying and finish when we have read a page, a chapter, or a specific topic.&lt;/p&gt;

&lt;h3&gt;
  
  
  Distraction
&lt;/h3&gt;

&lt;p&gt;The key here is to enter a state of flow (some people call this being “in the zone”). In this state, our mind will be completely absorbed by the task we are performing. We need to set the difficulty of the task to something that’s not too hard or too easy, so we can achieve flow effortlessly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/Mt0IKnQaKdSTu/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/Mt0IKnQaKdSTu/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But… we shouldn’t worry too much if we don’t manage to achieve a flow state. What we can do instead is to focus on achieving short goals. Similarly to the small checkpoints described earlier, this will help us to maintain motivation.&lt;/p&gt;

&lt;p&gt;We also need to maintain a balance between studying programming and resting. 50 minutes to an hour is enough for many learning tasks. After that, we can rest for a while, and repeat the cycle again. Using the Pomodoro timer could also be helpful here.&lt;/p&gt;

&lt;p&gt;Additionally, we need to make sure our environment is free from distractions such as our phones, watching videos or playing games during our study sessions, distracting noises, or the lack of tools to study (like pencils, books, or a lamp).&lt;/p&gt;

&lt;p&gt;We should engage with the task. We can do this by taking notes to explain difficult concepts, asking questions to the book or video course (writing them down to look for the answers later), and trying to identify where we can apply what we are learning.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3ohc1bNYPZR8gQ5ybS/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3ohc1bNYPZR8gQ5ybS/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, if we get stuck, we should take a break and let our focus expand. We can go for a walk, grab a snack, or have a quick chat with someone. This will bring new ideas to our consciousness that we can use to unstuck ourselves.&lt;/p&gt;

&lt;p&gt;Let’s now move on to the principle of Directness.&lt;/p&gt;

&lt;h2&gt;
  
  
  Directness
&lt;/h2&gt;

&lt;p&gt;We will learn better by doing the thing we want to do. Do you want to build a website? Start building it and learn what you need along the way. Doing this will feel difficult, frustrating, and painful even, so we are going to want to avoid it. But what we should do is focus on solving the problems practically, instead of loading ourselves with theoretical concepts. As the author of the book says: “Doing the thing that you want to get good at is when much of the learning takes place.”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/bKnEnd65zqxfq/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/bKnEnd65zqxfq/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can apply different tactics to learn by doing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tactic 1: Project-based learning
&lt;/h3&gt;

&lt;p&gt;We can organise our learning around producing something. For example, we can decide that we want to build the website for a restaurant, and we can divide that project into smaller pieces: user login components, menu bars, database tables for orders, etc. Then we can learn what’s needed for each of those parts. If you don’t know what you need to learn for each of the parts, jump into a forum (like Reddit), Twitter or Discord channel, and ask around to more experienced developers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tactic 2: Immersive learning
&lt;/h3&gt;

&lt;p&gt;Surround yourself with the environment in which programming is being practised. Join Meetup groups, participate in open-source projects, explore Discord channels, and take part in hackathons or coding challenges. The objective is to look for things to do that can push us to learn new things.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tactic 3: the overkill approach
&lt;/h3&gt;

&lt;p&gt;Decide to do something that’s way more complex than the topic you want to learn. For example, instead of just learning JavaScript to build an interactive website, decide that you are going to teach a course about JavaScript and that this course will be publicly available. By doing this, even if we fail to deliver the course as we envisioned, we are going to be learning far more than we initially imagined when we thought about just building our JavaScript app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing thoughts
&lt;/h2&gt;

&lt;p&gt;Now, coming to an end in this post, I want to remind you that there are still at least 5 more principles that I’ll cover in the coming posts, so you might want to &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;subscribe to my newsletter&lt;/a&gt; to get a notification when they are published.&lt;/p&gt;

&lt;p&gt;🤔 Which one of the covered principles resonated most with you? Leave your answer in the comments so we can discuss more about it.&lt;/p&gt;

&lt;p&gt;Don’t forget to &lt;a href="https://mailchi.mp/77b7cbf1b03a/web-development-notion-template" rel="noopener noreferrer"&gt;download the Notion template&lt;/a&gt; in which I cover resources for learning web development and, programming in general, so you can start getting your feet wet with the programming world.&lt;/p&gt;

&lt;p&gt;Thanks for reading and see you next time! 👋&lt;/p&gt;




&lt;p&gt;🗞️ &lt;strong&gt;NEWSLETTER -&lt;/strong&gt; &lt;em&gt;If you want to hear about my latest articles and interesting software development content, &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;subscribe to my newsletter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;🐦 &lt;strong&gt;TWITTER -&lt;/strong&gt; &lt;em&gt;Follow me on &lt;a href="https://twitter.com/DamianDemasi" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/damiandemasi" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1641530738382%2FWt_2bHGsXK.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Learning how to code: what you should know first (part 2)</title>
      <dc:creator>Damian Demasi</dc:creator>
      <pubDate>Mon, 05 Sep 2022 18:15:08 +0000</pubDate>
      <link>https://dev.to/colocodes/learning-how-to-code-what-you-should-know-first-part-2-2hke</link>
      <guid>https://dev.to/colocodes/learning-how-to-code-what-you-should-know-first-part-2-2hke</guid>
      <description>&lt;p&gt;Are you thinking of learning how to code? I think there’s still something you need to know first…&lt;/p&gt;

&lt;p&gt;This is the second post of a two parts series, and I’m going to cover:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The importance of Grit&lt;/li&gt;
&lt;li&gt;The key to consistency: Habits&lt;/li&gt;
&lt;li&gt;Why doing Deep Work is important to have productive study sessions&lt;/li&gt;
&lt;li&gt;Why you should Care about Your Craft, and&lt;/li&gt;
&lt;li&gt;Why you shouldn’t compare yourself to others&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Just in case you missed it, &lt;a href="https://dev.to/colocodes/learning-how-to-code-what-you-should-know-first-1922"&gt;this is the first article&lt;/a&gt; of this series.&lt;/p&gt;

&lt;p&gt;You can watch this content on my &lt;a href="https://youtu.be/6UZmSZ8En_Q" rel="noopener noreferrer"&gt;YouTube video&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/6UZmSZ8En_Q"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;If you missed the first post, you should consider &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;subscribing to my newsletter&lt;/a&gt; so you can get a notification when I publish my videos.&lt;/p&gt;

&lt;p&gt;In this post, we are going to continue developing an attitude and mindset that will allow us to face the challenge of learning programming in the best way possible.&lt;/p&gt;

&lt;p&gt;Let's start by discussing Grit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Grit
&lt;/h2&gt;

&lt;p&gt;Grit can be defined as a fierce determination to perform our work. Grit means being able to endure setbacks and work hard. Once more, keeping in mind our "why" will be very helpful here.&lt;/p&gt;

&lt;p&gt;We can have a high potential (or almost none), but what’s really important is what we do with it.&lt;/p&gt;

&lt;p&gt;Someone with great potential, like a person that understands mathematics and logic easily, but with no grit, will not be able to progress far in the programming journey.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/WRQBXSCnEFJIuxktnw/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/WRQBXSCnEFJIuxktnw/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the other hand, someone with low potential, like a person that needs to read a definition several times to really understand it, but with plenty of grit, will progress far in programming.&lt;/p&gt;

&lt;p&gt;If you want to know more about this topic, I recommend you read the book &lt;a href="https://amzn.to/3oGaYMR" rel="noopener noreferrer"&gt;Grit&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let's now move on to Habits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Habits
&lt;/h2&gt;

&lt;p&gt;We need to decide what our identity will be and develop habits that can sustain that identity. Our habits shape our identity, and, in turn, our identity also shapes our habits.&lt;/p&gt;

&lt;p&gt;Ask yourself: What type of identity do you want to develop? Do you want to be a programmer? What habits does a programmer have?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/13HgwGsXF0aiGY/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/13HgwGsXF0aiGY/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can define our identity as follows: “I’m a programmer that takes care in giving the best of himself or herself at this very moment“. Then, when we are about to do something that goes against that identity, we will have a clear indication of what we should be doing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Will a programmer that’s giving the best of herself sit to watch a Netflix show, or, instead, would she choose to work on a project for her portfolio?”&lt;/li&gt;
&lt;li&gt;“Willa programmer that’s giving the best of himself choose to work or study without a break, or choose to go outside for a while to clear his head and stretch the body?”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key here is not to fool ourselves, because we are the easiest person to fool.&lt;/p&gt;

&lt;p&gt;To know more about this topic, I recommend you to read the book &lt;a href="https://amzn.to/3oItGmY" rel="noopener noreferrer"&gt;Atomic Habits&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let's now talk about Deep Work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deep Work
&lt;/h2&gt;

&lt;p&gt;According to Carl Newport, Deep Work is a “professional activity performed in a state of distraction-free concentration that pushes your cognitive capabilities to their limit”. The key here is “distraction-free concentration”.&lt;/p&gt;

&lt;p&gt;If you wish to know more about this, read the book &lt;a href="https://amzn.to/3qtrQrj" rel="noopener noreferrer"&gt;Deep Work&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;One of the main obstacles to overcome in order to achieve distraction-free concentration are social networks (Facebook, TikTok, Reddit, Twitter, etc.). When we are studying programming, or working on a project, we should avoid using social networks if we want to keep the focus on the task at hand.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/aDan8Uo90usaCu2Z26/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/aDan8Uo90usaCu2Z26/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In his book, Carl Newport recommends allocating specific days and times in which we are going to be studying, distraction-free. This will help us to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;avoid burnout,&lt;/li&gt;
&lt;li&gt;avoid pilling up subjects to learn or projects to practice, and&lt;/li&gt;
&lt;li&gt;keep the focus on the studying activity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The hours of our day are not all equal. We are going to be more productive at certain times of the day rather than others. For example, we could study best early in the morning, or in the late afternoon, so we need to pay attention to which time serves us better according to what we want to do.&lt;/p&gt;

&lt;p&gt;What I usually do is assign a relative value to the different parts of the day. Early mornings are my most valuable hours. I’m full of energy, no one is going to interrupt me, and I can use those moments to study programming or work on a project, no matter the day of the week.&lt;/p&gt;

&lt;p&gt;Let's now Care about our craft.&lt;/p&gt;

&lt;h2&gt;
  
  
  Care about your craft
&lt;/h2&gt;

&lt;p&gt;What we do in our work and in our studying activities will be a reflection of the type of professional we want to be. Therefore, it will be in our best interest to do things the best way we can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We shouldn’t be mindlessly studying, overlooking important topics.&lt;/li&gt;
&lt;li&gt;We should try to care about the quality of the code we are writing (even if it just how well indented it is).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The objective here is to do whatever we do, in the best way we can, given our current circumstances.&lt;/p&gt;

&lt;p&gt;I find it very helpful to ask myself if my future self (not someone else) would be proud of how and what I’m doing right now.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/aDcvK946SC3GwCqLk8/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/aDcvK946SC3GwCqLk8/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To learn more about this topic, you should read the book &lt;a href="https://amzn.to/3KIu3IB" rel="noopener noreferrer"&gt;The Pragmatic Programmer&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now... remember not to compare yourself with others.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don’t compare yourself to others
&lt;/h2&gt;

&lt;p&gt;We are all different, and you don’t know what paths have led people to where they are today. So, comparing yourself with someone else has no point.&lt;/p&gt;

&lt;p&gt;Instead of comparing ourselves with someone else, choose to make that comparison with your own self.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Where were you 2, 5, or 10 years ago? Are you in a better position today? Did you know how to program 5 years ago? What about today?&lt;/li&gt;
&lt;li&gt;Where could you be in 2, 5, or 10 years in the future, if you continue doing what you are doing? If you keep studying programming, could you become a senior developer 5 years from now?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/LMhuP91QIPo52/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/LMhuP91QIPo52/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This concept is so important to me that I’ve written down the question “How would my life be in 10 years if I stick to this?” (speaking of programming), and hung it over my monitor, together with my list of my "whys".&lt;/p&gt;

&lt;h2&gt;
  
  
  Finishing up
&lt;/h2&gt;

&lt;p&gt;I want to remind you that this is just a guide to what I consider to be the best way to set the right mindset and attitude toward becoming a software developer.&lt;/p&gt;

&lt;p&gt;Which one of these concepts resonated the most with you? Leave it in the comments so we can see which ones are the favourite picks!&lt;/p&gt;

&lt;h2&gt;
  
  
  Next posts
&lt;/h2&gt;

&lt;p&gt;In the next posts, I’m going to cover the concepts and techniques described in the book &lt;a href="https://amzn.to/3PNLqJM" rel="noopener noreferrer"&gt;Ultralearning&lt;/a&gt;, so you may want to &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;subscribe to my newsletter&lt;/a&gt; to get a notification when the video is out.&lt;/p&gt;

&lt;p&gt;Thanks for reading, and see you next time! 👋&lt;/p&gt;




&lt;p&gt;🗞️ &lt;strong&gt;NEWSLETTER -&lt;/strong&gt; &lt;em&gt;If you want to hear about my latest articles and interesting software development content, &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;subscribe to my newsletter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;🐦 &lt;strong&gt;TWITTER -&lt;/strong&gt; &lt;em&gt;Follow me on &lt;a href="https://twitter.com/DamianDemasi" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/damiandemasi" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1641530738382%2FWt_2bHGsXK.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Learning how to code: what you should know first (part 1)</title>
      <dc:creator>Damian Demasi</dc:creator>
      <pubDate>Tue, 30 Aug 2022 18:50:21 +0000</pubDate>
      <link>https://dev.to/colocodes/learning-how-to-code-what-you-should-know-first-1922</link>
      <guid>https://dev.to/colocodes/learning-how-to-code-what-you-should-know-first-1922</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Are you thinking of learning how to code? 🤔 I think there’s something you need to know first…&lt;/p&gt;

&lt;p&gt;This is the first post of a two-part series. In it, I’ll cover the following topics:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The importance of having a good idea of &lt;strong&gt;Why you want to learn how to code&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;How &lt;strong&gt;Passion&lt;/strong&gt; is overrated&lt;/li&gt;
&lt;li&gt;Why it’s important to have a &lt;strong&gt;Growth mindset&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Why you shouldn’t rely on &lt;strong&gt;Motivation&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Why focus on &lt;strong&gt;Systems over Goals&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When starting the journey of learning programming, one tends to focus on the programming languages to learn, courses to take and books to read. But I think the most important thing is to develop an attitude and mindset that allow us to face the challenge of learning programming in the best way possible.&lt;/p&gt;

&lt;p&gt;I discuss these concepts in my first published YouTube video! You can &lt;a href="https://youtu.be/VJZEEqHC63o" rel="noopener noreferrer"&gt;watch it here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/VJZEEqHC63o"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Have a clear idea of why you want to learn how to code
&lt;/h3&gt;

&lt;p&gt;Knowing our why will help us to keep going when motivation fails us, and things get difficult 😰.&lt;/p&gt;

&lt;p&gt;Ideally, your why would be internally focused, so don’t start studying programming just because you want to earn more money (something external). Programming is very hard, and doing it just for the money may not be a reason powerful enough to stick with it 💰💰💰.&lt;/p&gt;

&lt;p&gt;Instead, try to find internal reasons why you want to study programming. For example, some of the internal reasons that work for me are: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To learn and grow personally and professionally.&lt;/li&gt;
&lt;li&gt;To choose better quality problems and to choose a struggle to enjoy.&lt;/li&gt;
&lt;li&gt;To build mastery at something.&lt;/li&gt;
&lt;li&gt;To be an inspiration to others (family, friends, strangers).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Having a clear why will give meaning to the effort we are going to invest in our learning journey. &lt;/p&gt;

&lt;p&gt;You can read more about this topic in the book &lt;a href="https://amzn.to/3R0nnaW" rel="noopener noreferrer"&gt;Man’s Search for Meaning&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I actually have my why printed and hung on top of my monitor. I use it as a tool to lift my mood and motivation when I don’t feel like studying or when I’m stuck with a programming problem or bug. It reminds me of what I have chosen to do and the reasons behind that choice, something that’s very helpful as a reminder that I need to keep going in spite of feeling uncomfortable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F34y2r7lthgo06jjk1gar.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F34y2r7lthgo06jjk1gar.png" alt="My Why"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By deciding to become a programmer, I’m choosing to have better problems, because problems are going to be present no matter what we decide to do. One thing is to have problems that someone enforces on you, and a very different thing is to choose your own problems. &lt;/p&gt;

&lt;p&gt;You can read more about choosing your own problems in the book &lt;a href="https://amzn.to/3wCBdbs" rel="noopener noreferrer"&gt;The Subtle Art of Not Giving a F*ck&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Passion
&lt;/h3&gt;

&lt;p&gt;I’ve been struggling to find my passion for most of my life. Ultimately, I’ve learned that passion is not something that you find, but something you build day by day.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/ItvHXpVnqGffddbNBA/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/ItvHXpVnqGffddbNBA/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can choose an activity that sparks interest in you, but that interest will evolve into a passion over time. It’s because of this that we shouldn’t pay too much attention to passion when we are just starting with programming and give it time to build up.&lt;/p&gt;

&lt;h3&gt;
  
  
  Growth mindset
&lt;/h3&gt;

&lt;p&gt;The Growth mindset is a concept developed by psychologist Carol Dweck. You can read more about it in her book &lt;a href="https://amzn.to/3AU7ixS" rel="noopener noreferrer"&gt;Mindset&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The way in which we see ourselves deeply affects how we manage in life. If we perceive ourselves as someone who is not intelligent, or incapable of learning programming, we will start our learning journey on the wrong foot. &lt;/p&gt;

&lt;p&gt;On the other hand, if we understand that intelligence is something we can develop over time, as well as most of our skills, we are going to be better prepared mentally to begin studying programming.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/d3mlE7uhX8KFgEmY/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/d3mlE7uhX8KFgEmY/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The growth mindset is based on the idea that our qualities can be cultivated and developed through effort.&lt;/p&gt;

&lt;p&gt;You can have a deeper dive into this topic by reading &lt;a href="https://ccsre.stanford.edu/publications/mindset-updated-edition-changing-way-you-think-fulfill-your-potential" rel="noopener noreferrer"&gt;this article&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Motivation
&lt;/h3&gt;

&lt;p&gt;According to Steven Pressfield (author of The War of Art), motivation is the push we feel when “the pain of not doing something is worse than the pain of doing it”. For example, the pain of being in a job we hate is greater than the pain we feel when we must sit to study programming to change our careers, so we are pushed to sit and study how to code.&lt;/p&gt;

&lt;p&gt;There are two types of motivation: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;External:&lt;/strong&gt; it’s outside of our control. For example, study programming to get a good salary in the future, solve a bug to receive praise from others, and prove someone’s code is wrong so others can see us as intelligent coders.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Internal:&lt;/strong&gt; it’s in our control, within ourselves. For example: study programming to get good at it and gain mastery, solve a bug because we love our craft (our code), or solve someone’s else code because we care about delivering a good product.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We should focus on internal motivation, as it’s the only one we can control.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/J7jsbfcJ2O5eo/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/J7jsbfcJ2O5eo/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Furthermore, it’s very important to realise that motivation is the result of an action, not the cause of it. This means that motivation will come after we start doing the thing we need to do (but don’t feel like doing it). You can know more about this topic by reading the book &lt;a href="https://amzn.to/3Q27VtE" rel="noopener noreferrer"&gt;Atomic Habits&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So, the key to keeping ourselves motivated is to make the thing we need to do as easy to start as possible. We can arrange a calendar with the times and places to study programming, for example, so our decision-making process can be automated.&lt;/p&gt;

&lt;p&gt;We can follow the same ritual or habit each time we sit to study programming, thus conditioning our study activity. For example, we can choose the same place in the house, at the same time in the day, with the same music playlist, each time we sit to study.&lt;/p&gt;

&lt;p&gt;You can have a deeper dive into this topic by reading &lt;a href="https://jamesclear.com/motivation" rel="noopener noreferrer"&gt;this article&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Systems over Goals
&lt;/h3&gt;

&lt;p&gt;It’s important to have a goal, a clear objective. But it’s also important not to focus too much on it. What we should do instead is to focus on the system we are going to use in order to achieve our goal. &lt;/p&gt;

&lt;p&gt;Those who achieve a goal and those who don’t, ultimately have the same goal. So, having a goal by itself is not a guarantee to get it. Many people want to become programmers, but not all of them end up achieving that.&lt;/p&gt;

&lt;p&gt;Focusing on our systems will help us to achieve our goals by providing discipline, reminding us why we are doing what we are doing, and avoiding procrastination.&lt;/p&gt;

&lt;p&gt;For example, our system could look like this: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wake up early&lt;/li&gt;
&lt;li&gt;Take a shower so we can be more awake&lt;/li&gt;
&lt;li&gt;Make our breakfast&lt;/li&gt;
&lt;li&gt;Sit in front of the computer with our breakfast&lt;/li&gt;
&lt;li&gt;Open the programming book or online course&lt;/li&gt;
&lt;li&gt;Start to study whilst we are having breakfast, and do this for at least one hour (we are stacking habits here, as described in the book Atomic Habits)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By focusing on the process (our habits) we are working on our system every day. We are focusing on the immediate, without worrying too much about the future: all the programming languages we don’t know, or how much time is left to become a programmer. By focusing on the day-by-day tasks, we can diminish our anxiety. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/1FMaabePDEfgk/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/1FMaabePDEfgk/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we keep applying our system, day in and day out, we are going to achieve our goal of becoming a programmer.&lt;/p&gt;

&lt;p&gt;You can have a deeper dive into this topic by reading &lt;a href="https://jamesclear.com/goals-systems" rel="noopener noreferrer"&gt;this article&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Finishing up…
&lt;/h3&gt;

&lt;p&gt;I want to remind you that this is just a guide to what I consider to be the best way to set the right mindset and attitude toward becoming a software developer.&lt;/p&gt;

&lt;p&gt;Which one of these concepts resonated the most with you? Leave it in the comments so we can see which ones are the favourite picks!&lt;/p&gt;

&lt;h3&gt;
  
  
  Next post
&lt;/h3&gt;

&lt;p&gt;In the next post, I’m going to cover the rest of these concepts, so you may want to &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;subscribe to my newsletter&lt;/a&gt; to get a notification when the post is out.&lt;/p&gt;

&lt;p&gt;See you next time! 👋&lt;/p&gt;




&lt;p&gt;🗞️ &lt;strong&gt;NEWSLETTER -&lt;/strong&gt; &lt;em&gt;If you want to hear about my latest articles and interesting software development content, &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;subscribe to my newsletter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;🐦 &lt;strong&gt;TWITTER -&lt;/strong&gt; &lt;em&gt;Follow me on &lt;a href="https://twitter.com/DamianDemasi" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/damiandemasi" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1641530738382%2FWt_2bHGsXK.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to debug a React app</title>
      <dc:creator>Damian Demasi</dc:creator>
      <pubDate>Mon, 02 May 2022 19:41:02 +0000</pubDate>
      <link>https://dev.to/colocodes/how-to-debug-a-react-app-51l4</link>
      <guid>https://dev.to/colocodes/how-to-debug-a-react-app-51l4</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Since I started working as a software developer, I find myself spending the majority of the day debugging a big react app. This is not the result of a poorly implemented code, but what I feel is the natural process in which I find myself involved daily:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I can debug to find the root cause of an actual &lt;strong&gt;bug&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Or I can debug as part of the normal &lt;strong&gt;development process&lt;/strong&gt; (most likely)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/10eJOwQ9BKrF72/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/10eJOwQ9BKrF72/giphy.gif" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When hunting for actual bugs in the code, we need to focus on tools and systematic processes to analyse the code in search of what's not working and accept the fact that the person that wrote the code may not be available to answer our questions. Sometimes, though, the bug might have been introduced by ourselves 🙋‍♂️, and we can find it difficult to step in the shoes of our past selves in order to understand why we did what we did. No matter what's the case, they all have something in common: we need to use tools to help us debug the app and find what's wrong with it.&lt;/p&gt;

&lt;p&gt;More often than not, I feel debugging is not solving a particular issue affecting a customer, but the natural process inherent to the development of software. If I want to create a feature for an existing app (or build one from scratch), I will often face code that is not working as it is supposed to 🤷‍♂️, and here is when I will pull out the "debugging arsenal" to find out what's wrong with the code in order to keep moving forward in the development process.&lt;/p&gt;

&lt;h3&gt;
  
  
  A special note: when a bug is introduced by ourselves
&lt;/h3&gt;

&lt;p&gt;Let's apply some logic here: 🤔 if &lt;strong&gt;we have created a bug&lt;/strong&gt;, then &lt;strong&gt;we are not in the position to be able to solve it&lt;/strong&gt;, because if we could, we wouldn't have created it in the first place! This is why we need additional tools that can help us to step outside ourselves in the process of finding a bug, just like if we were detectives trying to solve a crime in which we are the prime suspect. We need to be methodical, go step by step, test a lot, and gather evidence. Here is where debugging tools come to our rescue.&lt;/p&gt;

&lt;h2&gt;
  
  
  Breakpoints and the &lt;code&gt;debugger&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;When debugging a React app, I often find breakpoints to be very helpful. There are two main ways in which we can use them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;By writing the &lt;code&gt;debugger&lt;/code&gt; statement in our source code&lt;/li&gt;
&lt;li&gt;By clicking on a specific line of the code in the Chrome web browser (or Firefox, Edge, etc.) Developer Tools.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Using the &lt;code&gt;debugger&lt;/code&gt; statement
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;The debugger statement invokes any available debugging functionality, such as setting a breakpoint. If no debugging functionality is available, this statement has no effect. - &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger" rel="noopener noreferrer"&gt;Source&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's say we have a project in which we are interested in finding out what's happening in a particular section of code. In this example, I'm using the source code of my portfolio site, which you can find in &lt;a href="https://github.com/Colo-Codes/portfolio-v2" rel="noopener noreferrer"&gt;this GitHub repository&lt;/a&gt;). I have introduced a bug, and now I will search for it using the debugger.&lt;/p&gt;

&lt;p&gt;In this particular bug, the third animation related to the portfolio title is not working correctly, so I can write the &lt;code&gt;debugger&lt;/code&gt; statement in that section of the code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqp24ncr6ao5rwr170aod.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqp24ncr6ao5rwr170aod.png" alt="Hunting a bug" width="800" height="617"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the file is saved and compiled, as soon as I reload the page and the browser parses that code, it will stop on the line that has the &lt;code&gt;debugger&lt;/code&gt; statement on it. The browser will then display useful data in the Developer Tools pane.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgtkky5hcilnokqscz0h1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgtkky5hcilnokqscz0h1.png" alt="Developer Tools" width="800" height="547"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can see the value of variables at that moment by &lt;strong&gt;hovering&lt;/strong&gt; over them in the source code, or in the panel located on the right, in the &lt;strong&gt;Scope&lt;/strong&gt; section. Thanks to this, I can see that the value of the &lt;code&gt;setIsAnimated1&lt;/code&gt; function is being called with the wrong value.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using breakpoints
&lt;/h3&gt;

&lt;p&gt;Breakpoints work in a very similar way. To enable breakpoints we need to open our site in a web browser (I'm using Chrome in this case) and open the &lt;strong&gt;Developer Tools&lt;/strong&gt;. Now, if we click in the &lt;strong&gt;Sources&lt;/strong&gt; tab and in the tab with the &lt;strong&gt;file name&lt;/strong&gt; that we are interested in debugging, we will see our source code once more, as happened in the previous method using &lt;code&gt;debugger&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: for more information about the &lt;strong&gt;Developer Tools&lt;/strong&gt;' &lt;strong&gt;Source&lt;/strong&gt; tab, read &lt;a href="https://developer.chrome.com/docs/devtools/javascript/" rel="noopener noreferrer"&gt;this article&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2zlgn5vc4hairfkpphz5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2zlgn5vc4hairfkpphz5.png" alt="Using breakpoints" width="800" height="547"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, in order to create a breakpoint, we can click on the margin just next to the line number. These breakpoints will be listed in the panel shown on the right, in the &lt;strong&gt;Breakpoints&lt;/strong&gt; section. We can now reload the page, and the loading of it will stop at the breakpoints we have set (we can click the play button to tell the browser that it should continue executing the code and, thus, loading the page).&lt;/p&gt;

&lt;p&gt;If you want to learn more about this topic, and even set &lt;strong&gt;conditional breakpoints&lt;/strong&gt; or &lt;strong&gt;stop the code execution when a node is removed&lt;/strong&gt;, for example, I think you should read the &lt;a href="https://developer.chrome.com/docs/devtools/javascript/breakpoints/" rel="noopener noreferrer"&gt;Pause your code with breakpoints&lt;/a&gt; article.&lt;/p&gt;

&lt;h2&gt;
  
  
  React Developer Tools
&lt;/h2&gt;

&lt;p&gt;The previous debugging tools apply not only to React apps but to any JavaScript app. But, when working with React apps in specific, we have a very useful tool: the &lt;strong&gt;React Developer Tools&lt;/strong&gt; browser extension. You can find this extension by searching for it on the corresponding browser extension marketplace. For example, for Chrome, you can install it from &lt;a href="https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi" rel="noopener noreferrer"&gt;this link&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The react Developer Tools is a set of two main tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the &lt;strong&gt;Components&lt;/strong&gt; tool, where you can analyse the structure of the components,&lt;/li&gt;
&lt;li&gt;and the &lt;strong&gt;Profiler&lt;/strong&gt; tool, where you can see the time each component took to render and how they are updated.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Components tab
&lt;/h3&gt;

&lt;p&gt;In the Components tab, you will be able to see the component structure of the site you are analysing (left panel), as well as the &lt;code&gt;props&lt;/code&gt;, &lt;code&gt;hooks&lt;/code&gt; (for function components) or &lt;code&gt;state&lt;/code&gt; (for class components) that a selected component has (right panel), together with a list of the ancestors that ended up rendering the component you have selected.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F28vr0vqqbar36r4decce.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F28vr0vqqbar36r4decce.png" alt="Components" width="800" height="693"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just by the information this tool is presenting I think it's very valuable, but that's not all! You can also modify the &lt;code&gt;props&lt;/code&gt; and &lt;code&gt;hooks&lt;/code&gt; of the component you have selected, and this will affect the site in real-time, something that's very useful for debugging purposes. 🤯&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9i5jjkuu7ptbckkef8iv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9i5jjkuu7ptbckkef8iv.png" alt="Modifying a component" width="800" height="441"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Profiler tab
&lt;/h3&gt;

&lt;p&gt;As mentioned earlier, we can use the Profiler to record the time it took each component to be rendered. In order to do so, we need to click the &lt;code&gt;Start profiling&lt;/code&gt; or &lt;code&gt;Reload and start profiling&lt;/code&gt; buttons.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp3yd9a7z21qf37y2708p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp3yd9a7z21qf37y2708p.png" alt="Profiler" width="800" height="582"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the site has been rendered, we'll need to click the &lt;code&gt;Stop profiling&lt;/code&gt; button, and we will see a graph detailing the time each of the components took to be rendered. Instead of clicking on the &lt;code&gt;Stop profiling&lt;/code&gt; button, we can interact with the site, clicking on buttons, menus, etc., and the profiler will record these interactions at a component level.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffqqri6izzwgzirj08giw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffqqri6izzwgzirj08giw.png" alt="Profiler record" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is very helpful when we need to debug certain interactions with our app.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bonus: check why a component was rendered
&lt;/h3&gt;

&lt;p&gt;If we are interested in knowing why a particular component was rendered, we can activate this feature by clicking on the &lt;strong&gt;gear icon&lt;/strong&gt;, then in the &lt;strong&gt;Profiler tab&lt;/strong&gt;, and finally ticking the &lt;code&gt;Record why each component rendered while profiling.&lt;/code&gt; checkbox. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr7u2f957pcqm5pnqhyuu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr7u2f957pcqm5pnqhyuu.png" alt="Extra options" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we need to start a new profiling, just as before, and we'll be able to see extra information concerning the reasons why a component was rendered. Some of the most common reasons for a component to (re)render are, as you can see by using this tool:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the parent component was rendered&lt;/li&gt;
&lt;li&gt;its &lt;code&gt;props&lt;/code&gt; changed&lt;/li&gt;
&lt;li&gt;its state-related &lt;code&gt;hooks&lt;/code&gt; changed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj80sddd5soeipbq2dimi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj80sddd5soeipbq2dimi.png" alt="Re-renders" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have found that recording why a component was rendered saved me many headaches when debugging a complex React app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Workflow debugging
&lt;/h2&gt;

&lt;p&gt;There are some occasions in which none of the previously mentioned tools can help us to find a bug. In this case, I like to use a "workflow debugging" approach. This method consists in start analysing the code in the closest region to where the bug is happening, and following the flow of the code "upstream": which method is creating this section of code, what's its parent, grand-parent, etc.&lt;/p&gt;

&lt;p&gt;Let's say a header in our app has a wrong margin. We can start by analysing the code closest to this header, looking for methods that can be altering its margin, and then analysing the code that's affecting the header at higher levels, like an inverse &lt;a href="https://en.wikipedia.org/wiki/Matryoshka_doll" rel="noopener noreferrer"&gt;Matryoshka doll&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw0xnb2ofgcc51r06hyxq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw0xnb2ofgcc51r06hyxq.png" alt="Matryoshka doll" width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Photo by Didssph on Unsplash&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The debugging methodical process
&lt;/h2&gt;

&lt;p&gt;In order to be consistent in how we proceed to find a bug, we can create our own process or framework by combining these tools and approaches. For example, when facing a bug we could:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start by analysing the workflow the code is following that affects a particular section of code.&lt;/li&gt;
&lt;li&gt;If nothing wrong is found, we could use the React  Developer Tools to analyse each component closely.&lt;/li&gt;
&lt;li&gt;If that analysis is not delivering results, we could apply breakpoints at different sections in the code and see how the variables are being altered.&lt;/li&gt;
&lt;li&gt;If everything else fails, just comment out pieces of code and see what happens. Experiment.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We have many  tools at our disposal to look for bugs, but it's not always easy to find them. I think it's very important not to feel frustrated when debugging an app, and to focus on a systematic, step by step process to analyse the code.&lt;/p&gt;

&lt;p&gt;I'm sure I haven't covered all the techniques available for debugging a React app, so if you have one that's your favourite and that is not listed here, please share it in the comments so we can all learn from it. 😊&lt;/p&gt;




&lt;p&gt;🗞️ &lt;strong&gt;NEWSLETTER -&lt;/strong&gt; &lt;em&gt;If you want to hear about my latest articles and interesting software development content, &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;subscribe to my newsletter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;🐦 &lt;strong&gt;TWITTER -&lt;/strong&gt; &lt;em&gt;Follow me on &lt;a href="https://twitter.com/DamianDemasi" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/damiandemasi" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1641530738382%2FWt_2bHGsXK.png" alt="Buy Me A Coffee" width="178" height="50"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>react</category>
      <category>debug</category>
    </item>
    <item>
      <title>Problem-solving techniques to avoid yelling at your computer</title>
      <dc:creator>Damian Demasi</dc:creator>
      <pubDate>Tue, 12 Apr 2022 20:01:03 +0000</pubDate>
      <link>https://dev.to/colocodes/problem-solving-techniques-to-avoid-yelling-at-your-computer-41e9</link>
      <guid>https://dev.to/colocodes/problem-solving-techniques-to-avoid-yelling-at-your-computer-41e9</guid>
      <description>&lt;p&gt;I have been facing some tough code monsters at work lately. I guess I'm out of shape and my sword isn't sharp enough, because I find myself struggling greatly.&lt;/p&gt;

&lt;p&gt;This is the reason I decided to upgrade some of my attributes (especially intelligence and wisdom) in order to help me cope with this struggle. Luckily, I found a great loot: &lt;a href="https://www.penguin.com.au/books/think-like-a-programmer-9781593274245" rel="noopener noreferrer"&gt;Think Like a Programmer, by Spraul, V. Anton&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1649557247984%2FKqylXGyBy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1649557247984%2FKqylXGyBy.png" alt="Think Like a Programmer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This book explains how we should approach problems in order to solve them in a methodical manner. I have just started reading it, but I have already learned the basics of problem-solving techniques, and I wanted to share them with you.&lt;/p&gt;

&lt;h2&gt;
  
  
  General Problem-Solving Techniques
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Always Have a Plan
&lt;/h3&gt;

&lt;p&gt;When working on a solution to a problem, starting by typing code without a clear direction in mind is not a good idea. Sometimes I found myself typing without putting too much thought into it, just for the sake of building something fast and, if I’m "lucky", stumbling with the solution to the problem. This is an awful approach.&lt;/p&gt;

&lt;p&gt;According to the book, we should always have a plan. In the beginning, the plan usually will consist in how we are going to find the solution to our problem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/l0IylOPCNkiqOgMyA/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/l0IylOPCNkiqOgMyA/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our plan will, most likely, require alterations along the way, and this is OK. Without a plan, we are directionless, we miss on evaluating possible scenarios and different alternatives to find a solution.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I have always found that plans are useless, but planning is indispensable.” - General Dwight D. Eisenhower&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I prefer to think about a plan as a map that allows seeing all the possible roads to a destination (or even draw new ones as they manifest along the journey).&lt;/p&gt;

&lt;p&gt;The book emphasises that plans allow us to set intermediate goals, and achieve them. This is of extreme importance because by achieving these intermediate goals we feel we are making progress towards the solution. As we are usually going to struggle until the solution is found, feeling that we are making progress will help to cope with despair.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Restate the Problem
&lt;/h3&gt;

&lt;p&gt;A problem that at first seems incommensurable, could be expressed in other terms, or in a different manner. At first sight, we might think the problem is one way, but upon restating it we can discover that it's something different.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1649558249544%2FtZhDCAqMR.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1649558249544%2FtZhDCAqMR.png" alt="Change of perspective"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Restating the problem in new, simpler or more familiar terms, could help us to redefine it and to come up with different solutions (hopefully, easier to implement than what we first thought would be).&lt;/p&gt;

&lt;p&gt;Restating the problem could be thought of as one of the planning steps in solving a problem, and if we do restate the problem, we will be making progress towards the solution.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Divide the Problem
&lt;/h3&gt;

&lt;p&gt;You don’t eat an elephant in one bite but in multiple small bites. Actually, I have never eaten an elephant, and I wouldn't either, as they are one of my favourite animals! But the metaphor is still applicable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/9S1zkYeluvYwzoj9pC/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/9S1zkYeluvYwzoj9pC/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If the problem is too complex, divide it into smaller chunks. If we need to ask for user input, process the data, and store it in a database, start by building a simple input field that prints on the console, and build on top of that.&lt;/p&gt;

&lt;p&gt;If we need to build a complex loop, we can start with one line, or a couple of lines, and manually perform the tasks that the loop should do until we have a clear idea of what is needed.&lt;/p&gt;

&lt;p&gt;This is the technique I use the most when coding and is the one that helps me to keep my sanity when facing complex problems.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Start with What You Know
&lt;/h3&gt;

&lt;p&gt;After dividing the problem into pieces, we can start by solving what we already know how to solve. Later we can focus on the tricky parts of it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/13f5iwTRuiEjjW/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/13f5iwTRuiEjjW/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Does our problem require finding unique values? If we know how to use a &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/Set" rel="noopener noreferrer"&gt;&lt;code&gt;Set&lt;/code&gt;&lt;/a&gt; in JavaScript, that could help us to solve it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;By starting with what you know, you build confidence and momentum toward the goal. - Spraul, V. Anton&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  5. Reduce the Problem
&lt;/h3&gt;

&lt;p&gt;If the problem is too complex or if it can’t be subdivided into smaller pieces, we can reduce its complexity by applying (or removing) constraints to it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/IHnROpQICe4kE/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/IHnROpQICe4kE/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Should a user be able to drag and drop tasks in our to-do app? Let’s write step by step all that is needed in order to implement this functionality and eliminate (for now) what’s too complex. Later we could review what we have left out and ask for help in order to solve those specific aspects of the problem (and not the whole problem).&lt;/p&gt;

&lt;p&gt;The author of the book uses an excellent example here:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;One never wants to be reduced to saying, “Here’s my program, and it doesn’t work. Why not?” Using the problem-reduction technique, one can pinpoint the help needed, saying something like, “Here’s some code I wrote. As you can see, I know how to find the distance between two three-dimensional coordinates, and I know how to check whether one distance is less than another. But I can’t seem to find a general solution for finding the pair of coordinates with the minimum distance.” - Spraul, V. Anton&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  6. Look for Analogies
&lt;/h3&gt;

&lt;p&gt;We are often solving the same problem, but in a different flavour, over and over again.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/iGXpb2gJM3JkQXfBXv/giphy-downsized-large.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/iGXpb2gJM3JkQXfBXv/giphy-downsized-large.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We should pay attention to similarities between the problem we have in front of us, and other problems we solved in the past. &lt;/p&gt;

&lt;p&gt;If the problem is totally new, that’s great, because it’s a great opportunity to put it inside our “cookie jar of solved problems” for future use.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Experiment
&lt;/h3&gt;

&lt;p&gt;If everything looks dark and we don’t know why the program is behaving as if it had life on its own, experimenting with it can help us.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/QU1pSfyEynvgY/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/QU1pSfyEynvgY/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I usually use &lt;code&gt;console.log&lt;/code&gt; as a “probing” method to find out what’s happening. We can tweak something here and there and see how the output gets modified. Then make hypotheses and put them to the test.&lt;/p&gt;

&lt;p&gt;It is important to make a distinction between &lt;strong&gt;experimenting&lt;/strong&gt; and &lt;strong&gt;guessing&lt;/strong&gt;. Experimenting is a controlled process: we gather the information that can help us solve the problem. Guessing is typing code mindlessly and hoping for the best.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Don’t Get Frustrated
&lt;/h3&gt;

&lt;p&gt;The final technique is more of a recommendation than a technique in itself: don't get frustrated.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3ohs81rDuEz9ioJzAA/giphy-downsized-large.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3ohs81rDuEz9ioJzAA/giphy-downsized-large.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I must confess that I had felt frustrated many times, and I can assure you that it didn’t help me one bit to solve the problem.&lt;/p&gt;

&lt;p&gt;How does the rage you feel inside of you help you solve a problem? Why are you angry? Or a better question even: &lt;strong&gt;why do you choose to be angry?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here is where two maxims of the Stoic philosophy come for our help:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“We suffer more often in &lt;strong&gt;imagination&lt;/strong&gt; than in &lt;strong&gt;reality&lt;/strong&gt;.” - Seneca&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“The chief task in life is simply this: to identify and separate matters so that I can say clearly to myself which are &lt;strong&gt;externals not under my control&lt;/strong&gt;, and which have to do with the &lt;strong&gt;choices I actually control&lt;/strong&gt;. Where then do I look for good and evil? Not to uncontrollable externals, &lt;strong&gt;but within myself to the choices that are my own…&lt;/strong&gt;” - Epictetus, Discourses, 2.5.4–5&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We have to learn to manage how we respond to frustration. As developers, it’s very likely that we are going to face bugs in our code or complicated features to implement on a daily basis, and a good portion of them are going to be difficult to solve. Hence, it’s better to learn not to feel frustrated because of this, but rather think of this as a “feature” of our job.&lt;/p&gt;

&lt;p&gt;I often remember &lt;a href="https://markmanson.net/life-purpose" rel="noopener noreferrer"&gt;this question&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What shit sandwich do you want to eat? Because eventually, we all get served one. - Mark Manson&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And then I realise: "I have chosen this struggle, so I shouldn't get mad because of it."&lt;/p&gt;

&lt;p&gt;Something that can help us to get out of a frustrating moment is to iterate on these steps again: build a new plan, restate the problem differently, create different problem divisions and alterations, etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practice time
&lt;/h2&gt;

&lt;p&gt;Now, let’s put all these concepts into practice. I have adapted one of the problems presented in the book from C++ to JavaScript for convenience purposes.&lt;/p&gt;

&lt;p&gt;By the way, you can get the source code from my repository (I plan on keep adding new problems as I move forward in reading the book): &lt;a href="https://github.com/Colo-Codes/think-like-a-programmer-book-problems" rel="noopener noreferrer"&gt;think-like-a-programmer-book-problems&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Write a program that uses a single console.log statement to produce a pattern of hash symbols shaped like half of a perfect 5 x 5 square (or a right triangle):

#####
####
###
##
#

Spraul, V. Anton. Think Like a Programmer (p. 26). Adapted from C++ to JavaScript by Damian Demasi.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The plan
&lt;/h3&gt;

&lt;p&gt;We are going to take the problem, divide it into smaller pieces, and start solving the pieces one by one. We are going to search for analogies along the way. In the end, we will put everything together.&lt;/p&gt;

&lt;h3&gt;
  
  
  Restating the problem
&lt;/h3&gt;

&lt;p&gt;After analysing the problem a bit deeper, we can see that there is a pattern that needs to be printed and that this pattern gets altered on each line. I don’t know about you, but this is suggesting “iteration” to me, so we will use some sort of loop to solve it.&lt;/p&gt;

&lt;p&gt;Our restatement could be something like: “write a loop that prints a line of hash symbols where each line gets one less hash symbol that the previous one, starting with 5 symbols on the first line.”&lt;/p&gt;

&lt;h3&gt;
  
  
  Divide the problem
&lt;/h3&gt;

&lt;p&gt;We can divide this problem like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Print a line of 5 hash symbols&lt;/li&gt;
&lt;li&gt;Print 5 lines of 5 hash symbols&lt;/li&gt;
&lt;li&gt;Find a way to decrease a number as a count grows&lt;/li&gt;
&lt;li&gt;Apply point 3 to point 2&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Start with What You Know
&lt;/h3&gt;

&lt;p&gt;Let’s start by the easy part: print 5 hashes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;halfSquare&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;halfSquare&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;halfSquare&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Great! It’s not much, but it’s honest work 😅.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reduce the Problem
&lt;/h3&gt;

&lt;p&gt;Now, instead of printing five lines with a decreasing number of hashes, let's print 5 lines with the same number of hashes. By doing this we are simplifying the problem and reducing its complexity and constraints.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;halfSquare&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;halfSquare&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nx"&gt;halfSquare&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;halfSquare&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  Look for Analogies
&lt;/h3&gt;

&lt;p&gt;In the previous block of code, we are using something we already know (a loop) to repeat the line of hashes 5 times, resulting in a nested &lt;code&gt;for&lt;/code&gt; loop. This is our analogy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Experiment
&lt;/h3&gt;

&lt;p&gt;Now we need to find a way to decrease a value as the loop increases. In the book, this is referenced as “counting down by counting up”.&lt;/p&gt;

&lt;p&gt;Let’s experiment to find this behaviour starting with the easier part: counting up.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1
2
3
4
5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After looking at the expected end result (the triangle of hashes) and comparing it with our experiment, we can think of these numbers as the number of hashes that need to be subtracted on each line plus 1:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Line&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;First line:&lt;/td&gt;
&lt;td&gt;5 hashes - 1 + 1 = 5 hashes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Second line:&lt;/td&gt;
&lt;td&gt;5 hashes - 2 + 1 = 4 hashes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Third line:&lt;/td&gt;
&lt;td&gt;5 hashes - 3 + 1 = 3 hashes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fourth line:&lt;/td&gt;
&lt;td&gt;5 hashes - 4 + 1 = 2 hashes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fifth line:&lt;/td&gt;
&lt;td&gt;5 hashes - 5 + 1 = 1 hash&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If we use 6 hashes, we can get rid of the “+ 1” part:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Line&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;First line:&lt;/td&gt;
&lt;td&gt;6 hashes - 1 = 5 hashes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Second line:&lt;/td&gt;
&lt;td&gt;6 hashes - 2 = 4 hashes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Third line:&lt;/td&gt;
&lt;td&gt;6 hashes - 3 = 3 hashes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fourth line:&lt;/td&gt;
&lt;td&gt;6 hashes - 4 = 2 hashes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fifth line:&lt;/td&gt;
&lt;td&gt;6 hashes - 5 = 1 hash&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;So, as 6 looks like an important number for our purposes, and as the subtracted number looks like the for loop iterating as a new line gets printed, let’s see what happens when we subtract the current iteration number from 6:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;5
4
3
2
1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is starting to look good!&lt;/p&gt;

&lt;p&gt;So, as the first line will need to have 5 hashes, the iteration should go from 1 to 6 - 1 = 5.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;hashLine&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;hashLine&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hashLine&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Moving to the next line, to build it our loop will need to change the &lt;code&gt;i &amp;lt;= 6 - 1&lt;/code&gt; condition to &lt;code&gt;i &amp;lt;= 6 - 2&lt;/code&gt; condition. This pattern is pointing to a loop incrementing a value on each iteration, and we already have that loop: it’s the outer &lt;code&gt;for&lt;/code&gt; loop.&lt;/p&gt;

&lt;p&gt;When combining these findings with what we already have we can arrive to the conclusion of our problem:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;halfSquare&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;halfSquare&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;halfSquare&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;halfSquare&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;And this is the fruit of the struggle, the thinking and the experimenting.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/5bivKwxhVzshNk2Rjw/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/5bivKwxhVzshNk2Rjw/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing thoughts
&lt;/h2&gt;

&lt;p&gt;Applying all these techniques at once is not easy for me. I discovered that I have “my way” of solving problems, but it’s often not the most suitable way of doing so. As with most new habits, implementing a particular process comes with a certain resistance. This is why I’m taking the approach of implementing these problem-solving techniques one step at a time (and I’ve noticed that I’m going full-on "inception" here, using the division of a problem into smaller pieces as a technique to implement the problem-solving techniques 🤯).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/VEcLrbBDy4B1tTKhq7/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/VEcLrbBDy4B1tTKhq7/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Notion templates, trackers and roadmaps
&lt;/h2&gt;

&lt;p&gt;🙋‍♂️ Psst! Before you go, I have something to share with you. If you are a subscriber of my newsletter, you already know this, but in case you are not, I would like to share with you these 3 free resources:&lt;/p&gt;

&lt;p&gt;👍 My &lt;a href="https://mailchi.mp/77b7cbf1b03a/web-development-notion-template" rel="noopener noreferrer"&gt;Notion template with over 440 pages of web development content&lt;/a&gt;, so you can &lt;a href="https://blog.damiandemasi.com/using-notion-to-organise-programming-topics" rel="noopener noreferrer"&gt;use Notion to organise programming topics&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;👍 My &lt;a href="https://blog.damiandemasi.com/html-study-progress-tracker-notion-template" rel="noopener noreferrer"&gt;HTML Study Progress Tracker and Roadmap Notion Template&lt;/a&gt;, so you can keep track of your progress in learning HTML concepts (and review  them).&lt;/p&gt;

&lt;p&gt;👍 And my &lt;a href="https://blog.damiandemasi.com/css-study-progress-tracker-and-roadmap-notion-template" rel="noopener noreferrer"&gt;CSS Study Progress Tracker and Roadmap Notion Template&lt;/a&gt;, to to the same  as before but with CSS.&lt;/p&gt;

&lt;p&gt;They are totally free for download and use, but I'm always open to donations (I need to buy coffee to transform it into code 😅).&lt;/p&gt;




&lt;p&gt;🗞️ &lt;strong&gt;NEWSLETTER -&lt;/strong&gt; &lt;em&gt;If you want to hear about my latest articles and interesting software development content, &lt;a href="https://mailchi.mp/22b236f812b1/subscribe-to-newsletter" rel="noopener noreferrer"&gt;subscribe to my newsletter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;🐦 &lt;strong&gt;TWITTER -&lt;/strong&gt; &lt;em&gt;Follow me on &lt;a href="https://twitter.com/DamianDemasi" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/damiandemasi" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1641530738382%2FWt_2bHGsXK.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
