<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ tips - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ tips - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Mon, 25 May 2026 20:14:42 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/tips/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ Common DevOps Mistakes and How to Avoid Them — Tips for Startups ]]>
                </title>
                <description>
                    <![CDATA[ Most DevOps engineers don't fail because they lack knowledge about tools. They fail because nobody told them what not to do before they got into production. Startup environments make this worse. The p ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-avoid-devops-mistakes/</link>
                <guid isPermaLink="false">6a060c22baf09db7a6253878</guid>
                
                    <category>
                        <![CDATA[ Devops ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Cloud Computing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ AWS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ startup ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Tolani Akintayo ]]>
                </dc:creator>
                <pubDate>Thu, 14 May 2026 17:53:38 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/uploads/covers/5fc16e412cae9c5b190b6cdd/6fcabd5e-272f-4f1d-b035-8241896e8296.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Most DevOps engineers don't fail because they lack knowledge about tools. They fail because nobody told them what <em>not</em> to do before they got into production.</p>
<p>Startup environments make this worse. The pressure to ship fast, the small team sizes, and the absence of senior engineers to review your decisions means mistakes happen quietly until they become outages, data loss events, or security incidents that cost the company thousands of dollars and weeks of recovery time.</p>
<p>This article is a direct breakdown of the ten most costly DevOps mistakes engineers make early in their careers at startups. For each mistake, you will get the real-world scenario, the business impact, and the concrete fix you can apply immediately.</p>
<p>Whether you are setting up your first production environment or auditing an existing one, this guide will help you build systems that are reliable, secure, and aligned with what the business actually needs.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ul>
<li><p><a href="#heading-who-this-article-is-for">Who This Article Is For</a></p>
</li>
<li><p><a href="#heading-why-startups-are-a-different-environment">Why Startups Are a Different Environment</a></p>
</li>
<li><p><a href="#heading-mistake-1-deploying-without-understanding-what-youre-deploying">Mistake 1: Deploying Without Understanding What You're Deploying</a></p>
</li>
<li><p><a href="#heading-mistake-2-using-production-as-a-development-environment">Mistake 2: Using Production as a Development Environment</a></p>
</li>
<li><p><a href="#heading-mistake-3-hardcoding-secrets-and-credentials">Mistake 3: Hardcoding Secrets and Credentials</a></p>
</li>
<li><p><a href="#heading-mistake-4-overengineering-for-problems-you-dont-have-yet">Mistake 4: Overengineering for Problems You Don't Have Yet</a></p>
</li>
<li><p><a href="#heading-mistake-5-no-observability-before-launch">Mistake 5: No Observability Before Launch</a></p>
</li>
<li><p><a href="#heading-mistake-6-treating-security-as-a-final-step">Mistake 6: Treating Security as a Final Step</a></p>
</li>
<li><p><a href="#heading-mistake-7-manual-deployments-in-production">Mistake 7: Manual Deployments in Production</a></p>
</li>
<li><p><a href="#heading-mistake-8-no-disaster-recovery-plan">Mistake 8: No Disaster Recovery Plan</a></p>
</li>
<li><p><a href="#heading-mistake-9-no-documentation-or-runbooks">Mistake 9: No Documentation or Runbooks</a></p>
</li>
<li><p><a href="#heading-mistake-10-solving-technical-problems-without-understanding-the-business">Mistake 10: Solving Technical Problems Without Understanding the Business</a></p>
</li>
<li><p><a href="#heading-the-system-thinking-framework-every-devops-engineer-needs">The System Thinking Framework Every DevOps Engineer Needs</a></p>
</li>
<li><p><a href="#heading-your-production-readiness-checklist">Your Production Readiness Checklist</a></p>
</li>
<li><p><a href="#heading-conclusion">Conclusion</a></p>
</li>
</ul>
<h2 id="heading-who-this-article-is-for">Who This Article Is For</h2>
<ul>
<li><p><strong>Early-career DevOps and cloud engineers</strong> who are building or maintaining production infrastructure at a startup.</p>
</li>
<li><p><strong>Backend developers</strong> who have recently taken on DevOps responsibilities.</p>
</li>
<li><p><strong>Engineers joining a startup</strong> who want to understand what operational discipline actually looks like in a fast-moving environment.</p>
</li>
</ul>
<p>You do not need to be an expert in any specific tool to follow this article. The focus is on decision-making patterns and operational discipline, not tool configuration.</p>
<h2 id="heading-why-startups-are-a-different-environment">Why Startups Are a Different Environment</h2>
<p>Before getting into the mistakes, you have to understand why startups produce them in the first place.</p>
<img src="https://cdn.hashnode.com/uploads/covers/65a5bfab4c73b29396c0b895/f9bec1fa-8938-4144-b934-9e5af4edf4ad.svg" alt="diagram showing the startup DevOps reality, a single engineer handling infra, CI/CD, security, monitoring, and deployment pipelines simultaneously" style="display:block;margin:0 auto" width="600" height="400" loading="lazy">

<p>In a large company, you typically have dedicated security engineers, an SRE team, a platform team, and multiple reviewers for every infrastructure change. In a startup, you mostly likely have one engineer responsible for all of that simultaneously.</p>
<p>This creates four specific pressure points:</p>
<ol>
<li><p><strong>Speed pressure.</strong> The business needs features shipped now. Operational discipline gets treated as optional because nobody is watching closely yet.</p>
</li>
<li><p><strong>Budget constraints.</strong> Every infrastructure decision has a direct impact on company runway. Engineers optimize for the cheapest option rather than the most reliable one.</p>
</li>
<li><p><strong>Absent guardrails.</strong> There is no senior engineer reviewing your Terraform plans. There is no security audit before launch. The absence of immediate consequences can make bad decisions feel like good ones.</p>
</li>
<li><p><strong>Constantly changing requirements.</strong> The architecture you design today may need to support a completely different product in six months. None of these pressures are excuses for poor decisions. But understanding them helps you see why the following mistakes happen so consistently.</p>
</li>
</ol>
<h2 id="heading-mistake-1-deploying-without-understanding-what-youre-deploying">Mistake 1: Deploying Without Understanding What You're Deploying</h2>
<h3 id="heading-the-scenario">The Scenario</h3>
<p>A junior engineer is asked to deploy the company's Node.js API to AWS. They find a tutorial for Elastic Beanstalk, follow it, and it works. Two weeks later, traffic increases. They try to scale "the same way as in the tutorial." The application goes down. They cannot debug it because they never understood what the deployment was actually doing.</p>
<h3 id="heading-the-business-impact">The Business Impact</h3>
<p>When production breaks and the person who deployed the system cannot explain how it works, diagnosis takes hours instead of minutes. The longer the incident runs, the higher the cost in customer trust, team morale, and potentially direct revenue loss.</p>
<h3 id="heading-the-fix">The Fix</h3>
<p>Before you deploy anything to production, you should be able to answer these five questions in writing:</p>
<ol>
<li><p><strong>What compute type is running my code?</strong> (EC2, Lambda, Fargate, container?)</p>
</li>
<li><p><strong>How does a new version replace the old one?</strong> (Rolling? Blue/green? All-at-once?)</p>
</li>
<li><p><strong>Where does configuration and secrets come from?</strong> (SSM? Secrets Manager? Environment file?)</p>
</li>
<li><p><strong>What downstream services depend on this?</strong> (Database connections? Other APIs? Cache?)</p>
</li>
<li><p><strong>How do I roll back in under five minutes if this breaks?</strong></p>
</li>
</ol>
<p>If you cannot answer all five, do not deploy until you can. The tutorial that got it running is not the documentation for how it operates.</p>
<blockquote>
<p>"It is better to spend two hours understanding a system before deploying it than two days debugging it after something breaks."</p>
</blockquote>
<p>Personally, when learning a new technology, tool, or implementing something I have not worked with before, I usually focus on three core questions: What, Why, and How.</p>
<ul>
<li><p><strong>The first question is: What is this technology or concept about?</strong><br>This helps me build a solid foundation by doing deep research, studying the official documentation, understanding the core principles, and sometimes even learning the history behind the tool or technology. I believe having a well-grounded understanding before implementation is very important.</p>
</li>
<li><p><strong>The second question is: Why do we need it?</strong><br>I try to understand the value the technology brings, why it should be implemented, what problem it solves, and how it benefits the team or organization. This helps me make informed technical decisions instead of just implementing tools without understanding their purpose.</p>
</li>
<li><p><strong>The third question is: How should it be implemented?</strong><br>There are usually multiple approaches to solving a problem or implementing a technology, so I focus on understanding the best and most practical approach based on the use case and expected outcome.</p>
</li>
</ul>
<p>This structured approach has helped me learn new technologies quickly, adapt fast, and implement solutions effectively in real-world environments.</p>
<h2 id="heading-mistake-2-using-production-as-a-development-environment">Mistake 2: Using Production as a Development Environment</h2>
<h3 id="heading-the-scenario">The Scenario</h3>
<p>To save time, an engineer tests a new deployment script directly in the production AWS account. They accidentally run a command that terminates the production database instance. Automated backups exist but were misconfigured. Six hours of customer data is unrecoverable.</p>
<p>This scenario happens more often than you would expect. The reasoning is always the same: "It will only take a minute."</p>
<h3 id="heading-the-business-impact">The Business Impact</h3>
<p>A single test-in-production incident can result in data loss, hours of downtime, and a customer communication crisis. In a startup, that can permanently damage the company's reputation before it has had the chance to build one.</p>
<h3 id="heading-the-fix">The Fix</h3>
<p>You need at minimum three separate environments and ideally three separate AWS accounts:</p>
<table>
<thead>
<tr>
<th>Environment</th>
<th>Purpose</th>
<th>Access Level</th>
</tr>
</thead>
<tbody><tr>
<td><strong>dev</strong></td>
<td>Break things freely. No real data.</td>
<td>Engineers have broad access</td>
</tr>
<tr>
<td><strong>staging</strong></td>
<td>Mirror of production. Final verification.</td>
<td>Controlled access</td>
</tr>
<tr>
<td><strong>production</strong></td>
<td>Real customers. Real data.</td>
<td>MFA required. No manual deployments.</td>
</tr>
</tbody></table>
<p>Using separate AWS accounts (not just separate VPCs) gives you account-level isolation. A permission error in the dev account cannot accidentally touch production infrastructure at the API level.</p>
<p>Infrastructure as Code (Terraform or CloudFormation) makes this affordable, you write the configuration once and apply it three times with different variable files.</p>
<pre><code class="language-hcl"># terraform/environments/prod/main.tf
module "app" {
  source      = "../../modules/app"
  environment = "production"
  instance_type = "t3.medium"
  db_instance_class = "db.t3.medium"
  multi_az          = true
}
</code></pre>
<pre><code class="language-hcl"># terraform/environments/staging/main.tf
module "app" {
  source      = "../../modules/app"
  environment = "staging"
  instance_type = "t3.small"
  db_instance_class = "db.t3.small"
  multi_az          = false
}
</code></pre>
<p>The module is the same. The environment-specific variables are different. Separate environments are not a luxury, they are the minimum operating standard for any team running real software.</p>
<h2 id="heading-mistake-3-hardcoding-secrets-and-credentials">Mistake 3: Hardcoding Secrets and Credentials</h2>
<h3 id="heading-the-scenario">The Scenario</h3>
<p>A new engineer joins a startup and clones the repository. Inside they find a <code>.env</code> file committed to Git containing the production database password, the Stripe secret key, and an AWS access key with admin permissions. The repository has been public for six months.</p>
<p>GitHub's automated secret scanning never triggered because the secrets were inside a <code>.env</code> file rather than raw in the code. The credentials had been valid and actively used for over six months.</p>
<h3 id="heading-the-business-impact">The Business Impact</h3>
<p>Automated scanners run by attackers find exposed credentials within minutes of them being pushed to a public repository. A single exposed AWS access key with admin permissions can result in:</p>
<ul>
<li><p>Crypto-mining workloads generating thousands of dollars in cloud bills overnight</p>
</li>
<li><p>Complete exfiltration of customer data from every S3 bucket</p>
</li>
<li><p>Privilege escalation: the attacker creates new admin users and locks you out of your own account</p>
</li>
<li><p>AWS account suspension while the investigation runs</p>
</li>
</ul>
<p>According to <a href="https://github.blog/security/vulnerability-research/securing-millions-of-developers-together/">GitHub's annual security report</a>, millions of secrets are exposed in public repositories every year. The average time to detect a compromised cloud credential is 197 days.</p>
<h2 id="heading-the-fix">The Fix</h2>
<p><strong>Step 1: Never commit secrets to Git.</strong> Not temporarily. Not in a branch. Not in a private repository.</p>
<p><strong>Step 2: Add</strong> <code>.gitignore</code> <strong>before you create the first file.</strong> Check in the <code>.gitignore</code> with the first line of code before any <code>.env</code> files exist.</p>
<pre><code class="language-gitignore"># .gitignore
.env
.env.*
*.pem
*.key
secrets/
</code></pre>
<p><strong>Step 3: Use AWS Secrets Manager or SSM Parameter Store for all production secrets.</strong> Your application reads secrets at runtime:</p>
<pre><code class="language-python"># Python example — fetch secret at runtime, never at build time
import boto3
import json
 
def get_secret(secret_name: str, region: str = "us-east-1") -&gt; dict:
    client = boto3.client("secretsmanager", region_name=region)
    response = client.get_secret_value(SecretId=secret_name)
    return json.loads(response["SecretString"])
 
# Usage
db_config = get_secret("prod/myapp/database")
DATABASE_URL = db_config["connection_string"]
</code></pre>
<p><strong>Step 4: Scan your existing repositories immediately.</strong> You may already have a problem:</p>
<pre><code class="language-bash"># Install trufflehog to scan for exposed secrets in your repo history
pip install trufflehog
 
# Scan the entire commit history of your repository
trufflehog git file://.
 
# Or scan a remote GitHub repo
trufflehog github --repo https://github.com/your-org/your-repo
</code></pre>
<p><strong>Step 5: Add a pre-commit hook to prevent future accidents:</strong></p>
<pre><code class="language-bash">pip install pre-commit
</code></pre>
<pre><code class="language-yaml"># .pre-commit-config.yaml
repos:
  - repo: https://github.com/awslabs/git-secrets
    rev: master
    hooks:
      - id: git-secrets
  - repo: https://github.com/Yelp/detect-secrets
    rev: v1.4.0
    hooks:
      - id: detect-secrets
</code></pre>
<pre><code class="language-bash">pre-commit install
# Now the hook runs before every commit and blocks detected secrets
</code></pre>
<p>There is no recovery from a publicly exposed database password. The fix takes ten minutes upfront. The incident takes weeks.</p>
<h2 id="heading-mistake-4-overengineering-for-problems-you-dont-have-yet">Mistake 4: Overengineering for Problems You Don't Have Yet</h2>
<h3 id="heading-the-scenario">The Scenario</h3>
<p>A five-person startup with 200 users decides to build a microservices architecture on Kubernetes because "Netflix uses it." They spend three months setting up Kubernetes, Istio service mesh, ArgoCD, Vault, Prometheus, and Grafana. Their product has not shipped a new feature in three months. A competitor with a monolith on a single EC2 instance shipped twelve new features in the same period.</p>
<h3 id="heading-the-business-impact">The Business Impact</h3>
<p>Every layer of infrastructure you add is a layer that can break, a layer that requires expertise to operate, and a layer that slows down every future change. Kubernetes is the right answer for organizations with the scale and team size to operate it. For a five-person startup, it is an expensive distraction.</p>
<p>Premature complexity does not just cost engineering time. It costs the competitive advantage that speed provides in the early stage.</p>
<h3 id="heading-the-fix">The Fix</h3>
<p>Match your infrastructure to your actual stage:</p>
<table>
<thead>
<tr>
<th>Scale</th>
<th>Right Infrastructure</th>
<th>Cost Range</th>
</tr>
</thead>
<tbody><tr>
<td><strong>1–1,000 users</strong></td>
<td>Single EC2 + RDS + Nginx reverse proxy</td>
<td>$20–50/month</td>
</tr>
<tr>
<td><strong>1K–50K users</strong></td>
<td>Auto-scaling group, RDS Multi-AZ, ALB, basic CI/CD</td>
<td>$200-500/month</td>
</tr>
<tr>
<td><strong>50K–500K users</strong></td>
<td>ECS Fargate, RDS read replicas, ElastiCache, full observability</td>
<td>$1K-5K/month</td>
</tr>
<tr>
<td><strong>500K+ users</strong></td>
<td>Multi-region, managed Kubernetes, dedicated SRE</td>
<td>$10K+/month</td>
</tr>
</tbody></table>
<p>The question to ask before every infrastructure decision is: <strong>"What specific, measurable problem does this solve today that my current setup cannot solve?"</strong></p>
<p>Amazon, Netflix, and Uber did not start with microservices. They started with monoliths and extracted services only when the monolith became the actual bottleneck. You are not Netflix. You are solving the problems in front of you today.</p>
<p>Use managed services wherever possible, RDS instead of self-hosted Postgres, Fargate instead of self-managed Kubernetes, ElastiCache instead of self-hosted Redis. Managed services let your team focus on the product instead of the infrastructure.</p>
<h2 id="heading-mistake-5-no-observability-before-launch">Mistake 5: No Observability Before Launch</h2>
<h3 id="heading-the-scenario">The Scenario</h3>
<p>A startup's checkout flow breaks on a Friday evening. Users are abandoning their carts and the company is losing revenue. The DevOps engineer finds out 45 minutes later because a customer sent a direct message to the CEO on Twitter.</p>
<p>The engineer has no dashboards, no log aggregation, and no alerting. They SSH into the production server and scroll through raw log files. Two hours later, they find the issue: a database connection pool was exhausted by a memory leak introduced in that morning's deployment.</p>
<h3 id="heading-business-impact">Business Impact</h3>
<p>Without observability:</p>
<ul>
<li><p>You find out about production problems from users, not from your systems</p>
</li>
<li><p>Incidents take 10x longer to resolve because diagnosis is guesswork</p>
</li>
<li><p>You cannot tell whether a deployment improved or degraded performance</p>
</li>
<li><p>You have no data for making better architecture decisions</p>
</li>
</ul>
<h3 id="heading-the-fix">The Fix</h3>
<p>Implement the four golden signals before any service goes to production. These come from <a href="https://sre.google/sre-book/monitoring-distributed-systems/">Google's Site Reliability Engineering book</a>:</p>
<ol>
<li><p><strong>Latency</strong>: How long requests take to complete (p50, p95, p99)</p>
</li>
<li><p><strong>Traffic</strong>: How many requests per second the system is handling</p>
</li>
<li><p><strong>Errors</strong>: The rate of failed requests (5xx responses per minute)</p>
</li>
<li><p><strong>Saturation</strong>: How close the system is to its limits (CPU, memory, connection pool)</p>
</li>
</ol>
<p>Here is a minimal CloudWatch alarm setup using the AWS CLI:</p>
<pre><code class="language-shell"># Alert when error rate exceeds 1% for 5 consecutive minutes

aws cloudwatch put-metric-alarm \
  --alarm-name "high-error-rate-production" \
  --alarm-description "Error rate exceeded 1% for 5 minutes" \
  --metric-name "5XXError" \
  --namespace "AWS/ApplicationELB" \
  --statistic "Average" \
  --period 60 \
  --evaluation-periods 5 \
  --threshold 0.01 \
  --comparison-operator "GreaterThanOrEqualToThreshold" \
  --alarm-actions "arn:aws:sns:us-east-1:123456789:pagerduty-production" \
  --dimensions Name=LoadBalancer,Value=app/my-alb/1234567890abcdef
</code></pre>
<p>Every application should also expose a <code>/health</code> endpoint that returns <code>200 OK</code> when healthy:</p>
<pre><code class="language-python"># FastAPI example

from fastapi import FastAPI
from sqlalchemy import text
 
app = FastAPI()
 
@app.get("/health")
async def health_check():
    # Check database connectivity
    try:
        db.execute(text("SELECT 1"))
        db_status = "healthy"
    except Exception:
        db_status = "unhealthy"
 
    return {
        "status": "healthy" if db_status == "healthy" else "degraded",
        "database": db_status,
        "version": os.getenv("APP_VERSION", "unknown")
    }
</code></pre>
<p>Your load balancer checks this endpoint. Your uptime monitor checks it. You check it after every deployment.</p>
<blockquote>
<p>You do not get to say a system is working unless you have data to prove it. "Nobody complained" is not the same as "nothing is broken."</p>
</blockquote>
<h2 id="heading-mistake-6-treating-security-as-a-final-step">Mistake 6: Treating Security as a Final Step</h2>
<h3 id="heading-the-scenario">The Scenario</h3>
<p>A startup rushes to launch their MVP. Security reviews are "planned for after launch." Six months later, a potential enterprise customer requires a security audit before signing a contract. The audit reveals:</p>
<ul>
<li><p>S3 buckets publicly accessible by default</p>
</li>
<li><p>EC2 instances with port 22 open to <code>0.0.0.0/0</code></p>
</li>
<li><p>IAM users with <code>AdministratorAccess</code> for the entire team</p>
</li>
<li><p>No encryption on the database at rest</p>
</li>
<li><p>JWT secrets hardcoded in environment variables The audit fails. The enterprise deal worth $120,000 annually is lost. Remediation takes four weeks of engineering time.</p>
</li>
</ul>
<h3 id="heading-the-business-impact">The Business Impact</h3>
<p>Security debt is the most expensive technical debt you can accumulate. Unlike performance debt that degrades gradually, security vulnerabilities cause sudden, catastrophic events: data breaches, ransomware, account takeovers, and regulatory fines. At a startup, any one of these can end the company.</p>
<h3 id="heading-the-fix">The Fix</h3>
<p>Apply these six security controls before the first line of production code ships:</p>
<p><strong>1. Principle of Least Privilege every IAM role gets only what it needs:</strong></p>
<p>One of the most common security mistakes in AWS is granting roles more permissions than they need either out of convenience (<code>s3:*</code>) or uncertainty about what the service actually requires. This creates unnecessary risk: if a role is compromised, the attacker inherits every permission you granted.</p>
<p>The fix is simple: look at what your service actually does, then write a policy that allows exactly that.</p>
<p>If your app uploads and reads files from a specific S3 bucket, the policy should say exactly that:</p>
<pre><code class="language-json">{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject"
      ],
      "Resource": "arn:aws:s3:::my-app-uploads/*"
    }
  ]
}
</code></pre>
<p>Notice the <code>Resource</code> is scoped to <code>my-app-uploads/*</code> not all S3 buckets. And the <code>Action</code> list covers only <code>GetObject</code> and <code>PutObject</code> not <code>DeleteObject</code>, not <code>s3:*</code>. If the service gets compromised, the attacker can read and write to that one bucket. That is it. The rest of your account is untouched.</p>
<p><strong>2. Block all S3 public access by default:</strong></p>
<p>AWS S3 buckets are private by default when created but that can be overridden at the bucket level, the object level, or through a bucket policy. Misconfigured S3 buckets are one of the most common causes of data breaches, and they are almost always accidental.</p>
<p>The safest approach is to enable the "Block Public Access" setting at the account level, which overrides all other settings and prevents any bucket from being made public even if someone tries:</p>
<pre><code class="language-bash">aws s3api put-public-access-block \
  --bucket my-app-bucket \
  --public-access-block-configuration \
    "BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true"
</code></pre>
<p>Run this for every bucket you create. Better yet, enable it at the AWS account level so it applies automatically to all future buckets by default.</p>
<p><strong>3. Never open SSH to the internet, use AWS Systems Manager Session Manager instead:</strong></p>
<p>Port 22 open to <code>0.0.0.0/0</code> is an attack surface that exists on thousands of AWS instances right now. Brute-force bots scan the internet continuously looking for open SSH ports. Even with a strong key, the exposure is unnecessary because AWS provides a better alternative.</p>
<p>AWS Systems Manager Session Manager gives you full shell access to any EC2 instance without opening a single inbound port on the security group. There is no port to scan, no port to attack, and every session is logged automatically to CloudTrail:</p>
<pre><code class="language-bash"># Start a session on an EC2 instance without port 22 open
aws ssm start-session --target i-0123456789abcdef0
</code></pre>
<p>To use Session Manager, the EC2 instance needs the SSM Agent installed (included by default on Amazon Linux 2 and Ubuntu 20.04+) and an IAM instance profile with the <code>AmazonSSMManagedInstanceCore</code> policy attached. Once that is set up, you can close port 22 on the security group entirely.</p>
<p><strong>4. Enable MFA for all IAM users and enforce it via policy:</strong></p>
<p>A leaked IAM username and password with no MFA is a fully compromised account. Multi-factor authentication is the single most effective control against credential theft, and it costs nothing to enable.</p>
<p>Enforce it through an IAM policy that denies all actions when MFA is not present, except the actions needed to set up MFA in the first place. This means even if a set of credentials is stolen, the attacker cannot do anything without the second factor.</p>
<p>The AWS documentation provides the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_users-self-manage-mfa-and-creds.html">Complete Deny Without MFA Policy</a>, attach it to every IAM user or group in your account. This is a one-time setup that permanently raises your account's security baseline.</p>
<p><strong>5. Enable CloudTrail in all regions:</strong></p>
<p>Without CloudTrail, you have no record of who did what in your AWS account. If a credential is compromised, you cannot investigate what the attacker accessed. If an engineer accidentally deletes a resource, you cannot trace it. You are operating blind.</p>
<p>CloudTrail logs every AWS API call who made it, from which IP, at what time, and what the response was. Enable it across all regions so activity in regions you do not actively use is also captured:</p>
<pre><code class="language-bash">aws cloudtrail create-trail \
  --name production-audit-trail \
  --s3-bucket-name my-cloudtrail-logs \
  --is-multi-region-trail \
  --enable-log-file-validation
</code></pre>
<p>The <code>--enable-log-file-validation</code> flag generates a digest file for each log that lets you verify the log has not been tampered with, this is important if you ever need to use these logs in a security investigation or compliance audit. Once this is running, every <code>AssumeRole</code>, every <code>DeleteBucket</code>, and every <code>RunInstances</code> call in your account is permanently recorded.</p>
<p><strong>6. Run AWS Security Hub from day one:</strong></p>
<p>Most teams only discover security misconfigurations after a breach or a compliance audit. Security Hub inverts this, it continuously scans your AWS environment against industry-standard frameworks (CIS AWS Foundations Benchmark, AWS Foundational Security Best Practices) and surfaces findings before they become incidents.</p>
<p>Enabling it takes a single command:</p>
<pre><code class="language-bash">aws securityhub enable-security-hub
</code></pre>
<p>Within minutes, Security Hub gives your account a compliance score and a prioritized list of findings. A finding might tell you that a security group has port 22 open to the world, that an S3 bucket has logging disabled, or that root account credentials were recently used. Each finding includes the affected resource and a remediation guide.</p>
<p>Treat every Security Hub finding the same way you treat a production bug: assign it a priority, assign an owner, and close it. A finding sitting unaddressed for 30 days is a known vulnerability you chose to leave open.</p>
<h2 id="heading-mistake-7-manual-deployments-in-production">Mistake 7: Manual Deployments in Production</h2>
<h3 id="heading-the-scenario">The Scenario</h3>
<p>A startup's deployment process is documented in a Notion page that is four months out of date. It involves SSH-ing into the server, running <code>git pull</code>, running <code>npm install</code>, and restarting the PM2 process. Different engineers do it slightly differently. One engineer, rushing a late-night release, skips <code>npm install</code>. The application starts crashing because a new dependency is missing.</p>
<h3 id="heading-the-business-impact">The Business Impact</h3>
<p>Manual deployment processes are inherently unreliable. Humans under pressure skip steps, perform steps in the wrong order, and remember procedures differently. Every manual step in a production deployment process is a scheduled incident waiting for the right moment of stress.</p>
<h3 id="heading-the-fix">The Fix</h3>
<p>If a deployment step is performed manually more than twice, it needs to be automated. Here is a minimal but complete GitHub Actions deployment workflow for an ECS Fargate service:</p>
<pre><code class="language-yaml"># .github/workflows/deploy.yml
name: Deploy to Production
 
on:
  push:
    branches:
      - main
 
permissions:
  id-token: write   # Required for OIDC authentication with AWS
  contents: read
 
jobs:
  deploy:
    runs-on: ubuntu-latest
    environment: production
 
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
 
      - name: Configure AWS credentials via OIDC
        uses: aws-actions/configure-aws-credentials@v4
        with:
          role-to-assume: ${{ secrets.AWS_DEPLOY_ROLE_ARN }}
          aws-region: us-east-1
 
      - name: Login to Amazon ECR
        id: login-ecr
        uses: aws-actions/amazon-ecr-login@v2
 
      - name: Build and push Docker image
        id: build
        env:
          ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
          IMAGE_TAG: ${{ github.sha }}
        run: |
          docker build -t \(ECR_REGISTRY/my-app:\)IMAGE_TAG .
          docker push \(ECR_REGISTRY/my-app:\)IMAGE_TAG
          echo "image=\(ECR_REGISTRY/my-app:\)IMAGE_TAG" &gt;&gt; $GITHUB_OUTPUT
 
      - name: Deploy to Amazon ECS
        uses: aws-actions/amazon-ecs-deploy-task-definition@v1
        with:
          task-definition: task-definition.json
          service: my-app-service
          cluster: production
          wait-for-service-stability: true
</code></pre>
<p>Notice <code>wait-for-service-stability: true</code>. Without this, the workflow reports success the moment ECS accepts the new task definition before the containers are actually healthy. With it, the workflow fails if the new containers crash. You want to know immediately, not discover it from user reports thirty minutes later.</p>
<h2 id="heading-mistake-8-no-disaster-recovery-plan">Mistake 8: No Disaster Recovery Plan</h2>
<h3 id="heading-the-scenario">The Scenario</h3>
<p>A startup's production database runs on a single RDS instance with no Multi-AZ configuration. Automated backups are enabled but have never been tested. The EBS volume backing the instance fails. AWS provisions a new instance from the last snapshot, which is 18 hours old. 18 hours of customer data is permanently lost.</p>
<p>The startup had no disaster recovery plan, no tested recovery procedure, and no communication template ready for customers.</p>
<h3 id="heading-the-business-impact">The Business Impact</h3>
<p>The question is not whether your infrastructure will fail. It will fail. Every database, every server, every availability zone experiences failures. The question is whether you have a tested plan for when it does.</p>
<p>Data loss of any magnitude is serious. For startups that handle financial data, healthcare data, or anything under GDPR, even partial data loss can trigger regulatory consequences.</p>
<h3 id="heading-the-fix">The Fix</h3>
<p><strong>Define your RTO and RPO before you design anything:</strong></p>
<ul>
<li><p><strong>RTO (Recovery Time Objective):</strong> How long can the business survive without this system? A payment API might have an RTO of 15 minutes. An internal analytics dashboard might have an RTO of 4 hours.</p>
</li>
<li><p><strong>RPO (Recovery Point Objective):</strong> How much data loss is acceptable? Zero means real-time replication. One hour means hourly snapshots are sufficient. This directly determines your backup frequency and architecture.</p>
</li>
</ul>
<p><strong>Enable RDS Multi-AZ for all production databases:</strong></p>
<pre><code class="language-hcl"># Terraform
resource "aws_db_instance" "production" {
  identifier        = "prod-postgres"
  engine            = "postgres"
  engine_version    = "15.4"
  instance_class    = "db.t3.medium"
  allocated_storage = 100
 
  # Multi-AZ: automatic failover to standby in a different AZ
  # No data loss. Automatic failover in ~60-120 seconds.
  multi_az = true
 
  # Encryption at rest — non-negotiable
  storage_encrypted = true
 
  # Automated backups with 7-day retention
  backup_retention_period = 7
  backup_window           = "03:00-04:00"
 
  # Enable deletion protection in production
  deletion_protection = true
 
  tags = {
    Environment = "production"
  }
}
</code></pre>
<p><strong>Test your backups on a schedule.</strong> Create a monthly calendar event: "Restore production backup to staging and verify data integrity." An untested backup is not a backup, it is a hope.</p>
<pre><code class="language-bash"># Restore a snapshot to a test instance and verify
aws rds restore-db-instance-from-db-snapshot \
  --db-instance-identifier recovery-test \
  --db-snapshot-identifier rds:prod-postgres-2025-01-15 \
  --db-instance-class db.t3.medium \
  --no-multi-az
 
# Connect and verify row counts
psql -h recovery-test.xxxx.rds.amazonaws.com -U admin -d mydb \
  -c "SELECT COUNT(*) FROM users; SELECT COUNT(*) FROM orders;"
</code></pre>
<p>For official guidance on RDS backup and restore, refer to the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html">AWS RDS Backup and Restore documentation</a>.</p>
<h2 id="heading-mistake-9-no-documentation-or-runbooks">Mistake 9: No Documentation or Runbooks</h2>
<h3 id="heading-the-scenario">The Scenario</h3>
<p>The startup's most experienced DevOps engineer takes two weeks of vacation. On day three of their holiday, the staging environment goes down. Nobody else knows how it was built, the engineer set it up manually over six months with no documentation, no Terraform, no notes. The team spends four days trying to reconstruct the environment from memory and guesswork. The engineer gets messages on their vacation every day. When they return, they rebuild the environment in four hours.</p>
<h3 id="heading-the-business-impact">The Business Impact</h3>
<p>Undocumented infrastructure creates single points of failure not in your systems, but in your team. It makes onboarding new engineers take weeks instead of hours. It makes incident response depend on specific people being available. When that person leaves the company, the knowledge walks out with them.</p>
<h3 id="heading-the-fix">The Fix</h3>
<p>Documentation for an engineering team means three specific things:</p>
<ol>
<li><p><strong>Infrastructure as Code is the highest form of documentation.</strong> The Terraform that defines your infrastructure IS the documentation for what exists and how it is configured. If something is not in code, it should not exist in production.</p>
</li>
<li><p><strong>A runbook for every operational task.</strong> A runbook is a step-by-step procedure written well enough that someone in their first week at the company can follow it during an incident:</p>
</li>
</ol>
<pre><code class="language-markdown"># Runbook: Production Database Connection Exhaustion
 
## Symptoms
- Application logs: "too many connections" errors
- 500 error rate spike on database-dependent endpoints
- pg_stat_activity shows max connections reached
 
## Diagnosis
# Check current connection count
psql -h \(DB_HOST -U \)DB_USER -c "SELECT COUNT(*) FROM pg_stat_activity;"
 
# See connections by application
psql -h \(DB_HOST -U \)DB_USER \
  -c "SELECT application_name, COUNT(*) FROM pg_stat_activity GROUP BY 1 ORDER BY 2 DESC;"

## Resolution
1. Identify and restart the service causing the connection leak
2. If immediate relief needed: kill idle connections older than 10 minutes
3. Long-term: review connection pool settings in application config

## Escalation
If unresolved in 30 minutes: page the on-call backend engineer.
</code></pre>
<ol>
<li><strong>An architecture README in every repository.</strong> Every engineer who clones your repository should be able to understand what it does, how to run it locally, how to deploy it, and what it depends on without asking anyone.</li>
</ol>
<h2 id="heading-mistake-10-solving-technical-problems-without-understanding-the-business">Mistake 10: Solving Technical Problems Without Understanding the Business</h2>
<h3 id="heading-the-scenario">The Scenario</h3>
<p>A startup is experiencing slow page loads. A DevOps engineer decides to solve it by migrating to Kubernetes with horizontal pod auto-scaling. The migration takes six weeks. Page loads improve slightly. But 80% of the slowness was caused by unoptimized database queries that had nothing to do with the infrastructure layer. The six-week migration solved 20% of the problem.</p>
<h3 id="heading-the-business-impact">The Business Impact</h3>
<p>Technical solutions to misdiagnosed problems are extraordinarily expensive. Every hour spent building the wrong solution is an hour not spent on the right one. Infrastructure is a tool for delivering business outcomes not an end in itself.</p>
<h3 id="heading-the-fix">The Fix</h3>
<p>Before making any infrastructure decision, answer these four questions:</p>
<ol>
<li><p><strong>What is the actual, measured bottleneck?</strong> Instrument before you act. The bottleneck is almost never where you assumed it was.</p>
</li>
<li><p><strong>What does success look like, and how will you measure it?</strong> "Pages are faster" is not measurable. "p95 page load time drops below 1.2 seconds" is measurable.</p>
</li>
<li><p><strong>What is the full cost of this solution?</strong> Time to implement, ongoing operational burden, team learning curve. Is this cost justified by the measured impact?</p>
</li>
<li><p><strong>Can a simpler solution solve 80% of the problem in 20% of the time?</strong></p>
</li>
</ol>
<p>Always profile and measure before you rebuild:</p>
<pre><code class="language-bash"># Check slow queries in PostgreSQL before any infrastructure changes
psql -h \(DB_HOST -U \)DB_USER -d $DB_NAME -c "
SELECT
  query,
  calls,
  total_exec_time / calls AS avg_ms,
  rows / calls AS avg_rows
FROM pg_stat_statements
ORDER BY avg_ms DESC
LIMIT 10;
"
</code></pre>
<p>Nine times out of ten, slow applications have slow queries, missing indexes, or an N+1 query problem, none of which require a new infrastructure layer to fix.</p>
<h2 id="heading-the-system-thinking-framework-every-devops-engineer-needs">The System Thinking Framework Every DevOps Engineer Needs</h2>
<p>Most of the mistakes above share a common root cause: the engineer was thinking about one component in isolation instead of the full system.</p>
<img src="https://cdn.hashnode.com/uploads/covers/65a5bfab4c73b29396c0b895/b33035a6-448f-419b-b293-206b7b775594.jpg" alt="A diagram showing a request flowing through a full system: user → CDN → load balancer → application servers → cache → database → logs/monitoring" style="display:block;margin:0 auto" width="600" height="400" loading="lazy">

<p>A system thinker asks six questions before making any change in production:</p>
<table>
<thead>
<tr>
<th>Question</th>
<th>Why You Ask It</th>
</tr>
</thead>
<tbody><tr>
<td><strong>What does this change?</strong></td>
<td>List every configuration, file, or service that will be different.</td>
</tr>
<tr>
<td><strong>What does this depend on?</strong></td>
<td>What must be true upstream for this component to work correctly?</td>
</tr>
<tr>
<td><strong>What depends on this?</strong></td>
<td>What downstream systems are affected if this changes or fails?</td>
</tr>
<tr>
<td><strong>What is the failure mode?</strong></td>
<td>Does this fail loudly (500 errors) or silently (wrong data)?</td>
</tr>
<tr>
<td><strong>What is the rollback path?</strong></td>
<td>How do you reverse this in under five minutes?</td>
</tr>
<tr>
<td><strong>What does healthy look like after the change?</strong></td>
<td>What metrics confirm everything is working correctly?</td>
</tr>
</tbody></table>
<p>This is not a checklist you run through slowly. It is a thinking habit that becomes automatic with practice. Senior engineers do not spend more time on deployments than junior engineers do, they spend their time on different things, and this is one of them.</p>
<h2 id="heading-your-production-readiness-checklist">Your Production Readiness Checklist</h2>
<p>Use this checklist before any production system goes live. Mark each item as done, in progress, or not yet started.</p>
<h3 id="heading-infrastructure">Infrastructure</h3>
<ul>
<li><p>Infrastructure is defined as code (Terraform or CloudFormation) and version-controlled in Git</p>
</li>
<li><p>Separate dev, staging, and production environments exist with separate credentials</p>
</li>
<li><p>All production changes go through an automated CI/CD pipeline, no manual SSH deployments</p>
</li>
<li><p>You can rebuild the entire production environment from code in under two hours</p>
</li>
</ul>
<h3 id="heading-security">Security</h3>
<ul>
<li><p>No secrets, credentials, or API keys exist in any Git repository</p>
</li>
<li><p>All production secrets are in Secrets Manager or SSM Parameter Store</p>
</li>
<li><p>All IAM roles follow the principle of least privilege</p>
</li>
<li><p>S3 buckets have public access blocked by default</p>
</li>
<li><p>Port 22 is not open to <code>0.0.0.0/0</code> on any security group</p>
</li>
<li><p>CloudTrail is enabled in all regions</p>
</li>
<li><p>All IAM users have MFA enabled</p>
</li>
<li><p>AWS Security Hub is enabled and findings are reviewed weekly</p>
</li>
</ul>
<h3 id="heading-observability">Observability</h3>
<ul>
<li><p>Every service has a <code>/health</code> endpoint that monitoring checks continuously</p>
</li>
<li><p>Alerts fire within five minutes of a production error rate spike</p>
</li>
<li><p>Dashboards exist showing latency, error rate, and resource utilization</p>
</li>
<li><p>Logs are centralized and searchable, not scattered across individual servers</p>
</li>
</ul>
<h3 id="heading-reliability">Reliability</h3>
<ul>
<li><p>Production database has Multi-AZ enabled</p>
</li>
<li><p>Backup restoration has been tested in the last 30 days</p>
</li>
<li><p>Written runbooks exist for the three most likely failure scenarios</p>
</li>
<li><p>RTO and RPO requirements are documented and the architecture meets them</p>
</li>
</ul>
<h3 id="heading-documentation">Documentation</h3>
<ul>
<li><p>Every repository has a README explaining what it does and how to deploy it</p>
</li>
<li><p>A new engineer could understand the production architecture from documentation alone</p>
</li>
<li><p>No single engineer holds critical knowledge that lives only in their head</p>
</li>
</ul>
<h2 id="heading-conclusion">Conclusion</h2>
<p>None of the mistakes in this article require rare misfortune to experience. They are the predictable result of decisions that feel reasonable under startup pressure but accumulate into real operational risk over time.</p>
<p>The good news is that every single one of them is preventable with the right awareness and the right habits applied early.</p>
<p>You do not need a perfect infrastructure from day one. You need a correct one: version-controlled, automated, observable, secure, and documented. Start with that foundation. Add complexity only when a specific, measured problem requires it. Always connect technical decisions to business outcomes.</p>
<p>The goal of DevOps in a startup is not to build impressive infrastructure. It is to build reliable systems that support product growth safely, efficiently, and sustainably and to make sure that when something does break, you can recover faster than anyone notices.</p>
<h2 id="heading-want-to-go-deeper">Want to Go Deeper?</h2>
<p>If this article resonated with you, <a href="https://coachli.co/tolani-akintayo/PR-H4oQS"><strong>The Startup DevOps Field Guide</strong></a> covers these principles in full depth with complete infrastructure blueprints, security frameworks, CI/CD pipeline templates, and the end-to-end decision-making playbook for engineers building DevOps practices in startup environments from scratch.</p>
<p>It is written specifically for the engineer who wants to do this right from the beginning not the one rebuilding everything after the first major incident.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Build Better React Apps with These Simple Tricks ]]>
                </title>
                <description>
                    <![CDATA[ Here's a list of amazing tricks that you can use to improve your React applications instantly. These tips will not only make your code cleaner and more reliable, but they also aim to make your development experience easier and overall more enjoyable.... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/build-better-react-apps-with-these-tricks/</link>
                <guid isPermaLink="false">66d03758871ae63f179f6ba8</guid>
                
                    <category>
                        <![CDATA[ React ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tips ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Applications ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Reed ]]>
                </dc:creator>
                <pubDate>Wed, 16 Jun 2021 20:55:03 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/06/amazing-react-tricks.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Here's a list of amazing tricks that you can use to improve your React applications instantly.</p>
<p>These tips will not only make your code cleaner and more reliable, but they also aim to make your development experience easier and overall more enjoyable. </p>
<p>Give these techniques a try in your React projects today!</p>
<h2 id="heading-replace-redux-with-react-query">Replace Redux with React Query</h2>
<p>As your application gets larger it becomes harder to manage state across your components. So you may reach for a state management library like Redux.</p>
<p>If your application relies on data that you get from an API, you often use Redux to fetch that server state and then update your application state.</p>
<p>This can be a challenging process – not only do you have to fetch data, but you also need to handle the different states, depending on whether you have the data or are in a loading or error state.</p>
<p>Instead of using Redux to manage data you get from a server, <strong>use a library like React Query.</strong></p>
<p>First of all, React Query gives you greater control over making HTTP requests in your React apps through helpful hooks, along with the ability to easily refetch data. And it also enables you to seamlessly manage state across your app components, often without having to manually update state yourself.</p>
<p>Here's how you set up React Query in your index.js file:</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> { QueryClient, QueryClientProvider } <span class="hljs-keyword">from</span> <span class="hljs-string">'react-query'</span>
<span class="hljs-keyword">import</span> ReactDOM <span class="hljs-keyword">from</span> <span class="hljs-string">"react-dom"</span>;

<span class="hljs-keyword">import</span> App <span class="hljs-keyword">from</span> <span class="hljs-string">"./App"</span>;

<span class="hljs-keyword">const</span> queryClient = <span class="hljs-keyword">new</span> QueryClient()

<span class="hljs-keyword">const</span> rootElement = <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">"root"</span>);
ReactDOM.render(
  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">QueryClientProvider</span> <span class="hljs-attr">client</span>=<span class="hljs-string">{queryClient}</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">App</span> /&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">QueryClientProvider</span>&gt;</span></span>,
  rootElement
);
</code></pre>
<p>Here, we are setting up a query client which will set up a cache for us to effortlessly manage any requests that we have made in the past. We also set up a query client provider component to pass it down the entire component tree.</p>
<h3 id="heading-how-to-make-requests-with-react-query">How to make requests with React Query</h3>
<p>You can make requests with the useQuery hook, which takes an identifier for your query (in this case, since we are fetching user data, we will call it 'user'), plus a function that is used to fetch that data.</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> { useQuery } <span class="hljs-keyword">from</span> <span class="hljs-string">"react-query"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">App</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">const</span> { isLoading, isError, data } = useQuery(<span class="hljs-string">"user"</span>, <span class="hljs-function">() =&gt;</span>
    fetch(<span class="hljs-string">"https://randomuser.me/api"</span>).then(<span class="hljs-function">(<span class="hljs-params">res</span>) =&gt;</span> res.json())
  );

  <span class="hljs-keyword">if</span> (isLoading) <span class="hljs-keyword">return</span> <span class="hljs-string">"Loading..."</span>;
  <span class="hljs-keyword">if</span> (isError) <span class="hljs-keyword">return</span> <span class="hljs-string">"Error!"</span>;

  <span class="hljs-keyword">const</span> user = data.results[<span class="hljs-number">0</span>];
  <span class="hljs-keyword">return</span> user.email;
}
</code></pre>
<p>As you can see, React Query takes care of managing these various states that can take place when we fetch our data. We no longer need to manage these states ourselves, we can just destructure them from what is returned from <code>useQuery</code>.</p>
<p>Where does the state management part of useQuery come into play?</p>
<p>Now that we have fetched the user data and have it stored in our internal cache, all we need to do to be able to use it across any other component is to call <code>useQuery()</code> with the 'user' key that we associated with it:</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> { useQuery } <span class="hljs-keyword">from</span> <span class="hljs-string">"react-query"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">OtherComponent</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">const</span> { data } = useQuery(<span class="hljs-string">'user'</span>);

  <span class="hljs-built_in">console</span>.log(data);
}
</code></pre>
<h2 id="heading-make-react-context-easier-with-a-custom-hook">Make React Context Easier with a Custom Hook</h2>
<p>React Context is a great way to pass data across our component tree. It allows us to pass data into whatever component we like without having to use props. </p>
<p>To consume context in a React function component, we use the <code>useContext</code> hook.</p>
<p>However, there is a slight downside to doing so. In every component that we want to consume data that has been passed down on context, we have to import both the created context object and import React to grab the useContext hook.</p>
<p>Instead of having to write multiple import statements every time we want to read from context, we can simply create a custom React hook.</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">"react"</span>;

<span class="hljs-keyword">const</span> UserContext = React.createContext();

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">UserProvider</span>(<span class="hljs-params">{ children }</span>) </span>{
  <span class="hljs-keyword">const</span> user = { <span class="hljs-attr">name</span>: <span class="hljs-string">"Reed"</span> };
  <span class="hljs-keyword">return</span> <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">UserContext.Provider</span> <span class="hljs-attr">value</span>=<span class="hljs-string">{user}</span>&gt;</span>{children}<span class="hljs-tag">&lt;/<span class="hljs-name">UserContext.Provider</span>&gt;</span></span>;
}

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">useUser</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">const</span> context = React.useContext(UserContext);
  <span class="hljs-keyword">if</span> (context === <span class="hljs-literal">undefined</span>) {
    <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span>(<span class="hljs-string">"useUser in not within UserProvider"</span>);
  }
  <span class="hljs-keyword">return</span> context;
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">App</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">UserProvider</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">Main</span> /&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">UserProvider</span>&gt;</span></span>
  );
}

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Main</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">const</span> user = useUser();

  <span class="hljs-keyword">return</span> <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>{user.name}<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span></span>; <span class="hljs-comment">// displays "Reed"</span>
}
</code></pre>
<p>In this example, we are passing down user data on our custom UserProvider component, which takes a user object and is wrapped around the Main component.</p>
<p>We have a <code>useUser</code> hook to more easily consume that context. We only need to import that hook itself to consume our User Context in any component we like, such as our Main component.</p>
<h2 id="heading-manage-context-providers-in-a-custom-component">Manage Context Providers in a Custom Component</h2>
<p>In almost any React application that you create, you will need a number of Context providers.</p>
<p>We not only need context providers for React Context that we are creating, but also from third party libraries that rely upon it (like React Query) in order to pass their tools down to our to the components that need them.</p>
<p>Once you've started working on your React project for a while, here's what it tends to look like:</p>
<pre><code class="lang-js">ReactDOM.render(
  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Provider3</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">Provider2</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">Provider1</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">App</span> /&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">Provider1</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">Provider2</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">Provider3</span>&gt;</span></span>,
  rootElement
);
</code></pre>
<p>What can we do about this clutter?</p>
<p>Instead of putting all of our context providers within our App.js file or index.js file, we can create a component called ContextProviders. </p>
<p>This allows us to use the children prop, then all we have to do is put all these providers into this one component:</p>
<pre><code class="lang-js">src/context/ContextProviders.js

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">ContextProviders</span>(<span class="hljs-params">{ children }</span>) </span>{
  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Provider3</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">Provider2</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">Provider1</span>&gt;</span>
          {children}
        <span class="hljs-tag">&lt;/<span class="hljs-name">Provider1</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">Provider2</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">Provider3</span>&gt;</span></span>
  );
}
</code></pre>
<p>Then, wrap the ContextProviders component around App:</p>
<pre><code class="lang-js">src/index.js

<span class="hljs-keyword">import</span> ReactDOM <span class="hljs-keyword">from</span> <span class="hljs-string">"react-dom"</span>;
<span class="hljs-keyword">import</span> ContextProviders <span class="hljs-keyword">from</span> <span class="hljs-string">'./context/ContextProviders'</span>
<span class="hljs-keyword">import</span> App <span class="hljs-keyword">from</span> <span class="hljs-string">"./App"</span>;

<span class="hljs-keyword">const</span> rootElement = <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">"root"</span>);
ReactDOM.render(
  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">ContextProviders</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">App</span> /&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">ContextProviders</span>&gt;</span></span>,
  rootElement
);
</code></pre>
<h2 id="heading-pass-props-more-easily-using-the-object-spread-operator">Pass props more easily using the object spread operator</h2>
<p>When it comes to working with components, we normally pass down data with the help of props. We create a prop name and set it equal to its appropriate value.</p>
<p>However, if we have a lot of props that we need to pass down to a component, do we need to list them all individually?</p>
<p>No, we don't.</p>
<p>A very easy way to be able to pass down all the props that we like without having to write all of the prop names and their corresponding values is to use the <code>{...props}</code> pattern. </p>
<p>This involves putting all of our prop data in an object and spreading all of those props individually to the component we want to pass it to:</p>
<pre><code class="lang-js"><span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">App</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">const</span> data = {
    <span class="hljs-attr">title</span>: <span class="hljs-string">"My awesome app"</span>,
    <span class="hljs-attr">greeting</span>: <span class="hljs-string">"Hi!"</span>,
    <span class="hljs-attr">showButton</span>: <span class="hljs-literal">true</span>
  };

  <span class="hljs-keyword">return</span> <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Header</span> {<span class="hljs-attr">...data</span>} /&gt;</span></span>;
}

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Header</span>(<span class="hljs-params">props</span>) </span>{
  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">nav</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>{props.title}<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">h2</span>&gt;</span>{props.greeting}<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>
      {props.showButton &amp;&amp; <span class="hljs-tag">&lt;<span class="hljs-name">button</span>&gt;</span>Logout<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>}
    <span class="hljs-tag">&lt;/<span class="hljs-name">nav</span>&gt;</span></span>
  );
}
</code></pre>
<h2 id="heading-map-over-fragments-with-react-fragment">Map over fragments with React fragment</h2>
<p>The <code>.map()</code> function in React allows us to take an array and iterate over it, then display each element's data within some JSX. </p>
<p>However, in some cases, we want to iterate over that data but we do not want to return it within a closing JSX element. Maybe using an enclosing JSX element would modify our applied or we simply don't want to add another element to the DOM. </p>
<p>A little known tip to be able to iterate over a set of data, and not have the parent element as an HTML element, is to use <code>React.Fragment</code>. </p>
<p>To use the longhand form of React fragments can provide it the <code>key</code> prop which is required for any element over which we are iterating.</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">App</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">const</span> users = [
    {
      <span class="hljs-attr">id</span>: <span class="hljs-number">1</span>,
      <span class="hljs-attr">name</span>: <span class="hljs-string">"Reed"</span>
    },
    {
      <span class="hljs-attr">id</span>: <span class="hljs-number">2</span>,
      <span class="hljs-attr">name</span>: <span class="hljs-string">"John"</span>
    },
    {
      <span class="hljs-attr">id</span>: <span class="hljs-number">3</span>,
      <span class="hljs-attr">name</span>: <span class="hljs-string">"Jane"</span>
    }
  ];

  <span class="hljs-keyword">return</span> users.map(<span class="hljs-function">(<span class="hljs-params">user</span>) =&gt;</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">React.Fragment</span> <span class="hljs-attr">key</span>=<span class="hljs-string">{user.id}</span>&gt;</span>{user.name}<span class="hljs-tag">&lt;/<span class="hljs-name">React.Fragment</span>&gt;</span></span>
  ));
}
</code></pre>
<p>Note that we cannot use the required <code>key</code> prop for the shorthand fragment's alternative: <code>&lt;&gt;&lt;/&gt;</code>.</p>
<h2 id="heading-become-a-professional-react-developer">Become a Professional React Developer</h2>
<p>React is hard. You shouldn't have to figure it out yourself.</p>
<p>I've put everything I know about React into a single course, to help you reach your goals in record time:</p>
<p><a target="_blank" href="https://www.thereactbootcamp.com"><strong>Introducing: The React Bootcamp</strong></a></p>
<p><strong>It’s the one course I wish I had when I started learning React.</strong></p>
<p>Click below to try the React Bootcamp for yourself:</p>
<p><a target="_blank" href="https://www.thereactbootcamp.com"><img src="https://reedbarger.nyc3.digitaloceanspaces.com/reactbootcamp/react-bootcamp-cta-alt.png" alt="Click to join the React Bootcamp" width="600" height="400" loading="lazy"></a>
<em>Click to get started</em></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ 5 JavaScript Tips That'll Help You Save Time ]]>
                </title>
                <description>
                    <![CDATA[ I've always wanted to create videos around my programming hobby. But I'm not a native English speaker, and I was scared to try. But a few weeks ago, while I was preparing some JavaScript tips to start my YouTube journey, I wrote this list of time-sav... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/time-saving-javascript-tips/</link>
                <guid isPermaLink="false">66bb921bd2bda3e4315491e7</guid>
                
                    <category>
                        <![CDATA[ ES6 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Gaël Thomas ]]>
                </dc:creator>
                <pubDate>Thu, 19 Nov 2020 16:54:42 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/11/time-saving-javascript-tips.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>I've always wanted to create videos around my programming hobby. But I'm not a native English speaker, and I was scared to try.</p>
<p>But a few weeks ago, while I was preparing some JavaScript tips to start my YouTube journey, I wrote this list of time-saving tips. I hope they help you as they've helped me.</p>
<p>In this article, I'm going to share with you 5 useful JavaScript tips (are you ready to dive in? 😀).</p>
<p>And now, guess what? Some of these tips are on <a target="_blank" href="https://www.youtube.com/channel/UCSRuzHhjUaAnBb6_rmlr10g">my YouTube channel</a>📹! (here is <a target="_blank" href="https://www.youtube.com/playlist?list=PL-P9AMQZdy2aj3uLhjHagEsfTOrVqF7AR">the playlist</a>. </p>
<h2 id="heading-object-destructuring">Object Destructuring</h2>
<p>Destructuring is a feature that was introduced in ES6. It's one of the features you will use daily once you know how.</p>
<p>It helps you deal with three main issues:</p>
<ul>
<li><strong>Repetition.</strong> Every time you want to extract one object property and create a new variable, you create a new line.</li>
</ul>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> user = {
  <span class="hljs-attr">firstName</span>: <span class="hljs-string">"John"</span>,
  <span class="hljs-attr">lastName</span>: <span class="hljs-string">"Doe"</span>,
  <span class="hljs-attr">password</span>: <span class="hljs-string">"123"</span>,
};

<span class="hljs-comment">// Wow... should we display</span>
<span class="hljs-comment">// John's password like that?</span>

<span class="hljs-keyword">const</span> firstName = user.firstName;
<span class="hljs-keyword">const</span> lastName = user.lastName;
<span class="hljs-keyword">const</span> password = user.password;
</code></pre>
<ul>
<li><strong>Accessibility.</strong> Each time you want to access an object property, you should write the path to it. (<strong>example:</strong> <code>user.firstName</code>, <code>user.family.sister</code>, and so on).</li>
<li><strong>Usage.</strong> As an example, when you create a new function, and you are only working with one property of an object.</li>
</ul>
<p>Now that you've seen what these three issues with objects are, how do you think you can solve them?</p>
<h3 id="heading-how-to-solve-the-repetition-issue">How to Solve the Repetition Issue</h3>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> user = {
  <span class="hljs-attr">firstName</span>: <span class="hljs-string">"John"</span>,
  <span class="hljs-attr">lastName</span>: <span class="hljs-string">"Doe"</span>,
  <span class="hljs-attr">password</span>: <span class="hljs-string">"123"</span>,
};

<span class="hljs-keyword">const</span> { firstName, lastName, password } = user;

<span class="hljs-built_in">console</span>.log(firstName, lastName, password);
<span class="hljs-comment">// Output: 'John', 'Doe', '123'</span>
</code></pre>
<p>Destructuring is the process of extracting a property from an object by its key. By taking an existing key in your object, then placing it between two brackets (<code>{ firstName }</code>) you tell JavaScript:</p>
<p>"Hey JavaScript, I want to create a variable with the same name as my property. I want to create a variable <code>firstName</code> for the <code>firstName</code> property of my object."</p>
<blockquote>
<p><strong>Note:</strong> If you want to destructure an object, you should always use an existing key. Otherwise, it will not work.</p>
</blockquote>
<h3 id="heading-how-to-solve-the-accessibility-issue">How to Solve the Accessibility Issue</h3>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> user = {
  <span class="hljs-attr">firstName</span>: <span class="hljs-string">"John"</span>,
  <span class="hljs-attr">lastName</span>: <span class="hljs-string">"Doe"</span>,
  <span class="hljs-attr">password</span>: <span class="hljs-string">"123"</span>,
  <span class="hljs-attr">family</span>: {
    <span class="hljs-attr">sister</span>: {
      <span class="hljs-attr">firstName</span>: <span class="hljs-string">"Maria"</span>,
    },
  },
};

<span class="hljs-comment">// We access to the nested object `sister`</span>
<span class="hljs-comment">// and we extract the `firstName` property</span>
<span class="hljs-keyword">const</span> { firstName } = user.family.sister;

<span class="hljs-built_in">console</span>.log(firstName);
<span class="hljs-comment">// Output: 'Maria'</span>
</code></pre>
<p>When you work with nested objects, it can become quite repetitive and wastes a lot of time accessing the same property many times.</p>
<p>Using destructuring, in one line only, you can reduce the property path to one variable.</p>
<h3 id="heading-how-to-solve-the-usage-issue">How to Solve the Usage Issue</h3>
<p>Now that you know how to destructure an object, let me show you how to extract properties directly in your function parameter definition.</p>
<p>If you know React, you're probably already familiar with it.</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getUserFirstName</span>(<span class="hljs-params">{ firstName }</span>) </span>{
  <span class="hljs-keyword">return</span> firstName;
}

<span class="hljs-keyword">const</span> user = {
  <span class="hljs-attr">firstName</span>: <span class="hljs-string">"John"</span>,
  <span class="hljs-attr">lastName</span>: <span class="hljs-string">"Doe"</span>,
  <span class="hljs-attr">password</span>: <span class="hljs-string">"123"</span>,
};

<span class="hljs-built_in">console</span>.log(getUserFirstName(user));
<span class="hljs-comment">// Output: 'John'</span>
</code></pre>
<p>In the above example, we have a <code>getUserFirstName</code> function, and we know that it will only use one property of our object, <code>firstName</code>.</p>
<p>Rather than passing the whole object or creating a new variable, we can destructure the object's function parameters.</p>
<h2 id="heading-how-to-merge-objects-in-es6">How to Merge Objects in ES6</h2>
<p>In programming, you often have to tackle issues with data structures. Thanks to <a target="_blank" href="https://herewecode.io/blog/spread-operator-in-javascript/">the spread operator</a> introduced in ES6, object and array manipulations are more straightforward.</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> user = {
  <span class="hljs-attr">firstName</span>: <span class="hljs-string">"John"</span>,
  <span class="hljs-attr">lastName</span>: <span class="hljs-string">"Doe"</span>,
  <span class="hljs-attr">password</span>: <span class="hljs-string">"123"</span>,
};

<span class="hljs-keyword">const</span> userJob = {
  <span class="hljs-attr">jobName</span>: <span class="hljs-string">"Developer"</span>,
  <span class="hljs-attr">jobCountry</span>: <span class="hljs-string">"France"</span>,
  <span class="hljs-attr">jobTimePerWeekInHour</span>: <span class="hljs-string">"35"</span>,
};
</code></pre>
<p>Let's imagine that we have two objects:</p>
<ul>
<li><strong>User.</strong> An object defining general information about the user.</li>
<li><strong>UserJob.</strong> An object defining job information of the user.</li>
</ul>
<p>We want to create one object that only contains the properties of these two objects.</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> user = {
  <span class="hljs-attr">firstName</span>: <span class="hljs-string">"John"</span>,
  <span class="hljs-attr">lastName</span>: <span class="hljs-string">"Doe"</span>,
  <span class="hljs-attr">password</span>: <span class="hljs-string">"123"</span>,
};

<span class="hljs-keyword">const</span> userJob = {
  <span class="hljs-attr">jobName</span>: <span class="hljs-string">"Developer"</span>,
  <span class="hljs-attr">jobCountry</span>: <span class="hljs-string">"France"</span>,
  <span class="hljs-attr">jobTimePerWeekInHour</span>: <span class="hljs-string">"35"</span>,
};

<span class="hljs-keyword">const</span> myNewUserObject = {
  ...user,
  ...userJob,
};

<span class="hljs-built_in">console</span>.log(myNewUserObject);
<span class="hljs-comment">// Output:</span>
<span class="hljs-comment">//{</span>
<span class="hljs-comment">//  firstName: 'John',</span>
<span class="hljs-comment">//  lastName: 'Doe',</span>
<span class="hljs-comment">//  password: '123',</span>
<span class="hljs-comment">//  jobName: 'Developer',</span>
<span class="hljs-comment">//  jobCountry: 'France',</span>
<span class="hljs-comment">//  jobTimePerWeekInHour: '35'</span>
<span class="hljs-comment">//}</span>
</code></pre>
<p>Using the spread operator (<code>...</code>), we can extract all the properties of one object to another.</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> user = {
  <span class="hljs-attr">firstName</span>: <span class="hljs-string">"John"</span>,
  <span class="hljs-attr">lastName</span>: <span class="hljs-string">"Doe"</span>,
  <span class="hljs-attr">password</span>: <span class="hljs-string">"123"</span>,
};

<span class="hljs-keyword">const</span> myNewUserObject = {
  ...user,
  <span class="hljs-comment">// We extract:</span>
  <span class="hljs-comment">// - firstName</span>
  <span class="hljs-comment">// - lastName</span>
  <span class="hljs-comment">// - password</span>
  <span class="hljs-comment">// and send them to</span>
  <span class="hljs-comment">// a new object `{}`</span>
};
</code></pre>
<h3 id="heading-how-to-merge-arrays">How to Merge Arrays</h3>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> girlNames = [<span class="hljs-string">"Jessica"</span>, <span class="hljs-string">"Emma"</span>, <span class="hljs-string">"Amandine"</span>];
<span class="hljs-keyword">const</span> boyNames = [<span class="hljs-string">"John"</span>, <span class="hljs-string">"Terry"</span>, <span class="hljs-string">"Alexandre"</span>];

<span class="hljs-keyword">const</span> namesWithSpreadSyntax = [...girlNames, ...boyNames];

<span class="hljs-built_in">console</span>.log(namesWithSpreadSyntax);
<span class="hljs-comment">// Output: ['Jessica', 'Emma', 'Amandine', 'John', 'Terry', 'Alexandre']</span>
</code></pre>
<p>Like objects, the spread operator (<code>...</code>) extracts all the elements from one array to another.</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> girlNames = [<span class="hljs-string">"Jessica"</span>, <span class="hljs-string">"Emma"</span>, <span class="hljs-string">"Amandine"</span>];

<span class="hljs-keyword">const</span> newNewArray = [
  ...girlNames,
  <span class="hljs-comment">// We extract:</span>
  <span class="hljs-comment">// - 'Jessica'</span>
  <span class="hljs-comment">// - 'Emma'</span>
  <span class="hljs-comment">// - 'Amandine'</span>
  <span class="hljs-comment">// and send them to</span>
  <span class="hljs-comment">// a new array `[]`</span>
];
</code></pre>
<h3 id="heading-how-to-remove-array-duplicates">How to Remove Array Duplicates</h3>
<p>Because arrays are lists, you can have many items of the same value. If you want to remove duplicates in your array, you can follow one of the examples below.</p>
<p>One of them will be only one line thanks to ES6, but I let the "old" example  in there so you can compare.</p>
<h4 id="heading-how-to-remove-array-duplicates-the-old-way">How to remove array duplicates "the old way"</h4>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> animals = [<span class="hljs-string">"owl"</span>, <span class="hljs-string">"frog"</span>, <span class="hljs-string">"canary"</span>, <span class="hljs-string">"duck"</span>, <span class="hljs-string">"duck"</span>, <span class="hljs-string">"goose"</span>, <span class="hljs-string">"owl"</span>];

<span class="hljs-keyword">const</span> uniqueAnimalsWithFilter = animals.filter(
  <span class="hljs-comment">// Parameters example: 'owl', 0, ['owl', 'frog', 'canary', 'duck', 'duck', 'goose', 'owl']</span>
  <span class="hljs-function">(<span class="hljs-params">animal, index, array</span>) =&gt;</span> array.indexOf(animal) == index
);

<span class="hljs-built_in">console</span>.log(uniqueAnimalsWithSet);
<span class="hljs-comment">// Output: ['owl', 'frog', 'canary', 'duck', 'goose']</span>
</code></pre>
<p>In the above example, we want to clean the <code>animals</code> array by removing all duplicates.</p>
<p>We can do that by using the function <code>filter</code> with <code>indexOf</code> inside it.</p>
<p>The <code>filter</code> function takes all elements of the <code>animals</code> array (<code>animals.filter</code>). Then for each occurrence it provides:</p>
<ul>
<li>the current value (<strong>example:</strong> <code>duck</code>)</li>
<li>the index (<strong>example:</strong> 0)</li>
<li>the initial array (<strong>example:</strong> the <code>animals</code> array =&gt; <code>['owl', 'frog', 'canary', 'duck', 'duck', 'goose', 'owl']</code>)</li>
</ul>
<p>We will apply <code>indexOf</code> on the original array for each occurrence and give as a parameter the <code>animal</code> variable (the current value).</p>
<p><code>indexOf</code> will return the first index of the current value (<strong>example:</strong> for 'owl' the index is 0).</p>
<p>Then inside of the filter, we compare the value of <code>indexOf</code> to the current index. If it's the same, we return <code>true</code> otherwise <code>false</code>.</p>
<p><code>filter</code> will create a new array with only the elements where the returned value was <code>true</code>.</p>
<p>So, in our case: <code>['owl', 'frog', 'canary', 'duck', 'goose']</code>.</p>
<h3 id="heading-how-to-remove-array-duplicates-the-new-way">How to remove array duplicates "the new way"</h3>
<p>Well, the "old way" is interesting to understand, but it's long and a bit hard. So let's check out the new way now: </p>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> animals = [<span class="hljs-string">"owl"</span>, <span class="hljs-string">"frog"</span>, <span class="hljs-string">"canary"</span>, <span class="hljs-string">"duck"</span>, <span class="hljs-string">"duck"</span>, <span class="hljs-string">"goose"</span>, <span class="hljs-string">"owl"</span>];

<span class="hljs-keyword">const</span> uniqueAnimalsWithSet = [...new <span class="hljs-built_in">Set</span>(animals)];

<span class="hljs-built_in">console</span>.log(uniqueAnimalsWithSet);
<span class="hljs-comment">// Output: ['owl', 'frog', 'canary', 'duck', 'goose']</span>
</code></pre>
<p>Let's separate out the different steps:</p>
<pre><code class="lang-javascript"><span class="hljs-comment">// 1</span>
<span class="hljs-keyword">const</span> animals = [<span class="hljs-string">"owl"</span>, <span class="hljs-string">"frog"</span>, <span class="hljs-string">"canary"</span>, <span class="hljs-string">"duck"</span>, <span class="hljs-string">"duck"</span>, <span class="hljs-string">"goose"</span>, <span class="hljs-string">"owl"</span>];

<span class="hljs-comment">// 2</span>
<span class="hljs-keyword">const</span> animalsSet = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Set</span>(animals);

<span class="hljs-built_in">console</span>.log(animalsSet);
<span class="hljs-comment">// Output: Set { 'owl', 'frog', 'canary', 'duck', 'goose' }</span>

<span class="hljs-comment">// 3</span>
<span class="hljs-keyword">const</span> uniqueAnimalsWithSet = [...animalsSet];

<span class="hljs-built_in">console</span>.log(uniqueAnimalsWithSet);
<span class="hljs-comment">// Output: ['owl', 'frog', 'canary', 'duck', 'goose']</span>
</code></pre>
<p>We have an <code>animals</code> array, and we convert it into a <code>Set</code>, which is a special type of object in ES6.</p>
<p>The thing that's different about it is that it lets you create a collection of unique values.</p>
<blockquote>
<p><strong>Note:</strong> <code>Set</code> is a collection of unique values, but it's not an <code>Array</code>.</p>
</blockquote>
<p>Once we have our <code>Set</code> object with unique values, we need to convert it back to an array.</p>
<p>To do that, we use the spread operators to destructure it and send all the properties to a new <code>Array</code>.</p>
<p>Because the <code>Set</code> object has unique properties, our new array will also have unique values only.</p>
<h2 id="heading-how-to-use-ternary-operators">How to Use Ternary Operators</h2>
<p>Have you already heard about a way to write small conditions in only one line?</p>
<p>If not, it's time to remove a lot of your <code>if</code> and <code>else</code> blocks and convert them to small ternary operations.</p>
<p>Let's look at an example with <code>console.log</code> to start. The idea is to check the value of a variable and conditionally display an output.</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> colour = <span class="hljs-string">"blue"</span>;

<span class="hljs-keyword">if</span> (colour === <span class="hljs-string">"blue"</span>) {
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`It's blue!`</span>);
} <span class="hljs-keyword">else</span> {
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`It's not blue!`</span>);
}
</code></pre>
<p>This example is a typical case where you can use <a target="_blank" href="https://herewecode.io/blog/ternary-operator-in-javascript/">the ternary operator</a> to reduce these 5 <code>if</code> and <code>else</code> lines to only one!</p>
<p><strong>One line to rule them all!</strong></p>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> colour = <span class="hljs-string">"blue"</span>;

colour === <span class="hljs-string">"blue"</span> ? <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`It's blue!`</span>) : <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`It's not blue!`</span>);
<span class="hljs-comment">// [condition] ? [if] : [else]</span>
</code></pre>
<p>Ternary operators replace <code>if</code> and <code>else</code> for small conditions.</p>
<blockquote>
<p><strong>Note:</strong> It's not recommended to create complex conditions with ternary operators because it can reduce readability.</p>
</blockquote>
<p>Below is another example that uses ternary operators, but this time in the <code>return</code> of a function.</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">sayHelloToAnne</span>(<span class="hljs-params">name</span>) </span>{
  <span class="hljs-keyword">return</span> name === <span class="hljs-string">"Anne"</span> ? <span class="hljs-string">"Hello, Anne!"</span> : <span class="hljs-string">"It's not Anne!"</span>;
}

<span class="hljs-built_in">console</span>.log(sayHelloToAnne(<span class="hljs-string">"Anne"</span>));
<span class="hljs-comment">// Output: 'Hello, Anne!'</span>

<span class="hljs-built_in">console</span>.log(sayHelloToAnne(<span class="hljs-string">"Gael"</span>));
<span class="hljs-comment">// Output: "It's not Anne!"</span>
</code></pre>
<h2 id="heading-want-to-contribute-heres-how">Want to Contribute? Here's How.</h2>
<p>You are welcome to contribute to this GitHub repository. Any contribution is appreciated, and it will help each of us improve our JavaScript skills.
<a target="_blank" href="https://github.com/gael-thomas/javascript-awesome-tips">GitHub: JavaScript Awesome Tips</a></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>I hope you learned some new things about JavaScript while reading this post.</p>
<p>If you want more content like this, you can <a target="_blank" href="https://twitter.com/gaelgthomas/">follow me on Twitter</a> where I tweet about web development, self-improvement, and my journey as a full stack developer!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Chrome DevTools: How to Filter Network Requests ]]>
                </title>
                <description>
                    <![CDATA[ By Adeel Imran As front end developers, most of our time is spent in the browser with DevTools open (almost always, unless we are watching YouTube ... sometimes even then).  One of the major sections in DevTools is the network tab. There are a couple... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/chrome-devtools-network-tab-tricks/</link>
                <guid isPermaLink="false">66d45d59bd438296f45cd36d</guid>
                
                    <category>
                        <![CDATA[ browser ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Google Chrome ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 02 Jun 2020 21:26:48 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9a87740569d1a4ca2629.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Adeel Imran</p>
<p>As front end developers, most of our time is spent in the browser with DevTools open (almost always, unless we are watching YouTube ... sometimes even then). </p>
<p>One of the major sections in DevTools is the <code>network</code> tab. There are a couple of things you can do in the <code>network</code> tab, like the following:</p>
<ul>
<li>Find network requests by text</li>
<li>Find network requests by regex expression</li>
<li>Filter (exclude) out network requests</li>
<li>Use the property filter to see network requests by a certain domain</li>
<li>Find network requests by resource type</li>
</ul>
<p>For the purposes of this tutorial I am using <a target="_blank" href="https://www.freecodecamp.org/news/">freeCodeCamp's</a> home page, <strong><a target="_blank" href="https://www.freecodecamp.org/news/">freecodecamp.org/news</a></strong>. Simply go to the page and open the <code>network</code> tab.</p>
<p>You can see the <code>network</code> tab by hitting <code>cmd + opt + j</code> on your Mac or <code>ctrl + shift + j</code> in Windows. It will open up the <code>console</code> tab in DevTools by default.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-22.18.37.png" alt="Image" width="600" height="400" loading="lazy">
<em>Clicking "cmd + opt + j" opens up console panel in DevTools</em></p>
<p>Once the <code>console</code> tab is open, simply click on the <code>network</code> tab to make it visible.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-22.19.57.png" alt="Image" width="600" height="400" loading="lazy">
<em>Clicking on the "network" tab will show you all network requests being made for a certain page</em></p>
<p>Once the <code>network</code> tab is open we can begin our tutorial.</p>
<h2 id="heading-lets-begin">Let's begin</h2>
<p>Make sure the correct page is open (<a target="_blank" href="https://www.freecodecamp.org/news/">freecodecamp.org/news</a>) and the "network" tab panel is open in DevTools:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-23.12.01.png" alt="Image" width="600" height="400" loading="lazy">
<em>Illustration on where the filter bar is in network panel.</em></p>
<ul>
<li>The green box here illustrates the icon that can hide/show the filter area in the network panel tab.</li>
<li>The red box here illustrates the filter area box. With this box we can filter out network requests.</li>
</ul>
<h3 id="heading-find-network-request-by-text">Find network request by text</h3>
<p>Type <code>analytics</code> into the Filter text box. Only the files that contain the text <code>analytics</code> are shown.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-22.47.38.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-find-network-request-by-regex-expression">Find network request by regex expression</h3>
<p>Type <code>/.*\min.[c]s+$/</code>. DevTools filters out any resources with filenames that end with a <code>min.c</code> followed by 1 or more <code>s</code> characters.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-23.21.34.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-filter-exclude-out-network-request">Filter (exclude) out network request</h3>
<p>Type <code>-min.js</code>. DevTools filters out all files that contain <code>min.js</code>. If any other file matches the pattern they will also be filtered out and won't be visible in the network panel.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-22.51.50.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-use-property-filter-to-see-network-request-by-a-certain-domain">Use property filter to see network request by a certain domain</h3>
<p>Type <code>domain:code.jquery.com</code> into the filter area. It will only show network requests that belong to the URL <code>code.jquery.com</code>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-22.54.22.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-find-network-request-by-resource-type">Find network request by resource type</h3>
<p>If you only want to see which font(s) file is being used on a certain page click <code>Font</code>:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-23.03.41.png" alt="Image" width="600" height="400" loading="lazy">
<em>Filtering network requests by "font" type files only</em></p>
<p>Or if you only want to see the web socket files being loaded on a certain page click <code>WS</code>:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-23.05.55.png" alt="Image" width="600" height="400" loading="lazy">
<em>Filtering network requests by "web socket" type files only</em></p>
<p>You can also go one step further and view both <code>Font</code> &amp; <code>WS</code> files together. Simply click on <code>Font</code> first and then <code>cmd</code> click on <code>WS</code> to multi-select tabs. (If you are on a Windows machine you can multi-select by using <code>ctrl</code> click).</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-23.08.48.png" alt="Image" width="600" height="400" loading="lazy">
<em>Multi selecting multiple resource types by "cmd` click on types</em></p>
<hr>
<p>That is it for this tutorial. If you found it useful do share it with your colleagues and let me know what you think as well on <a target="_blank" href="https://twitter.com/adeelibr"><strong>twitter.com/adeelibr</strong></a><strong>.</strong></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Legacy Code Tips – How to Take Over an Existing Project and its Codebase ]]>
                </title>
                <description>
                    <![CDATA[ By Milecia McGregor Working as a developer means you need to know how to dive into existing code bases. When you inherit a project, there are a lot of specifics that you don't know, like why some of the code is written a certain way. So when it's tim... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/taking-over-an-existing-project/</link>
                <guid isPermaLink="false">66d4604e8812486a37369d19</guid>
                
                    <category>
                        <![CDATA[ project management ]]>
                    </category>
                
                    <category>
                        <![CDATA[ software development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sun, 17 May 2020 16:01:28 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/05/exisiting-proj.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Milecia McGregor</p>
<p>Working as a developer means you need to know how to dive into existing code bases. When you inherit a project, there are a lot of specifics that you don't know, like why some of the code is written a certain way.</p>
<p>So when it's time to go into a hand off meeting, you need to know what questions to ask. This is the best time you will have to get the information you need to get up and running.</p>
<p>These questions come up in every project. You could be starting a new job or working on a different project at your current company. Regardless, here are a few things you should bring up in transfer meetings.</p>
<h2 id="heading-know-what-its-supposed-to-do">Know what it's supposed to do</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/what-it-does.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>What exactly is this application used for and who uses it? Without this context, it's going to be really hard figuring out how to implement new features or fix bugs.</p>
<p>Ask about the overall use of the app. Learn about the workflow for different parts of the app and how users move through it. If there's a task list, get a walk-through or more details about each of the items on the list.</p>
<p>This is one of the rare moments everyone is prepared to focus on answering questions about the project. So if there is <em>anything</em> you're unclear on, don't leave that meeting without getting a better understanding of it.</p>
<p>Of course things come up once you start digging in, but this is your chance to preempt a large chunk of confusion. Try and get a high level understanding of the app before you dive into specific questions. Learning about the industry the app operates in can help answer questions that come up in your development as well.</p>
<h2 id="heading-know-how-source-control-is-handled">Know how source control is handled</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/source-control.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>While most projects use Git, not everyone uses GitHub. Some projects could be hosted in BitBucket, Azure DevOps, or even on a SVN. You need to know where code is kept in version control so you can pull it down to your machine and also so you can do troubleshooting when those inevitable production bugs appear.</p>
<p>Make sure that you have access to the code repository and that you have the right level of permissions to do the work you need. When you receive the your login credentials, check them immediately.</p>
<p>The sooner you can find little problems like these, the smoother the project will go in the long run. Fix a small bug and do a quick commit to make sure that you can push up your local branches to wherever the remote repository is.</p>
<p>Also, take a quick look at everyone who has access to the repository. This will be useful info when it's time for pull requests and code reviews. This is also the time to ensure that only the necessary people have access to the code.</p>
<p>Note any users you are unfamiliar with and check with a project manager or someone to see if they still need access.</p>
<h2 id="heading-know-how-to-run-the-project">Know how to run the project</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/run-code.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The hardest part of taking on a new project can be getting it set up and running on your machine the first time. There are a lot of one-time commands that can be lost if the process hasn't been well documented.</p>
<p>A few things you need to check that might not be obvious include your env variables, the versions of the software you're running, and the file names you are referencing. </p>
<p>Other things that might come up are setting up a new local database and loading the seed data and changing any connection strings to APIs or databases.</p>
<pre><code>REACT_APP_NAME=<span class="hljs-string">"Boogaloo"</span>
REACT_APP_API=<span class="hljs-string">"https://not-staging.morwl.com/api"</span>
API_KEY=ij2i0r9j02tt904tn93
</code></pre><p>If you are going through setup and you notice yourself running into issues, make sure you're documenting them so that it's easier for the next developer to do it. Plus you never know when you'll need to factory reset your computer and those notes will come in handy.</p>
<p>Once you have the app running, check that everything is functioning like it does in development or production. You should see the same behavior across all of the environments until people start pushing changes.</p>
<h2 id="heading-know-the-testing-process">Know the testing process</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/testing.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>There are many different forms of testing that your app can go through and you need to know how that process works. Unit tests are common in most projects to some degree so always check for those. Some companies do integration testing to make sure no breaking changes sneak into the build or deploy pipelines.</p>
<p>Other places even have dedicated software testers that will run through user scenarios to see how things will work when real users see the updates. You need to be aware of all the steps your app will go through.</p>
<p>When you start this new project, looking at the tests can give you a good idea of how the app works. If there aren't any tests in the project then this is your chance to start adding them. Having some code coverage sets the tone for the app in the future that there should probably be more tests added as the code developed.</p>
<pre><code class="lang-jsx"><span class="hljs-keyword">import</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>;
<span class="hljs-keyword">import</span> ReactDOM <span class="hljs-keyword">from</span> <span class="hljs-string">'react-dom'</span>;
<span class="hljs-keyword">import</span> { configure, shallow } <span class="hljs-keyword">from</span> <span class="hljs-string">'enzyme'</span>;
<span class="hljs-keyword">import</span> Adapter <span class="hljs-keyword">from</span> <span class="hljs-string">'enzyme-adapter-react-16'</span>;
<span class="hljs-keyword">import</span> Items <span class="hljs-keyword">from</span> <span class="hljs-string">'../src/components/Items'</span>;
<span class="hljs-keyword">import</span> CreateItemModal <span class="hljs-keyword">from</span> <span class="hljs-string">'../src/components/CreateItemModal'</span>;

configure({ <span class="hljs-attr">adapter</span>: <span class="hljs-keyword">new</span> Adapter() });
jest.mock(<span class="hljs-string">'../__mocks__/getAllItemsMockRequest.js'</span>);

describe(<span class="hljs-string">'Items component works'</span>, <span class="hljs-function">() =&gt;</span> {
    it(<span class="hljs-string">'Items renders without crashing'</span>, <span class="hljs-function">() =&gt;</span> {
        <span class="hljs-keyword">const</span> div = <span class="hljs-built_in">document</span>.createElement(<span class="hljs-string">'div'</span>);
        ReactDOM.render(<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Items</span> /&gt;</span></span>, div);
        ReactDOM.unmountComponentAtNode(div);
    });

    it(<span class="hljs-string">'should toggle CreateItemModal'</span>, <span class="hljs-function">() =&gt;</span> {
        <span class="hljs-keyword">const</span> div = <span class="hljs-built_in">document</span>.createElement(<span class="hljs-string">'div'</span>);
        <span class="hljs-keyword">const</span> ItemComponent = shallow(<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Items</span> /&gt;</span></span>, div);
        ItemComponent.find(<span class="hljs-string">'#add-item-icon'</span>).simulate(<span class="hljs-string">'click'</span>);
        expect(ItemComponent.contains(<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">CreateItemModal</span> /&gt;</span></span>)).toBe(<span class="hljs-literal">true</span>);
        ReactDOM.unmountComponentAtNode(div);
    });
});
</code></pre>
<p>Working with software testers is usually a more involved process. There's typically some kind of system in place like Jira or Basecamp where bugs and features can be discussed and tracked through sprints. Follow the process they have in place and it'll help get your code to the deploy phase faster and more consistently.</p>
<h2 id="heading-know-the-deploy-process">Know the deploy process</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/deploy-process.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Although cloud services have just about taken over the hosting needs for most companies, you might still need to work with a physical server. Having this information will help you understand the deploy strategy you will be working with.</p>
<p>Is there a continuous build/deploy process in place or will you need to do manual deploys from your machine? Know how migrations should be handled across the different environments. Get all of the common parts of deploying an app clarified for this particular app.</p>
<p>Little wonky things happen with the cloud services that only the people who handled the deploys before know about so make sure you ask if there is any weird behavior you should look out for. Since you've already fixed a small bug to check that you can push up your changes, go ahead and deploy that small fix to the development environment.</p>
<pre><code class="lang-yml"><span class="hljs-attr">version:</span> <span class="hljs-number">2</span>
<span class="hljs-attr">jobs:</span>
  <span class="hljs-attr">build:</span>
    <span class="hljs-attr">docker:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-attr">image:</span> <span class="hljs-string">circleci/&lt;language&gt;:&lt;version</span> <span class="hljs-string">TAG&gt;</span>
    <span class="hljs-attr">steps:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">checkout</span>
      <span class="hljs-bullet">-</span> <span class="hljs-attr">run:</span> <span class="hljs-string">&lt;command&gt;</span>
  <span class="hljs-attr">test:</span>
    <span class="hljs-attr">docker:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-attr">image:</span> <span class="hljs-string">circleci/&lt;language&gt;:&lt;version</span> <span class="hljs-string">TAG&gt;</span>
    <span class="hljs-attr">steps:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">checkout</span>
      <span class="hljs-bullet">-</span> <span class="hljs-attr">run:</span> <span class="hljs-string">&lt;command&gt;</span>
<span class="hljs-attr">workflows:</span>
  <span class="hljs-attr">version:</span> <span class="hljs-number">2</span>
  <span class="hljs-attr">build_and_test:</span>
    <span class="hljs-attr">jobs:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">build</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">test</span>
</code></pre>
<p>This is your test to see if you really understand how the deploys will work. Hopefully you won't have to do many manual deploys and you'll work with CI/CD pipelines so the process will stay consistent.</p>
<h2 id="heading-know-who-you-can-turn-to-for-different-parts-of-the-project">Know who you can turn to for different parts of the project</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/team.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Unless you are responsible for the entire application from the front-end all the way to the database, there are probably other people who cover parts of the code or system you'll never touch. It's important to know who those people are so you know who to turn with questions.</p>
<p>Plus this is a great way to get to know other teams that work on the project and learn what they do. If it's just you working on every part of a project, make sure that you get every login credential that you can because it'll be up to you to answer all the questions.</p>
<h2 id="heading-know-which-third-party-services-the-project-uses">Know which third-party services the project uses</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/third-party.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>When you start debugging issues, knowing where to turn for documentation is the fastest way to fix things. That means knowing what services the application uses and where they're used. One way to find this is to check the <em>package.json</em> or <em>App.config</em> file of your project to see what's installed.</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"name"</span>: <span class="hljs-string">"dog-finder"</span>,
    <span class="hljs-attr">"version"</span>: <span class="hljs-string">"0.1.0"</span>,
    <span class="hljs-attr">"scripts"</span>: {
        <span class="hljs-attr">"build"</span>: <span class="hljs-string">"npm install"</span>,
        <span class="hljs-attr">"start"</span>: <span class="hljs-string">"npm run build &amp;&amp; concurrently --kill-others \"node ./server.js\" \"http-server\""</span>
    },
    <span class="hljs-attr">"dependencies"</span>: {
        <span class="hljs-attr">"concurrently"</span>: <span class="hljs-string">"^5.1.0"</span>,
        <span class="hljs-attr">"cors"</span>: <span class="hljs-string">"^2.8.5"</span>,
        <span class="hljs-attr">"express"</span>: <span class="hljs-string">"^4.17.1"</span>,
        <span class="hljs-attr">"johnny-five"</span>: <span class="hljs-string">"^1.4.0"</span>,
        <span class="hljs-attr">"path"</span>: <span class="hljs-string">"^0.12.7"</span>
    }
}
</code></pre>
<p>This will help you sort out a lot of issues that come up in production and it'll help you ask better questions. You'll also need credentials for most services so that will likely come up when you try to run the project the first time. </p>
<p>A few big advantages to looking at the third-party services early are to learn about any version compatibility changes and any known issues.</p>
<p>A common complaint you'll run into on older projects is that the app doesn't work the way it used to and no one knows why. Looking at these services is a quick and easy place to start looking while you get ready to take over.</p>
<h2 id="heading-know-the-best-way-to-get-in-touch-with-the-decision-makers">Know the best way to get in touch with the decision makers</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/decision-maker.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Even though you are taking over the primary development of a project, there will still be someone like a project manager that will guide the tasks you work on. Get their contact information as soon as you get approval to start on the project. This is one of the people that will be able to get your high level questions answered.</p>
<p>If you're working with a smaller company it would also be good to have the contact info of someone like the CEO or CTO because they will be able to give you a direct yes or no on many of the questions you have. </p>
<p>For example, if you've researched a new database service that will decrease their bill by 10% and increase the overall performance of the app, you want to know if you can make those changes or not.</p>
<p>Learn who the people are that can give you approval or guidance for the next steps you take and then save their emails and phone numbers.</p>
<p>One instance this is especially crucial is if there's a fire in production. When you can get those quick decisions immediately, that can save a company thousands of dollars so they will understand if you call them.</p>
<h2 id="heading-know-what-your-timeline-is">Know what your timeline is</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/timeline.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Sometimes it's so easy to get wrapped up in the minute details that when a timeline is thrown out, agreeing makes sense. </p>
<p>Before you fully commit to any length of work, make sure that you've done a proper evaluation of what you are being asked to do with the resources you're provided. Do a quick code sweep to get an idea of what you'll be working with and see how long it takes for people to respond to your initial questions.</p>
<p>That way when you are given a deadline you can explain why it is or isn't reasonable for the amount of work being asked. You always want to give realistic estimates on so that your client or project manager doesn't get other people's hopes up. It's better to tell them upfront if something will take longer or not as long as they expect.</p>
<p>When you have reasonable expectations, it makes the whole project flow better for everyone. There aren't as many panicked sessions of coding and you are able to deliver quality code that won't have to be debugged in production.</p>
<h2 id="heading-know-what-the-scope-of-your-work-is">Know what the scope of your work is</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/scope.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The scope of projects tends to slowly expand as you make progress. You start getting a little feedback here and there about "little tweaks" that should be made. Then it turns into a question of what takes priority over what and it's not the original work you started with.</p>
<p>One way to prevent scope creep is to agree on a set list of tasks or a specific functionality that needs to be implemented. Anything else can be written down and brought up in another part of the project work, but not right now. </p>
<p>Once the work has been agreed on, then there should be a clear finish state that the project will be in at the end.</p>
<h2 id="heading-final-thoughts">Final Thoughts</h2>
<p>Taking over an existing project is a special skill because it's not something you do all the time. Some people work on one product or product line for a bulk of their career, so setting up new projects only happens every now and then.</p>
<p>Although if you ever do consulting or freelance work, you'll need to know how to do this with confidence on a regular basis. Usually there are small configuration changes that you have to figure out and once you set them you never have to worry about them again.</p>
<p>These are just a few things I try to check for when I'm setting up a new project. Some of these tips apply to open source projects as well. Do you have anything you always check for when you're getting set up?</p>
<hr>
<p>I write about other random stuff in tech too, like air guitars and VR. You should follow me on <a target="_blank" href="https://twitter.com/FlippedCoding">Twitter</a> to learn about that cool stuff.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ 7 Vim Tips That Changed My Life (With Demo) ]]>
                </title>
                <description>
                    <![CDATA[ By Alex Kallaway Hi, fellow coders! You may have heard of the Vim code editor before, or even used it a bit. There are plenty of resources out there that cover the basics of Vim and I don't want to just do another rewrite of those here. Instead, I wa... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/7-vim-tips-that-changed-my-life/</link>
                <guid isPermaLink="false">66d45f62d7a4e35e38434975</guid>
                
                    <category>
                        <![CDATA[ 100DaysOfCode ]]>
                    </category>
                
                    <category>
                        <![CDATA[ editor ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tips ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vim ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sat, 02 May 2020 21:24:51 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/05/image_2020-04-19_16-22-44.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Alex Kallaway</p>
<p>Hi, fellow coders! You may have heard of the Vim code editor before, or even used it a bit.</p>
<p>There are plenty of resources out there that cover the basics of Vim and I don't want to just do another rewrite of those here. Instead, I want to share some quick tips that I've learned from others while using Vim full time at work.</p>
<p>These are tiny things that you can learn quickly that will make a big difference in your day-to-day work in Vim. They'd definitely made my life easier.</p>
<p>Remember: Vim comes pre-installed on Mac and Linux. You just need to open up your terminal and type "vim" in the command prompt, and you'll open Vim. If you have a Windows computer, <a target="_blank" href="https://www.freecodecamp.org/news/vim-windows-install-powershell/">follow these instructions to install Vim on your PC</a>.</p>
<h2 id="heading-before-we-begin">Before we begin</h2>
<p>If you're interested in Vim but haven't started yet, these are the resources I'd like to recommend:</p>
<ul>
<li><a target="_blank" href="https://www.openvim.com">OpenVim</a> - Interactive Vim Tutorial</li>
<li>vimtutor - this is an interactive command line tutorial that's available and installed on Macs and some Linux distros. Just type <code>vimtutor</code> in your terminal</li>
<li><a target="_blank" href="https://vim-adventures.com/">VimAdventures</a> - First couple of levels are free, and if you like the format, and the full license is $25</li>
</ul>
<p>If you like Vim but it's too much to run it on its own, install a Vim extension for your favourite editor, like VS Code or Sublime or any other. That way you get to use the quick actions and shortcuts of Vim and a friendlier interface you're more used to.</p>
<p>One important realization I had about learning and working with Vim: you don't need to master everything (which is practically impossible anyway) to start using it.</p>
<p>Once you figure out the basics, every time you have a question or a block throughout your workday, write it down, and then go through that list and search the Internet for how to do that in Vim. </p>
<p>This way, you will incrementally fill any gaps you might have and will become better with each new little thing you add to your repertoire (these micro-improvements will be similar to the tips in this article below).</p>
<p>Now let's proceed to the fun stuff – the tips and tricks. You don't have to have any Vim plugins installed to take advantage of these.</p>
<h2 id="heading-1-how-to-start-writing-on-a-line-at-correct-indentation">1. How to start writing on a line at correct indentation</h2>
<p>Before I learned this, I used to jump on a new line and go to insert mode, TAB to the right indentation and start typing code. With this little trick, you won't have to do do all the extra tabbing, it will just place you in insert mode at the right indentation.</p>
<p>RECIPE: <code>S</code> (SHIFT+s)</p>
<p>DEMO:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/vimtips-shift-s.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-2-resize-windows-automatically">2. Resize windows automatically</h2>
<p>Very often we do something with windows inside Vim that causes them to be resized incorrectly, sometimes one being way too wide and the other way too narrow. </p>
<p>The easiest way to see that effect is to open 3 windows in one Vim tab and resize the terminal window in which you opened Vim.</p>
<p>You want to resize the windows to all be the same size, with available space evenly distributed. Good news is, you don't have to do it manually.</p>
<p>RECIPE: <code>CTRL+w =</code></p>
<p>The combination of CTRL+w, followed by pressing the equals sign key will equalize the windows.</p>
<p>DEMO:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/vimtips-equalize-3.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-3-jump-to-the-matching-bracketbrace">3. Jump to the matching bracket/brace</h2>
<p>With your cursor on a square [ or round ( bracket or a curly brace {, press % (SHIFT+5) to jump to its matching symbol. Press it again to jump back (toggle between them).</p>
<pre><code><span class="hljs-keyword">if</span> (condition) {
  <span class="hljs-comment">// code</span>
}
<span class="hljs-comment">// If your cursor was on {, and you pressed %, you'd jump to }</span>
</code></pre><p>RECIPE: <code>%</code> with your cursor on the character you want to find a match to.</p>
<p>DEMO:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/vimtips-percent.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-4-indentunindent-a-line-or-multiple-lines">4. Indent/Unindent a line or multiple lines</h2>
<pre><code>&gt;&gt; ⁠– indents a line
&lt;&lt; ⁠– unindents a line
</code></pre><p>When you have multiple lines selected (in VISUAL LINE mode), you only need to press &gt; or &lt; once to indent or unindent the lines (as shown in demo below)</p>
<p>It doesn't matter where your cursor is positioned in the line when indenting - it will still work. After indent is done, cursor is auto-positioned on first non-empty character in the line.</p>
<p>RECIPE: One line: <code>&gt;&gt;</code>, <code>&lt;&lt;</code>. Multiple lines: <code>&gt;</code>, <code>&lt;</code>.</p>
<p>DEMO:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/vimtips-move-a-line.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-5-fix-indentation-in-the-whole-file">5. Fix indentation in the whole file</h2>
<p>Start in the top of a file (to get there, press <code>gg</code> anywhere in the file.). Then press <code>=G</code>, and Vim will fix the indentation in the whole file. If you don't start in the beginning of the file, it will fix indentation from current line to the bottom of file.</p>
<p>RECIPE: <code>=G</code></p>
<p>Press the equals sign, followed by SHIFT+G</p>
<p>DEMO:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/vimtips-format.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-6-basics-of-working-with-tabs">6. Basics of working with tabs</h2>
<p>Often you want to be looking at multiple files or contexts at the same time. Vim tabs are very handy but underutilized feature for this. I don't know of any other editor that supports this (but I'm sure there is a way to do it elsewhere). </p>
<p>For example, I like to keep my code related files in my main tab, and in another tab: README with a TODO list and a place I can jot down further ideas.</p>
<p>To write the commands to work with tabs, you will need to be in command mode. To start writing the command, press <code>:</code> and type. The command will show up in the left bottom corner of the editor as you are typing. Press enter to execute.</p>
<p>RECIPE:<br><code>:tabnew</code> creates a new tab<br><code>gt</code> - go to next tab<br><code>gT</code> - go to previous tab<br><code>:tabo</code> - close all other tabs besides the active one</p>
<p>DEMO:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/vimtips-tabs.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-7-how-to-quickly-go-back-to-a-previous-file">7. How to quickly go back to a previous file</h2>
<p>Often, when you edit a file with code, you open another one in the same window. Then it's not so easy to come back to the one you just worked on. You could list buffers and navigate to the previous one but you need to remember its name for that and spend your precious time. Vim users don't like to spend too much time on actions. :) So you can use CTRL+o for this.</p>
<p>All it does is that it finds a previous position of your cursor - and if it happened to be in a different file (the one you just lost by opening a new one), it jumps us right back there.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/vimtips-ctrl-o.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Thank you for reading and I hope these tips serve you well!  </p>
<p>? If you want to follow my adventures, <a target="_blank" href="https://twitter.com/ka11away">here's my Twitter</a> :)</p>
<p>? I write a weekly newsletter that covers topics like learning to code, changing habits, personal finance, book recommendations &amp; key takeaways, minimalism, starting a business, psychology and more. For those of you who are interested: join 1K+ like-minded people passionate about self-improvement and learning.<br><a target="_blank" href="https://www.dotheoppo.site/newsletter">Subscribe here</a></p>
<p>? These days I am working on my side project - an app called "Zerno". Sign up to get early access very soon!<br><a target="_blank" href="https://www.zerno.app">ZERNO app</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ A letter to myself as a brand new software engineer ]]>
                </title>
                <description>
                    <![CDATA[ By Luca Florio Dear Self, You just graduated and you are ready to start your career in the IT field. I cannot spoil anything, but I assure you it will be an interesting ride.  I'm writing you this letter because I want to give you some advice that wi... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/a-letter-to-myself-as-a-fresh-software-engineer/</link>
                <guid isPermaLink="false">66d45e3c9f2bec37e2da061a</guid>
                
                    <category>
                        <![CDATA[ career advice ]]>
                    </category>
                
                    <category>
                        <![CDATA[ self-improvement  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Software Engineering ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sat, 28 Mar 2020 20:39:06 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9bee740569d1a4ca2edb.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Luca Florio</p>
<p>Dear Self,</p>
<p>You just graduated and you are ready to start your career in the IT field. I cannot spoil anything, but I assure you it will be an interesting ride. </p>
<p>I'm writing you this letter because I want to give you some advice that will help you be a better professional. These are all things you'll learn yourself in the next few years, but this list contains everything I wish someone had told me when I started my career. They are not ordered by any means and are <strong>all equally important</strong>.</p>
<h3 id="heading-run-a-marathon-not-a-sprint">Run a marathon, not a sprint.</h3>
<p>The road to becoming a good software engineer is a long one. <strong>Don't rush things</strong>, and don't give up just because you are not getting an easy and fast win. </p>
<p>Take your time to learn and become proficient in the topics you are interested in. Remember that this is a marathon, not a sprint.</p>
<h3 id="heading-be-humble-not-stupid">Be humble, not stupid.</h3>
<p>It is good -- sorry, it is <strong>fundamental</strong> -- to be humble. There is always something to learn from others, even when you are an experienced professional. </p>
<p>But this doesn't mean that everyone is better than you. You have to <strong>respect yourself and your skills</strong>. </p>
<p>When you don't respect yourself you become stupid, not humble.</p>
<h3 id="heading-compare-with-yourself-not-others">Compare with yourself, not others.</h3>
<p>There is no point in comparing yourself with others. There will always be someone better than you in your job. And there will always be someone better than the one that is better than you. And there will... ok, you get the point. <strong>Just do your best</strong>. </p>
<p>If you think someone is a better engineer than you are, learn from them. Keep doing your best, and eventually, you will be a reference for someone else.</p>
<h3 id="heading-respect-people-not-titles">Respect people, not titles.</h3>
<p>During your career, you will work with exceptional professionals. Most importantly, you will meet exceptional human beings. <strong>Respect people for who they are</strong>, not for the title they have. </p>
<p>If <code>foo</code> is the "Principal Senior Lead Engineering Chief Architect", that doesn't mean that he deserves more respect than <code>bar</code> who is a junior software developer.</p>
<h3 id="heading-choose-the-challenge-not-comfort">Choose the challenge, not comfort.</h3>
<p>The road will be full of crossroads. There may be multiple choices, but everything boils down to a choice: stay in your comfort zone, or go outside your comfort zone. </p>
<p>There may be a moment in your life -- hopefully after decades of work -- when you will feel the need to cool down a bit because you will be satisfied with what you achieved. Until that moment, try to go out of your comfort zone. It will make you a better professional and you will feel more satisfied with your career. </p>
<p>Remember that <strong>the best things often happen outside your comfort zone</strong>.</p>
<h3 id="heading-jump-on-the-whiteboard-not-on-the-keyboard">Jump on the whiteboard, not on the keyboard.</h3>
<p>When you have to design a new feature or a new system, don't jump on the keyboard to start coding. The "muscle" you have to train and use as an engineer is your brain, not your fingers. <strong>Always think before you act</strong>. </p>
<p>For this reason, jump on the whiteboard instead of the keyboard, and start thinking of what you should implement. Better if you have a sparring partner to challenge your thoughts. </p>
<p>Oh, when I say "the whiteboard" I mean "anything that can help you think", be it pen and paper, a notebook application, <a target="_blank" href="https://app.diagrams.net/">draw.io</a>, and so on.</p>
<h3 id="heading-deliver-value-not-code">Deliver value, not code.</h3>
<p>Please don't be affected by the <a target="_blank" href="https://en.wikipedia.org/wiki/Not_invented_here">NIH syndrome</a>. There is no point in reinventing the wheel. <strong>Avoid wasting time on something that is already out there</strong>. </p>
<p>If you can achieve your goal simply gluing some tools together, just do it. What you should deliver as a software engineer is value to your business, not lines of code.</p>
<h3 id="heading-choose-life-not-work">Choose life, not work.</h3>
<p>In the IT field, it is easy to focus too much on work. After all, for most of us, it is not just a job, it is our passion. Remember that <strong>work is important, but life is more important</strong>. </p>
<p>Live a meaningful and rich life. Play sports, read books, find hobbies, travel and see the beautiful world we are living in. Hang out with friends, find a partner for your life and give to your partner all the love, attention, and support that you can. You'll be surprised how much having a rich life will improve you as a professional. </p>
<p>That's all I can tell you right now. I still have a lot to learn.</p>
<p>One last note: <strong>enjoy the ride</strong>! ?</p>
<p>With love,
(a more experienced) You.</p>
<hr>
<p>You can read other articles like this on my blog, <a target="_blank" href="https://www.florio.dev/"><strong>florio.dev</strong></a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Make Programming More Exciting and More Fun ]]>
                </title>
                <description>
                    <![CDATA[ Although the majority of developers know why programming is exciting, you might wonder about ways to make it funnier. I've recently asked on the Instagram of HereWeCode the following question: "What small tutorials do you want to see on the account?"... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-make-programming-more-exciting-and-funnier/</link>
                <guid isPermaLink="false">66bb9210d2bda3e4315491e5</guid>
                
                    <category>
                        <![CDATA[ beginner ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Career ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Gaël Thomas ]]>
                </dc:creator>
                <pubDate>Wed, 29 Jan 2020 09:37:02 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/01/how-to-make-programming-more-exciting-and-more-fun-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Although the majority of developers know why programming is exciting, you might wonder about ways to make it funnier.</p>
<p>I've recently asked on <a target="_blank" href="https://www.instagram.com/gaelgthomas/">the Instagram</a> of HereWeCode the following question: "What small tutorials do you want to see on the account?". One of the followers answered "How to make coding interesting?". I was surprised because I'd never asked this myself.</p>
<p>After a few hours of searching, I wanted share with you different ways to make programming more fun.</p>
<h2 id="heading-why-coding-is-exciting">Why coding is exciting</h2>
<p>In my opinion, IT in general is exciting. We live in a world where computers are one of the most important things. </p>
<p>As we speak, programming is not a skill that everyone has. Being able to develop your own project is this world gives you a chance. Everything is possible thanks to Information Technology, and we live in a key period where there are not enough developers to satisfy the need.</p>
<p>Coding is a creative skill, and it's exciting to be a part of a project. Although mobile apps and websites are everywhere, I talked with a lot of people who don't know how they work.</p>
<p>My speech so far may seem a bit over-sold and over-played, but it's the reason why coding is exciting for me.</p>
<p>It's one of the reasons why I take so much pleasure in creating educational content.</p>
<h2 id="heading-how-to-make-it-more-fun">How to make it more fun</h2>
<p>After thinking about it, although programming is now a passion for me, I remembered that it hasn't always been fun for me.</p>
<p>Mostly when I started, I would get stuck for days on a problem. Sometimes I would completely lose hope and say: "This is not for me. I tried everything, and it still does not work. I'm not that good."</p>
<p>If that's the case with you, I can tell you – everybody's been there.</p>
<p>This situation can also happen for many other reasons. For example, when you are bored with a language or a framework because you've used it too much.</p>
<p>Anyway, don't worry too much about it. Here, I've listed a few tips to give you a dose of fun when you need it.</p>
<h2 id="heading-practice">Practice</h2>
<p>Writing code is like playing golf. When you start, it's not fun. You need to learn everything: which driver to use for hitting the ball in such a way, how to position yourself, and so on. The pleasure will come as you go along, begin to understand things, and start to have fun with them.</p>
<h2 id="heading-dont-just-read-code-run-it">Don't just read code, run it</h2>
<p>Following along with lessons by simply reading the code can be a significant problem when people start programming. </p>
<p>When you are learning how to code, you should try to write and run it by yourself. Take the time to do it – you will understand it better, and you will have fun trying to modify the code to create your programs.</p>
<p>Here's another example: when you are searching for a code on GitHub, why not try it out? It can be fun to understand someone else's work and be able to integrate it into your project.</p>
<h2 id="heading-add-a-dose-of-fun-to-your-projects-or-apprenticeships">Add a dose of fun to your projects or apprenticeships</h2>
<p>When you are bored with one technology or if you want to increase your knowledge, you can learn a new library, framework, or language. This can be an interesting process and can help you to try new things and have fun doing them.</p>
<p>However, I don't recommend that you only learn from and follow along with a course. If you do so, after a few days you will be bored. Every day or with every new chapter, create small projects to encourage yourself, and let your creativity run free.</p>
<p>Try to find some fun projects to work on. For example, imagine you are learning the basics of JavaScript. Even if these skills are the most important, learning them won't be enjoyable. Once you know how to get user inputs and print in the console, why not trying to create a simple "chatbot" that answers user questions?</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/07/chatbot-example.png" alt="Image" width="600" height="400" loading="lazy">
<em>Chatbot example</em></p>
<p>When I was doing my search to answer this question, I found this story from a Quora user, and I liked it. It's an excellent example of how to put fun into your apprenticeships.</p>
<blockquote>
<p>"Another thing - the worst is learning a new thing - it is usually very challenging, and your progress is much slower than you wish it were. To make that fun, I typically trick my brain.   </p>
<p>For example, when I was learning about assembly language, and we had a project to program a tiny hardware display - well first, it was very dull. You had to study the hardware manual, it had inputs and outputs, and all you could achieve was a few letters to appear on the screen.   </p>
<p>But I challenged myself to master that thing, and to do that, I came up with my own "special exercise". Instead of merely writing 10101 on display, I came up with the idea to write something more stupid, more childish. Something like - ——CALL -ME - NOW -XXXX — flashing and moving over the screen - this was WAY more advanced than the actual task we had been assigned in class. I just used this stupid thing to motivate myself to learn everything I could about assembly languages, and boy, this worked out well! :)"   </p>
<p>— <a target="_blank" href="https://www.quora.com/How-can-I-make-coding-fun-and-interesting">Marcus Biel</a></p>
</blockquote>
<h2 id="heading-always-challenge-yourself">Always challenge yourself</h2>
<p>When you are a developer, you always need to learn new things to stay up to date. Everything is evolving quickly, and you can't be left behind. Boredom or lack of fun occurs when you no longer feel like you are growing or learning.</p>
<p>To counteract this feeling, you can try to achieve goals that you have not yet met.</p>
<p>For example, if you have never participated in an open-source project, you can search on GitHub and contribute for the first time.</p>
<p>Your sense of satisfaction will be increased when you succeed in having your work accepted within the project. Perhaps you will help dozens, even hundreds of people, by fixing a previously unresolved problem.</p>
<p>You can also participate in coding competitions or use coding websites such as <a target="_blank" href="https://www.hackerrank.com/home?utm_expid=.2u09ecQTSny1HV02SEVoCg.1&amp;utm_referrer=https%3A%2F%2Fwww.google.com%2F">HackerRank</a>, <a target="_blank" href="https://www.codingame.com/start">CodingGame</a>, or <a target="_blank" href="https://projecteuler.net/">Project Euler</a> to challenge yourself.</p>
<h2 id="heading-create-a-personal-project-from-scratch">Create a personal project from scratch</h2>
<p>It can be frustrating to be a developer when you're only working on a small part of a project for your company.</p>
<p>Maybe you have always dreamed about a project, but you've never taken the time to work on it. Why not try to code it? You will see – it's fun to start the project of your dreams. It's also a worthy goal to <a target="_blank" href="https://herewecode.io/blog/how-to-make-programming-a-daily-habit/">make your programming habit stick</a>.</p>
<p>If you don't have any ideas, try to find a theme you like, for example:</p>
<ul>
<li>If you like video games, you can try to create a game.</li>
<li>If you are into education, why not create tutorials around code?</li>
<li>If you love hardware and electronics, why not build an Arduino or a raspberry pi?</li>
</ul>
<blockquote>
<p>"Programming is like writing - in the main subject matters much more than the writing itself." — <a target="_blank" href="https://news.ycombinator.com/item?id=7669435">lifeisstillgood</a></p>
</blockquote>
<h2 id="heading-define-a-goal">Define a goal</h2>
<p>This point always returns in all of my productivity articles. You must define goals.</p>
<p>Without goals, it's challenging to feel comfortable and enjoy what you are doing as a developer.</p>
<h2 id="heading-find-a-mentor">Find a mentor</h2>
<p>A mentor can be motivating if you don't find coding fun anymore.</p>
<p>A mentor can give you a goal to follow and teach you the best practices. They can also help you <a target="_blank" href="https://herewecode.io/blog/how-to-improve-your-programming-skills/">improve your programming skills</a> and stimulate your professional career.</p>
<p>Perhaps you are wondering how to ask your "hero" to become your mentor.</p>
<p>Well, just send a message and them to be your mentor.</p>
<p>Yeah yeah, it's that simple. Maybe, they will be pleased to know that you value their skills enough to mentor you. In most cases, they will be delighted to accompany you in your development.</p>
<h2 id="heading-sleep-more">Sleep more</h2>
<p>When you are in a downward spiral, programming becomes less fun. Sometimes it can be difficult for you to move forward and thrive in your work. </p>
<p>Go to bed earlier for a few nights or sleep later in the morning for a few days, and everything should improve dramatically.</p>
<h2 id="heading-show-your-work">Show your work</h2>
<p>What's worse than being a developer and losing all hope because you're alone in your basement? It's a bit of a cliché but, believe me, when you work alone for a long time on a project and never show it to anyone, it becomes less fun right away.</p>
<p>This tip is close to the previous ones. Once you share your work, people will make suggestions or ask questions. It's going to be challenging for you and will help you set new goals.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>I tried to round up some essential tips to help you have fun while programming. If you have any other advice or suggestions to make it more fun, feel free to leave a comment or send me a message.</p>
<p><strong>Why do you think programming is exciting? How do you make programming more fun?</strong></p>
<p>Feel free to share this article if you liked it.</p>
<p>If you want more content like this, you can <a target="_blank" href="https://twitter.com/gaelgthomas/">follow me on Twitter</a>, where I tweet about web development, self-improvement, and my journey as a full stack developer!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Should you Learn to Code with Paid or Free Content - and Why? ]]>
                </title>
                <description>
                    <![CDATA[ As more and more people use computers, the number of resources out there for learning about them has increased a lot, too. When you start programming, it isn't straightforward to choose between free or paid content. I've been thinking, gathering argu... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/should-you-learn-programming-with-paid-or-free-content-and-why/</link>
                <guid isPermaLink="false">66bb9218a5fd14123a8b4a36</guid>
                
                    <category>
                        <![CDATA[ beginner ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Career ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Gaël Thomas ]]>
                </dc:creator>
                <pubDate>Sat, 18 Jan 2020 14:20:15 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/01/should-you-learn-to-code-with-paid-or-free-content-and-why.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>As more and more people use computers, the number of resources out there for learning about them has increased a lot, too. When you start programming, it isn't straightforward to choose between free or paid content. I've been thinking, gathering arguments, and creating examples to help you make your choice.</p>
<h2 id="heading-what-should-you-choose-paid-or-free-content">What Should You Choose - Paid or Free Content?</h2>
<p>This question is widespread, and everyone has asked it at one point.</p>
<p>I've thought about it for a long time and have reviewed my habits to understand why someone would be more interested in paid rather than free content.</p>
<p>Most of the time paid content is qualified by:</p>
<ul>
<li><em>All-in-one content.</em> You pay to get all the information in the same place (for example, on Udemy).</li>
<li><em>More detail.</em> When I pay for a book or a course, I expect a bunch of information from the creator. I want to really understand why and how to use something.</li>
<li><em>A warranty on knowledge.</em> You are guaranteed to know all the basic necessary information on a subject when you finish a course. Indeed, when I take a "Learn Flutter and Firebase with concrete examples" course, I know I will see all the critical concepts surrounding these two technologies. I'll also be able to develop a small application using these technologies. Sometimes, when I use YouTube for this kind of search, I don't get all the necessary details, and I need to find another video.</li>
<li><em>Time savings.</em> You don't have to search for other online resources. You can focus only on the course.</li>
<li><em>Quality.</em> Usually when you pay for content, the sound quality and recording are much better.</li>
<li><em>Community support.</em> People pay for content to support a creator, or to contribute to the development of a community. If you buy a course on a new technology, you encourage the creator to develop more resources on the technology.</li>
</ul>
<h2 id="heading-my-recommendations-to-learners">My recommendations to learners</h2>
<p>All types of content are great. I personally use both free and paid content at the same time.</p>
<p>I think certain types of people are more likely to choose one type of content over another.</p>
<h3 id="heading-if-you-choose-primarily-paid-content">If you choose primarily paid content:</h3>
<ul>
<li>You are a beginner, and you know what you want to learn.</li>
<li>You are a beginner, and you don't want to waste time searching for content or looking at many tutorials and videos to find a solution to your problem. DISCLAIMER: Being able to search for a solution to a problem in programming is a crucial concept. It will happen–one day you're going to have to look for content to solve a specific problem. If you use paid content, be sure you know how to search for potential errors yourself.</li>
<li>You are a beginner, and you don’t know how to search for the right resources.</li>
<li>You want to learn a subject quickly and globally to accomplish a task (for example, <a target="_blank" href="https://www.instagram.com/gaelgthomas/">I watched a course on Instagram to launch HereWeCode on the social network</a>) .</li>
<li>You don't have a lot of time (for example, you need to learn a new technology for your company in one week).</li>
<li>You like to read books and understand all the details of the technology.</li>
</ul>
<h3 id="heading-if-you-choose-primarily-free-content"><strong>If you choose primarily free content:</strong></h3>
<ul>
<li>You are a beginner, and you have a lot of time. In my opinion, this is the best way to learn how to code. For example, this works great if it's as a hobby or if you know you have 1-2 years to retrain yourself and find work. Nothing is better than taking your time to learn programming. I took almost 3 years to be comfortable in computer development and I still have a lot to learn. You'll feel like you're taking a long time, but I guarantee it's worth it. Searching, testing, failing, retrying and so on is the key to success.</li>
<li>You have been a developer for some time, and you know how to search efficiently on Google. </li>
</ul>
<p>Note that these profiles are only examples of people who may be inclined to pay for content or search for it for free. It's up to you to do what you want. I just hope this helps people decide what kind of content they should use.</p>
<h2 id="heading-a-case-study-my-own-learning-path">A Case Study: My Own Learning Path</h2>
<p>To show you that this subject is complex and very personal, I will tell you what I did.</p>
<p>I have been coding for more than three years. It's my hobby, and I like to share my knowledge to help people to learn how to code. These reasons pushed me to create <a target="_blank" href="https://herewecode.io">HereWeCode</a>.</p>
<h3 id="heading-period-with-only-free-content">Period with only free content</h3>
<p><em>The goal of this period:</em> Learn programming and critical concepts to be able to switch quickly from one language to another.</p>
<p>When I started to code three years ago, I was in a school with a project pedagogy. I learned development with online resources such as StackOverflow, YouTube, freeCodeCamp, and blogs.</p>
<p>This period was hard for me, but it was also exciting. It was an essential part of my life as a developer. By learning with free content, I was forced to search a lot and understand where I could easily find answers to my questions. Nowadays, I'm able to explore everything efficiently on the internet.</p>
<p>It may not seem like it, but searching on the internet is not easy for everyone. I can tell you because I'm teaching students on a French platform, and most of the time, the beginners don't know how to find the answer to fix an error.</p>
<h3 id="heading-period-with-free-and-paid-content">Period with free and paid content</h3>
<p>For one year now I've been using both types of content. And it just depends on my goals with each technology.</p>
<p>I like to use paid courses on Udemy when I want to learn quickly and have a showcase of that new technology. </p>
<p>For example, my Instagram course allowed me to understand a new social network, define a strategy, and deploy a professional account in a few weeks. I reached my goal with this course, which was to share a new type of content as soon as possible.</p>
<p>When I want to learn technology deeply, I like to read books. Most of the time, there are books with lots of details you can't find in any other content.</p>
<p>I still use free content daily to answer a question, find a code example, understand a specific concept in a few minutes, and so on.</p>
<h3 id="heading-bonus-the-seemingly-paid-but-actually-free-content">Bonus: The Seemingly PAID but Actually FREE content</h3>
<p>In my opinion, there is another type of content which I call "paid but free" content.</p>
<p>This is the name I've given to a platform offering <strong>free</strong> content with a premium paid <strong>quality</strong>.</p>
<p>There are very few of them, and the most famous is <a target="_blank" href="https://www.freecodecamp.org/">freeCodeCamp</a>.</p>
<p>It's quite incredible to imagine that so many hours of training are free. You can even get certified!</p>
<p>I know people who have changed their lives thanks to freeCodeCamp, and all for free.</p>
<p>I'm writing this last paragraph to give thanks for the work done by the whole team and the contributors to the platform.</p>
<p>If you want to do a kind act and help develop free content, you can <a target="_blank" href="https://www.freecodecamp.org/donate">support freeCodeCamp</a>.</p>
<blockquote>
<p>"When you donate to freeCodeCamp, you help people learn new skills and provide for their families. You also help us create new resources for you to use to expand your technology skills." - <a target="_blank" href="https://www.freecodecamp.org/donate/">freeCodeCamp's Donate Page</a></p>
</blockquote>
<h2 id="heading-conclusion">Conclusion</h2>
<p>This topic is not easy to answer, and it's the first time I've discussed something like this. I'll be honest with you: I was scared when I hit the publish button. It's quite an engaging topic, and I'll be waiting for your opinions.</p>
<p>I think nowadays there are so many ways to learn new things. This diversity comes from the need to satisfy all different types of learners.</p>
<p>It's like when you were in school – some people learned by reading, others by drawing, reading aloud, answering quizzes, and so on.</p>
<p>Choose the content that best suits your situation and goals.</p>
<p>What type of content do you use? Do you sometimes switch between paid and free content? If so, why?</p>
<p>If you want more content like this, you can <a target="_blank" href="https://twitter.com/gaelgthomas/">follow me on Twitter</a>, where I tweet about web development, self-improvement, and my journey as a full stack developer!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Move from Coding Tutorials to Building Projects as a Developer ]]>
                </title>
                <description>
                    <![CDATA[ By M. S. Farzan Learning to code by following tutorials works for many people. And yet there tends to be a separate learning curve when you're trying to move out of the tutorial ecosystem and into creating your own projects. I've written elsewhere ab... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/five-tips-for-moving-from-coding-tutorials-to-making-progress-as-a-developer/</link>
                <guid isPermaLink="false">66d851e2bdc56847ac959f48</guid>
                
                    <category>
                        <![CDATA[ beginner ]]>
                    </category>
                
                    <category>
                        <![CDATA[ C ]]>
                    </category>
                
                    <category>
                        <![CDATA[ ide ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Integrated Development Environment   ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learn to code ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Python ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tips ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tutorial purgatory ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Thu, 19 Dec 2019 17:00:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/12/jefferson-santos-V9sv7QrDUgc-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By M. S. Farzan</p>
<p>Learning to code by following tutorials works for many people. And yet there tends to be a separate learning curve when you're trying to move out of the tutorial ecosystem and into creating your own projects.</p>
<p>I've <a target="_blank" href="https://www.freecodecamp.org/news/how-to-choose-a-programming-language-and-escape-tutorial-purgatory/">written elsewhere</a> about how to escape tutorial purgatory and make progress as a programmer. But to summarize here, it's a necessary step in your growth as a developer to venture out into the wild west of programming and build something. This will expose you to the ins and outs of your chosen coding ecosystem.</p>
<p>Here are five tips to help you move out of those tutorials and into making real progress as a developer by building projects.</p>
<h2 id="heading-1-choose-a-project">1. Choose a Project</h2>
<p>Whether you're coding from a book or working through online tutorials, your first step upon leaving the safety of your nest is to choose a project that is specific to your field of interest.</p>
<p>If you're an aspiring front end developer, that might mean creating a basic website. If you're learning Python, that could look like a simple web scraper. Find something that interests you, and research examples to get an idea of what your project might look like when it's complete.</p>
<h2 id="heading-2-set-up-an-ide">2. Set Up an IDE</h2>
<p>If you've been learning from online tutorials which provide a console that handles all of the back end work for you, take some time to set up an <a target="_blank" href="https://www.freecodecamp.org/news/how-to-set-up-an-integrated-development-environment-ide/">integrated development environment</a> (IDE) that is specific to your intended project and ecosystem.</p>
<p>The actual form of your IDE will vary greatly depending on your project. You could be cobbling together a workflow that includes a code editor, command line interface, version control system, and package manager. Or, on the other hand, you might install a game engine that has all of the stuff that you need built-in for you.</p>
<p>The important component of this step is to become comfortable coding in an environment that is standard for the type of work you want to do. This helps you move away from only coding in a browser or following a book.</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/f-JWTicIOwI" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<h2 id="heading-3-get-comfortable-with-documentation">3. Get Comfortable with Documentation</h2>
<p>Here's a glimpse of a familiar workflow when you're beginning a new project:</p>
<ol>
<li>Set up your IDE</li>
<li>Code</li>
<li>Get stuck or forget the syntax for something</li>
<li>Google some half-formed question about the issue</li>
<li>Find the official documentation and a handful of Stack Overflow posts</li>
<li>Check social media for no reason</li>
<li>Return to the documentation and Stack Overflow to find your answer</li>
<li>Return to step 2</li>
</ol>
<p>Unless you're a super expert in your field, chances are that you'll get stuck trying to figure out a solution to some aspect of your project. The official documentation for the library or framework that you're using will likely have some sort of answer - even if it's an obscure one - for whatever's puzzling you. But if it doesn't, someone has probably asked a similar question on Stack Overflow or elsewhere.</p>
<p>Even if there are no answers out there for your specific question, there will be a breadcrumb somewhere that'll lead you to an approach for how to solve your problem.  </p>
<p>If you're trying to use ES6 classes in some obscure JavaScript framework, for example, you might not find the <em>exact</em> answer you're looking for. But there will be plenty of similar resources out there that can help you come up with a solution yourself.</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/z9xz-R4iuaU" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<h2 id="heading-4-ask-for-help">4. Ask for Help</h2>
<p>One of the best things you can do for yourself as an aspiring developer is to make friends with other developers in your field. They can look at your code and provide feedback about how to make it better.</p>
<p>For some people, the idea of sharing their work and having it critiqued is an anxiety-inducing experience. I recommend working as diligently as you can to overcome this emotion as it will stagnate your growth as a programmer.</p>
<p>When you're starting out with your own projects, it can be <em>extremely</em> helpful to have someone who's already walked the path to look at your work and offer constructive criticism. Even if doing so requires you to rewrite whole sections of code.  In many cases, you might be trying to recreate the wheel while other options already exist. There, you'll benefit greatly from learning best practices from experts that have experience in the field.</p>
<h2 id="heading-5-identify-other-areas-for-growth">5. Identify Other Areas for Growth</h2>
<p>One project usually leads to another, and you'll quickly identify areas in which you're able to grow as a developer.  This might mean that you'll move from front end development to back end, or vice versa, or hop from 2D game programming into 3D.</p>
<p>It might also mean that you need to keep building your skill set just to complete the initial project that you've chosen. There's no shame in learning C#, for example, then deciding to build the back end of a web app, and having to learn all about <a target="_blank" href="https://docs.microsoft.com/en-us/aspnet/?view=aspnetcore-3.1">ASP.NET</a> and <a target="_blank" href="https://docs.microsoft.com/en-us/aspnet/core/razor-pages/?view=aspnetcore-3.1&amp;tabs=visual-studio">Razor Pages</a> before actually making any progress!</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/0-dUB52eEMk" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p>Happy coding!</p>
<p>If you enjoyed this article, please consider <a target="_blank" href="https://www.nightpathpub.com/">checking out my games and books</a>, <a target="_blank" href="https://www.youtube.com/msfarzan?sub_confirmation=1">subscribing to my YouTube channel</a>, or <a target="_blank" href="https://discord.gg/RF6k3nB">joining the <em>Entromancy</em> Discord</a>.</p>
<p>M. S. Farzan, Ph.D. has written and worked for high-profile video game companies and editorial websites such as Electronic Arts, Perfect World Entertainment, Modus Games, and MMORPG.com, and has served as the Community Manager for games like <em>Dungeons &amp; Dragons Neverwinter</em> and <em>Mass Effect: Andromeda</em>. He is the Creative Director and Lead Game Designer of <em><a target="_blank" href="https://www.nightpathpub.com/rpg">Entromancy: A Cyberpunk Fantasy RPG</a></em> and author of <em><a target="_blank" href="http://nightpathpub.com/books">The Nightpath Trilogy</a></em>. Find M. S. Farzan on Twitter <a target="_blank" href="https://twitter.com/sominator">@sominator</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Getting Code Done: How to Stop Wasting Time and Start Investing it ]]>
                </title>
                <description>
                    <![CDATA[ Have you ever wasted your time being entertained while you were working?  It was happening to me every time before I start reading a lot on this and searching for ways to improve my productivity. I was like you, but today everything is over. When I f... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/low-productivity-how-to-stop-wasting-time/</link>
                <guid isPermaLink="false">66bb9213add24ba4273250ff</guid>
                
                    <category>
                        <![CDATA[ beginner ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Career ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Gaël Thomas ]]>
                </dc:creator>
                <pubDate>Thu, 05 Dec 2019 10:41:49 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/12/low-productivity-how-to-stop-wasting-time.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Have you ever wasted your time being entertained while you were working? </p>
<p>It was happening to me every time before I start reading a lot on this and searching for ways to improve my productivity. I was like you, but today everything is over. When I focus on a task, nothing can disturb me anymore.</p>
<blockquote>
<p>“Stop wasting time, start investing time for that is the only way to greatness.”― Sunday Adelaja, <a target="_blank" href="https://www.goodreads.com/book/show/35851967-how-to-become-great-through-time-conversion">How To Become Great Through Time Conversion: Are you wasting time, spending time or investing time?</a></p>
</blockquote>
<h2 id="heading-what-are-the-bad-habits">What are the bad habits?</h2>
<p>When I started coding every day, a few years ago, my productivity was so weak. Unconsciously each thing was a trigger to me: a noise, my social networks, my emails, someone speaking next to me, etc.</p>
<p>I think most of us know this; you are starting to work on something, then suddenly you have the wrong idea to open a webpage and start reading one, two, three articles. Then you close your browser, a half-hour later, and ask yourself where I was? Your brain takes a few times to remember everything before you start working again.</p>
<p>Other examples of my daily habits, 30-45 minutes of social networks right after waking up, 5-10 minutes of youtube videos at the toilet, 20 minutes of news each break, etc.</p>
<p>Do you recognize yourself? So, you are like me: you waste your time and decrease your productivity considerably.</p>
<blockquote>
<p>“Time should be invested instead of wasting it or spending it.” — Sunday Adelaja, <a target="_blank" href="https://www.goodreads.com/book/show/35851967-how-to-become-great-through-time-conversion">How To Become Great Through Time Conversion: Are you wasting time, spending time or investing time?</a></p>
</blockquote>
<h2 id="heading-in-fact-why-is-it-a-problem">In fact, why is it a problem?</h2>
<p>Once you are dependent on these bad habits, you are doing multitasking.</p>
<p>In a first thought, we can say that multitasking is a good thing. We can achieve many things at the same time, and my productivity is incredibly huge.</p>
<p>But it’s false. Unfortunately, humans are not computers, and our brains can’t handle it correctly.</p>
<p>When I was writing this article, I was looking for a multitasking definition, and I found something funny.</p>
<blockquote>
<p>“Multitasking, in an operating system, is allowing a user to perform more than one computer task (such as the operation of an application program) at a time. The operating system is able to keep track of where you are in these tasks and go from one to the other without losing information.” - <a target="_blank" href="https://whatis.techtarget.com/definition/multitasking">WhatIs.com</a></p>
</blockquote>
<p>Multitasking is in a first search, a computer skill.</p>
<p>Indeed, it seems like a great way to finish a lot of things at once, but researchers have shown that our brains can’t do it. By doing it, you will lose a lot of focus and also IQ.</p>
<blockquote>
<p>"According to a study by the Institute of Psychiatry at the University of London, e-mailing while talking on the phone reduce your IQ by 10 points. Researchers studied 1,100 workers at a British company and found that multitasking with electronic media caused a greater decrease in IQ than smoking pot or losing a night's sleep." — <a target="_blank" href="https://www.chicagotribune.com/opinion/ct-xpm-2010-08-10-ct-oped-0811-multitask-20100810-story.html">Chicago Tribune</a></p>
</blockquote>
<p>Much more than that, some research found that a typical office worker gets only 11 minutes between each interruption and can take an average of 25 minutes to return to the original task after interruption.</p>
<p>Did you remember the last time you were working on something, and a colleague asked you to finish another task quickly? Try to remember the time you took to come back to your first task.</p>
<blockquote>
<p>"Gloria Mark of the University of California, Irvine, found that a typical office worker gets only 11 minutes between each interruption, while it takes an average of 25 minutes to return to the original task after an interruption." — <a target="_blank" href="https://www.nytimes.com/2013/05/05/opinion/sunday/a-focus-on-distraction.html">NYTime</a></p>
</blockquote>
<h2 id="heading-its-not-too-late-to-change-your-habits">It’s not too late to change your habits</h2>
<p>What I want to show in the previous part is that we do a lot of things by habits, without really thinking about it. If a practice is right, this is fine, but in these cases, our patterns are wrong, and we need to find solutions to break them.</p>
<p>I will help you to stop multitasking and increase your productivity by giving you the tips which helped me.</p>
<h2 id="heading-define-your-time-wasters">Define your time wasters</h2>
<p>The first thing you need to do is define your time wasters. As I explained precedently, in my case, it was social applications most of the time.</p>
<p>You need to take a break and write on paper all the triggers that make you unfocused on a task. Try to remember the last time you worked or tried to learn something. Once you do that, you make a considerable improvement to your future improved productivity.</p>
<h2 id="heading-tips-to-stop-wasting-time">Tips to stop wasting time</h2>
<p>I’ve sorted my advice in 3 categories:</p>
<ul>
<li><em>General:</em> Tips that everyone can use to improve productivity.</li>
<li><em>Low time-waster:</em> If you lost a bit of time and you want to make some improvements without blocking everything.</li>
<li><em>Hard time-waster:</em> If you already tried many times to stop being distracted, but nothing is working.</li>
</ul>
<h2 id="heading-general">General</h2>
<h3 id="heading-parkinsons-law">Parkinson’s law</h3>
<p>This law follows the principle of work expands to fill the time available for its completion. It explains why you are more productive when you do last-minute work. Your brain will focus more because you know it’s the last limit, and you can’t exceed it.</p>
<p>If you want to counter this law, you need to create constraints of time in your tasks. For example, you should finish a task in one month, try to do it in two weeks.</p>
<p>The constraint will give you a clear objective and make it easier for you to concentrate.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/07/parkinsons-law.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://benjaminhardy.com/parkinsons-law-on-steroids-the-single-principle-for-automatically-expanding-your-confidence-and-success/">Parkinson's law</a></em></p>
<h3 id="heading-the-pomodoro-technique">The Pomodoro Technique</h3>
<p>This method of work helps a lot of people (developers, project managers, etc.), and it’s the most simple productivity method to implement in your daily life.</p>
<p>Only 5 simple steps are required to accomplish this method.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/5-steps-pomodoro-technique.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>As simple as it may seem, the timer will create a sense of urgency. Unconsciously, you will focus more on your task because you want to reach your goal.</p>
<p>If you are distracted while doing Pomodoro, for example, a colleague is talking to you, you need to postpone your timer and start it again when you can focus again.</p>
<p>Free Pomodoro timer (Online, Android, or IOS):</p>
<ul>
<li><a target="_blank" href="https://play.google.com/store/apps/details?id=net.phlam.android.clockworktomato&amp;hl=en_GB">Clockwork Tomato</a> (Android)</li>
<li><a target="_blank" href="https://www.forestapp.cc/">Forest</a> (Android and IOS)</li>
<li><a target="_blank" href="https://tomato-timer.com/">Tomato-Timer</a> (Online)</li>
</ul>
<blockquote>
<p>“For many people, time is an enemy. We race against the clock to finish assignments and meet deadlines. The Pomodoro Technique teaches you to work with time, instead of struggling against it. A revolutionary time management system, it is at once deceptively simple to learn and life-changing to use.”  — <a target="_blank" href="https://francescocirillo.com/pages/pomodoro-technique">The Pomodoro Technique</a></p>
</blockquote>
<h3 id="heading-noise-canceling-headset">Noise canceling headset</h3>
<p>This advice is simple but efficient. For most people, noise can be a trigger to concentration. Your brain will have a lot of difficulties to stay concentrated if you work in a noisy workplace (co-working, coffee, etc.).</p>
<p>When I started coding, I decided to invest in a noise-canceling headset. It was a bit expensive, but by making this purchase, my productivity has exponentially improved.</p>
<p>You can find a lot of headsets or earphones with this feature at different prices. My article will not give you what is the best one, but a few examples.</p>
<ol>
<li>Sony WH-1000XM3</li>
<li>Bose Noise Cancelling Headphones 700</li>
<li>Sony WH-1000XM2</li>
<li>Bose QuietComfort 35 II</li>
<li>Sony WF-1000XM3 True Wireless Earbuds</li>
<li>Jabra Elite 85H</li>
<li>Philips Fidelio NC1</li>
<li>Bose QuietComfort 25</li>
<li>Bowers and Wilkins PX Wireless</li>
<li>Sennheiser HD 4.50 BTNC</li>
<li>JBL Live 650BTNC</li>
<li>Microsoft Surface Headphones</li>
</ol>
<h2 id="heading-low-time-waster">Low time-waster</h2>
<h3 id="heading-disable-data-connectivity-for-useless-apps">Disable data connectivity for useless apps</h3>
<p>A few months ago, I received many hundreds of notifications a day. I was always looking at my phone. Most of these notifications were not interesting: who liked my last twitter post, an advertisement by email, games, etc.</p>
<p>I disabled data connectivity in the background for all my not essential applications.</p>
<p>You must know that all smartphones are always synching notifications in the background. It's why you receive them even if everything is closed.</p>
<p>On IOS and Android, you can select for each application if you want this feature or not. What I recommend is to disable data fetching for every social network, news, and games.</p>
<p>It does not mean that you will not be able to use these applications. You will receive notifications when you open them only.</p>
<p>Besides, it will save your battery power!</p>
<h3 id="heading-unsubscribe-from-useless-emails">Unsubscribe from useless emails</h3>
<p>It's a bit similar to the previous tip. Most of your email notifications are advertising, don't be overwhelmed and use the "unsubscribe" option at the bottom of useless emails.</p>
<p>After a few weeks of doing this, your phone will stop ringing constantly.</p>
<h3 id="heading-use-do-not-disturb-mode">Use "do not disturb" mode</h3>
<p>If you can't control yourself and unlock your phone regularly, you can enable "do not disturb" mode. It will prevent your phone from the light on when you receive a notification, and you will not leave your task to watch your mobile.</p>
<h2 id="heading-hard-time-waster">Hard time-waster</h2>
<p>Block time-wasting website and applications It’s for me the most important thing, and I still use it today.</p>
<p>If you want to force yourself to focus on your task, you should remove every distraction. Some companies and developers created blockers on smartphones and computers to remove access to distracting websites or applications.</p>
<p>When I feel distracted, I switch-on, and I don’t have anything else to do. You can be safe; you can call and answer with your phone if it’s needed.</p>
<p>Some applications (Windows, Mac, Android, and IOS) you can use:  </p>
<ul>
<li><a target="_blank" href="https://heyfocus.com/">Focus</a> (Mac)</li>
<li><a target="_blank" href="https://freedom.to/">Freedom</a> (Windows, Mac, Android, and IOS)</li>
<li><a target="_blank" href="https://selfcontrolapp.com/">SelfControl</a> (Mac)</li>
<li><a target="_blank" href="https://www.forestapp.cc/">Forest</a> (Android and IOS)</li>
<li><a target="_blank" href="https://getcoldturkey.com/">ColdTurkey</a> (Windows and Mac)</li>
</ul>
<h3 id="heading-switch-off-your-phone-or-use-airplane-mode">Switch off your phone or use “airplane” mode</h3>
<p>If your phone is a real distraction, you can switch it off or use the “airplane” mode to stay concentrated. It can be useful when you are learning a new thing or working on your examinations.</p>
<h3 id="heading-sleep-more">Sleep more</h3>
<p>Lack of sleep negatively affects your way of thinking and your productivity. If it’s hard for you to be focused daily, it can be because you don’t sleep enough.</p>
<p>For high-performance work, it’s essential to have a healthy life. If your life is not qualitative, you can’t focus.</p>
<h2 id="heading-dont-escape-the-rule">Don’t escape the rule</h2>
<p>I hope that this article has helped you to find ways to avoid wasting time.</p>
<p>One last tip is: <strong>don’t escape the rule</strong>. If you keep these new habits in your daily tasks, you will succeed!</p>
<p>If these habits help you, feel free to share this article and your feedback.</p>
<p>If you want more content like this, you can <a target="_blank" href="https://twitter.com/gaelgthomas/">follow me on Twitter</a>, where I tweet about web development, self-improvement, and my journey as a full stack developer!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Improve Your Programming Skills ]]>
                </title>
                <description>
                    <![CDATA[ Since I started coding, I've always been looking for tips to improve my programming skills.    I read and tried a lot of things, and I want to share some of my top tips with you. So if you are looking for ways to become a better developer, ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-improve-your-programming-skills/</link>
                <guid isPermaLink="false">66bb92083e3fa59ecfecb878</guid>
                
                    <category>
                        <![CDATA[ beginner ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Career ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Gaël Thomas ]]>
                </dc:creator>
                <pubDate>Wed, 27 Nov 2019 20:07:38 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/12/how-to-improve-your-programming-skills.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Since I started coding, I've always been looking for tips to improve my programming skills.   </p>
<p>I read and tried a lot of things, and I want to share some of my top tips with you. So if you are looking for ways to become a better developer, you're in the right place! </p>
<p>In this post, you will discover a summary of what I've learned over the past few years of programming.  </p>
<p>I also launched my YouTube channel recently and created a video version of this post. If you want to check it out here it is:</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/YZ0ouBQdhQo" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<h2 id="heading-here-are-my-top-5-tips-for-becoming-a-better-programmer">Here are my top 5 tips for becoming a better programmer</h2>
<h2 id="heading-1-establish-goals-for-yourself">1. Establish goals for yourself.</h2>
<p>Setting goals can boost your productivity as a developer.
Ask yourself the following questions:</p>
<p>• Why did you start programming?
• What are your programming goals?
• What dream do you want to achieve by becoming a developer?</p>
<p>Everyone has their own personal goals, but I created a small list of ideas for you:</p>
<p>• Create your website
• Get a new job
• Work as a freelancer
• Work remotely
• Challenge yourself
• Attain better financial health</p>
<p>Remember to save a slot for one of the most important goals: the personal project. For me, it's one of the most essential things in coding. If you want to succeed and stay motivated, you should create projects.</p>
<p>But you don't always have to finish them. The idea is to achieve small goals in your projects.</p>
<p>I'll give you an example. If you want to learn how to use a database, you can start a blog project. But if your interest is just learning how to add something to a database, you can create a simple form (a title and description) to add a record to the database.</p>
<p>I know this is simple, but once you do it, you've achieved your goal.
It's crucial to use projects to achieve goals because it leads you to work on more concrete examples (life examples). What could be more motivating than that?</p>
<h2 id="heading-2-do-it-again-and-again">2. Do it again… and again!</h2>
<p>Once you choose your goals, work on them as much as possible! The more your practice, the more you learn.</p>
<p>Learning to code is a skill, and you can compare it to doing sports. If you want to be good at it and perform well at work, you should practice a lot.</p>
<p>Try to practice coding daily, during your lunch break or after work. Even if it is only for one hour, if you create a habit and stick to it, you will see daily improvements.</p>
<blockquote>
<p>“Repetition is the mother of learning, the father of action, which makes it the architect of accomplishment.” (Zig Ziglar - <a target="_blank" href="https://twitter.com/TheZigZiglar">Twitter</a>)</p>
</blockquote>
<h2 id="heading-3-share-what-you-learncreate">3. Share what you learn/create.</h2>
<p>It's the best way to learn new things.</p>
<p>Some ideas for sharing what you do:
• Write blog articles
• Join conferences or local meetups
• Ask for feedback on StackOverflow
• Tweet your progress every day with the <a target="_blank" href="https://twitter.com/hashtag/100daysofcode">#100DaysOfCode hashtag</a></p>
<p><strong>A bit of storytelling:</strong> Do you know why I created <a target="_blank" href="https://herewecode.io">HereWeCode.io</a>?</p>
<p>I am fascinated by code and knowledge sharing. Over the past few years, I read a lot of articles on different platforms: <a target="_blank" href="https://freecodecamp.org/">freeCodeCamp</a>, <a target="_blank" href="https://dev.to/">dev.to</a>, and so on. I learned that everyone could share what they learn and create, even if it's just a small thing.</p>
<p>I created HereWeCode for a few reasons:
• Share my knowledge to become a better developer
• Help beginners understand key concepts
• Create simple and concrete examples for everyone
• To do what I love and have fun</p>
<p>Everyone can do it! I started simple. First I created a small article on Medium called <a target="_blank" href="https://medium.com/@gaelthomas/discover-what-is-an-api-60be03fda59f">"Discover what an API is!"</a>, then a second one on Docker called <a target="_blank" href="https://herewecode.io/blog/a-beginners-guide-to-docker-how-to-create-your-first-docker-application/">"A beginner's guide to Docker — how to create your first Docker application"</a>, and so on.</p>
<p>By writing for others, you will improve your programming skills a lot. Being able to explain a concept and how it works is a crucial skill as a developer.</p>
<p><strong>Remember:</strong> You don't need to be a domain expert to write about something!</p>
<h2 id="heading-4-read-code">4. Read code</h2>
<p>Everything you read about code will improve your programming skills.
You'll discover a lot!</p>
<p>Here's what you can read:
• Code on Github
• Books
• Articles
• Newsletters</p>
<p>You can learn a lot from other people's code. You can find experts in your field or use GitHub to find code that's similar to your own. It's exciting to discover how other developers write code and solve problems. You will develop your critical thinking skills. Is the method they use better than yours?</p>
<p>Similar to programming every day, why don't you try to read at least one article or a few pages of a programming book daily?</p>
<p>Some well-known books:
• Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin
• The pragmatic programmer: from Journeyman to Master
• Deep Work by Cal Newport</p>
<h2 id="heading-5-ask-questions">5. Ask questions.</h2>
<p>Don't be shy about asking too much!</p>
<p>It can be helpful when you don't understand something. You can reach out to your team or friends. If you don't know anyone you can ask, use programming forums.</p>
<p>Sometimes, you need a different explaination to understand a concept. It's good to stay stuck and search for an answer on the internet, but at some point, you need to ask other developers.</p>
<p>Take advantage of another person's knowledge to improve yourself. And if you ask another developer, there is a high chance that they will appreciate it.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>You can save this article and refer to it every time you need to become a better developer.</p>
<p>Now it's your turn. What are your tips to improve your programming skills?</p>
<p>If you want more content like this, you can <a target="_blank" href="https://twitter.com/gaelgthomas/">follow me on Twitter</a>, where I tweet about web development, self-improvement, and my journey as a full stack developer!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Control Alt Delete on a Mac - How to Open Task Manager on your Macbook ]]>
                </title>
                <description>
                    <![CDATA[ It happens to the best of us: we're working away on some important project, and our trusty computer freezes. Or rather, a program we're in just stops responding. So what do you do? If you have a Windows machine, you can just use the familiar CTRL+ALT... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/control-alt-delete-on-mac-how-to-open-task-manager-on-your-macbook/</link>
                <guid isPermaLink="false">66b1fa13eea9870582e16bc8</guid>
                
                    <category>
                        <![CDATA[ mac ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Abigail Rennemeyer ]]>
                </dc:creator>
                <pubDate>Sat, 02 Nov 2019 17:48:00 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9fae740569d1a4ca43f5.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>It happens to the best of us: we're working away on some important project, and our trusty computer freezes. Or rather, a program we're in just stops responding. So what do you do?</p>
<p>If you have a Windows machine, you can just use the familiar CTRL+ALT+DEL sequence to force quit whatever program is misbehaving. But that doesn't work on a Mac.</p>
<p>Don't worry, though - there is one super simple way to force quit on a Mac (and a couple other methods you can keep in your back pocket as well). Let's learn what that is.</p>
<h2 id="heading-how-to-force-quit-on-a-mac">How to force quit on a Mac</h2>
<p>The easiest way to force a program to quit on your Mac is a simple key sequence similar to ctrl+alt+delete. Just tap COMMAND+OPTION+ESC, in that order. Here's where those keys are located on a typical Mac keyboard:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/force-quit-keystrokes.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This will bring up a task manager type window that looks like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/force-quit.png" alt="Image" width="600" height="400" loading="lazy">
<em>Command+Option+ESC brings you here</em></p>
<p>Then just select the non-responsive program and hit "Force Quit" which will stop that program from running.</p>
<p><strong>Note</strong>: since you'll be forcing that program to quit in the middle of whatever you were doing, any unsaved data might be lost. Make sure you enable auto-saving, back up your projects often, and keep your computer clean and up to date.</p>
<h2 id="heading-an-alternative-method">An alternative method</h2>
<p>Why learn just one way to force quit when you can learn two? Click the Apple logo at the top left of your screen in the menu bar. Scroll down to "Force Quit" and it'll bring up the same task manager.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/force-quit-way-2-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>It'll suggest whatever program you're currently using</em></p>
<p>Simple as that!</p>
<p>Now that you've dealt with your crashing application, you can get back to work. :)</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to use your .bashrc file to do twice as much with half the keystrokes ]]>
                </title>
                <description>
                    <![CDATA[ In my recent post about setting up Ubuntu with Bash scripts, I briefly alluded to the magic of .bashrc. This didn’t really do it justice, so here’s a quick post that offers a bit more detail about what the Bash configuration file can do. My current c... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-do-twice-as-much-with-half-the-keystrokes-using-bashrc/</link>
                <guid isPermaLink="false">66bd8f452fbe28509b2d6e8e</guid>
                
                    <category>
                        <![CDATA[ Bash ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Devops ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Linux ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ terminal ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Victoria Drake ]]>
                </dc:creator>
                <pubDate>Thu, 22 Aug 2019 13:20:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/08/cover-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>In my <a target="_blank" href="https://victoria.dev/verbose/how-to-set-up-a-fresh-ubuntu-desktop-using-only-dotfiles-and-bash-scripts/">recent post about setting up Ubuntu with Bash scripts</a>, I briefly alluded to the magic of <code>.bashrc</code>. This didn’t really do it justice, so here’s a quick post that offers a bit more detail about what the Bash configuration file can do.</p>
<p>My current configuration hugely improves my workflow, and saves me well over 50% of the keystrokes I would have to employ without it! Let’s look at some examples of aliases, functions, and prompt configurations that can improve our workflow by helping us be more efficient with fewer key presses.</p>
<h1 id="heading-bash-aliases">Bash aliases</h1>
<p>A smartly written <code>.bashrc</code> can save a whole lot of keystrokes. We can take advantage of this in the literal sense by using <a target="_blank" href="https://www.gnu.org/software/bash/manual/html_node/Aliases.html">bash aliases</a>, or strings that expand to larger commands. For an indicative example, here is a Bash alias for copying files in the terminal:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Always copy contents of directories (r)ecursively and explain (v) what was done</span>
<span class="hljs-built_in">alias</span> cp=<span class="hljs-string">'cp -rv'</span>
</code></pre>
<p>The <code>alias</code> command defines the string we’ll type, followed by what that string will expand to. We can override existing commands like <code>cp</code> above. On its own, the <code>cp</code> command will only copy files, not directories, and succeeds silently. With this alias, we need not remember to pass those two flags, nor <code>cd</code> or <code>ls</code> the location of our copied file to confirm that it’s there! Now, just those two key presses (for <code>c</code> and <code>d</code>) will do all of that for us.</p>
<p>Here are a few more <code>.bashrc</code> aliases for passing flags with common functions.</p>
<pre><code class="lang-bash"><span class="hljs-comment"># List contents with colors for file types, (A)lmost all hidden files (without . and ..), in (C)olumns, with class indicators (F)</span>
<span class="hljs-built_in">alias</span> ls=<span class="hljs-string">'ls --color=auto -ACF'</span>
<span class="hljs-comment"># List contents with colors for file types, (a)ll hidden entries (including . and ..), use (l)ong listing format, with class indicators (F)</span>
<span class="hljs-built_in">alias</span> ll=<span class="hljs-string">'ls --color=auto -alF'</span>

<span class="hljs-comment"># Explain (v) what was done when moving a file</span>
<span class="hljs-built_in">alias</span> mv=<span class="hljs-string">'mv -v'</span>
<span class="hljs-comment"># Create any non-existent (p)arent directories and explain (v) what was done</span>
<span class="hljs-built_in">alias</span> mkdir=<span class="hljs-string">'mkdir -pv'</span>
<span class="hljs-comment"># Always try to (c)ontinue getting a partially-downloaded file</span>
<span class="hljs-built_in">alias</span> wget=<span class="hljs-string">'wget -c'</span>
</code></pre>
<p>Aliases come in handy when we want to avoid typing long commands, too. Here are a few I use when working with Python environments:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">alias</span> pym=<span class="hljs-string">'python3 manage.py'</span>
<span class="hljs-built_in">alias</span> mkenv=<span class="hljs-string">'python3 -m venv env'</span>
<span class="hljs-built_in">alias</span> startenv=<span class="hljs-string">'source env/bin/activate &amp;&amp; which python3'</span>
<span class="hljs-built_in">alias</span> stopenv=<span class="hljs-string">'deactivate'</span>
</code></pre>
<p>For further inspiration on ways Bash aliases can save time, I highly recommend <a target="_blank" href="https://www.digitalocean.com/community/tutorials/an-introduction-to-useful-bash-aliases-and-functions">the examples in this article</a>.</p>
<h1 id="heading-bash-functions">Bash functions</h1>
<p>One downside of the aliases above is that they’re rather static - they’ll always expand to exactly the text declared. For a Bash alias that takes arguments, we’ll need to create a function. We can do this like so:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Show contents of the directory after changing to it</span>
<span class="hljs-keyword">function</span> <span class="hljs-function"><span class="hljs-title">cd</span></span> () {
    <span class="hljs-built_in">builtin</span> <span class="hljs-built_in">cd</span> <span class="hljs-string">"<span class="hljs-variable">$1</span>"</span>
    ls -ACF
}
</code></pre>
<p>I can’t begin to tally how many times I’ve typed <code>cd</code> and then <code>ls</code> immediately after to see the contents of the directory I’m now in. With this function set up, it all happens with just those two letters! The function takes the first argument, <code>$1</code>, as the location to change directory to, then prints the contents of that directory in nicely formatted columns with file type indicators. The <code>builtin</code> part is necessary to get Bash to allow us to override this default command.</p>
<p>Bash functions are very useful when it comes to downloading or upgrading software, too. I previously spent at least a few minutes every couple weeks downloading the new extended version of the <a target="_blank" href="https://gohugo.io/categories/releases">static site generator Hugo</a>, thanks to their excellent shipping frequency. With a function, I only need to pass in the version, and the upgrade happens in a few seconds.</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Hugo install or upgrade</span>
<span class="hljs-keyword">function</span> <span class="hljs-function"><span class="hljs-title">gethugo</span></span> () {
    wget -q -P tmp/ https://github.com/gohugoio/hugo/releases/download/v<span class="hljs-string">"<span class="hljs-variable">$@</span>"</span>/hugo_extended_<span class="hljs-string">"<span class="hljs-variable">$@</span>"</span>_Linux-64bit.tar.gz
    tar xf tmp/hugo_extended_<span class="hljs-string">"<span class="hljs-variable">$@</span>"</span>_Linux-64bit.tar.gz -C tmp/
    sudo mv -f tmp/hugo /usr/<span class="hljs-built_in">local</span>/bin/
    rm -rf tmp/
    hugo version
}
</code></pre>
<p>The <code>$@</code> notation simply takes all the arguments given, replacing its spot in the function. To run the above function and download Hugo version 0.57.2, we use the command <code>gethugo 0.57.2</code>.</p>
<p>I’ve got one for <a target="_blank" href="https://golang.org/">Golang</a>, too:</p>
<pre><code class="lang-bash"><span class="hljs-keyword">function</span> <span class="hljs-function"><span class="hljs-title">getgolang</span></span> () {
    sudo rm -rf /usr/<span class="hljs-built_in">local</span>/go
    wget -q -P tmp/ https://dl.google.com/go/go<span class="hljs-string">"<span class="hljs-variable">$@</span>"</span>.linux-amd64.tar.gz
    sudo tar -C /usr/<span class="hljs-built_in">local</span> -xzf tmp/go<span class="hljs-string">"<span class="hljs-variable">$@</span>"</span>.linux-amd64.tar.gz
    rm -rf tmp/
    go version
}
</code></pre>
<p>Or how about a function that adds a remote origin URL for GitLab to the current repository?</p>
<pre><code class="lang-bash"><span class="hljs-keyword">function</span> <span class="hljs-function"><span class="hljs-title">glab</span></span> () {
    git remote set-url origin --add git@gitlab.com:<span class="hljs-string">"<span class="hljs-variable">$@</span>"</span>/<span class="hljs-string">"<span class="hljs-variable">${PWD##*/}</span>"</span>.git
    git remote -v
}
</code></pre>
<p>With <code>glab username</code>, we can create a new <code>origin</code> URL for the current Git repository with our <code>username</code> on GitLab.com. Pushing to a new remote URL <a target="_blank" href="https://victoria.dev/verbose/how-to-write-bash-one-liners-for-cloning-and-managing-github-and-gitlab-repositories/#a-bash-one-liner-to-create-and-push-many-repositories-on-gitlab">automatically creates a new private GitLab repository</a>, so this is a useful shortcut for creating backups!</p>
<p>Bash functions are really only limited by the possibilities of scripting, of which there are, practically, few limits. If there’s anything we do on a frequent basis that requires typing a few lines into a terminal, we can probably create a Bash function for it!</p>
<h1 id="heading-bash-prompt">Bash prompt</h1>
<p>Besides directory contents, it’s also useful to see the full path of the directory we’re in. The Bash prompt can show us this path, along with other useful information like our current Git branch. To make it more readable, we can define colours for each part of the prompt. Here’s how we can set up our prompt in <code>.bashrc</code> to accomplish this:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Colour codes are cumbersome, so let's name them</span>
txtcyn=<span class="hljs-string">'\[\e[0;96m\]'</span> <span class="hljs-comment"># Cyan</span>
txtpur=<span class="hljs-string">'\[\e[0;35m\]'</span> <span class="hljs-comment"># Purple</span>
txtwht=<span class="hljs-string">'\[\e[0;37m\]'</span> <span class="hljs-comment"># White</span>
txtrst=<span class="hljs-string">'\[\e[0m\]'</span>    <span class="hljs-comment"># Text Reset</span>

<span class="hljs-comment"># Which (C)olour for what part of the prompt?</span>
pathC=<span class="hljs-string">"<span class="hljs-variable">${txtcyn}</span>"</span>
gitC=<span class="hljs-string">"<span class="hljs-variable">${txtpur}</span>"</span>
pointerC=<span class="hljs-string">"<span class="hljs-variable">${txtwht}</span>"</span>
normalC=<span class="hljs-string">"<span class="hljs-variable">${txtrst}</span>"</span>

<span class="hljs-comment"># Get the name of our branch and put parenthesis around it</span>
<span class="hljs-function"><span class="hljs-title">gitBranch</span></span>() {
    git branch 2&gt; /dev/null | sed -e <span class="hljs-string">'/^[^*]/d'</span> -e <span class="hljs-string">'s/* \(.*\)/(\1)/'</span>
}

<span class="hljs-comment"># Build the prompt</span>
<span class="hljs-built_in">export</span> PS1=<span class="hljs-string">"<span class="hljs-variable">${pathC}</span>\w <span class="hljs-variable">${gitC}</span>\$(gitBranch) <span class="hljs-variable">${pointerC}</span>\$<span class="hljs-variable">${normalC}</span> "</span>
</code></pre>
<p>Result:</p>
<pre><code class="lang-bash">~/github/myrepo (master) $
</code></pre>
<p>Naming the colours helps to easily identify where one colour starts and stops, and where the next one begins. The prompt that we see in our terminal is defined by the string following <code>export PS1</code>, with each component of the prompt set with an <a target="_blank" href="https://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/bash-prompt-escape-sequences.html">escape sequence</a>. Let’s break that down:</p>
<ul>
<li><code>\w</code> displays the current working directory,</li>
<li><code>\$(gitBranch)</code> calls the <code>gitBranch</code> function defined above, which displays the current Git branch,</li>
<li><code>\$</code> will display a “$” if you are a normal user or in normal user mode, and a “#” if you are root.</li>
</ul>
<p>The <a target="_blank" href="https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html">full list of Bash escape sequences</a> can help us display many more bits of information, including even the time and date! Bash prompts are highly customizable and individual, so feel free to set it up any way you please.</p>
<p>Here are a few options that put information front and centre and can help us to work more efficiently.</p>
<h2 id="heading-for-the-procrastination-averse">For the procrastination-averse</h2>
<p>Username and current time with seconds, in 24-hour HH:MM:SS format:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">export</span> PS1=<span class="hljs-string">"<span class="hljs-variable">${userC}</span>\u <span class="hljs-variable">${normalC}</span>at \t &gt;"</span>
</code></pre>
<pre><code>user at <span class="hljs-number">09</span>:<span class="hljs-number">35</span>:<span class="hljs-number">55</span> &gt;
</code></pre><h2 id="heading-for-those-who-always-like-to-know-where-they-stand">For those who always like to know where they stand</h2>
<p>Full file path on a separate line, and username:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">export</span> PS1=<span class="hljs-string">"<span class="hljs-variable">${pathC}</span>\w<span class="hljs-variable">${normalC}</span>\n\u:"</span>
</code></pre>
<pre><code>~<span class="hljs-regexp">/github/my</span>repo
<span class="hljs-attr">user</span>:
</code></pre><h2 id="heading-for-the-minimalist">For the minimalist</h2>
<pre><code class="lang-bash"><span class="hljs-built_in">export</span> PS1=<span class="hljs-string">"&gt;"</span>
</code></pre>
<pre><code>&gt;
</code></pre><p>We can build many practical prompts with just the basic escape sequences; once we start to integrate functions with prompts, as in the Git branch example, things can get really complicated. Whether this amount of complication is an addition or a detriment to your productivity, only you can know for sure!</p>
<p>Many fancy Bash prompts are possible with programs readily available with a quick search. I’ve intentionally not provided samples here because, well, if you can tend to get as excited about this stuff as I can, it might be a couple hours before you get back to what you were doing before you started reading this post, and I just can’t have that on my conscience. ?</p>
<p>We’ve hopefully struck a nice balance now between time invested and usefulness gained from our Bash configuration file! I hope you use your newly-recovered keystroke capacity for good.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ 5 Awesome Terminal Tricks to Help You Level Up as a Developer ]]>
                </title>
                <description>
                    <![CDATA[ By Jackson Bates There are plenty of beginner tutorials around that help you learn command line basics, such as cd, ls, pwd and so on...but what about that fancy magic you've seen more experienced developers use? Here are my five favourite terminal c... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/terminal-tricks/</link>
                <guid isPermaLink="false">66d45f483a8352b6c5a2aa8a</guid>
                
                    <category>
                        <![CDATA[ command line ]]>
                    </category>
                
                    <category>
                        <![CDATA[ terminal ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 21 Aug 2019 03:04:36 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/08/termtrick.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Jackson Bates</p>
<p>There are plenty of beginner tutorials around that help you learn command line basics, such as <code>cd</code>, <code>ls</code>, <code>pwd</code> and so on...but what about that fancy magic you've seen more experienced developers use?</p>
<p>Here are my five favourite terminal commands and utilities (in no particular order), to help you feel like the wizard you aspire to be! This is based on Ubuntu, but should be similar across other platforms (with maybe a little Googling). </p>
<p>If you want to mention how to achieve similar results on MacOS or Windows, or there are other terminal tricks you would like to share, let me know in the comments below.</p>
<p><em>This is adapted from my recent <a target="_blank" href="https://www.youtube.com/watch?v=CmNTuq7M71U">YouTube video</a>, which you can view to see these tricks in action!</em></p>
<h2 id="heading-sudo">sudo !!</h2>
<p><code>sudo !!</code> (or as I like to shout SUDO BANG BANG) will repeat the last command you typed, but with <code>sudo</code> in front of it.</p>
<p>If you have ever forgotten to use your <code>sudo</code> privilege when doing something that needs your administrator credentials (such as <code>apt update</code>for example), then <code>sudo !!</code> is a handy way to correct it without having to type the whole command again.</p>
<h2 id="heading-tig">tig</h2>
<p><code>tig</code> and <code>tig status</code> are probably the tools I use most often in my day-to-day work.</p>
<p>The eagle-eyed among you may have noticed that this is <code>git</code> spelled backwards, and indeed <code>tig</code> is an excellent git utility.</p>
<p>One of gits shortcomings for me is the lack of interactivity available in some of the basic actions. For example, while <code>git log</code> and <code>git status</code> give me useful information, it requires more manual git commands to do anything useful with that information.</p>
<p><code>tig</code> acts like <code>git log</code>, but allows you to navigate up and down the log, and examine the contents of each commit from the command line.</p>
<p><code>tig status</code> acts like <code>git status</code> except that it also allows for the same navigation as <code>tig</code>, and it also allows you to add files to staging easily from the command line.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/08/tig.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Both commands can be navigated using the <code>j</code> and <code>k</code> keys to move up and down, and pressing <code>enter</code> will open the information about the file (such as the commit diff). <code>q</code> also exits out of each command.</p>
<p>To add or remove specific files from your staging area in git, simply press <code>u</code>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/08/tigstatus.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Now when you go to <code>git commit...</code> as usual, your  files have already been added, so no need to use the <code>git add</code> command.</p>
<h2 id="heading-grep">grep</h2>
<p>This is a very well known 'trick' but it's incredibly useful all the same.</p>
<p><code>grep</code> allows you to return the relevant lines from text output that match a particular pattern you pass it.</p>
<p>For example, if you are looking in a long <code>.log</code> file for an error, it can be hard to see amongst all irrelevant output. Grep can narrow down your search to only the relevant lines.</p>
<p>E.g. <code>grep error system.log</code></p>
<p>With other commands that produce lots of terminal output, you can pipe it to <code>grep error</code> to do the same. For example, if you wanted to look at your Rails routes, but you were only interested in those related to admin you could do this:</p>
<p><code>rake routes | grep admin</code> </p>
<h2 id="heading-history">history</h2>
<p><code>history</code> simply returns every command you have ever typed into your terminal. Why is this useful? Well, if, like me, you are super forgetful, the <code>history</code> command can show you what you've done before to jog your memory.</p>
<p>For example, whenever I have to restore a database back-up, I can never remember the syntax. <code>history | grep pg_restore</code> will show me every time I've used the <code>pg_restore</code> command, with the exact flags and arguments I had to use.</p>
<p>Notice the use of <code>grep</code> to narrow down the search? Work smart, not hard!</p>
<h2 id="heading-spd-say">spd-say</h2>
<p>This one can be achieved a number of ways, and with various tools on each platform. <code>spd-say</code> is the default Ubuntu text-to-speech utility.</p>
<p>Using your terminal's ability to chain commands, you can use your speech utility tool of choice to tell you when a long running process has finished.</p>
<p>Example: <code>sudo apt update; spd-say done</code> </p>
<p>Notice the <code>;</code> between the commands? This will basically run the <code>apt update</code> to completion and then invoke the next command. In this case it will helpfully say 'done' when it's finished. </p>
<p>Feel free to make it say 'booyah!' if you feel like your day needs more celebrations of tiny wins in it.</p>
<hr>
<h2 id="heading-share-yours-with-me">Share yours with me!</h2>
<p>Devs love two things: laptop stickers and snazzy terminal commands. I've run out of room for stickers, but I'd love to hear your favourite terminal commands in the comments below!</p>
<p>You can also connect with me on Twitter <a target="_blank" href="https://twitter.com/jacksonbates">@JacksonBates</a></p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
