<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ahmed Bouchefra</title>
    <description>The latest articles on Forem by Ahmed Bouchefra (@programmerspace).</description>
    <link>https://forem.com/programmerspace</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F36617%2F1b47ffb9-d3d0-486d-b67d-67340f4a61dc.jpg</url>
      <title>Forem: Ahmed Bouchefra</title>
      <link>https://forem.com/programmerspace</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/programmerspace"/>
    <language>en</language>
    <item>
      <title>16 API Concepts You Need to Master</title>
      <dc:creator>Ahmed Bouchefra</dc:creator>
      <pubDate>Sat, 28 Feb 2026 22:30:37 +0000</pubDate>
      <link>https://forem.com/programmerspace/16-api-concepts-you-need-to-master-48d0</link>
      <guid>https://forem.com/programmerspace/16-api-concepts-you-need-to-master-48d0</guid>
      <description>&lt;p&gt;Hey readers,&lt;/p&gt;

&lt;p&gt;I still remember my first “real” system design interview. I was ready to code algorithms, but then the interviewer asked me how I’d handle a payment retry without charging the customer twice. &lt;/p&gt;

&lt;p&gt;I froze. I knew &lt;em&gt;how&lt;/em&gt; to write code, but I didn’t fully grasp the architectural glue that holds big systems together.&lt;/p&gt;

&lt;p&gt;That glue is APIs.&lt;/p&gt;

&lt;p&gt;APIs look messy when you stare at a massive distributed system diagram. But here’s the secret: the whole thing usually boils down to a handful of core ideas. &lt;/p&gt;

&lt;p&gt;Once you get these sixteen concepts down, you stop seeing “complexity” and start seeing patterns.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can get the post as PDF file from &lt;a href="https://10xdev.blog/16-api-concepts-you-need-to-master/" rel="noopener noreferrer"&gt;https://10xdev.blog/16-api-concepts-you-need-to-master/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Whether you are preparing for a backend interview or trying to explain to a junior dev why we can’t just “return all the data at once,” this guide is for you.&lt;/p&gt;

&lt;p&gt;This a breakdown of 16 essential API concepts every software engineer should understand, followed by clear explanations for each.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://substackcdn.com/image/fetch/$s_!C1l2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3589b28-faf1-4249-a956-6c410326a9bb_2816x1536.png" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Let’s get into the mechanics of how modern systems actually talk to each other.&lt;/p&gt;




&lt;h2&gt;
  
  
  The “Big Three” Communication Styles
&lt;/h2&gt;

&lt;p&gt;Before we worry about data formats or security, we have to decide how our servers are going to exchange information.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;There isn’t a single “best” way, just the right tool for the job.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  1. REST (The Reliable Standard)
&lt;/h3&gt;

&lt;p&gt;Think of REST (Representational State Transfer) as the plain English of the web. It’s what you’ll see 90% of the time. A REST API lets a client talk to a server using standard HTTP actions that actually mean what they say.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GET:&lt;/strong&gt; “Give me this data.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;POST:&lt;/strong&gt; “Create this new thing.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;PUT:&lt;/strong&gt; “Update this existing thing.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DELETE:&lt;/strong&gt; “Get rid of this.”&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Imagine an online bookstore. You hit &lt;strong&gt;GET /books&lt;/strong&gt; to see the catalog. You hit &lt;strong&gt;POST /books&lt;/strong&gt; to add a new title. It’s predictable. Each URL is a specific “resource” (like a user or a product), and the server usually hits you back with &lt;strong&gt;JSON&lt;/strong&gt;. Because it works across browsers, mobile apps, and backends without fuss, it’s usually the default choice for public APIs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://substackcdn.com/image/fetch/$s_!_fo2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2995b997-1234-4960-9b6c-b843e7fd23af_1818x1917.png" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;h3&gt;
  
  
  2. GraphQL (The “Picky Eater”)
&lt;/h3&gt;

&lt;p&gt;REST is great, but it has a habit of over-sharing. You ask for a user’s profile, and it sends you their name, address, shoe size, and purchase history—even if you just wanted their name.&lt;/p&gt;

&lt;p&gt;GraphQL changes that dynamic. It lets the client ask for &lt;em&gt;exactly&lt;/em&gt; what it needs, and nothing else.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Say you’re building a mobile app. Bandwidth is tight. Instead of making three different REST calls to get a user’s name, their last order, and their wishlist, you send one GraphQL query. You define the shape of the data, and the server fills it in. This cuts down on round trips and keeps your mobile app snappy.  &lt;/p&gt;

&lt;h3&gt;
  
  
  3. gRPC (The Speed Demon)
&lt;/h3&gt;

&lt;p&gt;If REST is a polite conversation and GraphQL is a specific order, gRPC is a high-speed binary stream. It’s rarely used in browsers but is a powerhouse for backend services talking to other backend services.&lt;/p&gt;

&lt;p&gt;It uses &lt;strong&gt;Protobufs&lt;/strong&gt; (Protocol Buffers) instead of text-based JSON. This binary data is tiny and incredibly fast to parse.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;When to use it:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I worked on a system once where a recommendation engine had to talk to a ranking service thousands of times. JSON was too slow. We switched to gRPC, and the latency dropped like a rock. It supports streaming and strict type checks, making it safer and faster for internal microservices.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Gatekeepers: Control &amp;amp; Security
&lt;/h2&gt;

&lt;p&gt;Once your API is live, you can’t just let anyone walk in and do whatever they want. You need bouncers.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. API Gateway
&lt;/h3&gt;

&lt;p&gt;In a microservices architecture, you might have fifty different services (Billing, Users, Inventory, Shipping). You definitely don’t want your mobile app trying to keep track of many addresses.&lt;/p&gt;

&lt;p&gt;An API Gateway is the single entry point. It sits in front of everything.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Routing:&lt;/strong&gt; It sends the request to the right service.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Security:&lt;/strong&gt; It handles the login check so the individual services don’t have to.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Housekeeping:&lt;/strong&gt; It handles rate limits and logging.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It keeps your backend organized and your clients happy because they only need to know one URL.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://substackcdn.com/image/fetch/$s_!_M0N!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbe4e483-1f9d-489d-823e-1951adf04713_1986x1137.png" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;h3&gt;
  
  
  5. Authentication (Who are you?)
&lt;/h3&gt;

&lt;p&gt;This is security step one. Authentication is simply the system asking, “ID, please.” We usually verify this using tokens (like JWTs), passwords, or API keys.&lt;/p&gt;

&lt;p&gt;If you don’t have a valid token, you don’t get in. The request is rejected immediately (usually with a 401 status code) before it even touches any business logic.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://substackcdn.com/image/fetch/$s_!d-oD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36fc9584-8861-40a6-bee0-61c29ae3d352_2184x2193.png" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;h3&gt;
  
  
  6. Authorization (What are you allowed to do?)
&lt;/h3&gt;

&lt;p&gt;Here is where people get mixed up. Authentication says you &lt;em&gt;are&lt;/em&gt; John Doe. Authorization says what John Doe is &lt;em&gt;allowed&lt;/em&gt; to touch.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;The difference:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I might log in (Authentication successful), but if I try to delete the production database, the system stops me (Authorization failed).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Regular User:&lt;/strong&gt; Can edit their own profile.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Admin&lt;/strong&gt;: Can edit any profile.&lt;/p&gt;

&lt;p&gt;Both are authenticated, but their permissions differ.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  7. Rate Limiting
&lt;/h3&gt;

&lt;p&gt;Imagine your service is a nightclub with a fire code capacity. Rate limiting restricts how many requests a user can send in a specific timeframe (e.g., 100 requests per minute).&lt;/p&gt;

&lt;p&gt;If a user—or a bot—tries to hammer your API with 1,000 requests in a second, the rate limiter steps in and blocks the extras.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is non-negotiable for public APIs to prevent abuse and keep costs in check.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  8. Throttling
&lt;/h3&gt;

&lt;p&gt;Throttling is the polite cousin of rate limiting. Instead of slamming the door shut when a user sends too many requests, the server just slows them down.&lt;/p&gt;

&lt;p&gt;The logic:&lt;/p&gt;

&lt;p&gt;If a client is sending too much traffic, we might delay their response by a few hundred milliseconds. It tells the client, “Hey, back off a bit,” without completely breaking their functionality. It maintains fair usage across the system.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Performance &amp;amp; Reliability (The “Safety Nets”)
&lt;/h2&gt;

&lt;p&gt;Things go wrong in distributed systems. Networks fail. Servers hang. Here is how we handle the chaos.&lt;/p&gt;

&lt;h3&gt;
  
  
  9. Idempotency
&lt;/h3&gt;

&lt;p&gt;This is the concept I messed up in that interview. Idempotency guarantees that if you make the same request multiple times, the result is the same as if you made it once.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Why it saves you:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A user is on a shaky subway connection. They hit “Pay Now.” The request goes through, but the confirmation response gets lost. The user panics and hits “Pay Now” again.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Without Idempotency:&lt;/strong&gt; You just charged them twice. Support ticket incoming.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;With Idempotency:&lt;/strong&gt; The server sees the same “Idempotency Key” (a unique ID for that transaction), realizes it already processed this payment, and just returns the success message again without charging the card.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://substackcdn.com/image/fetch/$s_!ubZe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febc0ad5f-6204-47d0-825c-0a5dec8a3645_3142x2103.png" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;h3&gt;
  
  
  10. Timeouts
&lt;/h3&gt;

&lt;p&gt;Never let a request wait forever. A “timeout” is a rule that says, “If this database doesn’t answer in 2 seconds, give up.”&lt;/p&gt;

&lt;p&gt;If you don’t have timeouts, a slow service can cause a pile-up. One stuck request becomes ten, then a thousand, and suddenly your whole system runs out of threads and crashes. Timeouts free up resources so the rest of the system stays alive.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://substackcdn.com/image/fetch/$s_!UNf6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F770fd38c-5fe3-428d-86e5-652063407605_2202x1923.png" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;h3&gt;
  
  
  11. Caching Headers
&lt;/h3&gt;

&lt;p&gt;The fastest request is the one you don’t have to make. Caching headers tell the client (or a proxy) how long they can keep a copy of the data.&lt;/p&gt;

&lt;p&gt;If you send &lt;code&gt;Cache-Control: max-age=3600&lt;/code&gt;, you are telling the browser, “This data is good for an hour. Don’t bother asking me for it again until then.” This drastically reduces the load on your servers and makes the app feel instant for the user.  &lt;/p&gt;

&lt;h3&gt;
  
  
  12. Pagination
&lt;/h3&gt;

&lt;p&gt;You have 50,000 products in your database. If someone hits &lt;code&gt;GET /products&lt;/code&gt;, and you try to return all of them at once, your server will choke, and the user’s browser will crash trying to render it.&lt;/p&gt;

&lt;p&gt;Pagination breaks that data into chunks (pages). You send the first 20 items. If they want more, they ask for page 2. It saves memory and bandwidth.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Mechanics: Speaking the Language
&lt;/h2&gt;

&lt;p&gt;Finally, let’s look at the nuts and bolts of the data exchange.&lt;/p&gt;

&lt;h3&gt;
  
  
  13. JSON (JavaScript Object Notation)
&lt;/h3&gt;

&lt;p&gt;XML used to be the king, but JSON took the throne because it is readable by humans. It stores data in key-value pairs: &lt;code&gt;{”id”: 1, “name”: “Alex”}&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It is lightweight, parses easily in every major programming language, and is the default response format for almost every modern API.  &lt;/p&gt;

&lt;h3&gt;
  
  
  14. HTTP Status Codes
&lt;/h3&gt;

&lt;p&gt;These are the traffic lights of the web. They tell the client instantly what happened, so they don’t have to parse the body of the response to guess.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;200s (Success):&lt;/strong&gt; “We’re good.” (200 OK, 201 Created).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;400s (Client Error):&lt;/strong&gt; “You messed up.” (400 Bad Request, 401 Unauthenticated, 404 Not Found).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;500s (Server Error):&lt;/strong&gt; “I messed up.” (500 Internal Server Error).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  15. Webhooks
&lt;/h3&gt;

&lt;p&gt;Most APIs are “poll” based—you keep asking, “Is there new data?”&lt;/p&gt;

&lt;p&gt;Webhooks flip this. They are “push” based. You tell the server, “Here is my URL. Call me when something happens.”&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Stripe (payments) uses this heavily. Instead of your server asking Stripe every second “Did the user pay yet?”, Stripe sends a message to your webhook URL the moment the payment succeeds. It makes systems real-time and event-driven.  &lt;/p&gt;

&lt;h3&gt;
  
  
  16. Versioning
&lt;/h3&gt;

&lt;p&gt;You built a great API. Now you need to change it. But if you change the data structure, you will break the mobile app that people haven’t updated yet.&lt;/p&gt;

&lt;p&gt;Versioning solves this. you keep &lt;code&gt;v1&lt;/code&gt; running for the old apps while you launch &lt;code&gt;v2&lt;/code&gt; for the new ones.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;v1:&lt;/strong&gt; Returns just a name.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;v2: Returns name, photo, and bio.&lt;/p&gt;

&lt;p&gt;It allows you to improve your system without breaking the experience for legacy users.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Big Picture: How It All Connects
&lt;/h2&gt;

&lt;p&gt;Now that we have the pieces, here is what a modern system actually looks like when you put them together.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://substackcdn.com/image/fetch/$s_!G-5_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78796310-2271-4074-b09d-6ff3ff5f3837_2754x2227.png" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;h3&gt;
  
  
  So, what’s the next move?
&lt;/h3&gt;

&lt;p&gt;These concepts are the building blocks. You don’t need to implement all of them tomorrow, but you do need to spot them when you see them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here is a challenge for you:&lt;/strong&gt; Open up the “Network” tab in your browser right now (F12) and refresh this page. Look at the API calls. Can you spot the &lt;strong&gt;Status Codes&lt;/strong&gt;? Do you see any &lt;strong&gt;Caching Headers&lt;/strong&gt;? Are they using &lt;strong&gt;GraphQL&lt;/strong&gt; or &lt;strong&gt;REST&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;Once you start looking, you’ll see these patterns everywhere.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Bou~codes and Naima from 10xdev blog.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is a diagram to help you remember all those 16 concepts:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://substackcdn.com/image/fetch/$s_!JhKJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac696183-9b4d-493f-aaf8-b34105296ecb_1218x1958.png" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  PDF Roadmaps:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://10xdev.blog/Guide-AI-Agents.pdf" rel="noopener noreferrer"&gt;A PDF Guide for Learning AI Agents&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://10xdev.blog/Guide-FrontEnd.pdf" rel="noopener noreferrer"&gt;A PDF Guide for Learning Frontend Development&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://10xdev.blog/Guide-JavaScript.pdf" rel="noopener noreferrer"&gt;A PDF guide for becoming a JavaScript Developer.&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://10xdev.blog/Guide-Backend.pdf" rel="noopener noreferrer"&gt;A PDF guide for becoming a Backend Developer.&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>api</category>
      <category>softwareengineering</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>10xDev Newsletter #1: Vibe Coding, Clone UIs with AI; LynxJS; New Angular 19, React 19, Laravel 12 Features</title>
      <dc:creator>Ahmed Bouchefra</dc:creator>
      <pubDate>Fri, 21 Mar 2025 22:05:08 +0000</pubDate>
      <link>https://forem.com/programmerspace/10xdev-newsletter-1-vibe-coding-clone-uis-with-ai-lynxjs-new-angular-19-react-19-laravel-12-16g9</link>
      <guid>https://forem.com/programmerspace/10xdev-newsletter-1-vibe-coding-clone-uis-with-ai-lynxjs-new-angular-19-react-19-laravel-12-16g9</guid>
      <description>&lt;p&gt;&lt;strong&gt;💬 Curious to know where the future of coding is really heading? Let’s dive into what’s shaping the next generation of developers.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Curated and comments by &lt;a href="https://substack.com/@naimacodes" rel="noopener noreferrer"&gt;Naima&lt;/a&gt; and &lt;a href="https://substack.com/@boucodes" rel="noopener noreferrer"&gt;Bou Codes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In this first issue, we’ll see:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;AI tools that are helping devs &lt;strong&gt;clone any UI&lt;/strong&gt; and &lt;strong&gt;build software&lt;/strong&gt; almost &lt;strong&gt;autonomously&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The rise of &lt;strong&gt;vibe coding&lt;/strong&gt;—what it means, how prompt engineering is changing everything, and how to ride the AI wave as a developer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TikTok is releasing a high-performance cross-platform mobile framework for building apps with just markup and CSS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A new &lt;strong&gt;Python&lt;/strong&gt; framework inspired by Flutter is quietly redefining cross-platform development. &lt;strong&gt;You need to check if you are a pythonista!&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Single Executable Apps&lt;/strong&gt; with Node.js.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;New features of Angular 19 and React 19 are here—what’s new and what matters.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Learn how to run Angular applications without a build step using ES modules and &lt;strong&gt;TypeScript in the browser.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Laravel 12 introduces &lt;strong&gt;Custom Starter Kits&lt;/strong&gt;—to build faster, cleaner, and in your way.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Windows 95, running in an Electron app with JavaScript.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;EA released the source code of classic C&amp;amp;C titles like Tiberian Dawn, Red Alert, Renegade, and Generals&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Local-first apps is more than a trend—it’s the future.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A TypeScript version that’s &lt;em&gt;10x faster&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And why the traditional “full-time dev” job might soon be a thing of the past...&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AI fakers exposed in tech dev recruitment: &lt;em&gt;Candidate used an AI face filter to pass a video interview.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Roblox announced the launch of an AI tool to &lt;strong&gt;generate 3D models&lt;/strong&gt; using simple text prompts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Python Developer Tooling Handbook.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The entire history of software engineering is that of the rise in levels of abstraction.&lt;/em&gt; &lt;strong&gt;Grady Booch.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;💬 &lt;strong&gt;&lt;em&gt;We hope you will enjoy these readings as we did!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;💬 Let’s dive in →&lt;/p&gt;










&lt;h2&gt;
  
  
  Good to Read or Watch (Handpicked for Devs by Devs)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://levelup.gitconnected.com/the-5-paid-subscriptions-i-actually-use-in-2025-as-a-staff-software-engineer-98033c94566e" rel="noopener noreferrer"&gt;&lt;strong&gt;The 5 paid subscriptions I actually use in 2025 as a Staff Software Engineer&lt;/strong&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Author:&lt;/strong&gt; &lt;em&gt;I care a lot about the tools I use. Especially when they aren’t free. Here’s what I’m paying for in 2025 to improve my performance and productivity as a software engineer.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 Investing in the right tools is the fastest way to &lt;strong&gt;compound your efficiency&lt;/strong&gt;. Think of these like leverage—if a tool saves you 30 minutes/day, it is going to pay for itself afterwards.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;🎞️&lt;/strong&gt; &lt;a href="https://www.youtube.com/watch?v=cBKHkm_rt4I&amp;amp;ab_channel=ThrivingTechnologist" rel="noopener noreferrer"&gt;&lt;strong&gt;Helping a Dev Manager Focus on ACTION—Not Fear&lt;/strong&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Jamie coaches Ben, an engineering manager debating solopreneurship. They explore how to navigate fear and take smart action without burning bridges.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 If you're thinking about making the jump from 9-to-5 to indie hacking, this is gold. Emotional agility is a core skill in &lt;strong&gt;devneurship&lt;/strong&gt;—calm minds ship bold ideas.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  More…
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://rxdb.info/articles/local-first-future.html" rel="noopener noreferrer"&gt;Why Local-First Software Is the Future and what are its Limitations&lt;/a&gt;: &lt;em&gt;Building with local-first in mind could future-proof your apps. Especially relevant for indie devs targeting emerging markets or privacy-first users.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://devblogs.microsoft.com/typescript/typescript-native-port/" rel="noopener noreferrer"&gt;A 10x Faster TypeScript&lt;/a&gt;: &lt;em&gt;Today I’m excited to announce the next steps we’re taking to radically improve TypeScript performance. by Anders Hejlsberg.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://medium.com/gitconnected/why-full-time-developer-career-is-becoming-dead-and-what-s-replacing-it-1c661af09e57" rel="noopener noreferrer"&gt;Why ‘Full-Time Developer’ Career Is Becoming Dead — And What’s Replacing It&lt;/a&gt;: &lt;em&gt;Being a full-time developer used to be the ultimate career goal. A stable job, fat paycheck, and a path paved with endless coding challenges — but that dream is dying.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dev.to/this-is-learning/building-single-executable-applications-with-nodejs-16k3"&gt;Building Single Executable Applications with Node.js&lt;/a&gt;: &lt;em&gt;In this article, I'm sharing what I've learned about&lt;/em&gt; &lt;strong&gt;&lt;em&gt;Single Executable Applications&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;, a feature that fundamentally shifts how we package and distribute Node.js applications.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://2ality.com/2025/03/typescript-sales-pitch.html" rel="noopener noreferrer"&gt;&lt;strong&gt;My sales pitch for TypeScript&lt;/strong&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 Still debating TS? This might convert you. It’s about more than safety—it’s a tool for better collaboration and fewer bugs, aka &lt;strong&gt;faster shipping&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://dev.to/mnathani/two-lines-of-css-that-boosts-7x-rendering-performance-4mjd"&gt;Two lines of CSS that boosts 7x rendering performance!&lt;/a&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 Tiny tweaks like this give your UI that buttery-smooth feel. &lt;strong&gt;Craftsmanship = growth&lt;/strong&gt;, especially when you're building solo.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://modernwebweekly.substack.com/p/modern-web-weekly-49" rel="noopener noreferrer"&gt;&lt;strong&gt;Finally, a customizable&lt;/strong&gt;&lt;/a&gt; &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Author:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;After what seemed like an eternity, it looks like we'll finally get a fully stylable and customizable&lt;/em&gt; &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; &lt;em&gt;on the web. I know, we should have had this 20 years ago. Standards take time and this took a long time.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;💬 User experience matters. Now there's no excuse for clunky UI.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;







&lt;h2&gt;
  
  
  What’s New in Dev World
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🎧 &lt;strong&gt;Vibe Coding: The New Abstraction Layer&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 A new concept called &lt;strong&gt;vibe coding (or programming by prompt)&lt;/strong&gt; is trending in the developer community. The term was coined by Andrej Karpathy in early 2025 to describe “fully giving in to the vibes” and almost forgetting that the code exists​:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Andrej Karpathy on X:&lt;/strong&gt; &lt;em&gt;There's a new kind of coding I call "vibe coding", where you fully give in to the vibes, embrace exponentials, and forget that the code even exists. I'm building a project or web app, but it's not really coding - I just see stuff, say stuff, run stuff, and copy paste stuff, and it mostly works.&lt;/em&gt; &lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 From early programming languages to modern frameworks and AI-assisted coding, the history of software development has been a continuous march toward higher levels of abstraction. Vibe coding is simply the latest step in that progression.&lt;/p&gt;

&lt;p&gt;💬 Just like GUIs abstracted terminals, vibe coding abstracts code. &lt;strong&gt;Indie devs who master this will out-ship teams.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://creatoreconomy.so/p/12-rules-to-vibe-code-without-frustration" rel="noopener noreferrer"&gt;12 Rules to Vibe Code Without Frustration&lt;/a&gt;: &lt;em&gt;I’ve spent 50+ hours building apps with AI (e.g., plane simulator, Star Wars run, zombie shooter) and collected 200+ tips.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 Think of this like the &lt;strong&gt;Zen of AI Dev&lt;/strong&gt;. If you want to vibe code without chaos, start here.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dev.to/vorniches/vibe-coding-yeah-ive-been-doing-it-for-two-years-ea2?ahoy_click=true&amp;amp;t=VAL5H9ZgG7elyeCZHB9pfz7d47QLiYqc&amp;amp;s=fRsl5Hgo2ymHFRXL0KHDa1gf4dHO1Ugt3DMoEisJX94&amp;amp;u=https%253A%252F%252Fdev.to%252Fvorniches%252Fvibe-coding-yeah-ive-been-doing-it-for-two-years-ea2"&gt;Vibe Coding? Yeah, I've Been Doing it for Two Years&lt;/a&gt;: &lt;em&gt;Not long ago, I stumbled across the term "vibe coding" and was kinda blown away. Turns out, the way I've been slapping together my apps for the last two years – with minimal hand-written code and maximum automation via neural networks – now has a trendy name. In this post, I'll share my tools for pair programming with AI and some thoughts on where this whole thing is heading.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;🎞️&lt;/strong&gt; &lt;a href="https://x.com/i/broadcasts/1ZkKzYanozoxv" rel="noopener noreferrer"&gt;&lt;strong&gt;LynxJS: First Impressions, Live Coding &amp;amp; What’s Under the Hood&lt;/strong&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;This talk discusses ByteDance’s new JavaScript framework, LynxJS, which is already in production for millions of users. It highlights Lynx’s performance, its framework-agnostic nature, and potential impact on the React Native ecosystem. The framework is polished for an early release, but questions remain about native module support. Early adopters have an opportunity to shape its development.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 ByteDance, the company behind TikTok, has released &lt;a href="https://lynxjs.org/index.html?ref=tuliocalil.com" rel="noopener noreferrer"&gt;&lt;strong&gt;Lynx&lt;/strong&gt;&lt;/a&gt;, a new framework that has a goal to revolutionize mobile app development, positioning itself as a competitor to React Native. &lt;strong&gt;Worth keeping an eye on if you’re building mobile-first.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.callstack.com/blog/were-building-a-new-react-native-framework" rel="noopener noreferrer"&gt;We’re Building a New React Native Framework&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;This new React Native framework speeds up enterprise app development with smart native build caching on CI with ability to reuse these builds across workflows, end-to-end tests, and local developers environments thanks to integrated CLI—all while staying flexible and self-hosted.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 This is a gift for startup founders and indie makers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  More..
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://astro.build/blog/astro-550/" rel="noopener noreferrer"&gt;Astro 5.5 - Type-safe sessions, better Mermaid diagrams integration&lt;/a&gt;: Astro 5.5 dives deep with better support for diagramming tools, improved Markdown compatibility, and type-safe sessions!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://nodejs.org/en/blog/announcements/official-discord-launch-announcement" rel="noopener noreferrer"&gt;Node.js Launches Official Community Space on Discord&lt;/a&gt;: The OpenJS Foundation and Reactiflux have collaborated to bring forth an official Discord community for Node.js 🎉&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 The dev world isn’t slowing down. Staying updated = staying &lt;strong&gt;relevant and hireable&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  What’s New in Tech World
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 An Adobe survey of 5,000 US consumers found that &lt;strong&gt;55%&lt;/strong&gt; use AI for research, &lt;strong&gt;39%&lt;/strong&gt; for shopping, and &lt;strong&gt;53%&lt;/strong&gt; plan to start using it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;🎞️ &lt;a href="https://www.youtube.com/watch?v=wrvWlFx1veY&amp;amp;ab_channel=PromptEngineering" rel="noopener noreferrer"&gt;Google Gemini 2.0 Flash is insane&lt;/a&gt; : &lt;em&gt;Edit images by prompt. Remove watermarks. Wild!&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 If you're building content products, this is your new &lt;strong&gt;creative co-pilot&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://newsletter.pragmaticengineer.com/p/ai-fakers" rel="noopener noreferrer"&gt;AI fakers exposed in tech dev recruitment: postmortem&lt;/a&gt;: &lt;em&gt;Candidate used an AI face filter to pass a video interview. Wild!&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://github.com/antiwork/helper" rel="noopener noreferrer"&gt;Helper.ai&lt;/a&gt;: &lt;em&gt;Helper is an open-source AI-powered customer support automation platform. Manage all support from one place with AI help.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 If you’re solo-building and dread support emails.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://corp.roblox.com/newsroom/2025/03/introducing-roblox-cube" rel="noopener noreferrer"&gt;Roblox&lt;/a&gt; has announced the launch of "Cube," an AI tool that allows creators to &lt;strong&gt;generate 3D models&lt;/strong&gt; using simple text prompts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://techcrunch.com/2025/03/16/photo-calorie-app-cal-ai-downloaded-over-a-million-times-was-built-by-two-teenagers/" rel="noopener noreferrer"&gt;Cal AI&lt;/a&gt;, co-founded by teens Zach Yadegari and Henry Langmack, has gained 5 million downloads and &lt;strong&gt;$2 million in revenue&lt;/strong&gt; since its May launch&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.linkedin.com/posts/emollick_i-regret-to-announce-that-the-meme-turing-activity-7307199008630816769-uHdp/" rel="noopener noreferrer"&gt;Recent findings&lt;/a&gt; indicate that large language models (LLMs) have surpassed the average human in &lt;strong&gt;creating humorous memes&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/felixrieseberg/windows95" rel="noopener noreferrer"&gt;Windows 95 in Electron&lt;/a&gt;: Windows 95, running in an Electron app with JavaScript. V4.0 adds Office 95 and IE 5.5 for some (limited) browsing of the Web.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/electronicarts" rel="noopener noreferrer"&gt;Command &amp;amp; Conquer Source Code Released&lt;/a&gt;: EA released the source code of classic C&amp;amp;C titles like Tiberian Dawn, Red Alert, Renegade, and Generals.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;







&lt;h2&gt;
  
  
  What’s New in Angular
&lt;/h2&gt;




&lt;blockquote&gt;
&lt;p&gt;💬 Angular's community is growing! There's been a noticeable increase in retention, usage, and positivity among developers, largely thanks to the introduction of standalone components and signals. This shift has made Angular more encouraging for new developers to dive into.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://blog.angular.dev/angular-19-2-is-now-available-673ec70aea12" rel="noopener noreferrer"&gt;&lt;strong&gt;Angular 19.2 Is Now Available&lt;/strong&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;And we’re back with Angular’s latest minor release, version 19.2, bringing new APIs and experimental features to empower developers on their next great app.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://medium.com/@sparklewebhelp/angular-19-the-ultimate-guide-for-developers-in-2025-b5a3896452c9" rel="noopener noreferrer"&gt;&lt;strong&gt;Angular 19: The Ultimate Guide for Developers in 2025&lt;/strong&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Angular 19 is packed with tools to make your applications faster and more efficient. Dive into our comprehensive overview to discover all the exciting updates and learn how they can elevate your projects to the next level.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  More..
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.angulararchitects.io/en/blog/learning-httpresource-with-super-mario/" rel="noopener noreferrer"&gt;Angular's new httpResource&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dev.to/oz/starting-a-modern-angular-application-34h6"&gt;Starting a Modern Angular Application&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://edbzn.dev/nobuild-angular/" rel="noopener noreferrer"&gt;Running Angular without build tools, Node.js or npm&lt;/a&gt;: &lt;em&gt;Learn how to run Angular applications without a build step using ES modules and TypeScript in the browser.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dev.to/this-is-angular/two-way-bind-a-signal-input-object-value-with-ngmodel-1c2a"&gt;Two-way bind a Signal Input object value with [(ngModel)]&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What’s New in React
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 React continues to evolve fast. Knowing the latest is key to &lt;strong&gt;staying employable and building better&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  &lt;a href="https://cyboxs.com/getting-started-with-react-19-and-vite/" rel="noopener noreferrer"&gt;&lt;strong&gt;Getting Started with React 19 and Vite&lt;/strong&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;React has long been a favorite among developers for building dynamic and high-performance user interfaces. With the release of React 19, the library introduces improved features, better performance, and new capabilities to streamline the development process. Pairing React with Vite, a fast and modern build tool, takes the experience to the next level.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  More..
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://mui.com/blog/react-19-update/" rel="noopener noreferrer"&gt;How we migrated MUI X to React 19&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://blog.carlosn.com.br/post/writing-static-websites-with-vite-and-react/" rel="noopener noreferrer"&gt;Writing static websites with Vite and React&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.epicweb.dev/tips/upgrading-react-router" rel="noopener noreferrer"&gt;Epic Web Dev - Upgrading React Router&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🎞️&lt;/strong&gt; &lt;a href="https://www.youtube.com/watch?v=nHnw3pusFXw&amp;amp;ab_channel=WebDevSimplified" rel="noopener noreferrer"&gt;&lt;strong&gt;Next.js Finally Fixed Caching&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://x.com/aleqsio/status/1902034184920584538" rel="noopener noreferrer"&gt;expo/ui will launch with Expo SDK 53&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.callstack.com/ebook/the-ultimate-guide-to-react-native-optimization" rel="noopener noreferrer"&gt;Ultimate Guide to React Native Optimization 2025&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What’s New in Vue
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://app.weekly-vue.news/link/45cb1ecf-5082-40c8-80c5-ba2d4230c106/1c5b921c-86c7-414c-a9fa-d66a06bdee63/e2ace563-07fe-4aff-ba6c-a650a0ed88e3" rel="noopener noreferrer"&gt;Nuxt UI v3 is out&lt;/a&gt;: This major redesign brings improved accessibility, Tailwind CSS v4 support, and full Vue compatibility.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 Nuxt UI v3 = Faster Dev for Vue Hackers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What’s New in Laravel
&lt;/h2&gt;




&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=mjSwVWhgpGc&amp;amp;ab_channel=LaravelDaily" rel="noopener noreferrer"&gt;&lt;strong&gt;Laravel 12.2 Introduces Custom Starter Kits&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; Laravel 12 Starter Kits: What You Need To Know&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 Laravel’s batteries-included setup makes it ideal for shipping MVPs fast.&lt;/p&gt;
&lt;/blockquote&gt;







&lt;h2&gt;
  
  
  What’s New in Python
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 Check these resources if you are a pythonista!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.youtube.com/watch?v=4aiNStwq8oU&amp;amp;ab_channel=BugBytes" rel="noopener noreferrer"&gt;&lt;strong&gt;Flet - Desktop &amp;amp; Mobile apps in Python!&lt;/strong&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;This video tutorial demonstrates how to use the Flet framework in Python to build cross-platform mobile and desktop apps, even without prior front-end development experience. It walks through creating a simple quiz application, explaining how to structure the UI with Flet controls and handle user interactions.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 Python is sneaking into front-end web and mobile territory. If you’re a Pythonista, this is your golden ticket to fullstack web and mobile development.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  More..
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=leir3xJ4Klo&amp;amp;ab_channel=CitusData" rel="noopener noreferrer"&gt;&lt;strong&gt;Why Python developers just use Postgres with Dawn Wages&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; &lt;em&gt;Why Python and Django developers favor PostgreSQL.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=tc713anE3UY&amp;amp;ab_channel=ArjanCodes" rel="noopener noreferrer"&gt;&lt;strong&gt;How to Make Your Python Docker Image 80% Smaller&lt;/strong&gt;&lt;/a&gt;  &lt;em&gt;A step-by-step guide to creating optimized and efficient Docker images for Python applications..&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://marimo.io/blog/python-not-json" rel="noopener noreferrer"&gt;&lt;strong&gt;Reinventing notebooks as reusable Python programs&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; &lt;em&gt;Marimo reinvents Python notebooks as reusable Python programs by storing them as plaintext .py files..&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.djangoproject.com/weblog/2025/mar/19/django-52-rc1/" rel="noopener noreferrer"&gt;&lt;strong&gt;Django 5.2 release candidate 1 released&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  AI for Developers
&lt;/h2&gt;




&lt;blockquote&gt;
&lt;p&gt;💬 AI won’t take your job, but a person using AI might. Don’t get left behind. Learn to &lt;strong&gt;leverage AI!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://blog.sshh.io/p/how-cursor-ai-ide-works" rel="noopener noreferrer"&gt;&lt;strong&gt;How Cursor (AI IDE) Works&lt;/strong&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Understanding how AI coding tools like Cursor, Windsurf, and Copilot function under the hood can greatly enhance your productivity, enabling these tools to work more consistently — especially in larger, complex code bases.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 Knowing the engine helps you optimize the ride.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  More..
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.sitepoint.com/prompt-engineering-for-web-development/" rel="noopener noreferrer"&gt;Prompt Engineering for Web Development&lt;/a&gt;: &lt;em&gt;Everyone should know how to prompt. by Kevin Leary.&lt;/em&gt; Prompt fluency is the &lt;strong&gt;next dev literacy&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://refactoring.fm/p/how-engineering-teams-use-ai" rel="noopener noreferrer"&gt;How Engineering Teams are Using AI&lt;/a&gt; : &lt;em&gt;Reporting on real-world use cases and stories.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.newline.co/@zaoyang/how-to-build-complete-fullstack-apps-in-less-than-an-afternoon-with-bolt-supabase--ab33ac05" rel="noopener noreferrer"&gt;How To Build Complete Fullstack Apps In Less Than An Afternoon With Bolt + Supabase&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 Time-to-ship is everything in early-stage devpreneurship. Tools like this give you unfair speed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.raymondcamden.com/2025/03/19/creating-images-with-generative-ai-via-conversation" rel="noopener noreferrer"&gt;Creating Images with Generative AI via Conversation&lt;/a&gt;: &lt;em&gt;How to build a simple chat interface with Python and Gemini to edit images using prompts.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Interesting Tools, Projects and Libraries
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 These are not just tools. They’re shortcuts. Every tool you master becomes a multiplier on your creative output.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://same.new" rel="noopener noreferrer"&gt;&lt;strong&gt;Same.dev&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; A fantastic web application that lets you clone any UI.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/ai-christianson/RA.Aid" rel="noopener noreferrer"&gt;&lt;strong&gt;RA.Aid&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; RA.Aid helps you develop software autonomously.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/xataio/agent" rel="noopener noreferrer"&gt;&lt;strong&gt;Xata Agent, your AI expert in PostgreSQL&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; An open source agent that monitors your database, finds root causes of issues, and suggests fixes and improvements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/antfu/node-modules-inspector" rel="noopener noreferrer"&gt;Node Modules Inspector&lt;/a&gt;: Interactive UI for local node modules inspection&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/xpipe-io/xpipe" rel="noopener noreferrer"&gt;&lt;strong&gt;XPipe&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; A new type of shell connection hub and remote file manager that allows you to access your entire server infrastructure from your local machine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.jerpint.io/blog/python-shelve-as-cache/" rel="noopener noreferrer"&gt;&lt;strong&gt;Python’s ‘shelve’ is really useful for LLM debugging&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt; You can use the builtin Python’s shelve as a quick and easy, persistent key-value store for LLM workflows.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Books
&lt;/h2&gt;




&lt;p&gt;&lt;a href="https://pydevtools.com/handbook/" rel="noopener noreferrer"&gt;&lt;strong&gt;Python Developer Tooling Handbook&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This handbook help Python developers learn about the ecosystem of tools that enhance productivity, covering areas like packaging, linting, formatting, and dependency management.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💬 Tooling = scaling. If you write Python, this is a must-read for shipping cleaner and faster.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Coming Soon!
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;10xDev.Blog:&lt;/strong&gt; Our goal is to reorganize the free knowledge scattered across the internet for developers—connecting the dots between what truly helps you achieve multiple goals: boosting your productivity (and actually living your life), growing in your career, and exploring paths beyond the 9-5—like freelancing, devneurship, and indie hacking—by leveraging AI and modern or trending technologies in the dev community.&lt;/p&gt;

</description>
      <category>vibecoding</category>
      <category>dev</category>
      <category>webdev</category>
      <category>ai</category>
    </item>
    <item>
      <title>Ever wondered how some JavaScript functions seem to “remember” variables even after they’ve finished running? That’s closures at work — one of JavaScript’s most powerful (and confusing) features.</title>
      <dc:creator>Ahmed Bouchefra</dc:creator>
      <pubDate>Wed, 05 Feb 2025 23:36:34 +0000</pubDate>
      <link>https://forem.com/programmerspace/ever-wondered-how-some-javascript-functions-seem-to-remember-variables-even-after-theyve-4bcb</link>
      <guid>https://forem.com/programmerspace/ever-wondered-how-some-javascript-functions-seem-to-remember-variables-even-after-theyve-4bcb</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/programmerspace" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F36617%2F1b47ffb9-d3d0-486d-b67d-67340f4a61dc.jpg" alt="programmerspace"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/programmerspace/javascript-deep-dive-1-mastering-closures-like-a-pro-4mn6" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;📜 JavaScript Deep Dive #1: Mastering Closures Like a Pro&lt;/h2&gt;
      &lt;h3&gt;Ahmed Bouchefra ・ Feb 5&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#javascript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#programming&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>javascript</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>📜 JavaScript Deep Dive #1: Mastering Closures Like a Pro</title>
      <dc:creator>Ahmed Bouchefra</dc:creator>
      <pubDate>Wed, 05 Feb 2025 23:24:28 +0000</pubDate>
      <link>https://forem.com/programmerspace/javascript-deep-dive-1-mastering-closures-like-a-pro-4mn6</link>
      <guid>https://forem.com/programmerspace/javascript-deep-dive-1-mastering-closures-like-a-pro-4mn6</guid>
      <description>&lt;p&gt;Ever wondered how some JavaScript functions seem to “remember” variables even after they’ve finished running? That’s referred to as closures— one of JavaScript’s most powerful (but little confusing) features.&lt;/p&gt;

&lt;p&gt;In this guide, you’ll learn:&lt;br&gt;&lt;br&gt;
🔹 How closures  &lt;strong&gt;preserve data&lt;/strong&gt;  in functions.&lt;br&gt;&lt;br&gt;
🔹 Why they’re essential for  &lt;strong&gt;state management and encapsulation&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
🔹 Common pitfalls  &lt;strong&gt;(and how to avoid them)&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
🔹 How closures power  &lt;strong&gt;React Hooks, event handlers, and async code&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
🔹 How they compare to similar features in  &lt;strong&gt;Python, Java, and C++&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;By the end of this article, we’ll make sure you understand closures correctly— with short examples, real-world analogy, and a quick challenge plus free and paid resources for more knowledge. Ready to dive in? 🚀&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“A fool thinks himself to be wise, but a wise man knows himself to be a fool.” — William Shakespeare&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Closures might seem simple, but they can confuse even experienced developers. Let’s break them down properly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh9yyed2cq3lul4xwxq11.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh9yyed2cq3lul4xwxq11.png" width="700" height="467"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  🧠 Introduction: What Are Closures and Why Do They Matter?
&lt;/h2&gt;

&lt;p&gt;Simply put: In JavaScript closures are functions (called inner functions) defined inside other functions (referred to as outer functions) which give them a special power — the access to the outer variables and scope even after the outer function has finished executing!&lt;/p&gt;

&lt;p&gt;Now before, continuing with the technical side, imagine you have a vault, and only a special key can open it. This key isn’t available to the world— instead only a trusted person can have it!&lt;/p&gt;

&lt;p&gt;Even if the vault is locked and becomes inaccessible to others, the trusted person still holds the key and can access the vault’s contents whenever needed.&lt;/p&gt;

&lt;p&gt;Let’s now map these concepts to closures!&lt;/p&gt;

&lt;p&gt;Closures work the same way as the previous analogy: the inner function (which is the trusted person) retains access to the variables (contents) of its outer function (vault), even after the outer function has finished executing (i.e not accessible to everyone); inner function can still have access the variables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Analogy Breakdown 🔐&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1️⃣ The vault is created → A function is defined.&lt;br&gt;
2️⃣ Contents are stored inside the vault → Variable are declared inside the defined function.&lt;br&gt;
3️⃣ Only a trusted person can access the vault → Only an inner function; defined inside the outer function; has access to the variables, but the outside code doesn’t.&lt;/p&gt;

&lt;p&gt;If you have a better analogy, please leave it in the comments :)&lt;/p&gt;
&lt;h2&gt;
  
  
  🔹 Why Are Closures Useful?
&lt;/h2&gt;

&lt;p&gt;Closures are useful because they make it very easy to implement:&lt;/p&gt;

&lt;p&gt;✅  &lt;strong&gt;Data Privacy&lt;/strong&gt;  (Preventing Global Pollution)&lt;br&gt;&lt;br&gt;
✅  &lt;strong&gt;State Persistence&lt;/strong&gt;  (Keeping Values Even After Execution)&lt;br&gt;&lt;br&gt;
✅  &lt;strong&gt;Function Factories&lt;/strong&gt;  (Returning Customized Functions)&lt;br&gt;&lt;br&gt;
✅  &lt;strong&gt;Event Listeners, Async Operations, and Module Patterns&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  💻 Example: Understanding Closures Step by Step
&lt;/h2&gt;

&lt;p&gt;Let’s now try to understand closures with an example!&lt;/p&gt;
&lt;h3&gt;
  
  
  🔹 Without Closures: Variables Don’t Persist
&lt;/h3&gt;

&lt;p&gt;Let’s define a simple function in JavaScript with a variable and call it twice:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;counter&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
  &lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;  

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;counter&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// 1  &lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;counter&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// 1 (Resets every time)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔴 &lt;strong&gt;Behavior:&lt;/strong&gt; Every time counter() is called, count is reset. This is an expected behavior and nothing is wrong about it, but what If we need some extra features without so much code! In our case, we need to implement the intended functionality of a counter!&lt;/p&gt;

&lt;h3&gt;
  
  
  ✅ Closures: Keeping Values Across Calls
&lt;/h3&gt;

&lt;p&gt;Let’s suppose we need to create a counter; here is how we can do it very easily with closures:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;createCounter&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Private variable  &lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
    &lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
  &lt;span class="p"&gt;};&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;  
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;myCounter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createCounter&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;  
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;myCounter&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// 1  &lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;myCounter&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// 2  &lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;myCounter&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// 3&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;✅ By simply defining a function inside another function; we get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Data Persistence:&lt;/strong&gt;  &lt;code&gt;count&lt;/code&gt;  retains its value across calls.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Encapsulation:&lt;/strong&gt;  &lt;code&gt;count&lt;/code&gt;  is protected; no direct access.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Reusability:&lt;/strong&gt;  Multiple independent counters can be created.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ⚠️ Beginner Pitfalls &amp;amp; How to Overcome Them
&lt;/h2&gt;

&lt;p&gt;🔴  &lt;strong&gt;1. Expecting closures to copy variables instead of reference them&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Issue:&lt;/strong&gt;  Many beginners think closures store a  &lt;strong&gt;copy&lt;/strong&gt;  of the variable at the time of function creation. Instead, they keep a  &lt;strong&gt;reference&lt;/strong&gt;  to the original variable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: Unexpected&lt;/strong&gt; &lt;code&gt;**setTimeout**&lt;/code&gt; &lt;strong&gt;behavior&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
  &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;  
&lt;span class="c1"&gt;// Logs: 4, 4, 4 (instead of 1, 2, 3)&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;✅  &lt;strong&gt;Fix:&lt;/strong&gt;  Use  &lt;code&gt;let&lt;/code&gt;  to create a block-scoped variable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
  &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;  
&lt;span class="c1"&gt;// Correctly logs: 1, 2, 3&lt;/span&gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  🔎 Think Like a Compiler: How Closures Work Internally
&lt;/h2&gt;

&lt;p&gt;Closures are possible because of  &lt;strong&gt;lexical scoping&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  When a function is created, it remembers the  &lt;strong&gt;scope where it was declared&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;  Even after the outer function  &lt;strong&gt;finishes execution&lt;/strong&gt;, its variables are  &lt;strong&gt;not destroyed&lt;/strong&gt;  if they are referenced inside a closure.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example Visualization:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;outer&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;   
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;inner&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;  
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;outer&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;  
&lt;span class="nf"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Logs 10 (Even though `outer()` has finished)&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;📌  &lt;strong&gt;Memory is only freed when there are no references to the closure.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚡ Closures in the Wild: Real-World Applications
&lt;/h2&gt;

&lt;p&gt;🔹  &lt;strong&gt;1. Avoiding Global Variables (Data Privacy)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;bankAccount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;initialBalance&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;initialBalance&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
    &lt;span class="nf"&gt;deposit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
      &lt;span class="nx"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`New Balance: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  
    &lt;span class="p"&gt;},&lt;/span&gt;  
    &lt;span class="nf"&gt;withdraw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Insufficient funds!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  
      &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
        &lt;span class="nx"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt; &lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`New Balance: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  
      &lt;span class="p"&gt;}&lt;/span&gt;  
    &lt;span class="p"&gt;},&lt;/span&gt;  
    &lt;span class="nf"&gt;getBalance&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
    &lt;span class="p"&gt;}&lt;/span&gt;  
  &lt;span class="p"&gt;};&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;  

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;myAccount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;bankAccount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  
&lt;span class="nx"&gt;myAccount&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deposit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// New Balance: 150  &lt;/span&gt;
&lt;span class="nx"&gt;myAccount&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;withdraw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// New Balance: 120  &lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;myAccount&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getBalance&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// 120&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;✅  &lt;strong&gt;Here,&lt;/strong&gt; &lt;code&gt;**balance**&lt;/code&gt; &lt;strong&gt;is private and only accessible through methods!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🔹  &lt;strong&gt;2. Closures in React’s&lt;/strong&gt; &lt;code&gt;**useState**&lt;/code&gt; &lt;strong&gt;(Modern Web Development)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Counter&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

 &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;  
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;  
      &lt;span class="nx"&gt;Count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;  
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&amp;gt; &lt;/span&gt;&lt;span class="err"&gt; 
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;✅  &lt;strong&gt;Closures allow&lt;/strong&gt; &lt;code&gt;**setCount**&lt;/code&gt; &lt;strong&gt;to remember the previous state.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🔄 Closures in Other Languages (If You Come From…)
&lt;/h2&gt;

&lt;p&gt;🔹  &lt;strong&gt;Python (Similar: Inner Functions &amp;amp;&lt;/strong&gt; &lt;code&gt;**nonlocal**&lt;/code&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Closures in Python work similarly using  &lt;strong&gt;inner functions and&lt;/strong&gt; &lt;code&gt;**nonlocal**&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;counter&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;  
    &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;  
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;increment&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;  
        &lt;span class="k"&gt;nonlocal&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;  
        &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;  
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;  
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;increment&lt;/span&gt;  

&lt;span class="n"&gt;my_counter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;counter&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;  
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;my_counter&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;  &lt;span class="c1"&gt;# 1  
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;my_counter&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;  &lt;span class="c1"&gt;# 2
&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹  &lt;strong&gt;Java (No Direct Equivalent, but Similar to Anonymous Classes)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Java doesn’t have true closures, but anonymous classes with  &lt;strong&gt;final variables&lt;/strong&gt;  behave similarly.&lt;/p&gt;

&lt;p&gt;🔹  &lt;strong&gt;C++ (Lambdas Capture State)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;std::function&amp;lt;int()&amp;gt; createCounter() {  
    int count = 0;  
    return [=]() mutable { return ++count; };  
}

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

&lt;/div&gt;



&lt;p&gt;✅  &lt;strong&gt;Closures in C++ are captured in lambdas, just like JavaScript functions.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🛠️ If You Understand This, Try… (Challenge Section)
&lt;/h2&gt;

&lt;p&gt;🔹  &lt;strong&gt;Challenge: Implement a function that only runs once using closures.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;once&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;ran&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;ran&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
      &lt;span class="nx"&gt;ran&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  
    &lt;span class="p"&gt;}&lt;/span&gt;  
  &lt;span class="p"&gt;};&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;  

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;init&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;once&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;This runs only once!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;  
&lt;span class="nf"&gt;init&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Runs ✅  &lt;/span&gt;
&lt;span class="nf"&gt;init&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Doesn't run ❌&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;✅  &lt;strong&gt;Used in JavaScript libraries like Lodash!&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  📖 Learn More: Best Books &amp;amp; Resources on Closures
&lt;/h2&gt;

&lt;h3&gt;
  
  
  📚 Free Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures" rel="noopener noreferrer"&gt;&lt;strong&gt;MDN Docs on Closures&lt;/strong&gt;&lt;/a&gt;  — Official Mozilla documentation.&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://javascript.info/closure" rel="noopener noreferrer"&gt;&lt;strong&gt;JavaScript.info: Closures&lt;/strong&gt;&lt;/a&gt;  — A well-explained article with examples.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  💰 Paid Books for Deep Understanding
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;“You Don’t Know JS: Scope &amp;amp; Closures”&lt;/strong&gt;  by Kyle Simpson — The ultimate guide to closures and scope.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;“JavaScript: The Good Parts”&lt;/strong&gt;  by Douglas Crockford — Covers closures as a fundamental JS feature.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🎯 Conclusion: Why Closures Are Essential
&lt;/h2&gt;

&lt;p&gt;Closures allow functions to  &lt;strong&gt;“remember”&lt;/strong&gt;  data even after execution. They help in  &lt;strong&gt;data privacy, function factories, and efficient state management&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Next time you use &lt;em&gt;setTimeout&lt;/em&gt;, event listeners, or create custom counters, remember to leverage closures! These "backpacks" of data make your functions more powerful by letting them carry around the variables they need, even after the outer function is gone.&lt;/p&gt;

&lt;p&gt;What JavaScript concept should we break down next? 🚀&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>📚 7 Free Python Books That Will Make You a Better Developer 🚀</title>
      <dc:creator>Ahmed Bouchefra</dc:creator>
      <pubDate>Mon, 03 Feb 2025 01:52:31 +0000</pubDate>
      <link>https://forem.com/programmerspace/7-free-python-books-that-will-make-you-a-better-developer-5361</link>
      <guid>https://forem.com/programmerspace/7-free-python-books-that-will-make-you-a-better-developer-5361</guid>
      <description>&lt;p&gt;Python is one of the most  &lt;strong&gt;powerful, versatile, and beginner-friendly&lt;/strong&gt;  programming languages. Whether you’re a  &lt;strong&gt;complete beginner&lt;/strong&gt;, an  &lt;strong&gt;experienced developer&lt;/strong&gt;, or someone looking to refine their coding style, the right book can  &lt;strong&gt;accelerate your learning process&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here’s a  &lt;strong&gt;handpicked collection&lt;/strong&gt;  of 7 free Python books that will help you  &lt;strong&gt;master Python&lt;/strong&gt;  — from the  &lt;strong&gt;basics&lt;/strong&gt;  to  &lt;strong&gt;advanced techniques&lt;/strong&gt;  like  &lt;strong&gt;clean code, automation, and project building&lt;/strong&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  🟢 Beginner Level
&lt;/h1&gt;

&lt;h1&gt;
  
  
  1️⃣ Think Python — How to Think Like a Computer Scientist
&lt;/h1&gt;

&lt;p&gt;📖  &lt;strong&gt;Author:&lt;/strong&gt;  Allen B. Downey&lt;/p&gt;

&lt;p&gt;If you’re new to programming, this book  &lt;strong&gt;teaches you how to think like a programmer&lt;/strong&gt;. It covers  &lt;strong&gt;fundamental Python concepts&lt;/strong&gt;  while emphasizing  &lt;strong&gt;problem-solving and algorithmic thinking&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;🔹  &lt;strong&gt;Key Takeaways:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ Understanding  &lt;strong&gt;fundamental programming concepts&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ Learning  &lt;strong&gt;recursion, object-oriented programming, and data structures&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ Developing a  &lt;strong&gt;problem-solving mindset&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;💡  &lt;strong&gt;Who is this for?&lt;/strong&gt;  &lt;strong&gt;Beginners&lt;/strong&gt;  who want to  &lt;strong&gt;develop strong problem-solving skills&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;🔗  &lt;strong&gt;Download:&lt;/strong&gt;  &lt;a href="https://greenteapress.com/wp/think-python/" rel="noopener noreferrer"&gt;Think Python&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  2️⃣ Automate the Boring Stuff with Python
&lt;/h1&gt;

&lt;p&gt;📖  &lt;strong&gt;Author:&lt;/strong&gt;  Al Sweigart&lt;/p&gt;

&lt;p&gt;One of the most popular Python books,  &lt;strong&gt;Automate the Boring Stuff&lt;/strong&gt;  teaches you how to  &lt;strong&gt;use Python to automate everyday tasks&lt;/strong&gt;. If you want to  &lt;strong&gt;save time&lt;/strong&gt;  by automating repetitive tasks (file management, data scraping, etc.), this is the book for you.&lt;/p&gt;

&lt;p&gt;🔹  &lt;strong&gt;Key Takeaways:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ Automate  &lt;strong&gt;file handling, emails, spreadsheets, and PDFs&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ Learn  &lt;strong&gt;web scraping&lt;/strong&gt;  to extract data from websites&lt;br&gt;&lt;br&gt;
✅ Master  &lt;strong&gt;regular expressions, APIs, and automation techniques&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;💡  &lt;strong&gt;Who is this for?&lt;/strong&gt;  &lt;strong&gt;Beginners&lt;/strong&gt;  who want to  &lt;strong&gt;use Python for real-world automation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;🔗  &lt;strong&gt;Read Online:&lt;/strong&gt;  &lt;a href="https://automatetheboringstuff.com/" rel="noopener noreferrer"&gt;Automate the Boring Stuff&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  3️⃣ Small Python Projects — 81 Easy Practice Programs
&lt;/h1&gt;

&lt;p&gt;📖  &lt;strong&gt;Author:&lt;/strong&gt;  Al Sweigart&lt;/p&gt;

&lt;p&gt;The best way to  &lt;strong&gt;learn Python&lt;/strong&gt;  is by  &lt;strong&gt;building projects&lt;/strong&gt;. This book provides  &lt;strong&gt;81 simple yet fun projects&lt;/strong&gt;  to practice Python concepts. From  &lt;strong&gt;games&lt;/strong&gt;  to  &lt;strong&gt;automation scripts&lt;/strong&gt;, each project is designed to teach you something  &lt;strong&gt;new and practical&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;🔹  &lt;strong&gt;Key Takeaways:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ Hands-on projects covering  &lt;strong&gt;loops, functions, and algorithms&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ A mix of  &lt;strong&gt;game development, automation, and scripting&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ Step-by-step explanations for every project&lt;/p&gt;

&lt;p&gt;💡  &lt;strong&gt;Who is this for?&lt;/strong&gt;  &lt;strong&gt;Beginners&lt;/strong&gt;  who want  &lt;strong&gt;real-world practice&lt;/strong&gt;  instead of just theory.&lt;/p&gt;

&lt;p&gt;🔗  &lt;strong&gt;Read Online&lt;/strong&gt;:  &lt;a href="https://inventwithpython.com/bigbookpython/" rel="noopener noreferrer"&gt;Small Python Projects&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;🔗  &lt;strong&gt;Download Source Code:&lt;/strong&gt;  &lt;a href="https://inventwithpython.com/projects/" rel="noopener noreferrer"&gt;Small Python Projects&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  🟡 Intermediate Level
&lt;/h1&gt;

&lt;h1&gt;
  
  
  4️⃣ Learn More Python 3 the Hard Way
&lt;/h1&gt;

&lt;p&gt;📖  &lt;strong&gt;Author:&lt;/strong&gt;  Zed Shaw&lt;/p&gt;

&lt;p&gt;This book is a  &lt;strong&gt;step-by-step&lt;/strong&gt;  guide designed to  &lt;strong&gt;push your Python skills to the next level&lt;/strong&gt;. The  &lt;strong&gt;“Hard Way”&lt;/strong&gt;  approach forces you to  &lt;strong&gt;practice by doing&lt;/strong&gt;, making sure you  &lt;strong&gt;truly understand&lt;/strong&gt;  each concept before moving forward.&lt;/p&gt;

&lt;p&gt;🔹  &lt;strong&gt;Key Takeaways:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ A rigorous, structured approach to  &lt;strong&gt;intermediate and advanced Python&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ Covers  &lt;strong&gt;data structures, algorithms, and OOP principles&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ Helps you  &lt;strong&gt;think like a programmer&lt;/strong&gt;  and write efficient code&lt;/p&gt;

&lt;p&gt;💡  &lt;strong&gt;Who is this for?&lt;/strong&gt;  &lt;strong&gt;Anyone who wants to go beyond the basics&lt;/strong&gt;  and master Python  &lt;strong&gt;the hard way&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;🔗  &lt;strong&gt;Download:&lt;/strong&gt;  &lt;a href="https://freecomputerbooks.com/Learn-Python-The-Hard-Way.html" rel="noopener noreferrer"&gt;Learn More Python 3 the Hard Way&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  5️⃣ The Quick Python Book
&lt;/h1&gt;

&lt;p&gt;📖  &lt;strong&gt;Author:&lt;/strong&gt;  Naomi Ceder&lt;/p&gt;

&lt;p&gt;If you need a  &lt;strong&gt;concise yet powerful guide to Python&lt;/strong&gt;, this book is perfect. It  &lt;strong&gt;skips unnecessary details&lt;/strong&gt;  and gets straight to the  &lt;strong&gt;important concepts&lt;/strong&gt;  that will help you  &lt;strong&gt;start coding quickly&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;🔹  &lt;strong&gt;Key Takeaways:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ Covers  &lt;strong&gt;Python syntax, libraries, and best practices&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ A well-structured book for  &lt;strong&gt;quick reference and review&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ Great for learning  &lt;strong&gt;modern Python techniques&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;💡  &lt;strong&gt;Who is this for?&lt;/strong&gt;  &lt;strong&gt;Developers&lt;/strong&gt;  who want a  &lt;strong&gt;fast-track guide to Python&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;🔗  &lt;strong&gt;Download:&lt;/strong&gt;  &lt;a href="http://128.174.51.21/teaching/SP2019/ASTR414/The_Quick_Python_Book.pdf" rel="noopener noreferrer"&gt;The Quick Python Book&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  🔴 Advanced Level
&lt;/h1&gt;

&lt;h1&gt;
  
  
  6️⃣ Python Beyond the Basics — Best Practices for Writing Clean Code
&lt;/h1&gt;

&lt;p&gt;📖  &lt;strong&gt;Author:&lt;/strong&gt;  Al Sweigart&lt;/p&gt;

&lt;p&gt;If you’ve already got a  &lt;strong&gt;good grasp of Python&lt;/strong&gt;  and want to  &lt;strong&gt;write better, more efficient, and maintainable code&lt;/strong&gt;, this book is for you. It focuses on  &lt;strong&gt;best practices, advanced Python techniques&lt;/strong&gt;, and  &lt;strong&gt;clean coding standards&lt;/strong&gt;  that will make your programs more  &lt;strong&gt;readable and professional&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;🔹  &lt;strong&gt;Key Takeaways:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ Writing  &lt;strong&gt;clean and professional&lt;/strong&gt;  Python code&lt;br&gt;&lt;br&gt;
✅ Understanding  &lt;strong&gt;design patterns&lt;/strong&gt;  and when to use them&lt;br&gt;&lt;br&gt;
✅ Exploring  &lt;strong&gt;advanced Python features&lt;/strong&gt;  (decorators, generators, etc.)&lt;/p&gt;

&lt;p&gt;💡  &lt;strong&gt;Who is this for?&lt;/strong&gt;  &lt;strong&gt;Intermediate Python developers&lt;/strong&gt;  who want to  &lt;strong&gt;refine their coding skills&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;🔗  &lt;strong&gt;Read Online:&lt;/strong&gt;  &lt;a href="https://inventwithpython.com/beyond/" rel="noopener noreferrer"&gt;Beyond the Basic Stuff with Python&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  7️⃣ Clean Code in Python — Maintainable and Scalable Software
&lt;/h1&gt;

&lt;p&gt;📖  &lt;strong&gt;Author:&lt;/strong&gt;  Mariano Anaya&lt;/p&gt;

&lt;p&gt;Writing code is easy. Writing  &lt;strong&gt;clean, maintainable, and scalable&lt;/strong&gt;  code is  &lt;strong&gt;hard&lt;/strong&gt;. This book  &lt;strong&gt;teaches you how to structure your Python code&lt;/strong&gt;  so it’s  &lt;strong&gt;readable, reusable, and efficient&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;🔹  &lt;strong&gt;Key Takeaways:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ Best practices for  &lt;strong&gt;code readability and maintainability&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ Writing  &lt;strong&gt;scalable, reusable Python components&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
✅ Using  &lt;strong&gt;SOLID principles&lt;/strong&gt;  and  &lt;strong&gt;design patterns&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;💡  &lt;strong&gt;Who is this for?&lt;/strong&gt;  &lt;strong&gt;Developers&lt;/strong&gt;  who  &lt;strong&gt;want to write Python like a pro&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;🔗  &lt;strong&gt;Download:&lt;/strong&gt;  &lt;a href="https://www.packtpub.com/free-ebook/clean-code-in-python/9781788835831?srsltid=AfmBOorRNuqaJl1g3BEMM1AWgvrkMKH8G_hrP-946AON6n37Hq2gfpmx" rel="noopener noreferrer"&gt;Clean Code in Python&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  🔥 Why These Books Are a Must-Read
&lt;/h1&gt;

&lt;p&gt;✅  &lt;strong&gt;They’re all FREE!&lt;/strong&gt;  No excuses — grab them and start learning.&lt;br&gt;&lt;br&gt;
✅  &lt;strong&gt;Cover everything from basics to advanced Python topics&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
✅  &lt;strong&gt;Practical projects and exercises&lt;/strong&gt;  to solidify your understanding.&lt;br&gt;&lt;br&gt;
✅  &lt;strong&gt;Written by experienced programmers and educators&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Whether you’re looking to  &lt;strong&gt;automate tasks, write clean code, or build projects&lt;/strong&gt;, these books will give you a  &lt;strong&gt;solid foundation in Python&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;👉  &lt;strong&gt;Which one will you read first? Have you already read any of them?&lt;/strong&gt;  Let me know in the comments!&lt;/p&gt;

&lt;p&gt;🚀  &lt;strong&gt;Save this post&lt;/strong&gt;  so you can always come back when you need a Python resource.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
    </item>
    <item>
      <title>Access your localhost dev server from Internet</title>
      <dc:creator>Ahmed Bouchefra</dc:creator>
      <pubDate>Mon, 23 May 2022 18:08:27 +0000</pubDate>
      <link>https://forem.com/programmerspace/access-your-localhost-dev-server-from-internet-488b</link>
      <guid>https://forem.com/programmerspace/access-your-localhost-dev-server-from-internet-488b</guid>
      <description>&lt;p&gt;While working at home on your development machine, you've put in many hours developing the new web application. Your implementation should be tested on a variety of mobile and tablet devices to make sure it's working as it should. You don't have the time to host everything on a public server just so your client may have a look at least until you are ready for production.&lt;/p&gt;

&lt;p&gt;Most web developers are likely to have encountered this scenario at some point. This is an all-too-common occurrence and you undoubtedly hoped there was a simpler and faster method to move stuff to a public-facing server during those occasions when you had to stay up all night hosting your still in-development web app.&lt;/p&gt;

&lt;p&gt;Rejoice, you weary web devs! There's a new and better way to do things! You may access your localhost from the Internet using a wide variety of apps and services, making this procedure a lot less cumbersome. The following are the ones I'll be discussing in this short article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ngrok&lt;/li&gt;
&lt;li&gt;Localtunnel&lt;/li&gt;
&lt;li&gt;Telbit&lt;/li&gt;
&lt;li&gt;Localhost.run&lt;/li&gt;
&lt;li&gt;Cloudflare tunnel&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These services are called &lt;strong&gt;tunnels&lt;/strong&gt; which come in handy to establish a secure but temporary connection between your localhost and the Internet. &lt;/p&gt;

&lt;p&gt;There are also a number of paid options, like pagekite, Forward and Burrow.io.&lt;/p&gt;

&lt;p&gt;For detailed instructions, you can read &lt;a href="https://www.techiediaries.com/public-localhost/" rel="noopener noreferrer"&gt;Expose localhost dev server to the Internet&lt;/a&gt; &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>frontend</category>
      <category>react</category>
      <category>angular</category>
    </item>
    <item>
      <title>Angular 14: new features &amp; release date</title>
      <dc:creator>Ahmed Bouchefra</dc:creator>
      <pubDate>Fri, 20 May 2022 01:10:35 +0000</pubDate>
      <link>https://forem.com/programmerspace/angular-14-new-features-release-date-30ei</link>
      <guid>https://forem.com/programmerspace/angular-14-new-features-release-date-30ei</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj4pverlebfblf4n82fmg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj4pverlebfblf4n82fmg.png" alt="angular 14 features" width="641" height="223"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Typed reactive forms and advanced template diagnostics will be a part of the next important upgrade to the widely used TypeScript-based web framework that was designed by Google i.e. &lt;a href="https://www.techiediaries.com/news/angular-14-release/" rel="noopener noreferrer"&gt;Angular 14&lt;/a&gt;. In the June release, the use of modules will be optional in favor for stand-alone components.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Angular CLI auto completion
&lt;/h2&gt;

&lt;p&gt;Angular 14 adds a new functionality to the CLI that allows real-time type ahead auto completion in the terminal. This capability can be accessed using the cli.&lt;/p&gt;

&lt;h2&gt;
  
  
  Angular 14 standalone components
&lt;/h2&gt;

&lt;p&gt;With the release of Angular 14, standalone components will at last be a feasible option, and Angular modules will no longer be required.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enhanced template diagnostics
&lt;/h2&gt;

&lt;p&gt;Enhanced template diagnostics are one of the new features introduced with Angular 14, making it possible for the compiler to shield developers from common coding errors in a manner similar to typescript.&lt;/p&gt;

&lt;h2&gt;
  
  
  Typed forms
&lt;/h2&gt;

&lt;p&gt;The most common request for an Angular feature on GitHub is for strictly typed forms, which, would improve the framework’s model-driven approach to the process of dealing with forms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;✋If you have any questions about this article, ask them in our&lt;/em&gt;&lt;/strong&gt; &lt;a href="https://github.com/techiediaries/techiescommunity/discussions" rel="noopener noreferrer"&gt;&lt;strong&gt;&lt;em&gt;GitHub Discussions&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;&lt;em&gt;👈 community.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;✋ Want to master Angular? Join our&lt;/em&gt;&lt;/strong&gt; &lt;a href="https://www.techiediaries.com/daily-angular-challenge/" rel="noopener noreferrer"&gt;&lt;strong&gt;&lt;em&gt;#DailyAngularChallenge&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;&lt;em&gt;where we learn to build components, directives, services, pipes and complete web, mobile, and desktop applications with latest Angular version.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;✋ Make sure to join our&lt;/em&gt;&lt;/strong&gt; &lt;a href="https://web.facebook.com/groups/ngxangular/" rel="noopener noreferrer"&gt;&lt;strong&gt;&lt;em&gt;Angular 14 Dev Community&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;&lt;em&gt;👈 to discuss anything related to Angular development.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;❤️ Like our&lt;/em&gt;&lt;/strong&gt; &lt;a href="https://www.facebook.com/techiediaries9" rel="noopener noreferrer"&gt;&lt;strong&gt;&lt;em&gt;page&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;&lt;em&gt;and subscribe to our&lt;/em&gt;&lt;/strong&gt; &lt;a href="http://feeds.feedburner.com/techiediaries/AXID" rel="noopener noreferrer"&gt;&lt;strong&gt;&lt;em&gt;feed&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;&lt;em&gt;for updates!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you would to read more details about the new features of Angular, check out these resources online:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://angularnewsletter.substack.com/p/whats-new-with-angular-14-new-features?s=w" rel="noopener noreferrer"&gt;https://angularnewsletter.substack.com/p/whats-new-with-angular-14-new-features?s=w&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=-f1Pfrtp_ao&amp;amp;ab_channel=techiediaries" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=-f1Pfrtp_ao&amp;amp;ab_channel=techiediaries&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.techiediaries.com/angular-14-features/" rel="noopener noreferrer"&gt;https://www.techiediaries.com/angular-14-features/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://efficientcoder.net/angular-14-release-features/" rel="noopener noreferrer"&gt;https://efficientcoder.net/angular-14-release-features/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>angular</category>
    </item>
    <item>
      <title>Angular 14 CRUD Tutorial</title>
      <dc:creator>Ahmed Bouchefra</dc:creator>
      <pubDate>Fri, 30 Oct 2020 17:59:53 +0000</pubDate>
      <link>https://forem.com/programmerspace/angular-11-crud-tutorial-5fpn</link>
      <guid>https://forem.com/programmerspace/angular-11-crud-tutorial-5fpn</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvblnop54mec0r6mtoyrj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvblnop54mec0r6mtoyrj.png" alt="Image for post" width="483" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Throughout this tutorial, we’ll be learning how to build an &lt;a href="https://webtips101.com/whats-new-angular-14/" rel="noopener noreferrer"&gt;Angular 14&lt;/a&gt; CRUD application with Bootstrap 4 styles to consume a REST Web API, create, read, modify, and search data.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://www.techiediaries.com/angular-10-crud-bootstrap-tutorial.pdf" rel="noopener noreferrer"&gt;&lt;em&gt;Download this tutorial as a PDF ebook&lt;/em&gt;&lt;/a&gt; &lt;em&gt;for offline reading.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Introducing our Angular 14 CRUD Application
&lt;/h1&gt;

&lt;p&gt;We will learn how to build an Angular 14 front-end application that fetches data from a REST API of products:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Each product has id, name, description, availability status.&lt;/li&gt;
&lt;li&gt;  Users would be able to create, retrieve, update, and delete products.&lt;/li&gt;
&lt;li&gt;  Users can search for products by name.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  The REST API Endpoints
&lt;/h1&gt;

&lt;p&gt;We’ll be building a Angular 14 frontend app for a presumed REST API exporting the following REST API endpoints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  POST /api/products create new product&lt;/li&gt;
&lt;li&gt;  GET /api/products retrieve all products&lt;/li&gt;
&lt;li&gt;  GET /api/products/:id retrieve a product by  &lt;code&gt;:id&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  PUT /api/products/:id update a product by  &lt;code&gt;:id&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  DELETE /api/products/:id delete a product by  &lt;code&gt;:id&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  DELETE /api/products delete all products&lt;/li&gt;
&lt;li&gt;  GET /api/products?name=[keyword] find all products which name contains the passed  &lt;code&gt;keyword&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of them can work well with this Angular App.&lt;/p&gt;

&lt;h1&gt;
  
  
  Angular 14 CRUD App Structure
&lt;/h1&gt;

&lt;p&gt;These are the components of our CRUD app:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  The  &lt;code&gt;App&lt;/code&gt;  component is the parent of all other components and contains a  &lt;code&gt;router-outlet&lt;/code&gt;  directive where the router will be inserting any matched component. It also contains a navigation bar that contains links to the app routes using  &lt;code&gt;routerLink&lt;/code&gt;  directive.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;–  &lt;code&gt;ProductListComponent&lt;/code&gt;  which displays the list of products.&lt;br&gt;&lt;br&gt;
–  &lt;code&gt;ProductUpdateComponent&lt;/code&gt;  which displays a form for editing product’s details by  &lt;code&gt;:id&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
–  &lt;code&gt;ProductCreateComponent&lt;/code&gt;  which displays a form for creating a new product.&lt;/p&gt;

&lt;p&gt;The components use the  &lt;code&gt;ProductService&lt;/code&gt;  methods for actually making CRUD operations against the REST API. The service makes use of Angular 14  &lt;code&gt;HttpClient&lt;/code&gt;  to send HTTP requests to the REST and process responses.&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 1 — Creating a New Angular 14 Project
&lt;/h1&gt;

&lt;p&gt;Let’s get started by generating a new Angular 14 project using the CLI. You need to run the following command:&lt;/p&gt;

&lt;p&gt;$ ng new Angular14CRUDExample&lt;/p&gt;

&lt;p&gt;The CLI will ask you a couple of questions — If  &lt;strong&gt;Would you like to add &lt;a href="https://www.techiediaries.com/routing-angular-router/" rel="noopener noreferrer"&gt;Angular routing&lt;/a&gt;?&lt;/strong&gt;  Type  &lt;strong&gt;y&lt;/strong&gt;  for Yes and  &lt;strong&gt;Which stylesheet format would you like to use?&lt;/strong&gt;  Choose  &lt;strong&gt;CSS&lt;/strong&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 2 — Generating Angular 14 CRUD Components and Service
&lt;/h1&gt;

&lt;p&gt;Next, we need to generate a bunch of components and a service using the Angular CLI as follows:&lt;/p&gt;

&lt;p&gt;$ ng generate service services/product&lt;br&gt;&lt;br&gt;
$ ng g c components/product-create&lt;br&gt;&lt;br&gt;
$ ng g c components/product-details&lt;br&gt;&lt;br&gt;
$ ng g c components/product-list&lt;/p&gt;

&lt;p&gt;We have generated three components  &lt;code&gt;product-list&lt;/code&gt;,  &lt;code&gt;product-details&lt;/code&gt;,  &lt;code&gt;product-create&lt;/code&gt;  and a product service that provides the necessary methods for sending HTTP requests to the server.&lt;/p&gt;

&lt;p&gt;We also have the following artifacts:&lt;/p&gt;

&lt;p&gt;– The  &lt;code&gt;src/app/app-routing.module.ts&lt;/code&gt;  module will contain routes for each component. This file is automatically generated by Angular CLI when you answered Yes for routing. – The  &lt;code&gt;App&lt;/code&gt;  component contains the router view and navigation bar.&lt;br&gt;&lt;br&gt;
– The  &lt;code&gt;src/app/app.module.ts&lt;/code&gt;  module declares our Angular components and import the necessary modules such Angular  &lt;code&gt;HttpClient&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Please continue reading in  &lt;a href="https://www.techiediaries.com/angular-11-crud-rest-api-tutorial/" rel="noopener noreferrer"&gt;Angular CRUD Example&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>angular</category>
    </item>
    <item>
      <title>Angular 10 CRUD Application Tutorial [PDF eBook]</title>
      <dc:creator>Ahmed Bouchefra</dc:creator>
      <pubDate>Thu, 27 Aug 2020 16:00:38 +0000</pubDate>
      <link>https://forem.com/programmerspace/angular-10-crud-application-tutorial-pdf-ebook-i34</link>
      <guid>https://forem.com/programmerspace/angular-10-crud-application-tutorial-pdf-ebook-i34</guid>
      <description>&lt;p&gt;Throughout this tutorial, We'll be learning how to build an Angular 10 CRUD application to consume a REST API, create, read, modify, and search data.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://www.techiediaries.com/angular-10-crud-bootstrap-tutorial.pdf" rel="noopener noreferrer"&gt;Download this tutorial as a PDF ebook&lt;/a&gt; for offline reading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can also read this tutorial online from:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;https://www.techiediaries.com/angular-10-crud-example-web-api/&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing our Angular 10 CRUD Application
&lt;/h2&gt;

&lt;p&gt;We will learn how to build an Angular 10 front-end application that fetches data from a REST API of products:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Each product has id, name, description, availability status.&lt;/li&gt;
&lt;li&gt;  Users would be able to create, retrieve, update, and delete products.&lt;/li&gt;
&lt;li&gt;  Users can search for products by name.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The REST API Endpoints
&lt;/h2&gt;

&lt;p&gt;We'll be building an Angular 10 frontend app for a presumed REST API exporting the following REST API endpoints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;POST /api/products create new product&lt;/li&gt;
&lt;li&gt;GET /api/products retrieve all products&lt;/li&gt;
&lt;li&gt;GET /api/products/:id retrieve a product by  &lt;code&gt;:id&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;PUT /api/products/:id update a product by  &lt;code&gt;:id&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;DELETE /api/products/:id delete a product by  &lt;code&gt;:id&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;DELETE /api/products delete all products&lt;/li&gt;
&lt;li&gt;GET /api/products?name=[keyword] find all products which name contains  the passed &lt;code&gt;keyword&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of them can work well with this Angular App.&lt;/p&gt;

&lt;h2&gt;
  
  
  Angular 10 CRUD App Structure
&lt;/h2&gt;

&lt;p&gt;These are the components of our CRUD app:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The  &lt;code&gt;App&lt;/code&gt;  component is the parent of all other components and contains a  &lt;code&gt;router-outlet&lt;/code&gt; directive where the router will be inserting any matched component. It also contains a navigation bar that contains links to the app routes using  &lt;code&gt;routerLink&lt;/code&gt; directive.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;–  &lt;code&gt;ProductListComponent&lt;/code&gt;  which displays the list of products.&lt;br&gt;&lt;br&gt;
–  &lt;code&gt;ProductUpdateComponent&lt;/code&gt;  which displays a form for editing product’s details by  &lt;code&gt;:id&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
–  &lt;code&gt;ProductCreateComponent&lt;/code&gt;  which displays a form for creating a new product.&lt;/p&gt;

&lt;p&gt;The components use the &lt;code&gt;ProductService&lt;/code&gt;  methods for actually making CRUD operations against the REST API. The service makes use of Angular  10 &lt;code&gt;HTTPClient&lt;/code&gt;  to send HTTP requests to the REST and process responses.&lt;/p&gt;

</description>
      <category>angular</category>
    </item>
    <item>
      <title>Angular 14 Promise by Example</title>
      <dc:creator>Ahmed Bouchefra</dc:creator>
      <pubDate>Tue, 25 Aug 2020 07:19:38 +0000</pubDate>
      <link>https://forem.com/programmerspace/angular-10-promise-by-example-bne</link>
      <guid>https://forem.com/programmerspace/angular-10-promise-by-example-bne</guid>
      <description>&lt;p&gt;In this tutorial, we'll learn about JavaScript promises and we'll see how to use them by example with Angular 14 and &lt;code&gt;HttpClient&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Make sure to check &lt;a href="https://10xdev.space/" rel="noopener noreferrer"&gt;10xdev.space&lt;/a&gt; for career growth, money making tips,devpreneurship and learning paths for developers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What's a JavaScript Promise?
&lt;/h2&gt;

&lt;p&gt;A  &lt;strong&gt;promise&lt;/strong&gt;  is a JavaScript object that may produce a value at some point in time. A  &lt;strong&gt;promise&lt;/strong&gt;  may be in one of 4 possible states: fulfilled, rejected, pending or settled.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Promises simplify deferred and asynchronous computations. A promise represents an operation that hasn't completed yet. &lt;a href="https://web.dev/promises/" rel="noopener noreferrer"&gt;Source&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A promise can be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;fulfilled&lt;/strong&gt; - The action relating to the promise succeeded&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;rejected&lt;/strong&gt; - The action relating to the promise failed&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;pending&lt;/strong&gt; - Hasn't fulfilled or rejected yet&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;settled&lt;/strong&gt; - Has fulfilled or rejected&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is an example of promise in plain JavaScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;promise&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Promise Resolved&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
&lt;span class="p"&gt;})&lt;/span&gt; 

&lt;span class="nx"&gt;promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;success&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;success&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
    &lt;span class="p"&gt;})&lt;/span&gt; 
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
    &lt;span class="p"&gt;});&lt;/span&gt; 
&lt;span class="c1"&gt;// Output: Promise Resolved&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Promises can be executed by calling the  &lt;code&gt;then()&lt;/code&gt;  and  &lt;code&gt;catch()&lt;/code&gt;  methods.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;then()&lt;/code&gt;  method takes two callback functions as parameters and is invoked when a promise is either resolved or rejected.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;catch()&lt;/code&gt; method takes one callback function and is invoked when an error occurs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Promises with TypeScript and Angular 14 by Example
&lt;/h2&gt;

&lt;p&gt;Let's now see how to use Promises in Angular 14 to work with HTTP  asynchronously. &lt;/p&gt;

&lt;p&gt;Head back to a folder where you want to create your project. Next open a command line interface and run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;ng new angular14promises &lt;span class="nt"&gt;--routing&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt; &lt;span class="nt"&gt;--style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;css
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a new Angular 14 application with no routing and CSS for stylesheets format. &lt;/p&gt;

&lt;p&gt;Now open the  &lt;code&gt;src/app/app.module.ts&lt;/code&gt;  file and import  &lt;code&gt;HttpClientModule&lt;/code&gt;  and add it inside the  &lt;code&gt;imports&lt;/code&gt;  array as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;BrowserModule&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/platform-browser&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;NgModule&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;AppComponent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./app.component&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;HttpClientModule&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@angular/common/http&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;NgModule&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;declarations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nx"&gt;AppComponent&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;imports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nx"&gt;BrowserModule&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;HttpClientModule&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;providers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
  &lt;span class="na"&gt;bootstrap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;AppComponent&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, open the &lt;code&gt;src/app/app.component.ts&lt;/code&gt;  file and add the following code to send an HTTP GET request and process the response using a Promise.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@angular/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;HttpClient&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@angular/common/http&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;app-root&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;templateUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./app.component.html&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;styleUrls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./app.component.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AppComponent&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Angular 10 and Promises Example&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nx"&gt;API_KEY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;e40d07f00b094602953cc3bf8537477e&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="nx"&gt;httpClient&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;HttpClient&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;

  &lt;span class="nf"&gt;ngOnInit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Angular 10 Promises&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetchDataAsPromise&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
      &lt;span class="p"&gt;})&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Promise rejected with &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
      &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nf"&gt;fetchDataAsPromise&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;httpClient&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="s2"&gt;`https://newsapi.org/v2/top-headlines?sources=techcrunch&amp;amp;apiKey=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;API_KEY&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
      &lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toPromise&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We import  &lt;code&gt;HttpClient&lt;/code&gt;  and inject  it  via the component constructor and use it to send the HTTP request.&lt;/p&gt;

&lt;p&gt;Next, we call the &lt;code&gt;get()&lt;/code&gt; method to send the request and the &lt;code&gt;toPromise()&lt;/code&gt; method to convert the returned RxJS Observable to a promise.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;  &lt;span class="nf"&gt;fetchDataAsPromise&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;httpClient&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="s2"&gt;`https://newsapi.org/v2/top-headlines?sources=techcrunch&amp;amp;apiKey=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;API_KEY&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
      &lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toPromise&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the &lt;code&gt;ngOnInit()&lt;/code&gt; life-cycle method, we send the actual request by calling the  &lt;code&gt;then()&lt;/code&gt;  method of the promise as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetchDataAsPromise&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
      &lt;span class="p"&gt;})&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Promise rejected with &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
      &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the promise is resolved successfully  we simply output the data in the console and in case of an error we display the error.&lt;/p&gt;

&lt;p&gt;In plain JavaScript, you can send http requests with the &lt;a href="https://30daysofjavascript.com/fetch-async-await-json/" rel="noopener noreferrer"&gt;JavaScript Fetch&lt;/a&gt; API.&lt;/p&gt;

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

&lt;p&gt;We have seen how JavaScript promises are used with Angular 10 by example and how to make asynchronous operations such as HTTP requests instead of observables. &lt;/p&gt;

</description>
      <category>angular</category>
    </item>
    <item>
      <title>How to Delete Local/Remote Git Branches</title>
      <dc:creator>Ahmed Bouchefra</dc:creator>
      <pubDate>Fri, 14 Aug 2020 22:10:15 +0000</pubDate>
      <link>https://forem.com/programmerspace/how-to-delete-local-remote-git-branches-3o96</link>
      <guid>https://forem.com/programmerspace/how-to-delete-local-remote-git-branches-3o96</guid>
      <description>&lt;p&gt;If you have previously worked with Git for versioning your Angular code, there is a good chance that you had some situation where you wanted to delete a remote branch or multiple branches. This happens many times to developers, particularly in large projects.&lt;/p&gt;

&lt;p&gt;In this article, we'll learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  How to delete a local branch in your Git repository,&lt;/li&gt;
&lt;li&gt;  How to delete a remote branch in Git,&lt;/li&gt;
&lt;li&gt;  How to delete all Git branches which have been merged,&lt;/li&gt;
&lt;li&gt;  How to remove all local branches not on remote,&lt;/li&gt;
&lt;li&gt;  How to delete all your local Git branches except master.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before tackling how to delete a remote branch, we’ll first see how to delete a branch in the local Git repository.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Version control systems are an indispensable tool in modern web development that can help you solve many issues related to every task. Git is one of the most popular version control systems nowadays.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Before we proceed to learn how to delete local and remote branches in Git, let's define what's a Git branch and the side effects of deleting branches.&lt;/p&gt;

&lt;p&gt;A branch in Git is a pointer to a commit. If you delete a branch, it deletes the pointer to the commit. This means if you delete a branch that is not yet merged and the commits become unreachable by any other branch or tag, the Git garbage collection will eventually remove the unreachable commits.&lt;/p&gt;

&lt;p&gt;Read the full article on &lt;a href="https://www.techiediaries.com/delete-local-remote-git-branches/" rel="noopener noreferrer"&gt;Techiediaries&lt;/a&gt;&lt;/p&gt;

</description>
      <category>git</category>
    </item>
    <item>
      <title>Add Bootstrap 4 with Vue CLI 3/4</title>
      <dc:creator>Ahmed Bouchefra</dc:creator>
      <pubDate>Thu, 13 Aug 2020 13:08:19 +0000</pubDate>
      <link>https://forem.com/programmerspace/add-bootstrap-4-with-vue-cli-3-4-4k6d</link>
      <guid>https://forem.com/programmerspace/add-bootstrap-4-with-vue-cli-3-4-4k6d</guid>
      <description>&lt;p&gt;In this tutorial, we’ll see by example how to integrate Bootstrap 4 with Vue.js using Bootstrap-Vue and Vue CLI.&lt;/p&gt;

&lt;p&gt;We'll particularly see how to use the Bootstrap Vue CLI plugin via the &lt;code&gt;vue add @techiediaries/bootstrap&lt;/code&gt; command to quickly install Bootstrap in your Vue project without much hassle.&lt;/p&gt;

&lt;p&gt;Bootstrap is a popular HTML/CSS framework for building responsive websites. However, for most components that need JavaScript,   &lt;a href="http://jquery.com/" rel="noopener noreferrer"&gt;jQuery&lt;/a&gt;  is required. Let's see how to use Bootstrap 4 with Vue.js using Bootstrap-Vue that provides an implementation without depending a jQuery.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using Bootstrap with Vue.js
&lt;/h2&gt;

&lt;p&gt;Since Bootstrap depends on jQuery, using it with Vue.js is somehow tricky. So the community has created some implementations that remove the jQuery requirement:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://bootstrap-vue.js.org/" rel="noopener noreferrer"&gt;Bootstrap-Vue&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://yuche.github.io/vue-strap/" rel="noopener noreferrer"&gt;VueStrap&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this tutorial, we'll see how to use Bootstrap-Vue.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Use  Bootstrap-Vue
&lt;/h2&gt;

&lt;p&gt;You can use Bootstrap-Vue in various ways such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installing it from npm using the  &lt;code&gt;npm i bootstrap-vue&lt;/code&gt; command,&lt;/li&gt;
&lt;li&gt; Using vue-cli templates to scaffold  preconfigured projects such as &lt;code&gt;webpack simple&lt;/code&gt; and &lt;code&gt;webpack&lt;/code&gt;,&lt;/li&gt;
&lt;li&gt; Using the Bootstrap Vue CLI plugin via the &lt;code&gt;vue add @techiediaries/bootstrap&lt;/code&gt; command&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's see how you can quickly add Bootstrap 4 to your Vue.js project using &lt;code&gt;vue add @techiediaries/bootstrap&lt;/code&gt; from this &lt;a href="https://www.techiediaries.com/add-bootstrap-4-vue-cli/" rel="noopener noreferrer"&gt;article&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>vue</category>
    </item>
  </channel>
</rss>
