<?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: The Educative Team</title>
    <description>The latest articles on Forem by The Educative Team (@educativeinc).</description>
    <link>https://forem.com/educativeinc</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%2F246442%2F81bbdd1a-3596-4e44-b522-758c0839afa6.png</url>
      <title>Forem: The Educative Team</title>
      <link>https://forem.com/educativeinc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/educativeinc"/>
    <language>en</language>
    <item>
      <title>When to use Kubernetes deployments, pods, and services</title>
      <dc:creator>The Educative Team</dc:creator>
      <pubDate>Wed, 23 Sep 2020 19:32:45 +0000</pubDate>
      <link>https://forem.com/educative/when-to-use-kubernetes-deployments-pods-and-services-2p4h</link>
      <guid>https://forem.com/educative/when-to-use-kubernetes-deployments-pods-and-services-2p4h</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was written by &lt;a href="https://au.linkedin.com/in/scott-coulton-22864813" rel="noopener noreferrer"&gt;Scott Coulton&lt;/a&gt;, a Microsoft Developer Advocate, CNCF Ambassador, and Docker Captain. He has over 10 years of experience as a software engineer in the managed services and hosting space. His design strengths are in cloud computing, automation, and security space.&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;When you first start your Kubernetes journey, the first thing you need to learn is how to deploy an application. There are multiple resource types that you can use, including &lt;strong&gt;pods, deployments&lt;/strong&gt; and &lt;strong&gt;services&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Today, we will first explain what each resource type does and then discuss when and why to use them in your apps. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We will discuss:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Quick refresher on Kubernetes&lt;/li&gt;
&lt;li&gt;What are Pods?&lt;/li&gt;
&lt;li&gt;What are Services?&lt;/li&gt;
&lt;li&gt;What are Deployments?&lt;/li&gt;
&lt;li&gt;What to learn next&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick refresher on Kubernetes
&lt;/h2&gt;

&lt;p&gt;Kubernetes is an open-source container management platform for deploying and managing containerized workloads.  When running containers in production, you'll have dozens, even thousands of containers. These containers need to be deployed, managed, and connected, which is hard to do manually. That's where Kubernetes comes in. Think of it like a &lt;strong&gt;container scheduler&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Kubernetes is designed to work alongside &lt;a href="https://www.educative.io/blog/docker-kubernetes-beginners-guide" rel="noopener noreferrer"&gt;Docker&lt;/a&gt;, which is the containerization platform that packages your application and all dependencies together as a container.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Simplified:&lt;/strong&gt; Docker is used to isolate, pack, and ship your application as containers. Kubernetes is the container scheduler for deploying and scaling your application.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;With Kubernetes, we can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploy services and roll out new releases without downtime, &lt;/li&gt;
&lt;li&gt;Run on a private or public cloud&lt;/li&gt;
&lt;li&gt;Place and scale replicas of a service on the most appropriate server&lt;/li&gt;
&lt;li&gt;Validate the health of our services &lt;/li&gt;
&lt;li&gt;Mount volumes for stateful applications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now that we have a refresher on Kubernetes, let's jump into some of its resources and discuss when to use them. We'll begin with &lt;em&gt;pods.&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What are Pods?
&lt;/h2&gt;

&lt;p&gt;A pod is the lowest, or more atomic unit of an application in Kubernetes. It's important to note that a pod is not equal to a container in the Docker world. A pod can be made up of &lt;strong&gt;multiple containers&lt;/strong&gt;.  If you have come from a pure Docker background, this can be hard to wrap your head around.&lt;/p&gt;

&lt;p&gt;Think of this like a Kubernetes abstraction that represents a group of containers and shared resources for them. For example, a Pod could include a container with your Node.js app and another container that feeds data to the web server.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A pod is a way to represent a running process in a cluster.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If a pod can have more than one container, how does it work? There are some limits we need to be aware of. A pod has the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A single IP address&lt;/li&gt;
&lt;li&gt;Share localhost&lt;/li&gt;
&lt;li&gt;A shared IPC space&lt;/li&gt;
&lt;li&gt;A shared network port range&lt;/li&gt;
&lt;li&gt;Shared volumes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The containers in a pod talk to each other via local host, whereas pod-to-pod communication is done via services. As you can see from the illustration, the containers in a pod share an IP Address.&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%2Fi%2Fzrr4574bj1u0amcrtp0h.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%2Fi%2Fzrr4574bj1u0amcrtp0h.png" alt="Alt Text" width="800" height="214"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pods are a great way for you to deploy an application, but there is some limitation to the pod resource type. A pod is a single entity, and if it fails, it cannot restart itself. This won’t suit most use cases, as we want our applications to be highly available. But Kubernetes has this issue solved, and we will look at how to tackle high availability further on in the post.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Nodes vs. Pods&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Kubernetes, a pod will always run on a node. Think of a node like a worker machine managed by the master. A node can have multiple pods, and the master automatically schedules the pods across a node.&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h3&gt;
  
  
  Anatomy of a Pod
&lt;/h3&gt;

&lt;p&gt;Pods are designed to run multiple processes that should act as a cohesive unit. Those processes are wrapped in &lt;strong&gt;containers&lt;/strong&gt;. All the containers that form a pod run on the same machine and cannot be split across multiple nodes.&lt;/p&gt;

&lt;p&gt;All the processes (or containers) inside a Pod share the same resources (such as storage), and they can communicate with each other through &lt;code&gt;localhost&lt;/code&gt;. A &lt;strong&gt;volume&lt;/strong&gt; is like a directory with shareable data. They can be accessed by all the containers and share the same data.&lt;/p&gt;



&lt;h3&gt;
  
  
  Replication controller
&lt;/h3&gt;

&lt;p&gt;We just learned that pods are mortal. If they die, that is their end. But what if you want to have three versions of the same pod running for availability?&lt;/p&gt;

&lt;p&gt;Enter the &lt;strong&gt;&lt;em&gt;replication controller&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The main responsibility of the replication controller is to &lt;strong&gt;prevent against failure&lt;/strong&gt;. It sits above the pod resource type and controls it. Let’s look at an example. &lt;/p&gt;

&lt;p&gt;Say I want to deploy 4 of pod x. I would create a replica set. A replica set has a defined number of pods that need to be running (in this case, 4). If one of the pods fails or dies, the replication controller will start a new pod for me and again, I will still have 4 versions of pod x running. &lt;/p&gt;

&lt;p&gt;This functionality handles this issue of pods. It's important to note, however, that the replication controller does not handle everything related to pods, namely, lifecycle. Say we want to upgrade the pods without downtime. A replication controller will not look after this.&lt;/p&gt;

&lt;p&gt;Now that we've learned about pods, let's move onto the next Kubernetes resource: &lt;em&gt;services.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  Keep the learning going.
&lt;/h3&gt;

&lt;p&gt;Master Kubernetes without scrubbing through videos or documentation. Educative's text-based courses are easy to skim and feature live coding environments, making learning quick and efficient. &lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;a href="https://www.educative.io/courses/practical-guide-to-kubernetes" rel="noopener noreferrer"&gt;A Practical Guide to Kubernetes&lt;/a&gt; &lt;/b&gt;&lt;/p&gt;
&lt;/blockquote&gt;



&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What are Services?
&lt;/h2&gt;

&lt;p&gt;If we want to have connectivity to our pods, we will need to create a service. In Kubernetes, a service is a network abstraction over a set of pods. Think of this as group of pods running on a cluster. Kubernetes services are often used to power a &lt;a href="https://www.educative.io/blog/microservices-architecture-tutorial-all-you-need-to-get-started" rel="noopener noreferrer"&gt;microservice architecture&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Kubernetes gives pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them. They provide features for standardizing a cluster, such as: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Load balancing&lt;/li&gt;
&lt;li&gt;Zero-downtime deployments&lt;/li&gt;
&lt;li&gt;Service discovery between applications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This allows for the traffic to be load balanced for failures. A service allows Kubernetes to set a single DNS record for the pods. As we mentioned earlier, each pod has a separate IP address. With the service resource type, you would usually define a selector like the example below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;apiVersion&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;v1&lt;/span&gt;
&lt;span class="n"&gt;kind&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Service&lt;/span&gt;
&lt;span class="n"&gt;metadata&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
  &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;my&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;service&lt;/span&gt;
&lt;span class="n"&gt;spec&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
  &lt;span class="n"&gt;selector&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;MyApp&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In addition to this, &lt;code&gt;kube-proxy&lt;/code&gt; also creates a virtual IP in the cluster to access the service. This virtual IP then routes to the pod IPs. If the pod IPs change or new pods are deployed, the service resource type will track the change and update the internal routing on your behalf.&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%2Fi%2Fqdykr7s0wbqr9gwpjwjc.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%2Fi%2Fqdykr7s0wbqr9gwpjwjc.png" alt="Alt Text" width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  What are Deployments?
&lt;/h2&gt;

&lt;p&gt;Now for the last piece of the puzzle: deployments. The deployment resource type sits above a replica set and can manipulate them. In other words, deployments provide updates for pods replica sets.&lt;/p&gt;

&lt;p&gt;To do so, you describe a desired state in a Deployment, and the Deployment Controller will change to the desired state at a controlled rate. This allows you to run a stateless application. If you need to do an upgrade, you need to replace the replica set. This action will cause downtime to your application.&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%2Fi%2Fo8qags12hbl2l5lz6vkv.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%2Fi%2Fo8qags12hbl2l5lz6vkv.png" alt="Alt Text" width="800" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the main benefits of Kubernetes is high availability. Deployments give us the functionality to do &lt;strong&gt;upgrades without downtime.&lt;/strong&gt; As you do in a replica set, you specify the number of pods you would like to run. &lt;/p&gt;

&lt;p&gt;Once you trigger an update, a deployment will do a rolling upgrade on the pods while ensuring that the upgrade is successful for each pod before moving to the next. &lt;/p&gt;

&lt;p&gt;Let's look at an example of a deployment to see how they are created.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;kubectl&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt; &lt;span class="err"&gt;\&lt;/span&gt;
    &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="n"&gt;deploy&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;go&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;demo&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;yml&lt;/span&gt; &lt;span class="err"&gt;\&lt;/span&gt;
    &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;record&lt;/span&gt;
&lt;span class="n"&gt;kubectl&lt;/span&gt; &lt;span class="n"&gt;get&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="n"&gt;deploy&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;go&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;demo&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;yml&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output of the latter command is as follows.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;NAME&lt;/span&gt;           &lt;span class="n"&gt;READY&lt;/span&gt;   &lt;span class="n"&gt;UP&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;TO&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;DATE&lt;/span&gt;   &lt;span class="n"&gt;AVAILABLE&lt;/span&gt;   &lt;span class="n"&gt;AGE&lt;/span&gt;
&lt;span class="k"&gt;go&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;demo&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;   &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;     &lt;span class="m"&gt;1&lt;/span&gt;            &lt;span class="m"&gt;0&lt;/span&gt;           &lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, what happens if we rollout a new version of our application and something goes wrong? Deployments have us covered there as well, as we can just as easily rollback a deployment. &lt;/p&gt;

&lt;p&gt;There is one caveat to this: if you are using a pvc (persistent volume claim) and have written something to the claim. That will not be rolled back. Deployments control replica sets, and replica sets control pods. So, when use a deployment resource type, you still need a service to access it.&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%2Fi%2Fn6dft40clka43ywetsr5.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%2Fi%2Fn6dft40clka43ywetsr5.png" alt="Alt Text" width="800" height="590"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Pro Tip:&lt;/strong&gt; In a production environment, the best practice is to use deployments for our applications within Kubernetes, but it's still important to understand how deployments work.&lt;/p&gt;
&lt;/blockquote&gt;



&lt;p&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What to learn next
&lt;/h2&gt;

&lt;p&gt;Congrats! You've now learned the basics of pods, services, and deployments. You've familiarized yourself with their uses, pros, and cons. There is still a lot to learn to master Kubernetes and understand all it has to offer for your apps. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A good next step would be to learn the following:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to define pods&lt;/li&gt;
&lt;li&gt;Components of pod scheduling&lt;/li&gt;
&lt;li&gt;Creating Split API pods&lt;/li&gt;
&lt;li&gt;Rolling back failed deployments&lt;/li&gt;
&lt;li&gt;Updating multiple objects &lt;/li&gt;
&lt;li&gt;and more &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To get started with these concepts and more, I recommend Educative's course &lt;strong&gt;&lt;a href="https://www.educative.io/courses/practical-guide-to-kubernetes" rel="noopener noreferrer"&gt;A Practical Guide to Kubernetes&lt;/a&gt;&lt;/strong&gt;. You'll start with the fundamentals of Kubernetes and learn how to build, test, deploy, and upgrade applications. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Happy learning!&lt;/em&gt;&lt;/p&gt;



&lt;h3&gt;
  
  
  Continue reading about Kubernetes and Docker
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.educative.io/blog/deploying-my-first-service-on-kubernetes-demystifying-ingress" rel="noopener noreferrer"&gt;Deploying your first service on Kubernetes: Demystifying ingress&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.educative.io/blog/docker-kubernetes-beginners-guide" rel="noopener noreferrer"&gt;Getting started with Docker and Kubernetes: a beginners guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.educative.io/blog/docker-compose-tutorial" rel="noopener noreferrer"&gt;Docker Compose Tutorial: advanced Docker made simple&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>docker</category>
      <category>kubernetes</category>
      <category>devops</category>
    </item>
    <item>
      <title>GitHub is reimagining the technical recruiting process</title>
      <dc:creator>The Educative Team</dc:creator>
      <pubDate>Fri, 20 Mar 2020 16:34:22 +0000</pubDate>
      <link>https://forem.com/educative/github-is-reimagining-the-technical-recruiting-process-2k6l</link>
      <guid>https://forem.com/educative/github-is-reimagining-the-technical-recruiting-process-2k6l</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally posted on &lt;a href="https://www.educative.io" rel="noopener noreferrer"&gt;Educative.io&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;“Even if you don’t land a job with us, we want to help you get a job somewhere.” — Salifu Abudulai, Head of Talent Attraction at GitHub&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%2Fi%2Fqaggbe0fxczlrg0bs65m.jpg" 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%2Fi%2Fqaggbe0fxczlrg0bs65m.jpg" alt="Alt Text" width="800" height="600"&gt;&lt;/a&gt; Salifu Abudulai&lt;/p&gt;

&lt;p&gt;When it comes to technical recruiting, the pressure is on. Companies are competing for talent in a pool that’s too small to meet demand. Recruiting teams are being asked to fill roles faster and meet increased diversity targets. Hiring managers want the certainty of candidates who have been there and done that, asking for senior resources who have demonstrated expertise solving problems at scale. These conflicting pressures make a small pond even smaller, with the same senior engineers bouncing from company to company. It isn’t working and GitHub realized the need to try something different.&lt;/p&gt;

&lt;p&gt;“GitHub brings together the world’s largest community of developers to discover, share, and build better software.” GitHub fosters community engagement and is part of the developer community. They are well positioned to get creative, with the ability to empathize with candidates, understand their journey, and innovate. One of the pain points Salifu Abudulai wants to eliminate is when, “candidates come into the system, and they never hear from us again.” The goal is to increase the pool of qualified, experienced, diverse candidates and GitHub recognizes the need to make a long term play. GitHub’s talent team has designed a “Nurturing Campaign” intended to build and maintain relationships with developer candidates hired today, or, if not, at some point in the future.&lt;/p&gt;

&lt;p&gt;“We want to create an ecosystem where we give something back,” Salifu says.&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%2Fi%2Ftsyzmmeletlyka05h35c.jpg" 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%2Fi%2Ftsyzmmeletlyka05h35c.jpg" alt="Alt Text" width="800" height="600"&gt;&lt;/a&gt; Hubbers (left to right) Brandon Ngo, Jared Valdron, Julie Hata, Amy Cano, Emily Bergen, Andi Aliko (kneeling), Victor Valdez, Sally Tran&lt;/p&gt;

&lt;p&gt;Nurturing comes naturally to Salifu Abudulai. Originally born in Ghana, Salifu lost his mother to a traffic accident when he was just a baby. As a 2-year-old, he had health challenges that left him unable to walk. His loving father allowed him to travel with missionaries to the U.S. to get the needed medical care. The treatments required more time than anticipated and Salifu was adopted to make it possible for him to continue his recovery. You would never have known any of this if you’d met Salifu as a college student studying Management Information Systems and playing football for the University of Tulsa. (His GitHub handle is pass-rush.) He knows from personal experience what it means to have others provide nurturing support so you can grow.&lt;/p&gt;

&lt;p&gt;After college and football, he saw a job in the paper for a consulting company called TEKsystems and he became the single point of contact for all technical project-based work. He gravitated toward technical recruiting and has thrived at meeting the challenge of finding talent for a variety of technical organizations, including Google, Zynga, CBS Interactive, OPower, GoPro and Pandora.&lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges technical recruiters face
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Lack of senior level talent
&lt;/h3&gt;

&lt;p&gt;One of the biggest challenges technical recruiters face is finding senior-level talent. Why? Because the competition among companies to hire the best senior engineers is fierce. Many engineers who are ready to make the move to senior migrate towards the big tech names like Amazon, Google, Facebook, Microsoft, among others.&lt;/p&gt;

&lt;p&gt;The hiring pool also shrinks the higher you go up the org chart. It requires a lot of resources to go out and find these potential hires. While diversity in the talent pool is increasing, most of these candidates have five years of experience or less.&lt;/p&gt;

&lt;h3&gt;
  
  
  Finding the communities is tough
&lt;/h3&gt;

&lt;p&gt;The number one approach for most recruiting teams is to go to conferences, meetups, and online communities where software engineers are active. While this can be an effective way to attract talent, these solutions typically engage those who are early in their career which doesn’t address the problem of finding senior-level talent.&lt;/p&gt;

&lt;p&gt;It’s counterproductive to go to a meetup or conference to accept resumes when you know they’re not a match for the openings you need to fill.&lt;/p&gt;

&lt;h2&gt;
  
  
  The GitHub Nurturing Campaign
&lt;/h2&gt;

&lt;p&gt;To address the shortcomings of traditional approaches, Salifu and the team at GitHub have come up with a nurturing campaign to help give candidates the best chance to succeed in their careers, at GitHub or elsewhere. To grow the pool, they will grow the candidates. The GitHub hiring process is spelled out on &lt;a href="https://www.codinginterview.com/github" rel="noopener noreferrer"&gt;codinginterview.com&lt;/a&gt;. The new difference in the candidate experience is the Nurturing Campaign being piloted now in partnership with Educative.&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%2Fi%2F81iz8bs3lsmr8qwwjpmb.jpg" 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%2Fi%2F81iz8bs3lsmr8qwwjpmb.jpg" alt="Alt Text" width="800" height="600"&gt;&lt;/a&gt; Amy Cano and Brandon Ngo&lt;/p&gt;

&lt;p&gt;GitHub is enhancing the candidate journey by investing in relationship building with candidates in the pipeline. Salifu is overflowing with ideas. “Where it makes sense, invite them to a training session. Invite them to events or conferences where Hubbers will be.” Because internal referrals are one of the best sources for talent, GitHub wants to make sure candidates have ways to engage with Hubbers.&lt;/p&gt;

&lt;p&gt;GitHub is also extending the candidate journey to stay engaged with candidates who do not receive an offer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How does it work?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Candidates get enrolled into their applicant tracking system by submitting an application for an open position or through one of the various conferences, meetups, and online communities. An auto-reply message thanks them for their interest and invites them to view &lt;a href="https://www.codinginterview.com/github" rel="noopener noreferrer"&gt;codinginterview.com&lt;/a&gt; and &lt;a href="https://github.com/about/careers" rel="noopener noreferrer"&gt;GitHub Open Positions&lt;/a&gt;. Candidates who make it past a phone screen with a recruiter receive an email with a 3-month gift subscription to &lt;a href="https://www.educative.io" rel="noopener noreferrer"&gt;Educative&lt;/a&gt;. Educative offers a full range of courses for interview prep, as well as many other beginning, intermediate and advanced topics. The first goal is to give candidates the information and resources that will help them perform well in an interview. If at any point they are not selected for a role, candidates will be tracked in their CRM.&lt;/p&gt;

&lt;p&gt;Once in their CRM, candidates continue to have access to Educative training, invitations to networking events, invitations to come into the office, and when a job opens up they’ll reach back out to candidates. At this point, candidates will know what to expect and what success looks like and be better prepared the next time. These helpful networking events and online training will be available to interviewers, and candidates can opt out at any time. GitHub is investing in growing the talent in the pool as well as growing the size of the pool. If they don’t offer you a job, they want to help you get a job somewhere.&lt;/p&gt;

&lt;p&gt;This approach helps GitHub address the lack of senior-level talent because, “You may not be a senior engineer today, but you will be 3 months from now, 6 months from now, etc.” This will help them keep in touch with potential interviewers and when those candidates are ready, GitHub hopes candidates consider them again.&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%2Fi%2Fqgnobgnpqkxcf7aet2zc.jpg" 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%2Fi%2Fqgnobgnpqkxcf7aet2zc.jpg" alt="Alt Text" width="800" height="600"&gt;&lt;/a&gt; Victor Valdez and Andi Aliko&lt;/p&gt;

&lt;h2&gt;
  
  
  The GitHub + Educative Partnership
&lt;/h2&gt;

&lt;p&gt;Educative first partnered with GitHub as a member of the &lt;a href="https://www.educative.io/github-students" rel="noopener noreferrer"&gt;GitHub Student Developer Pack&lt;/a&gt; and the &lt;a href="https://www.educative.io/github-educators" rel="noopener noreferrer"&gt;GitHub Teacher Toolbox&lt;/a&gt; which you can read more about &lt;a href="https://www.educative.io/blog/why-we-are-teaching-students-to-code-for-free" rel="noopener noreferrer"&gt;here&lt;/a&gt;. When the talent team began imagining the Nurturing Campaign, they thought of Educative. Educative’s mission is to cultivate a community of developers where they can learn and share their knowledge to maximize their economic opportunity. The Nurturing Campaign fits the community engagement values of both companies. “This is an invaluable resource, and I’ve never seen anyone else do this at any company I’ve been at,” says Salifu.&lt;/p&gt;

&lt;p&gt;For GitHub, this is a meaningful way that they can give back to candidates, and help them grow throughout their entire career. GitHub genuinely believes in giving back to the community and they want you to succeed whether that’s at GitHub or another company.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Can you imagine going through the interview process, not getting the job and the company says to you, hey you didn’t get this opportunity but we believe in you and here is some training to get you up to speed and we’ll invite you back in to the interview process when you’re done?” &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is the community member GitHub wants to be.&lt;/p&gt;

&lt;p&gt;This approach, although new, is helping GitHub reach new candidates, stay in touch with previous candidates, and ultimately give them the help they need to succeed. Carrie Olesen, GitHub’s CHRO, says, “When it comes to diversity, we benefit from being a global community and participating in and actively listening to what’s needed to drive change, and being able to learn and experiment together.”&lt;/p&gt;

&lt;p&gt;Understanding your candidates, like knowing your customer, allows a talent team to surface and pilot new ideas. New approaches will be necessary to compete in the tight talent market and GitHub knows how to innovate. The talent team at GitHub is creative and motivated. Salifu gets a lot of job satisfaction from investing in others, honoring and emulating the people who invested in him. He stays engaged with his heritage as well, traveling to Ghana this past December to participate in the historic homecoming known as The Year of Return. For Salifu, nurturing has come full circle.&lt;/p&gt;

</description>
      <category>github</category>
      <category>news</category>
      <category>career</category>
    </item>
    <item>
      <title>Behind the Screens: What happens when you type a URL in a browser</title>
      <dc:creator>The Educative Team</dc:creator>
      <pubDate>Tue, 19 Nov 2019 21:19:37 +0000</pubDate>
      <link>https://forem.com/educative/behind-the-screens-what-happens-when-you-type-a-url-in-a-browser-161d</link>
      <guid>https://forem.com/educative/behind-the-screens-what-happens-when-you-type-a-url-in-a-browser-161d</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally posted on &lt;a href="https://www.educative.io/" rel="noopener noreferrer"&gt;Educative.io&lt;/a&gt; by &lt;a href="https://www.linkedin.com/in/ayeshaalvi/" rel="noopener noreferrer"&gt;Ayesha Alvi&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;According to &lt;a href="https://www.statista.com/statistics/617136/digital-population-worldwide/" rel="noopener noreferrer"&gt;Statista&lt;/a&gt;, more than half of the world’s population consists of active Internet users. We rely on the internet for just about everything: checking email, calling an Uber, and ordering food and clothes. While most of us rely on the internet, what goes on ‘behind-the-screens’ eludes most.&lt;/p&gt;

&lt;p&gt;This post will allow you to understand what goes on when you enter a URL into a browser - a process that you not only interact with daily but also largely depend on.&lt;/p&gt;

&lt;p&gt;Fundamentally, this process can be broken down into a few steps. We’ll discuss the technological details of each in a way that anyone can understand.&lt;/p&gt;

&lt;p&gt;If you’d like to go beyond the scope of this post for a deep dive on networking fundamentals, you can visit &lt;a href="https://www.educative.io/courses/grokking-computer-networking" rel="noopener noreferrer"&gt;Grokking Computer Networking for Software Engineers&lt;/a&gt; and check out a free preview. This course will be helpful for those who are getting their software development career started. If you already are a software engineer, a deeper knowledge of networks will help to set you apart from the crowd of engineers who assume the network ‘just works’.&lt;/p&gt;

&lt;p&gt;Let’s get started!&lt;/p&gt;




&lt;h1&gt;
  
  
  What is a website?
&lt;/h1&gt;

&lt;p&gt;All websites are files. A barebones website is just an HTML file, however, most websites today comprise of several inter-linked files which include JavaScript and CSS.&lt;/p&gt;

&lt;p&gt;Websites exist on powerful computers called &lt;strong&gt;servers&lt;/strong&gt;. Servers are usually located somewhere remote from your computer. In order to display the website on your browser, it has to retrieve it from the server. Each server, hence, has an address through which it can be accessed called an &lt;strong&gt;IP address&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Retrieving a website from a server is a lot like retrieving goods from a warehouse. The warehouse is akin to the server because it is remote, has an address just like servers have IP addresses and stores goods just like servers store or &lt;strong&gt;host&lt;/strong&gt; websites.&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%2Flgu849zwwtvcxpw3pq7v.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%2Flgu849zwwtvcxpw3pq7v.png" alt="Alt Text" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;IP addresses are represented as four numbers each between 0 and 255 separated by dots. Here’s an example of an IP address:&lt;/p&gt;

&lt;center&gt; 203.128.22.10 &lt;/center&gt;

&lt;p&gt;Every device that is connected to the Internet has an IP address, regardless of whether it is a server or not. Your computer has an IP address too. The simplest way to find your computer’s IP address is is to visit &lt;a href="https://www.whatsmyip.org/" rel="noopener noreferrer"&gt;https://www.whatsmyip.org/&lt;/a&gt;. Note that all Internet-enabled devices have an IP address but not all of them are servers.&lt;/p&gt;

&lt;p&gt;If your browser &lt;em&gt;knows&lt;/em&gt; the IP address of the server on which a website exists, it will be able to access it. However, all it knows is the URL. &lt;/p&gt;



&lt;h1&gt;
  
  
  The Anatomy of a URL
&lt;/h1&gt;

&lt;p&gt;A &lt;strong&gt;URL or Uniform Resource Locator&lt;/strong&gt; is used to locate a resource, in our case, the website on a server. The requested resource can be a file of any kind, for example, an MP3 file, an image, or a cpp file. The URL tells your browser &lt;strong&gt;two things&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Domain name&lt;/strong&gt;: a unique name that identifies a website. Examples include, facebook.com, educative.io, and google.com. A domain name specifies which server a resource/website is on.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Path to file&lt;/strong&gt;: The files on the server have a location just the way your PC has a file system and each file has a location. The URL also tells where the specified resource that is requested is located on the server.  The files or resources on the server have locations that are specified in the URL.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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%2Ffpda4n88w3bes7y5efs9.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%2Ffpda4n88w3bes7y5efs9.png" alt="Alt Text" width="800" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Suppose you enter a URL like the one above into your browser. In this case, &lt;code&gt;course.php&lt;/code&gt; is the requested resource located inside the folder &lt;code&gt;allcourses&lt;/code&gt; on the server with the domain name &lt;code&gt;educative.io&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You might be wondering why URLs are used anyways. Why not just type IP addresses directly into browsers? &lt;/p&gt;

&lt;p&gt;Well, there are a number of reasons for this. &lt;strong&gt;First&lt;/strong&gt;, humans are generally not very good at memorizing random numbers. Imagine memorizing 73.22.49.2 over www&lt;span&gt;&lt;/span&gt;.Facebook.com. It’s easy enough for one website but imagine having to do this for all the websites you access in a day. You’d likely end up with the IP addresses written somewhere! So URLs are just practical. &lt;strong&gt;Second&lt;/strong&gt;, the server hosting the website may change over time which would mean the IP address would too. Keeping track of these changes is not pragmatic for users.&lt;/p&gt;



&lt;h1&gt;
  
  
  DNS
&lt;/h1&gt;

&lt;p&gt;So how does your browser figure out the IP address from a supplied URL?  Well, that is where the Internet’s directory service, &lt;strong&gt;Domain Name System or DNS&lt;/strong&gt;, comes in. DNS is used to &lt;em&gt;find&lt;/em&gt; IP addresses from domain names.&lt;/p&gt;

&lt;p&gt;These domain name to IP address mappings are called &lt;strong&gt;DNS records&lt;/strong&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%2Ff6q5va6loxrzkbzzchg2.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%2Ff6q5va6loxrzkbzzchg2.png" alt="Alt Text" width="762" height="112"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These DNS records are part of a distributed database which means all the records are not stored at any one server but they are &lt;em&gt;distributed&lt;/em&gt; amongst several servers.&lt;/p&gt;

&lt;p&gt;Since a full network intensive-resolution can slow down the process, it is more efficient to check if the mapping is already known than prematurely conducting one. This is done in a number of steps. &lt;strong&gt;First&lt;/strong&gt;, the browser’s local cache is checked. If it does not have the record, the OS’s cache is checked. If the record does not reside there either, the router is checked for the record. &lt;strong&gt;Lastly&lt;/strong&gt;, the query is sent to the ISP (Internet Service Provider) for it to check its cache.&lt;/p&gt;

&lt;p&gt;DNS servers are divided into zones that form a hierarchy. The servers at the top are called ‘root servers’ and they store IP addresses of other DNS servers called top level domain servers. Top-level domain (TLD) servers are divided by type, i.e., &lt;code&gt;.com&lt;/code&gt;, &lt;code&gt;.edu&lt;/code&gt;, etc. TLD servers have mappings to ‘second-level domain’ servers such as to a server for wikipedia.com and educative.io. These DNS servers that contain mappings to the actual servers that host the domain in question.&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%2Fedqrep09vh1ye6uctrq2.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%2Fedqrep09vh1ye6uctrq2.png" alt="Alt Text" width="800" height="289"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hence, if the record cannot be found locally, a full DNS resolution is conducted as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The first point of contact for a full resolution is a root server. As of the writing of this post, 1017 instances of root servers exist. Check out &lt;a href="https://root-servers.org/" rel="noopener noreferrer"&gt;https://root-servers.org/&lt;/a&gt; for more details and an interactive map!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The root server returns the IP address of the relevant top level domain server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The top level domain returns the IP address of the second level domain server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The second-level domain server contains the DNS record of the server we are looking for. The second-level domain server returns the IP address to the browser.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A good way to think of this is that a domain name is resolved in reverse:&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%2Fo5q3dt6j6iusc4yavlt1.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%2Fo5q3dt6j6iusc4yavlt1.png" alt="Alt Text" width="554" height="278"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;You can think of a dot being there after the URL which represents the root server. The root server returns the address of a top-level domain server, in this case for an io server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The io server then returns the address to the DNS server that knows the address of an Educative server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Educative DNS server returns the address to an Educative server.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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%2Fydfuppjwxijdmgd9knlc.jpg" 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%2Fydfuppjwxijdmgd9knlc.jpg" alt="Alt Text" width="660" height="371"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that the browser knows the IP address of the server, it can send a request to it.&lt;/p&gt;

&lt;h1&gt;
  
  
  HTTP
&lt;/h1&gt;

&lt;p&gt;These requests follow a ‘protocol’ or ‘rules of communication’ called &lt;strong&gt;HyperText Transfer Protocol (HTTP)&lt;/strong&gt;. This protocol dictates the format of the messages, when what message is sent, appropriate responses, and how messages are interpreted. HTTP messages are of two types: &lt;strong&gt;request&lt;/strong&gt; and &lt;strong&gt;response&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;An HTTP &lt;strong&gt;request message&lt;/strong&gt; consists of a &lt;strong&gt;request line&lt;/strong&gt; and &lt;strong&gt;headers&lt;/strong&gt;. The message starts with a request line and is followed by headers. Here’s a sample HTTP request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET /path/to/file/index.html HTTP/1.1

Host: www.educative.io

Connection: close

User-agent: Mozilla/5.0

Accept-language: fr

Accept: text/html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The request line consists of a &lt;strong&gt;request method&lt;/strong&gt;, a &lt;strong&gt;path&lt;/strong&gt;, and the &lt;strong&gt;HTTP version&lt;/strong&gt;. The request method, &lt;code&gt;GET&lt;/code&gt;, in the example above tells the server what to do. &lt;code&gt;GET&lt;/code&gt;, for example, tells the server that the client wants to retrieve the resource at the supplied path. Other examples of request methods include &lt;code&gt;DELETE&lt;/code&gt;, which tells the server to delete a resource at the given path, and &lt;code&gt;PUT&lt;/code&gt;, which tells the server to put a supplied resource at the given path. The HTTP version is also specified to cater for the differences between each.&lt;/p&gt;

&lt;p&gt;Next come the HTTP &lt;strong&gt;headers&lt;/strong&gt;. Headers allow the client to communicate extra information such as the server type and the date. Each header exists on a separate line, consists of a name, followed by a colon and then the value of the header. There are a number of headers. For example, the &lt;code&gt;connection&lt;/code&gt; header indicates whether it's a HTTP connection type. If you’d like a more detailed dive into headers, you can visit &lt;a href="https://www.educative.io/courses/grokking-computer-networking" rel="noopener noreferrer"&gt;Grokking Computer Networking for Software Engineers&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The server then sends an HTTP &lt;strong&gt;response message&lt;/strong&gt;. Here’s a sample response message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP/1.1 200 OK

Connection: close

Date: Tue, 18 Aug 2015 15: 44 : 04 GMT

Server: Apache/2.2.3 (CentOS)

Last-Modified: Tue, 18 Aug 2015 15:11:03 GMT 

Content-Length: 6821

Content-Type: text/html

[The object/file that was requested]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Response messages consist of a &lt;strong&gt;status line&lt;/strong&gt; to start with, followed by a number of &lt;strong&gt;headers&lt;/strong&gt;, followed by a blank line and ends with a resource if any was requested. &lt;/p&gt;

&lt;p&gt;The status line consists of the &lt;strong&gt;HTTP version&lt;/strong&gt; and a &lt;strong&gt;status code&lt;/strong&gt;. There are a few types of status codes. Are you familiar with the annoying &lt;code&gt;404 Not Found&lt;/code&gt;? &lt;/p&gt;

&lt;p&gt;Well, it’s an HTTP status code! Here’s a basic list and what each means:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;200 OK&lt;/strong&gt;: the request was successful, and the result is appended with the response message.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;404 File Not Found&lt;/strong&gt;: the requested object doesn’t exist on the server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;400 Bad Request&lt;/strong&gt;: generic error code that indicates that the request was in a format that the server could not comprehend.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;500 HTTP Internal Server Error&lt;/strong&gt;: the request could not be completed because the server encountered some unexpected error.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;505 HTTP Version Not Supported&lt;/strong&gt;: the requested HTTP version is not supported by the server.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Next, the browser receives the response, interprets it and displays something accordingly to the user. For instance, if an HTML page is returned, the browser interprets it and displays it accordingly.&lt;/p&gt;

&lt;p&gt;However, most websites today do not consist of simple HTML. This scenario is extremely oversimplified and this actually happening is very rare. Real world websites often consist of other resources such as images which are requested from the server via subsequent HTTP requests.&lt;/p&gt;

&lt;p&gt;There are many reasons why you would want to learn more about networks. &lt;/p&gt;

&lt;p&gt;If you want to start a career in software development, this knowledge will be immensely valuable. If you already are a software engineer, a deeper knowledge of networks will help to set you apart from the crowd of engineers who assume the network ‘just works’.&lt;/p&gt;

&lt;p&gt;Furthermore, network security is a very exciting discipline. In addition to research, ethical hacking and pentesting are viable careers in network security. However, it cannot be learned or fully understood without a very solid foundation in networks. &lt;/p&gt;

&lt;p&gt;Educative recently launched a course, &lt;a href="https://www.educative.io/courses/grokking-computer-networking" rel="noopener noreferrer"&gt;Grokking Computer Networking for Software Engineers&lt;/a&gt;, that will help you learn the most crucial aspects of networking.&lt;/p&gt;

&lt;p&gt;Happy learning!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>computerscience</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Learn C++: The Complete Guide for Beginners</title>
      <dc:creator>The Educative Team</dc:creator>
      <pubDate>Thu, 31 Oct 2019 19:32:01 +0000</pubDate>
      <link>https://forem.com/educative/how-to-learn-c-the-complete-guide-for-beginners-3mpi</link>
      <guid>https://forem.com/educative/how-to-learn-c-the-complete-guide-for-beginners-3mpi</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally posted on &lt;a href="https://www.educative.io/" rel="noopener noreferrer"&gt;Educative.io&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;C++ notoriously has a steep learning curve, but taking the time to learn this language will do wonders for your career and will set you apart from other developers. You’ll have an easier time picking up new languages, you’ll form real problem-solving skills, and build a solid foundation on the fundamentals of programming.&lt;/p&gt;

&lt;p&gt;C++ will help you instill good programming habits (i.e. clear and consistent coding style, comment the code as you write it, and limit the visibility of class internals to the outside world), and because there’s hardly any abstraction, you’re required to define just about every attribute to make your code work; this will force you to really understand what it is you’re doing and how your program will affect the system.&lt;/p&gt;

&lt;p&gt;Curious about why we think C++ is a good language to learn? Check out our article on &lt;em&gt;&lt;a href="https://www.educative.io/blog/c-is-a-good-first-language-to-learn" rel="noopener noreferrer"&gt;Why C++ is a good first language to learn&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;In this post, we will take you through a beginner’s roadmap to learning C++ so you can feel confident as you begin your journey. If you want to skip the reading and get hands-on with C++, you can visit this free course, &lt;a href="https://www.educative.io/courses/learn-cpp-from-scratch" rel="noopener noreferrer"&gt;Learn C++ from Scratch&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here’s what we’ll cover today:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Brief History of C++&lt;/li&gt;
&lt;li&gt;Overview of C++ Tools and Software&lt;/li&gt;
&lt;li&gt;Introduction to C++ Language and Syntax&lt;/li&gt;
&lt;li&gt;C++ Frequently Asked Questions&lt;/li&gt;
&lt;li&gt;Resources for Beginners&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let’s get started!&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Brief History of C++
&lt;/h1&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%2Fi%2Flscj3z06ljz2f8uez0yd.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%2Fi%2Flscj3z06ljz2f8uez0yd.png" alt="Alt Text" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A great way to get started with C++ is to learn about its history. C++ is one of the oldest programming languages, so there are many different versions. Having a sense of this history will situate you in the community of C++ programmers and give you a sense of its capabilities. It's always a good idea to familiarize yourself with past versions of a programming language, especially when you get into the professional workplace.&lt;/p&gt;

&lt;p&gt;The C++ programming language was invented in 1979 by &lt;a href="http://www.stroustrup.com/" rel="noopener noreferrer"&gt;Bjarne Stroustrup&lt;/a&gt; while working on his PhD thesis at Bell Labs. C++ was designed to be an extension of the programming language C, hence its original name, “C with Classes”. Stroustrup’s goal was to add flexibility and OOP (object-oriented programming) to the C language. He included features such as classes, strong type checking, default function arguments, and basic inheritance. The name was changed to C++ in 1983, which derives from the &lt;code&gt;++&lt;/code&gt; operator.&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%2Fj83hx81p29o86hef70ih.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%2Fj83hx81p29o86hef70ih.png" alt="Alt Text" width="270" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;C++ was released for commercial use in 1985, but it was not yet standardized. In 1990, Borland’s Turbo C++ compiler was released, which added many new features. The first international standard for C++ was published in 1998, known as C++98. This included The Standard Template Library, providing common programming functions and data structures. Based on feedback, the committee revised those standards in 2003, and the updated language was renamed to C++03.&lt;/p&gt;

&lt;p&gt;The language saw another revision in 2011 when C++11 was completed. This version includes features such as Regex support, new libraries, new syntax for loops, the &lt;code&gt;auto&lt;/code&gt; keyword, and new container classes, amongst other things. Since that time, two more revisions have been released, C++14 and C++17, which featured major revisions. There is currently another update in progress, C++20.&lt;/p&gt;

&lt;h1&gt;
  
  
  2. Overview of C++ Tools and Software
&lt;/h1&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%2Fi%2Fctiineppq4j8qehkl83h.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%2Fi%2Fctiineppq4j8qehkl83h.png" alt="Alt Text" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order to properly make C++ programs, you’ll need to be familiar with a few tools and softwares: a text editor, a C++ compiler, a linker, and libraries.&lt;/p&gt;

&lt;h2&gt;
  
  
  Text Editors
&lt;/h2&gt;

&lt;p&gt;In order to write a C++ program, you need a text editor. Think of this like a blank Microsoft Word Document; it is where you will actually write your code. Any text editor will do, and there are even some that come built into your computer, but we recommend using a text editor designed for coding. There are many options out there, but some of the most common text editors for C++ developers are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://notepad-plus-plus.org/downloads/" rel="noopener noreferrer"&gt;Notepad++&lt;/a&gt;: open-access, lightweight, simple&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://atom.io/" rel="noopener noreferrer"&gt;Atom&lt;/a&gt;: free, supports many languages, limited plugins&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.sublimetext.com/" rel="noopener noreferrer"&gt;Sublime Text&lt;/a&gt;: $80, unique features, simple layout&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://bluefish.openoffice.nl/features.html" rel="noopener noreferrer"&gt;Bluefish&lt;/a&gt;: lightweight, fast, multi-platform, supports many languages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Notepad++ text editor&lt;/strong&gt;&lt;br&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%2F5fjejhadm3qwvf89jg0k.gif" 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%2F5fjejhadm3qwvf89jg0k.gif" alt="Alt Text" width="456" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Atom text editor&lt;/strong&gt;&lt;br&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%2F9kbwxng05n1qt6lgxeug.gif" 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%2F9kbwxng05n1qt6lgxeug.gif" alt="Alt Text" width="800" height="433"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;
  
  
  Compilers
&lt;/h2&gt;

&lt;p&gt;A compiler goes through your source code to accomplish two important tasks: first, it checks that your code follows the C++ language rules; second, it translates your code into an object file. Some well-known compilers are GCC, Clang, and the Visual Studio C++ compiler. We don’t recommend Turbo C++, since it’s a bit out of date.&lt;/p&gt;
&lt;h2&gt;
  
  
  Linker
&lt;/h2&gt;

&lt;p&gt;Once the compiler does its magic, the object file is sent to a linker program which completes three tasks: first, it combines all your object files into a single program; second, it links library files to your program; and third, it exposes any cross-file naming or reference issues.&lt;/p&gt;
&lt;h2&gt;
  
  
  Libraries
&lt;/h2&gt;

&lt;p&gt;A library is essentially a prepackaged bundle of code that can be reused. The C++ library is called the C++ Standard Library, and this is linked to almost every C++ program. You can also add other libraries to your program if you have needs not met by the Standard Library. &lt;em&gt;Curious about the C++ Standard Library? Learn more about it &lt;a href="https://www.educative.io/blog/so-you-know-c-now-its-time-to-learn-the-standard-library" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Integrated Development Environment (IDE)
&lt;/h2&gt;

&lt;p&gt;Many C++ programmers use an IDE instead of a text editor and compiler. An IDE is a one-stop-shop for C++ programming. It includes a text editor, linker, compiler, and libraries. There is no right or wrong compiler to use. It all comes down to your needs and what layout is best for you. Some popular IDEs are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.codeblocks.org/" rel="noopener noreferrer"&gt;Code::Blocks&lt;/a&gt;: free, in-demand features, plugins by users&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;Visual Studio Code&lt;/a&gt;: open source, great features, cross-platform&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.eclipse.org/cdt/" rel="noopener noreferrer"&gt;Eclipse&lt;/a&gt;: open source, simple, cross-platform, need to install C++ components&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://developer.apple.com/xcode/" rel="noopener noreferrer"&gt;Xcode&lt;/a&gt;: only for MacOS, useful Mac features&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://netbeans.org/downloads/8.0.1/" rel="noopener noreferrer"&gt;Netbeans&lt;/a&gt;: free, project-based templates, cross-platform&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  3. Introduction to C++ Language and Syntax
&lt;/h1&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%2Fi%2Fvbqal7wbf77yhi1v6jt1.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%2Fi%2Fvbqal7wbf77yhi1v6jt1.png" alt="Alt Text" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;C++ is an object oriented programming language. This means that C++ programs are modeled around objects and classes, which you can control and manipulate by applying functions. OOP languages offer a clear structure to a program and help developers model real-world problems.&lt;/p&gt;

&lt;p&gt;The language is designed to provide you with a lot of freedom and power, which is both good and bad. You’re in full control of how your system utilizes resources; there is no automatic memory management like in Java; you have the ability to choose between how memory is allocated (i.e. stack or heap); there is no interpreter in C++ to stop you from writing buggy code.&lt;/p&gt;

&lt;p&gt;In order to get started with C++, you need to familiarize yourself with the syntax. This will pave the way for the rest of your C++ journey and help you create optimized programs that are safe and bug-free.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's look at some code&lt;/strong&gt;&lt;br&gt;
Looking at the code below, you may be wondering what all this is and what it means. Welcome to C++ syntax.&lt;/p&gt;

&lt;p&gt;What is syntax? Syntax is like the grammar of a programming language. It is the basic foundation for everything you’ll write in C++. These are the rules that define how you write and understand C++ code. Let’s look at an example of some code to familiarize ourselves with the syntax.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;span class="c1"&gt; //header file library &lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="k"&gt;namespace&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//using standard library&lt;/span&gt;

&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;//main function&lt;/span&gt;
  &lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"Hello World &lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// first object&lt;/span&gt;
  &lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"Learn C++ &lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//second object with blank line&lt;/span&gt;
  &lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"Educative Team"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//third object &lt;/span&gt;
  &lt;span class="k"&gt;return&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;//no other output or return&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c1"&gt;//end of code to execute&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The syntax explained&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;#include &amp;lt;iostream&amp;gt;&lt;/code&gt; is a header file library. A header file imports features into your program. We’re basically asking that the program copy the content from a file called &lt;code&gt;&amp;lt;iostream&amp;gt;&lt;/code&gt;. This stands for input and output stream, and it defines the standards for the objects in our code.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;using namespace std&lt;/code&gt; means that we are using object and variable names from the standard library (std). This statement is often abbreviated with the keyword &lt;code&gt;std&lt;/code&gt; and the operator &lt;code&gt;::&lt;/code&gt;. The &lt;code&gt;int main ( )&lt;/code&gt; is used to specify the main function. It is a very important part of C++ programs and is associated with every C++ program you write. A function essentially defines an action for your code. Anything within the curly brackets &lt;code&gt;{ }&lt;/code&gt; will be executed.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cout&lt;/code&gt; is an object (pronounced see - out). In this example, it defines our outputs: the strings of words. We write a new object using &lt;code&gt;cout&lt;/code&gt; on the second line. The character &lt;code&gt;\n&lt;/code&gt; makes the text execute on a different line. Including two &lt;code&gt;\n\n&lt;/code&gt; creates a blank space. By writing &lt;code&gt;return 0&lt;/code&gt;, we are telling the program that nothing will return. We are only outputting strings of text. Note that we use the &lt;code&gt;&amp;lt;&amp;lt;&lt;/code&gt; operator to name our objects. The semi colon &lt;code&gt;;&lt;/code&gt; functions like a period.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Tip: Leave notes for yourself in the code using &lt;code&gt;//&lt;/code&gt;. Any text after these dashes will not be executed. Leaving notes becomes increasingly important as you start to work with teams.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  C++ Terms and Vocabulary
&lt;/h1&gt;

&lt;p&gt;Now that we have a sense of what C++ code looks like, let’s define some of the terms we mentioned and introduce you to a few more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keywords
&lt;/h2&gt;

&lt;p&gt;Keywords are predetermined names that can be used to identify things in your code. Keywords are identifiers for particular objects, variables, or actions. You can also make your own keywords. Here are a few examples of keywords: &lt;code&gt;goto&lt;/code&gt;, &lt;code&gt;float&lt;/code&gt;, &lt;code&gt;public&lt;/code&gt;, &lt;code&gt;class(1)&lt;/code&gt;, &lt;code&gt;int&lt;/code&gt;. Take a look at a complete list of keywords &lt;a href="https://en.cppreference.com/w/cpp/keyword" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Variables
&lt;/h2&gt;

&lt;p&gt;Variables are like containers that store values. To declare a variable, you must give it a value and a &lt;code&gt;type&lt;/code&gt; using the correct keyword. All variables in C++ need a name, or identifier. There are some basic syntax rules to follow when making identifiers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Names are case sensitive&lt;/li&gt;
&lt;li&gt;Names can contain letters, numbers, and underscores&lt;/li&gt;
&lt;li&gt;Names must begin with a letter or an underscore&lt;/li&gt;
&lt;li&gt;Names cannot contain whitespaces or special characters (!, #, @, etc.)&lt;/li&gt;
&lt;li&gt;Names cannot use reserved keywords&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are six different types of variables:&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%2Frt2xg2prr07abpw35xrn.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%2Frt2xg2prr07abpw35xrn.png" alt="Alt Text" width="800" height="156"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Types
&lt;/h2&gt;

&lt;p&gt;Data types are the classifications for different kinds of data you can use in a program. Data types tell our variables what data they can store. There are three data types in C++:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Primitive data types: these are the built-in data that you can use to declare variables. They include integer, character, boolean, floating point, double floating point, void, and wide character.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Derived data types: these are derived from the primitive data types. They include function, reference, array, and pointer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User-Defined data types: these are defined by you, the programmer.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Strings
&lt;/h2&gt;

&lt;p&gt;Strings are objects in C++. They are a set of characters within &lt;code&gt;” “&lt;/code&gt; quotes, like our ”Hello World” string. Since they are objects, we can perform functions to them, like the &lt;code&gt;len ( )&lt;/code&gt; function, which determines the length of a string.&lt;/p&gt;

&lt;h2&gt;
  
  
  Operators
&lt;/h2&gt;

&lt;p&gt;Operators are symbols that manipulate our data and perform operations. In C++, we can overload operators to make them work for programmer-defined classes. Overloading an operator basically means that an operator can have more than one function at a time. There are four kinds of operators in the C++ language:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Arithmetic Operators&lt;/strong&gt; are used for mathematical operations. These work just like algebraic symbols.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="c1"&gt;// this adds x to y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Assignment Operators&lt;/strong&gt; are for assigning values to our variables&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="c1"&gt;// this defines x as 10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Comparison Operators&lt;/strong&gt; compare two values&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="c1"&gt;// determines x is greater than or equal to y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Logical Operators&lt;/strong&gt; determine the logic between values&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt; &lt;span class="c1"&gt;// will return true if both statements are true about x&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Objects
&lt;/h2&gt;

&lt;p&gt;An object is a collection of data that we can act upon. An object in C++ has an attribute (its traits) and method (its abilities). You construct objects using a class. Think of this like a blueprint for an object.&lt;/p&gt;

&lt;p&gt;You create a class using the &lt;code&gt;class&lt;/code&gt; keyword. You must define an access specifier, such as &lt;code&gt;public&lt;/code&gt;, &lt;code&gt;private&lt;/code&gt;, or &lt;code&gt;protected&lt;/code&gt;. The public keyword states that class is accessible from outside that class. Once you define your class, you can define your attributes and objects. Take a look below at an example of a class and object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="k"&gt;namespace&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Dog&lt;/span&gt; &lt;span class="c1"&gt;//this is the name of our class&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;public:&lt;/span&gt; 
    &lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"rover"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//this is an attribute &lt;/span&gt;
    &lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="n"&gt;gender&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"male"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;Dog&lt;/span&gt; &lt;span class="n"&gt;dogObj&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//here we are making an object of Dog class&lt;/span&gt;
  &lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"Dog name is: "&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;dogObj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;endl&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//by using . operator we can access the member of class&lt;/span&gt;
  &lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"Dog gender is: "&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;dogObj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gender&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;endl&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//accessing the public members of class Dog in main()&lt;/span&gt;
  &lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"Dog age is: "&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;dogObj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;endl&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;h2&gt;
  
  
  Functions
&lt;/h2&gt;

&lt;p&gt;Functions are blocks of code that run when they are invoked. They are the workhorse for your program and are used to perform operations and manipulations on your code. They are extremely important for code reusability and help to better modularize your code. Think of these like actions that you initiate. In C++, there are predetermined functions, like the &lt;code&gt;main ( )&lt;/code&gt; of our initial example.&lt;/p&gt;

&lt;p&gt;To create a function, you have to give it a name (called the declaration) and parentheses &lt;code&gt;( )&lt;/code&gt;. You can then invoke this function at any point by using that &lt;code&gt;name ( )&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;There are a lot of ways to use functions. You can also attach return values to your functions, which determine if a function should output any information. The &lt;code&gt;void&lt;/code&gt; keyword states that there will be no return. The &lt;code&gt;return&lt;/code&gt; keyword, on the other hand, will call for a data type output.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conditional Statements
&lt;/h2&gt;

&lt;p&gt;These allow you to perform checks on whether a block of code should be executed or not. There are four conditional statements in C++:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;if&lt;/code&gt;: a certain action will be performed if a certain condition is met&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;else&lt;/code&gt;: a certain action will be performed instead if that condition is not met&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;else if&lt;/code&gt;: a new condition will be tested if the first is not met&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;switch&lt;/code&gt;: tests a variable against a list of values&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Loops
&lt;/h2&gt;

&lt;p&gt;Loops are similar to conditional statements. They execute blocks of code as long as a certain condition is reached. There are two types of loops in C++:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;while loops&lt;/code&gt;: this loop will continue to iterate through your code while a condition returns true.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;for loops&lt;/code&gt;: this is used when you know the exact number of times you want to loop in your code&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now that you have a basic understanding of C++ syntax, let’s go over some FAQ and resources to get you started on your C++ journey.&lt;/p&gt;

&lt;h1&gt;
  
  
  4. C++ FAQ
&lt;/h1&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%2Fi%2Fclb84rj6yknd9zfd7n3w.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%2Fi%2Fclb84rj6yknd9zfd7n3w.png" alt="Alt Text" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How long does it take to learn C++?
&lt;/h3&gt;

&lt;p&gt;Well it really depends on what is meant by “learn”. If you’re serious about this language, then your learning is never done. Developers can devote their entire career to C++ and still feel as though they have more to learn.&lt;/p&gt;

&lt;p&gt;With that said, if you put in the work, you can learn enough C++ in 1-2 years and still be a great developer.&lt;/p&gt;

&lt;p&gt;In short, there is no one right answer to this question, and it largely depends on your learning style, goals, educational plan, and prerequisite knowledge.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is C++ used for?
&lt;/h3&gt;

&lt;p&gt;C++ is focused on large system performance, so it is used in a wide variety of programs and problems where performance is important. This includes, but is not limited to, operating systems, game development, 3D animation, web browsers (it is used in Firefox and Chrome), software for offices, medical software, and more. C++ is used in all Blizzard games, most console games, Adobe Photoshop, Mozilla Thunderbird, PDF technologies, and MRI scanners.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between C and C++?
&lt;/h3&gt;

&lt;p&gt;The main difference is that C++ is an object-oriented language while C is a procedural programming language. C does not allow for functions to be defined within structures, while C++ does. C and C++ also have some different functions, keywords, and memory allocation procedures.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between C++ and C#?
&lt;/h3&gt;

&lt;p&gt;C# is a much newer language (created by Microsoft in 2000), and is built off of C++, so they share similar syntaxes. One major difference between the two is their flexibility. C# shows you compiler warnings as you write code to help reduce errors, while C++ does not. C# only runs on Windows OS, while C++ can be run on any platform (MacOS, Linux, Windows, etc.). C# is great for mobile and web applications, while C++ is known for performance and programs that work directly with hardware. They also handle memory management a bit differently.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is C++ similar to other programming languages?
&lt;/h3&gt;

&lt;p&gt;C++ is the foundation for many other object-oriented programming languages like Java, JavaScript, Python, PHP, Rust, C#, and more. Learning the syntax of C++ will make it easier to learn other programming languages.&lt;/p&gt;

&lt;h3&gt;
  
  
  What’s the best programming language to learn?
&lt;/h3&gt;

&lt;p&gt;There’s really no one answer to this question, and every developer will tell you something different. It depends on what kinds of jobs interest you, your prerequisite knowledge, and your career goals. The truth is, every programming language is challenging to learn, but you are capable of learning any of them. A few benefits to starting with C++ are: the syntax is widespread, you’re forced to think about memory management, and it introduces you to multiple programming paradigms, which is a great way to expand your thinking and search for new approaches to problems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is C++ in demand? Does C++ pay well?
&lt;/h3&gt;

&lt;p&gt;Yes, and yes. If you put in the time, you will be rewarded. C++ developers already have high-paying salaries, and it’s expected that the salary will grow in the coming years. C++ is experiencing a resurgence of popularity since it is great for robust applications like self-driving cars and VR. Since C++ has a steeper learning curve than most languages, the skills you obtain will set you apart when you’re applying to jobs. Some &lt;a href="https://medium.com/@vardanator/why-cs-students-must-learn-c-as-their-main-programming-language-6d3b4f8720bd" rel="noopener noreferrer"&gt;developers&lt;/a&gt; argue that C++ will open doors that other programming languages just can’t.&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%2Fz9gpzr4h4vz4x193uv2z.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%2Fz9gpzr4h4vz4x193uv2z.png" alt="Alt Text" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  5. Resources for C++ Beginners
&lt;/h1&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%2Fi%2Fq95kw024k33wzr24tuke.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%2Fi%2Fq95kw024k33wzr24tuke.png" alt="Alt Text" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since C++ is such a mature language, there are a lot of resources available to new learners. With so many free resources out there, you can take charge of your learning. Here’s a list of the most useful, free resources for a C++ beginner.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tutorials/Online Courses
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.educative.io/courses/learn-cpp-from-scratch" rel="noopener noreferrer"&gt;Educative’s Free Learn C++ From Scratch Course&lt;/a&gt;:&lt;/strong&gt; &lt;br&gt;
Working with experts in the field, Educative has put together a free, one-stop-shop C++ tutorial for beginners. This text-based, highly-interactive course begins with an introduction to the fundamental concepts and then proceeds to cover more complex ideas such as multidimensional arrays, loops, inheritance, and more.&lt;/p&gt;

&lt;p&gt;Every chapter is loaded with hands-on practice, visualizations, and examples to make your learning easier. This course is also part one of our carefully designed &lt;a href="https://www.educative.io/track/c-plus-plus-for-programmers" rel="noopener noreferrer"&gt;learning track&lt;/a&gt;. Once you complete our from Scratch course, you’ll know what to learn next with the click of a button!&lt;/p&gt;

&lt;h3&gt;
  
  
  Community and Forums
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.meetup.com/" rel="noopener noreferrer"&gt;C++ Meetups&lt;/a&gt;: This is a free platform that connects groups of people who are interested in the same topics and hobbies. Search for local C++ groups and communities in your area.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dev.to/t/cpp"&gt;Dev.to C++ Community&lt;/a&gt;: This is an open access forum and resource for developers of all skill levels to get help, ask questions, and solve problems. The C++ community on Dev.to is very active, so you can turn here for articles, FAQ, and inspiring ideas.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.meetup.com/" rel="noopener noreferrer"&gt;GitHub C++ Community&lt;/a&gt;: GitHub is one of the most popular online communities and forums for developers around the globe. Here you can learn from other C++ developers, ask questions, and contribute to projects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/tagged/c%2B%2B" rel="noopener noreferrer"&gt;StackOverflow C++ Community&lt;/a&gt;: StackOverflow is an open-access forum where you can access questions and discussions on anything related to C++. StackOverflow is one of the best online communities for developers, and it is loaded with information to help you at any stage.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Online Training/Practice
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://edabit.com/challenges/cpp" rel="noopener noreferrer"&gt;Edabit&lt;/a&gt;: Edabit is like Duolingo for developers. You can search for online challenges in C++ and train in their embedded coding environments. The exercises range in difficulty and are searchable by tag.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://codingcompetitions.withgoogle.com/codejam/about/" rel="noopener noreferrer"&gt;Google Code Jam&lt;/a&gt;: Learn by competing with others on C++ projects. Code Jam is the longest running coding competition where you can solve puzzles and challenges using your new C++ skills.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://projecteuler.net/about" rel="noopener noreferrer"&gt;Project Euler&lt;/a&gt;: This is a great place to train your C++ skills by solving mathematical problems. The problems range in difficulty so you can keep using this platform as you grow in confidence and skill.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Style Guides and Libraries
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.stroustrup.com/" rel="noopener noreferrer"&gt;Bjarne Stroustrup’s Website&lt;/a&gt;: The creator of C++ maintains a website where he posts lots of useful information about the programming language, including &lt;a href="http://www.stroustrup.com/3rd_tour.pdf" rel="noopener noreferrer"&gt;free access to his book&lt;/a&gt; and a complete &lt;a href="http://www.stroustrup.com/glossary.html" rel="noopener noreferrer"&gt;glossary&lt;/a&gt; of terms. This site also documents the history of the language, research papers relating to computer programming, interviews, and more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.ece.uvic.ca/~frodo/cppbook/" rel="noopener noreferrer"&gt;C++ Lecture Slides&lt;/a&gt;: This site offers access to a variety of lecture slides relating to C++ programming. This site also offers information about libraries, the STL, and software tools.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.thefreecountry.com/sourcecode/cpp.shtml" rel="noopener noreferrer"&gt;The Free Country C++ Libraries&lt;/a&gt;: The Free Country offers free C++ libraries and source code. This will be more useful once you start building your own programs, or explore the libraries to familiarize yourself with C++ syntax and usage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://google.github.io/styleguide/cppguide.html" rel="noopener noreferrer"&gt;Google C++ Style Guide&lt;/a&gt;: Style guides are written by experienced programmers, and they outline how to maintain certain programs. A style guide is a great reference if you want to learn formatting rules and syntax.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;a href="https://www.educative.io/courses/learn-cpp-from-scratch" rel="noopener noreferrer"&gt;Get started today&lt;/a&gt; learning this exciting, popular programming language! Your journey to becoming a C++ developer begins today.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy learning!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Why we are teaching students to code for free</title>
      <dc:creator>The Educative Team</dc:creator>
      <pubDate>Wed, 30 Oct 2019 18:56:14 +0000</pubDate>
      <link>https://forem.com/educative/why-we-are-teaching-students-to-code-for-free-3aeo</link>
      <guid>https://forem.com/educative/why-we-are-teaching-students-to-code-for-free-3aeo</guid>
      <description>&lt;h1&gt;
  
  
  Educative has partnered with GitHub Education to be part of their &lt;a href="https://www.educative.io/github-students" rel="noopener noreferrer"&gt;Student Developer Pack&lt;/a&gt;!
&lt;/h1&gt;

&lt;p&gt;If you are a student, you can sign up with GitHub and receive &lt;strong&gt;6 months of free access to 60+ intro and advanced developer courses&lt;/strong&gt; on Educative. These courses cover in-demand topics like Web Development, Python, Machine Learning, Kubernetes, and more. Students of all levels can learn at no cost on our educational platform. And with many other amazing programs offered in GitHub’s Student Developer Pack, you’ll be able to excel, build confidence, and get started on any project you put your mind to.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Not a student?&lt;/strong&gt; We have something for you too! We’re proud to announce that we have made our Learn From Scratch courses completely free for everyone. We want to encourage beginners around the world, from all backgrounds and countries to start learning today. We know that it’s hard to be a beginner, so we’re making it easy for you to take the first step. Get started with a new programming language today to take charge of your future and career.&lt;/p&gt;

&lt;p&gt;There’s something here for everyone, from our affordable &lt;a href="https://www.educative.io/categories/prepare-for-interview" rel="noopener noreferrer"&gt;interview prep courses&lt;/a&gt; to our free beginner courses. We’re proud to be empowering the diverse needs of developers and students across the globe.&lt;/p&gt;

&lt;center&gt;[Check out the GitHub offer here](https://www.educative.io/github-students)&lt;/center&gt;

&lt;h1&gt;
  
  
  Why this matters
&lt;/h1&gt;

&lt;p&gt;We care about education. We want learners of all levels to get access to the tools they need to excel, and we are certain online education is the best way to do that.&lt;/p&gt;

&lt;p&gt;It’s no secret that the institution of higher education prevents thousands of learners from pursuing their interests and accessing the guidance they need to succeed. Luckily, online learning platforms continue to break down those barriers. Dedicated learners are becoming coding masters and taking charge of their education. The Internet is revolutionizing the way people acquire new skills. From open-access journals to affordable digital courses, such platforms empower people of all backgrounds to learn new things, to teach others, to prepare for jobs, and to level up their game.&lt;/p&gt;

&lt;h1&gt;
  
  
  The tech industry and online education are inseparable. Here's why.
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1. Nearly 60% of developers are using online courses to supplement their learning
&lt;/h2&gt;

&lt;p&gt;Programmers from around the world have uniquely benefited from democratized education. Software and web development have been rooted in online accessibility and community-based learning from the very beginning. In fact, according to a &lt;a href="https://insights.stackoverflow.com/survey/2019" rel="noopener noreferrer"&gt;2019 study by StackOverflow&lt;/a&gt;, roughly 60% of developers make use of online courses to learn a new language, framework, or tool. As talented developers are becoming less dependent on expensive CS degrees, online learning platforms and bootcamps are increasingly crucial sources of learning and training.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Online education will help you land a job.
&lt;/h2&gt;

&lt;p&gt;Even if a developer has a degree in CS, they by no means know everything about the field. Developers with a formal education will have a strong understanding of CS theory and mathematics, but it can be hard to translate those skills into what the industry demands (i.e. frameworks, web technologies, etc.). For example, React is one of the most demanded skills today, yet some schools are still teaching Pascal.&lt;/p&gt;

&lt;p&gt;Online courses and open-access platforms help to fill knowledge gaps required for job applications and successful careers. Online courses are becoming increasingly venerated and recognized by employers, which means that job applicants can show off their value by adding completed courses to their resumes.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Online education helps fill a supply gap in the tech industry.
&lt;/h2&gt;

&lt;p&gt;The supply gap of the tech field is larger than most industries. This means that there is a crucial need for talented developers but a global shortage of people who actually know how to code. Online learning platforms bridge this gap by making education easier to access. People from all around the world can step up and start learning without spending four years at an expensive university. Even seasoned developers can keep learning increasingly in-demand issues like data analytics, cloud computing, and cybersecurity that may have been missed in their education. All in all, online learning platforms and accessible education help to reach a global need for these skills.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Online education solves diverse problems.
&lt;/h2&gt;

&lt;p&gt;Software development and computer science are tackling some of the world’s biggest problems and crises. This means it is crucial for people of diverse backgrounds and identities to be involved, otherwise we miss out on other perspectives and fail to address serious issues around the world. Thanks to open-source platforms and online courses, developers are able to connect with thinkers from all around the world.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Careers in computer science open doors.
&lt;/h2&gt;

&lt;p&gt;Individuals who are limited by socioeconomic or educational systems find empowering careers in web and software development. Democratized, online education is crucial to diversifying the industry by providing access to those historically overlooked. On top of that, online courses complement other industries. People in fields like health care, journalism, non-profit, and entertainment have critical needs for coding skills. Coding skills are no longer reserved for the few techies. Online, accessible education empowers people of diverse industries to solve their problems and get connected with the global community of developers.&lt;/p&gt;




&lt;p&gt;Education matters and we are taking it seriously at Educative by providing accessible courses for all kinds of learners. Our courses are tailored to a variety of educational needs, from beginners, to career seekers, to seasoned developers. And by partnering with GitHub Education, we hope to reach the needs of students around the globe by empowering them to learn without any extra cost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let’s get to learning!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Start learning a new programming language today for free, and check out our &lt;a href="https://www.educative.io/" rel="noopener noreferrer"&gt;courses&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>news</category>
      <category>programming</category>
    </item>
    <item>
      <title>Level up your Python skills with these 6 challenges</title>
      <dc:creator>The Educative Team</dc:creator>
      <pubDate>Mon, 28 Oct 2019 20:49:35 +0000</pubDate>
      <link>https://forem.com/educative/level-up-your-python-skills-with-these-6-challenges-4a34</link>
      <guid>https://forem.com/educative/level-up-your-python-skills-with-these-6-challenges-4a34</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally posted on &lt;a href="https://www.educative.io/blog/level-up-python-skills" rel="noopener noreferrer"&gt;Educative.io&lt;/a&gt;. Visit the link for an interactive version of this post where you can actually code the solutions.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The best way to learn Python is to practice, practice, practice. That’s why we’re sharing this post: so you can test out your basic Python skills with these six challenges. These exercises are useful for everyone, especially if you’re a beginner with basic knowledge of Python concepts. If you’re an absolute beginner, it may be helpful to check out our &lt;a href="https://www.educative.io/blog/how-to-learn-python-in-5-easy-steps" rel="noopener noreferrer"&gt;beginner’s guide&lt;/a&gt; to get a grasp on some important concepts before diving in.&lt;/p&gt;

&lt;p&gt;If you’d like to explore these challenges (and many more) and the concepts even further you can visit this free course, &lt;a href="https://www.educative.io/courses/learn-python-from-scratch" rel="noopener noreferrer"&gt;Learn Python from Scratch&lt;/a&gt;, which has loads of exercises, quizzes, and in-browser coding playgrounds so you can practice what you learn without having to switch tabs.&lt;/p&gt;

&lt;p&gt;With each problem, there will be a hint and a solution, but if you want to actually code your solution and run it, you can &lt;a href="https://www.educative.io/blog/level-up-python-skills" rel="noopener noreferrer"&gt;visit the post&lt;/a&gt; on Educative's blog. &lt;/p&gt;




&lt;h1&gt;
  
  
  Challenge #1: Test your basic skills
&lt;/h1&gt;

&lt;p&gt;Your challenge is to write a Python program that prints the following messages.&lt;/p&gt;

&lt;p&gt;Hello World&lt;br&gt;
Let's Learn Python&lt;br&gt;
Sincerely, (your name here)&lt;/p&gt;

&lt;p&gt;Each of the three inputs should print on a new line.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.educative.io/blog/level-up-python-skills" rel="noopener noreferrer"&gt;Hop on over to the interactive version of this post&lt;/a&gt; on Educative.io to code the solution.&lt;/p&gt;

&lt;p&gt;Hint:&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="nf"&gt;print &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="c1"&gt;# what is the message to be printed?
&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;print &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Solution:&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="nf"&gt;print &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello World&lt;/span&gt;&lt;span class="sh"&gt;"&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Let&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s Learn Python&lt;/span&gt;&lt;span class="sh"&gt;"&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Sincerely, the Educative Team&lt;/span&gt;&lt;span class="sh"&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;em&gt;Explanation of Challenge #1&lt;/em&gt;&lt;br&gt;
First, we use the &lt;code&gt;print&lt;/code&gt; statement, which will display the result. We type our text within the &lt;code&gt;( )&lt;/code&gt;. We have to surround our text with “quotations marks” since it is a string. To start our second line of text, we hit enter and repeat this process on line 2 and 3 because each call to &lt;code&gt;print&lt;/code&gt; will move the output to a new line. If you’re dealing with numerical input, you won’t need to add quotation marks.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Quick tip:&lt;/em&gt; For strings, you can use either double quotation marks (" ") or single (’ '). Double quotation marks should be used if your sentence or word makes use of an apostrophe. In our example, “Let’s learn Python”, if you were to use single quotes you’d receive an error.&lt;/p&gt;
&lt;h1&gt;
  
  
  Challenge #2: Test your knowledge of data types and variables
&lt;/h1&gt;

&lt;p&gt;Your challenge is to write a Python program that calculates and prints the gravitational force between the Earth and the Sun using the &lt;code&gt;grav_force&lt;/code&gt; variable. The formula for gravitational force is as follows:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;F = GMm / r^2&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;F&lt;/code&gt; is the total gravitation force. &lt;code&gt;G&lt;/code&gt; is the gravitational constant. &lt;code&gt;M&lt;/code&gt; and &lt;code&gt;m&lt;/code&gt; are the masses to be compared, and &lt;code&gt;r&lt;/code&gt; is the distance between those masses.&lt;/p&gt;

&lt;p&gt;The values you will need to calculate the gravitation force of the Earth and Sun are offered below.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;G = 6.67 * 10^-11&lt;/li&gt;
&lt;li&gt;Msun = 2.0 * 10^30&lt;/li&gt;
&lt;li&gt;mEarth = 6.0 * 10^24&lt;/li&gt;
&lt;li&gt;r = 1.5 * 10^11&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before checking out the solution, you can try coding it yourself on the &lt;a href="https://www.educative.io/blog/level-up-python-skills" rel="noopener noreferrer"&gt;interactive version of this post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Hint:&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="n"&gt;G&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;6.67&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;M&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="c1"&gt;# what is the Mass of the Sun?
&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="c1"&gt;# what is the mass of the Earth
&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.5&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# how do we calcuate grav force?
# how do we display the answer?
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Solution:&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="n"&gt;G&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;6.67&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;M&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;2.0&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&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;# Mass of Sun
&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;6.0&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# Mass of Earth
&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.5&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;grav_force&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;G&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;M&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="mi"&gt;2&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="n"&gt;grav_force&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Explanation of Challenge #2&lt;/em&gt;&lt;br&gt;
This challenge is actually simpler than it seems! Don’t let the big numbers concern you. We use our arithmetic operators to perform all the operations. The &lt;code&gt;*&lt;/code&gt; operator multiplies variables, the &lt;code&gt;\&lt;/code&gt; operator divides variables, and the &lt;code&gt;**&lt;/code&gt; performs an exponent operation.&lt;/p&gt;

&lt;p&gt;First, we define each of our values (G, M, m, r). This stores them in the &lt;code&gt;grav_force&lt;/code&gt; variable. We then define the &lt;code&gt;grav_force&lt;/code&gt; equation using Python syntax and ask the program to print the answer. The parentheses are actually optional: we just used them to separate the top and bottom of the fraction.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fun fact: the gravitational force between the Earth and Sun is approximately 3,000x the weight of the Earth’s oceans combined!&lt;/em&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Challenge #3: Test your knowledge of conditional statements
&lt;/h1&gt;

&lt;p&gt;Your challenge is to write a Python program that calculates the discounted price of an object using the &lt;code&gt;if-elif-else&lt;/code&gt; statement.&lt;/p&gt;

&lt;p&gt;Your conditions are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the price is 300 or above, it will be discounted by 30%&lt;/li&gt;
&lt;li&gt;If the price falls between 200 and 300, it will be discounted by 20%&lt;/li&gt;
&lt;li&gt;If the price falls between 100 and 200, it will be discounted by 10%&lt;/li&gt;
&lt;li&gt;If the price is less than 100, it will be discounted by 5%&lt;/li&gt;
&lt;li&gt;There is no discount for negative prices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your input:&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="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;350&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hint:&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="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="c1"&gt;# what is the input price?
&lt;/span&gt;&lt;span class="nf"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="c1"&gt;# what are the conditions?
&lt;/span&gt;&lt;span class="nf"&gt;elif &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt;
&lt;span class="nf"&gt;elif &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt;
&lt;span class="nf"&gt;elif &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; 
&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="err"&gt;?&lt;/span&gt;

&lt;span class="c1"&gt;# how do we display the answer?
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Solution:&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="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;350&lt;/span&gt;

&lt;span class="nf"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="mf"&gt;0.7&lt;/span&gt; &lt;span class="c1"&gt;# (1 - 0.3)
&lt;/span&gt;&lt;span class="nf"&gt;elif &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; 
  &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="mf"&gt;0.8&lt;/span&gt; &lt;span class="c1"&gt;# (1 - 0.2)
&lt;/span&gt;&lt;span class="nf"&gt;elif &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt; &lt;span class="c1"&gt;# (1 - 0.1)
&lt;/span&gt;&lt;span class="nf"&gt;elif &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="mf"&gt;0.05&lt;/span&gt; &lt;span class="c1"&gt;# (1 - 0.05)
&lt;/span&gt;&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="n"&gt;price&lt;/span&gt;

&lt;span class="nf"&gt;print &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Explanation of Challenge #3&lt;/em&gt;&lt;br&gt;
To complete this challenge, we first define the price and then all our conditions using Python syntax. You only need to specify the lowest number of each condition since the higher number is accounted for in the previous condition. We calculate a discounted price with &lt;code&gt;price * (1 - discount)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;We then ask the program to &lt;code&gt;print&lt;/code&gt; our discounted price.&lt;/p&gt;
&lt;h1&gt;
  
  
  Challenge #4: Test your knowledge of functions
&lt;/h1&gt;

&lt;p&gt;Your challenge is to write a Python program using the &lt;code&gt;rep_cat&lt;/code&gt; function, which takes two integers (&lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt;) and converts them into strings. The string value of &lt;code&gt;x&lt;/code&gt; should repeat 8 times, and the string value of &lt;code&gt;y&lt;/code&gt; should repeat 5 times. The &lt;code&gt;y&lt;/code&gt; string must then be concatenated to the &lt;code&gt;x&lt;/code&gt; string and returned as a single piece of data.&lt;/p&gt;

&lt;p&gt;Your inputs:&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="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;
&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hint:&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;rep_cat&lt;/span&gt;&lt;span class="c1"&gt;# what are the integers?
&lt;/span&gt;    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt; &lt;span class="c1"&gt;# what are the inputs?
&lt;/span&gt;
&lt;span class="c1"&gt;# how do we display the answer?
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Solution:&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;rep_cat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&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;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;5&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;rep_cat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Explanation of Challenge #4&lt;/em&gt;&lt;br&gt;
First, we convert the integers to strings using the &lt;code&gt;str( )&lt;/code&gt; method. We then can use the &lt;code&gt;*&lt;/code&gt; operator to replicate the strings the required number of times. To link the strings together, we used the &lt;code&gt;+&lt;/code&gt; operator, and finally, that new string is returned using the &lt;code&gt;return&lt;/code&gt; statement.&lt;/p&gt;

&lt;p&gt;We use print to display the final statement.&lt;/p&gt;
&lt;h1&gt;
  
  
  Challenge #5: Test your knowledge of loops
&lt;/h1&gt;

&lt;p&gt;Your challenge is to write the Fibonacci function so that is takes a positive number, &lt;code&gt;n&lt;/code&gt;, and returns the n-th number in the Fibonacci sequence using loops.&lt;/p&gt;

&lt;p&gt;The Fibonacci sequence is a famous mathematical formula where each number in the sequence is the sum of the two numbers before it. The sequence goes as follows: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, etc.&lt;/p&gt;

&lt;p&gt;Your input:&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="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hint:&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;fib&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="n"&gt;first&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt;
  &lt;span class="n"&gt;second&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;n&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="k"&gt;return&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt;

  &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="c1"&gt;# where do we start the sequence? 
&lt;/span&gt;  &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;fib_n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt; 
    &lt;span class="n"&gt;first&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;second&lt;/span&gt;
    &lt;span class="n"&gt;second&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fib_n&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="err"&gt;?&lt;/span&gt;

&lt;span class="c1"&gt;# what is our input? 
# how do we print the answer?
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Solution:&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;fib&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="n"&gt;first&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; 
  &lt;span class="n"&gt;second&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;if&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;return&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;if&lt;/span&gt; &lt;span class="n"&gt;n&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="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;first&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;second&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;3&lt;/span&gt; 
  &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;fib_n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;first&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;second&lt;/span&gt;
    &lt;span class="n"&gt;first&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;second&lt;/span&gt;
    &lt;span class="n"&gt;second&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fib_n&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;fib_n&lt;/span&gt;

&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&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;fib&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Explanation of Challenge #5&lt;/em&gt;&lt;br&gt;
This challenge requires conditional statements. If &lt;code&gt;n&lt;/code&gt; is less than 1, it will return -1, and if &lt;code&gt;n&lt;/code&gt; is 1 or 2, it returns the first or second value. Note that the first two values are set, as they will always be fixed with this sequence.&lt;/p&gt;

&lt;p&gt;We used a &lt;code&gt;while&lt;/code&gt; loop to complete the challenge, but a &lt;code&gt;for&lt;/code&gt; loop would also get the same result. We use the &lt;code&gt;count&lt;/code&gt; variable and start at 3 because we already know the first two values. The two previous terms, &lt;code&gt;second&lt;/code&gt; and &lt;code&gt;fib_n&lt;/code&gt; become first and second with every iteration of the code.&lt;/p&gt;

&lt;p&gt;We then ask the program to print our specified value, &lt;code&gt;n&lt;/code&gt;.&lt;/p&gt;
&lt;h1&gt;
  
  
  Challenge #6: Test your knowledge of data structures
&lt;/h1&gt;

&lt;p&gt;Write a Python program that separates the highs and lows of a list of numbers (&lt;code&gt;num_list&lt;/code&gt;) then returns a list of the number of lows and highs, in that order. You will use the &lt;code&gt;count_low_high()&lt;/code&gt; function. These are your parameters.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If a number is more than 50 or divisible by 3, it is considered high&lt;/li&gt;
&lt;li&gt;If these conditions are not met, the number is considered low&lt;/li&gt;
&lt;li&gt;If the list is empty, it will return none&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your input:&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="n"&gt;num_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;77&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;95&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;51&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;29&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;136&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hint:&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;count_low_high&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;num_list&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="err"&gt;?&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="err"&gt;?&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
  &lt;span class="nf"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;?&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;num_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="err"&gt;?&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="err"&gt;?&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Solution:&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;count_low_high&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;num_list&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="n"&gt;high_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;3&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="n"&gt;num_list&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
  &lt;span class="n"&gt;low_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;3&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="n"&gt;num_list&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;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;low_list&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;high_list&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;

&lt;span class="n"&gt;num_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;77&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;95&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;51&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;29&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;136&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;count_low_high&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;num_list&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Explanation of Challenge #6&lt;/em&gt;&lt;br&gt;
To complete this challenge, you need to use the &lt;code&gt;filter()&lt;/code&gt; function, which filters the high numbers into one list and the low numbers into another. We set the parameters for sorting. We can then use the &lt;code&gt;len()&lt;/code&gt; function, which counts the elements in both lists. It isn’t necessary to use the &lt;code&gt;lambdas&lt;/code&gt;, but it simplifies the code. The lambdas keyword makes a shortcut to declare functions.&lt;/p&gt;

&lt;p&gt;We then input our &lt;code&gt;num_list&lt;/code&gt; and ask the program to print our new list.&lt;/p&gt;

&lt;h1&gt;
  
  
  You did it!
&lt;/h1&gt;

&lt;p&gt;Well done! You completed all six Python challenges! You’re now a more seasoned and practiced developer. Don’t be discouraged if you got stuck on some of the challenges. The best way to learn is to identify places for improvement and study.&lt;/p&gt;

&lt;p&gt;Remember that everyone learns at their own pace and style, so try not to compare your progress to others.&lt;/p&gt;

&lt;p&gt;If you want to keep learning, check out our &lt;strong&gt;free&lt;/strong&gt; &lt;a href="https://www.educative.io/courses/learn-python-from-scratch" rel="noopener noreferrer"&gt;Learn Python from Scratch&lt;/a&gt; course that walks you through all of these concepts in more detail.&lt;/p&gt;

&lt;p&gt;Happy learning!&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>challenge</category>
    </item>
    <item>
      <title>Learn Java from scratch with these easy steps</title>
      <dc:creator>The Educative Team</dc:creator>
      <pubDate>Wed, 23 Oct 2019 19:58:00 +0000</pubDate>
      <link>https://forem.com/educative/learn-java-from-scratch-with-these-easy-steps-363p</link>
      <guid>https://forem.com/educative/learn-java-from-scratch-with-these-easy-steps-363p</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally posted on &lt;a href="https://www.educative.io/" rel="noopener noreferrer"&gt;Educative.io&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Java is one of the most popular programming languages for software development. Learning and mastering Java will open doors for you as a developer, no matter your end-goal or skill level. Today, we’re going to go over some reasons we think you should start learning Java and then offer an in-depth roadmap on how to get started. &lt;em&gt;If you want to skip the reading and get hands-on with Java programming, you can visit this great free course, &lt;a href="https://www.educative.io/courses/learn-java-from-scratch" rel="noopener noreferrer"&gt;Learn Java from Scratch&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why should I learn Java?
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Java is easy to learn
&lt;/h2&gt;

&lt;p&gt;Java is a general purpose, object-oriented, high-performance, interpreted, secure, and multithreaded language. What does this all mean? Basically, Java simplifies the process required to make a network connection. Its security models safeguard against viruses. Many of the tedious processes run automatically, which saves you time. Java is statically-typed, so it’s easier to track down errors in your code. Java is a great first language for absolute beginners.&lt;/p&gt;

&lt;h2&gt;
  
  
  Java is popular
&lt;/h2&gt;

&lt;p&gt;Java is one of the most commonly used programming languages in the world. In fact, it has the 2nd largest online community on StackOverflow. This means that there is a huge, mature community of support for Java programmers and learners. If you ever get stuck, you can be sure that someone has tackled your questions online. And with a thriving ecosystem of developers, there’s always something exciting to learn.&lt;/p&gt;

&lt;h2&gt;
  
  
  Java deals with real-world problems
&lt;/h2&gt;

&lt;p&gt;Java is famous for its “write once, run anywhere” capabilities. This means that code compiled on Java can run on any platform without needing to be recompiled. That’s why Java is used in all kinds of distributed environments. In fact, Oracle estimates that Java is used in over 3 billion devices worldwide, such as Blu-ray players, game consoles, and Android phones. Java is even used by the financial service industry and NASA. There’s no limit to the real-world application of Java.&lt;/p&gt;

&lt;h2&gt;
  
  
  Java will boost your career
&lt;/h2&gt;

&lt;p&gt;Since Java helps us solve real world problems, there are a lot of job opportunities for Java programmers. It’s an in-demand language for companies of all sizes and scopes. Java continues to be one of the most sought after programming languages by employers, both within the high-tech industry and outside of it. According to industry estimates, approximately 90% of Fortune 500 companies make use of Java in some capacity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Java skills are transferable
&lt;/h2&gt;

&lt;p&gt;Java is an object-oriented programming (OOP) language, and its syntax is derived from C. These concepts are prevalent in many other programming languages as well, so as you learn and master Java, you’re also preparing yourself to tackle other languages in the future. JavaScript, C#, and C++ just got a whole lot easier.&lt;/p&gt;

&lt;h1&gt;
  
  
  I want to learn Java. Where do I start?
&lt;/h1&gt;

&lt;p&gt;Let’s break down six smart steps to learning Java and go over some basic vocabulary to get you started.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Make your motivation tangible
&lt;/h2&gt;

&lt;p&gt;Java might be easier to learn other languages, but that doesn’t mean it won’t be challenging. In order to master Java, you need to study and practice daily. This will be harder if you don’t have an objective behind your hard work.&lt;/p&gt;

&lt;p&gt;Having a clear motivation will push you through the challenges and keep you focused on your learning. Do you want to build a game? Do you want a full-time career as a Java developer? Setting these goals early in your journey will redirect your focus when it dwindles and make it easier to measure your progress.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Create an education plan
&lt;/h2&gt;

&lt;p&gt;Discipline is your new best friend. Making a plan for your learning will make or break you as a new Java learner. With an educational plan, you’ll know when and what to study.&lt;/p&gt;

&lt;p&gt;Set a weekly curriculum starting with the basics. A lot of people ask how long it takes to master Java, and, of course, there is no one answer. But a committed, organized learner will certainly learn faster and smarter than someone who doesn’t plan it out. If you’re serious about learning Java, we recommend setting aside &lt;strong&gt;2 hours per weekday&lt;/strong&gt; and &lt;strong&gt;4 hours per day on the weekend&lt;/strong&gt; for studying. If you stick to this plan, you’ll probably need 4-7 months before you’ll be ready to apply for a job as a Junior Java Developer.&lt;/p&gt;

&lt;p&gt;Here’s a general progression of the topics you will need to learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Java Syntax&lt;/strong&gt; (the rules for writing a program)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Object Oriented Programming Concepts&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Core Java&lt;/strong&gt; (how you develop a java application)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Java Collections&lt;/strong&gt; (architecture for storing groups of objects)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Libraries and frameworks&lt;/strong&gt; (large collections of prewritten code)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;APIs&lt;/strong&gt; (protocols and tools used to build applications)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Git&lt;/strong&gt; (a widely used control system)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Make an educational plan that progresses through these topics. Remember that your timing will depend both on your knowledge of other programming languages and your personal learning style.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Download Java Development Kit (JDK)
&lt;/h2&gt;

&lt;p&gt;The Java Development Kit is a development environment where you can document and compile Java applications. It includes all the basic tools you need to write and develop Java. This package includes Java Runtime Environment (JRE) and Java Virtual Machine (JVM). JRE provides the libraries and components to actually execute your code and applications. JVM is what runs your Java bytecodes and implements your code on any platform. You can download JDK from &lt;a href="https://docs.oracle.com/en/java/javase/11/install/overview-jdk-installation.html#GUID-8677A77F-231A-40F7-98B9-1FD0B48C346A" rel="noopener noreferrer"&gt;Oracle&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you’re still on the fence about Java, don’t worry about this step quite yet. You don’t have to commit right away and could start with courses that offer embedded environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Start with the basics
&lt;/h2&gt;

&lt;p&gt;Even if you’re familiar with other programming languages, a solid introduction to Java is crucial to building a foundation and ensuring success. Once you understand how to compile code and fix errors, you can move onto the next stage of your learning. So, let’s jump into a few key terms and concepts to get you started.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Java Syntax?&lt;/strong&gt; Like any language, a programming language has a set of terms and rules to make meaning and order. Java has its own syntax that you will need to learn to write code. Java is case sensitive, so capital letters matter. For example, &lt;code&gt;endLoop&lt;/code&gt; and &lt;code&gt;Endloop&lt;/code&gt; would have different uses and meanings. Everything from declaring data types, declaring variables, and using operators will make use of syntax.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are identifiers?&lt;/strong&gt; Identifies are the names we use to create all our Java elements. You can use an identifier to refer to an item later in your program. Here are the syntax rules for all identifiers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Identifiers are case sensitive&lt;/li&gt;
&lt;li&gt;Identifiers begin with a letter (A to Z or a to z), an underscore (_), or a currency character ($)&lt;/li&gt;
&lt;li&gt;An identifier cannot be a keyword&lt;/li&gt;
&lt;li&gt;Examples: &lt;code&gt;age&lt;/code&gt;, &lt;code&gt;_number&lt;/code&gt;, &lt;code&gt;_1_value&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What are operators?&lt;/strong&gt; Operators are symbols that perform particular operations or functions. Think of these like the punctuation of a sentence or the symbols of an algebraic formula. There are several types of operators in Java.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Arithmetic Operators: these are used in mathematical expressions. They function the same as in algebra. Examples include: &lt;code&gt;+&lt;/code&gt;, &lt;code&gt;-&lt;/code&gt;, &lt;code&gt;*&lt;/code&gt;, &lt;code&gt;/&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Relational Operators: there are six relational operators that compare two numbers and return a boolean value. The six operators are: &lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;=&lt;/code&gt;, &lt;code&gt;&amp;gt;=&lt;/code&gt;, &lt;code&gt;!=&lt;/code&gt;, &lt;code&gt;==&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Logical Operators: these return a boolean result based on the boolean result of other expressions. Examples include: &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;, &lt;code&gt;||&lt;/code&gt;, &lt;code&gt;!&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bitwise Operators: these perform operations of individual bits of number and can be applied to the integer types &lt;code&gt;long&lt;/code&gt;, &lt;code&gt;int&lt;/code&gt;, &lt;code&gt;short&lt;/code&gt;, &lt;code&gt;char&lt;/code&gt;, and &lt;code&gt;byte&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Assignment Operators: these assign values on its right to the variables on its left. For example, &lt;code&gt;age = 5&lt;/code&gt; defines the value &lt;code&gt;5&lt;/code&gt; to the variable &lt;code&gt;age&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Miscellaneous Operators: these do not fit into any of these categories, such as the conditional operator and the instance of operator.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What are keywords?&lt;/strong&gt; Keywords are words reserved for predefined meanings or functions. There is an established list of keywords that you will need to learn. For example, the keyword &lt;code&gt;new&lt;/code&gt; creates a new object. Take a look at the Java keywords below.&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%2F9iq7egmepdxhsufcxpj3.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%2F9iq7egmepdxhsufcxpj3.png" alt="Alt Text" width="800" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are data types?&lt;/strong&gt; In programming languages, data types specify the value of a variable and what type operations can be applied to a variable. There are two classifications of data in the Java programming language:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Primitive Data: These data types are built into the Java language and reserved with keywords. There are 8 primitive data types: boolean, byte, char, short, int, long, float, double.&lt;/li&gt;
&lt;/ul&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%2F8hh7rcjr1cj4wzifsx44.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%2F8hh7rcjr1cj4wzifsx44.png" alt="Alt Text" width="800" height="134"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Object Data: These data types come built into the Java language, but the programmer can create their own classes. These include Classes, Interfaces, and Arrays.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What is an object?&lt;/strong&gt; An object is a combination of data with a state (attribute) and behavior (method). An object is given a name using an identifier. Java is extremely object oriented, so your programs are organized around objects rather than functions or logic. Once you organize your objects, you can manipulate them.&lt;/p&gt;

&lt;p&gt;An object has three characteristics.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;State: the data of the object&lt;/li&gt;
&lt;li&gt;Behavior: the behavior or actions of the object&lt;/li&gt;
&lt;li&gt;Identity: the unique name of the object&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, if our object was a cat, we could define it like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;State: age, color, size&lt;/li&gt;
&lt;li&gt;Behavior: sleep, meow, eat&lt;/li&gt;
&lt;li&gt;Identity: name of cat&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We could make this object using the &lt;code&gt;new&lt;/code&gt; keyword.&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%2F154img8sb7l6eamji8kz.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%2F154img8sb7l6eamji8kz.png" alt="Alt Text" width="800" height="58"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a class?&lt;/strong&gt; A class is the blueprint we use to create objects and describe their behavior. They are comprised of a collection of fields and methods. Following our cat examples, we could make class of cats to categorize multiple cats into one group.&lt;/p&gt;

&lt;p&gt;A class is comprised of three parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Visibility modifier (e.g. public)&lt;/li&gt;
&lt;li&gt;Keyword &lt;code&gt;class&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Name of the class&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What are methods?&lt;/strong&gt; Methods perform actions in your code and display the behavior of your objects. They are comprised of a collection of statements and must be invoked either to return a value or to return nothing.&lt;/p&gt;

&lt;p&gt;A method is declared within a class. You declare a method using the name of the method, followed by &lt;code&gt;()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;main()&lt;/code&gt; method is mandatory for every Java program. Think of this as the entry point for your application. You will see it written like this &lt;code&gt;public static void main(String args[])&lt;/code&gt;. Take a look at the code below to see an example:&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%2F76ssjzc6xspgy90jc51m.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%2F76ssjzc6xspgy90jc51m.png" alt="Alt Text" width="800" height="126"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are variables?&lt;/strong&gt; A variable is like a container that stores data. Java is statically-typed, so we have to declare a variable before we can use it. There are three types of variables in Java.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A local variable is defined within the body of a method, and its scope is confined to that variable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An instance variable is defined in a class and is outside any method or block. Instance variables are created in attachment to an object.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A static variable (also known as a class variable) is defined in the same way as an instance variable, but its keyword is static. These are created at the start of your program.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  5. Balance your theory and practice
&lt;/h1&gt;

&lt;p&gt;Once you get a grasp of the basics, the best way to learn Java is to jump into practice. Learning only theory won’t get you very far. New learners will master the language more rapidly if they actually practice with hands-on projects.Practice is good for your eventual interview process, and it helps build confidence. Write your own code. Design your own algorithms. Learn from your mistakes. So many experts agree: the smartest way to master Java is to actually use it. Your new motto is “Code Everyday”.&lt;/p&gt;

&lt;p&gt;Theory and practice are interrelated, so you need a good balance. You can’t just throw out theory entirely, or you won’t have a good foundation for your actual coding skills. That’s why we recommend spending 20% of your time on theory and 80% on actual hands-on practice.&lt;/p&gt;

&lt;h1&gt;
  
  
  6. Learn with others
&lt;/h1&gt;

&lt;p&gt;Don’t make the mistake of thinking that your learning has to be in isolation. Java has a really collaborative and active community online. Other than forums and articles, there are also hundreds of &lt;a href="https://www.meetup.com/" rel="noopener noreferrer"&gt;meet-up events&lt;/a&gt; for developers of all levels. You don’t have to be an expert to start engaging with forums, blogs, events, or online communities.&lt;/p&gt;

&lt;p&gt;Trust us. Developers want to share their wisdom and knowledge with you. Don’t repeat the mistakes of others when their wisdom is readily available, and free! As you familiarize yourself with the language, you could even try &lt;a href="https://medium.com/@weblab_tech/pair-programming-guide-a76ca43ff389" rel="noopener noreferrer"&gt;pair programming&lt;/a&gt;. This gives you a chance to learn from others and ask questions as they come up.&lt;/p&gt;

&lt;h1&gt;
  
  
  Get started right now, for free
&lt;/h1&gt;

&lt;p&gt;If you want to learn Java online, there’s no better time to start than now! While this is a brief intro to Java, there is still a lot more to cover. You can visit our free course, &lt;a href="https://www.educative.io/courses/learn-java-from-scratch" rel="noopener noreferrer"&gt;Learn Java from Scratch&lt;/a&gt; to introduce you to this exciting language and empower you to start writing your own code. This highly interactive course offers a roadmap for all you need to get started on your Java journey.&lt;/p&gt;

&lt;p&gt;Here’s what you’ll learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basic Definitions and “Hello World”&lt;/li&gt;
&lt;li&gt;Variables and User Input&lt;/li&gt;
&lt;li&gt;Simple Math in Java and Functions&lt;/li&gt;
&lt;li&gt;Strings and String Processing&lt;/li&gt;
&lt;li&gt;Conditional Statements and Loops&lt;/li&gt;
&lt;li&gt;Classes and Inheritance&lt;/li&gt;
&lt;li&gt;Arrays and ArrayLists&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Our course is loaded with hands-on practice, interactive playgrounds, and illustrations to speed up and personalize your learning experience. And the course also comes fully prepared with in-browser embedded coding environments so no need to switch back and forth.&lt;/p&gt;

&lt;p&gt;We know that being a beginner is already hard, so taking the first step shouldn’t come at any extra cost or stress to you. That’s why we’ve made our &lt;a href="https://www.educative.io/courses/learn-java-from-scratch" rel="noopener noreferrer"&gt;Learn Java from Scratch&lt;/a&gt; course completely free. You’ll get lifetime access to the course without any sneaky subscription fees.&lt;/p&gt;

&lt;p&gt;Get started on your Java journey today!&lt;/p&gt;

</description>
      <category>java</category>
      <category>codenewbie</category>
      <category>beginners</category>
    </item>
    <item>
      <title>A Beginner's Guide to Web Development</title>
      <dc:creator>The Educative Team</dc:creator>
      <pubDate>Thu, 17 Oct 2019 21:21:27 +0000</pubDate>
      <link>https://forem.com/educative/a-beginner-s-guide-to-web-development-2me6</link>
      <guid>https://forem.com/educative/a-beginner-s-guide-to-web-development-2me6</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally posted on &lt;a href="https://www.educative.io/" rel="noopener noreferrer"&gt;Educative.io&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Do you want to become a web developer but don’t know where to start? You’re in the right place! Today, we will take you through a complete guide to your web development journey. &lt;em&gt;If you want to skip the reading and get right into web development you can visit this great free course, &lt;a href="https://www.educative.io/courses/learn-web-development-from-scratch" rel="noopener noreferrer"&gt;Learn web development from scratch: Go beyond the syntax&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Here’s what we’ll cover today:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Part One: The basics of web development skills and tools&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Part Two: A guide to web development jobs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Part Three: Resources for practice and help&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s jump right in!&lt;/p&gt;

&lt;p&gt;Are you completely new to web development? No worries! We recommend checking out our &lt;a href="https://www.educative.io/blog/web-developer-faq" rel="noopener noreferrer"&gt;Web Developer FAQ&lt;/a&gt; before you keep reading!&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%2Fi%2F6hsye82azn1w1k6uistj.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%2Fi%2F6hsye82azn1w1k6uistj.png" alt="Alt Text" width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Part One: The Basics of Web Development
&lt;/h1&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;What skills do I need as a web developer?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Anyone can become a web developer. You don’t need a fancy degree in computer science to master the skills, but before you can start looking for jobs in the field, there are a few things you will need to learn.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The basics of how the Internet and websites work&lt;/li&gt;
&lt;li&gt;The basics of HTML, CSS, and JavaScript&lt;/li&gt;
&lt;li&gt;Libraries and frameworks, like jQuery, React.js, and Bootstrap&lt;/li&gt;
&lt;li&gt;Other programming languages, like Python and Ruby (for back-end web devs only)&lt;/li&gt;
&lt;li&gt;Git and GitHub&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Don’t let this overwhelm you. All of these skills naturally build off of each other, so it’s important to learn slowly and take it step-by-step as you develop a solid foundation.&lt;/p&gt;

&lt;p&gt;Alright, now you know what’s ahead of you. Let’s start learning!&lt;/p&gt;

&lt;h2&gt;
  
  
  The Foundational Stuff
&lt;/h2&gt;

&lt;p&gt;The Internet is comprised of three interacting features.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Websites:&lt;/strong&gt; a collection of files and information that we access through a computer and a server&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Servers:&lt;/strong&gt; the computers that store all the data of websites in a massive network&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Browsers:&lt;/strong&gt; the programs that load and display content on your computer&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every website is comprised of the &lt;strong&gt;frontend&lt;/strong&gt; (client side) and the &lt;strong&gt;backend&lt;/strong&gt; (server side). The frontend includes everything that the user will directly see and experience when they visit a website. The backend is the behind the scenes where information is stored, sent, and received.&lt;/p&gt;

&lt;p&gt;Everything you see on a website, like the one you’re looking at now, is made up of HTML, CSS, and Javascript files. These are the most foundational tools that you need as a web developer. They are the languages you use to actually create your webpages. So, let’s learn what they do!&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%2Fv9n8blb68z9hjmrgmp7o.jpeg" 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%2Fv9n8blb68z9hjmrgmp7o.jpeg" alt="Alt Text" width="800" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is HTML?
&lt;/h3&gt;

&lt;p&gt;HTML (HyperText Markup Language) is the basic programming language for web development. It provides the basic structure of a site such as words, titles, and paragraphs. HTML consists of a bunch of established &lt;code&gt;tags&lt;/code&gt;, which represent different functions that then “translate” into readable information on the screen. These tags are written between angle brackets.&lt;/p&gt;

&lt;p&gt;For example, the text surrounded by the &lt;code&gt;&amp;lt;b&amp;gt; &amp;lt;/b&amp;gt;&lt;/code&gt; will be bold. The tag &lt;code&gt;&amp;lt;h6&amp;gt; &amp;lt;/h6&amp;gt;&lt;/code&gt; will make your text the smallest header size.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is CSS?
&lt;/h3&gt;

&lt;p&gt;CSS (Cascading Style Sheets) is a style sheet that essentially describes how HTML elements will appear on a webpage. You use CSS to control the presentation, style, and formatting of your site, like RGB values, border colors, background images, and more. CSS files declare a set of rules, that define a set of properties and their values.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h4 style="color:Tomato;"&amp;gt;Tomato Red&amp;lt;/h4&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;determines that the text “Tomato Red” will appear in the color "Tomato".&lt;/p&gt;

&lt;h3&gt;
  
  
  What is JavaScript?
&lt;/h3&gt;

&lt;p&gt;JavaScript is how you control the behavior of your webpage. If you’re serious about web development, you’ll need to start to &lt;a href="https://www.educative.io/courses/introduction-to-javascript-first-steps" rel="noopener noreferrer"&gt;learn the basics of JavaScript&lt;/a&gt;. It is one of the most popular and pervasive programming languages in the world, with a low entry barrier and offers immediate results based on the success of your code. JavaScript makes websites interactive by manipulating your various HTML and CSS features. With JavaScript, a user can click on a button, scroll to the bottom of a page, or display photos in a moving carousel.&lt;/p&gt;

&lt;p&gt;For example, this chunk of code dictates that when the button “Click here” is pressed, the word “Bigger Font” changes to size 35px.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button type="button" 
onclick="document.getElementById('demo').style.fontSize='35px'"&amp;gt;Click here&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Get started with HTML, CSS, and JavaScript for free with &lt;a href="https://www.educative.io/courses/learn-web-development-from-scratch" rel="noopener noreferrer"&gt;Learn web development from scratch: Go beyond the syntax&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Technology Stack
&lt;/h2&gt;

&lt;p&gt;Alright, so now we understand the basics of HTML, CSS, and JavaScript. Next, we need to tackle frameworks and libraries, which are part of the &lt;strong&gt;technology stack&lt;/strong&gt;. A tech stack is the combination of software, applications, programming languages, and tools that all build on top of each other to make your website. Companies and web developers will use different tech stacks based on their unique needs and goals.&lt;/p&gt;

&lt;p&gt;So, what are frameworks and libraries, and why do we need them? While you can technically make a webpage without these tools, you won’t make it very far as a web developer without them.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are frameworks?
&lt;/h3&gt;

&lt;p&gt;You could build a webpage completely from scratch, but it takes a lot of time, especially when you want to add more complexity. That’s where JavaScript frameworks come in handy. A framework is like a prepackaged structure of pre-written code for your website that determines how programs should interact.&lt;/p&gt;

&lt;p&gt;Say you wanted to build a car. Instead of starting entirely from scratch, you can buy a vehicle frame to save time and guarantee you’ll build something that will actually drive. A framework in web development is similar. It offers built-in programs, plug-ins, and tools that you install into your website files. Frameworks speed up your development process, and they are made by other developers, so you know the code is pre-tested and effective.&lt;/p&gt;

&lt;p&gt;There are backend and frontend frameworks that use different programming languages. Let’s look at a few notable ones to get you started.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backend frameworks&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://expressjs.com/" rel="noopener noreferrer"&gt;Express JS&lt;/a&gt;: used by IBM and Uber; minimalist design; harder for beginners&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.djangoproject.com/" rel="noopener noreferrer"&gt;Django&lt;/a&gt;: used by Google, Instagram; tons of built-in features; based on Python&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://spring.io/projects/spring-boot" rel="noopener noreferrer"&gt;Spring Boot&lt;/a&gt;: easy to use; good for large scale cloud projects; based on Java&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://rubyonrails.org/" rel="noopener noreferrer"&gt;Ruby on Rails&lt;/a&gt;: used by SoundCloud; good for small projects; based on Ruby&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://flask.palletsprojects.com/en/1.1.x/" rel="noopener noreferrer"&gt;Flask&lt;/a&gt;: used by Lyft; easy to set up; based on Python&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Frontend frameworks&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://emberjs.com/" rel="noopener noreferrer"&gt;Ember&lt;/a&gt;: used by Netflix, LinkedIn; good for mobile apps; based in JavaScript&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://reactjs.org/" rel="noopener noreferrer"&gt;React&lt;/a&gt;: easy DOM manipulation; easy to learn; based in JavaScript&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://backbonejs.org/" rel="noopener noreferrer"&gt;Backbone&lt;/a&gt;: lightweight; helps with code organization; based in JavaScript&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://vuejs.org/" rel="noopener noreferrer"&gt;Vue&lt;/a&gt;: progressive frameworks; easy to understand; based in JavaScript&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://angular.io/" rel="noopener noreferrer"&gt;Angular&lt;/a&gt;: good for Single-Page applications; not SEO friendly; based in TypeScript&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What are libraries?
&lt;/h3&gt;

&lt;p&gt;A library is a collection of specific tools and features that you can add to your website for functionality. Unlike a framework, a library does not offer any structure but rather implements different behaviors and actions on your webpage.&lt;/p&gt;

&lt;p&gt;Let’s return to our car analogy. If the framework is the frame of the car, the libraries are the features and parts you add to the car to tailor it to your needs, like the tires, air conditioner, or steering wheel.&lt;/p&gt;

&lt;p&gt;There are tons of different libraries that each have diverse purposes. Let’s take a look at a few to get a sense of what they can do.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://jquery.com/" rel="noopener noreferrer"&gt;jQuery&lt;/a&gt;: for manipulating HTML, DOM, and CSS&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://reactjs.org/" rel="noopener noreferrer"&gt;React.js&lt;/a&gt;: for creating interactive UIs&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.chartjs.org/" rel="noopener noreferrer"&gt;Chart.js&lt;/a&gt;: for making charts using JavaScript&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://mynameismatthieu.com/WOW/" rel="noopener noreferrer"&gt;Wow.js&lt;/a&gt;: for showing animations as you scroll&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/anthonyly/Scrolline.js" rel="noopener noreferrer"&gt;Scrolline.js&lt;/a&gt;: for showing how far you’ve scrolled on a page&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;jQuery and React.js are probably the most important libraries for you to learn at this time. They are very popular and have hundreds of unique features to make some really cool stuff.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Node.js
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://nodejs.org/en/" rel="noopener noreferrer"&gt;Node.js&lt;/a&gt; is a popular open-source, server-side tool for fullstack and back-end developers. Node is a run-time environment used for executing your web programs. It’s very useful for building network applications. It also comes packed with a library of JavaScript modules to simplify your web application process. Node.js is becoming more standardized even at enterprise-level organizations, so it’s a valuable tool to master.&lt;/p&gt;

&lt;h2&gt;
  
  
  What other tools do I need to become a web developer?
&lt;/h2&gt;

&lt;p&gt;Having the right tools before you get started will prepare you to learn faster and more efficiently. Fortunately, you can get started with just three basic things: a browser, a text editor, and a version control system.&lt;/p&gt;

&lt;h3&gt;
  
  
  Web browsers
&lt;/h3&gt;

&lt;p&gt;This is where you will test your code. A good web developer should be comfortable using many different kinds of browsers, but as you’re getting started, it’s fine to stick with one until you feel more comfortable. The most common browsers used by web developers are outlined below. This list is not exhaustive, so you will see several others as you research and learn.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.mozilla.org/en-US/firefox/new/" rel="noopener noreferrer"&gt;Mozilla Firefox&lt;/a&gt;: open-source, native on all platforms, lots of updates&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.google.com/chrome/" rel="noopener noreferrer"&gt;Google Chrome&lt;/a&gt;: DevTools, easy to troubleshoot JavaScript, uses a lot of memory&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.microsoft.com/en-us/windows/microsoft-edge" rel="noopener noreferrer"&gt;Edge&lt;/a&gt;: integrated with Windows, cons similar to IE&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://brave.com/" rel="noopener noreferrer"&gt;Brave&lt;/a&gt;: focused on performance, secure, poor plug-in support&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://developer.apple.com/safari/tools/" rel="noopener noreferrer"&gt;Safari&lt;/a&gt;: great dev tools, not integrated with Windows&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.opera.com/" rel="noopener noreferrer"&gt;Opera&lt;/a&gt;: free VPS service, cons similar to IE&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Text editors
&lt;/h3&gt;

&lt;p&gt;This is where you will write your code. There are many different options for text editors. You computer likely comes with a built-in one, but we recommend a more robust option. The most commonly used text editors by web developers are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://atom.io/" rel="noopener noreferrer"&gt;Atom&lt;/a&gt;: open-source, cross-platform, created by GitHub, known for its speed (free)&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.sublimetext.com/" rel="noopener noreferrer"&gt;Sublime Text&lt;/a&gt;: cross-platform, known for its plugins and shortcuts ($70)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;VS Code&lt;/a&gt;: open-source, created by Microsoft, interactive debugger (free)&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://brackets.io/" rel="noopener noreferrer"&gt;Brackets&lt;/a&gt;: open-source, made by Adobe, live preview feature (free)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Unlike browsers, most web developers stick with the same text editor. Explore your different options to see which one is most comfortable for you. The more you use it, the more muscle memory you will build.&lt;/p&gt;

&lt;h3&gt;
  
  
  Content management system (CMS)
&lt;/h3&gt;

&lt;p&gt;A Content Management System is a software used to facilitate editing, creating, and publishing your work. A CMS gives you control over your content by integrating all of the features of your site into an accessible platform. Many of these help with both content management, marketing, and content delivery.&lt;/p&gt;

&lt;p&gt;A CMS typically uses a &lt;strong&gt;database&lt;/strong&gt; (such as MySQL and MariaDB), which stores a collection of programs and tools in a particular programming language. That way, you can edit and manage your website without needing to return to the minute details of your code.&lt;/p&gt;

&lt;p&gt;Choosing a CMS depends on a lot of different factors, like your users, the size of your team, and the ease of the interface. A good CMS for beginners is &lt;a href="https://searchcontentmanagement.techtarget.com/definition/WordPress" rel="noopener noreferrer"&gt;WordPress&lt;/a&gt;. It’s a free, open source hosting service for building and publishing websites. It’s very popular for bloggers and has a low entry barrier for beginners. With a huge community of support, you’re likely to find answers to your questions as they come up.&lt;/p&gt;

&lt;p&gt;Some other notable CMS softwares are &lt;a href="https://www.drupal.org/" rel="noopener noreferrer"&gt;Drupal&lt;/a&gt;, &lt;a href="https://typo3.org/" rel="noopener noreferrer"&gt;Typo3&lt;/a&gt;, and &lt;a href="https://www.joomla.org/" rel="noopener noreferrer"&gt;Joomla!&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%2Fi%2Fp8idklt0r42fabjttj63.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%2Fi%2Fp8idklt0r42fabjttj63.png" alt="Alt Text" width="800" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Part Two: A Guide to Web Dev Jobs
&lt;/h1&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;What jobs are there for web developers?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Once you feel confident in your web dev skills, it’s time to actually start looking for work and apply your skills to the real-world. Where do you begin? What are the options for you? Let’s look at three things you’ll need to consider as you figure out the job that is best for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step1: Determine what kind of web dev you want to specialize as
&lt;/h3&gt;

&lt;p&gt;The first step to looking for work is to determine what kind of web developer you want to be. There are three different categories of web developer jobs to consider: &lt;strong&gt;frontend, backend, and full stack.&lt;/strong&gt; You might not know yet which is a better fit for you, and that’s fine! The more you practice and explore, the clearer that will become.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Frontend Web Developers&lt;/strong&gt; work on the layout and visuals of a website and use languages like HTML, CSS, and JavaScript. They work with web design and user experience. This kind of web dev is good for someone who likes fine-tuning details. The salary for a front-end web developer generally ranges from US$45k-$75k.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backend Web Developers&lt;/strong&gt; work on the frameworks of a website that fetch and display data. They use languages like Java, Python, and Ruby on top of HTML, CSS, and JavaScript. This kind of web dev is good for someone who cares more about functionality than design. The salary for a back-end web developer generally ranges from US$55k-85k.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full Stack Web Developers&lt;/strong&gt; deal with both sides of web development. The salary for a full stack developer generally ranges from US$60k-110k. Learn more about becoming a Full Stack Web Developer &lt;a href="https://www.educative.io/blog/the-journey-to-become-a-full-stack-js-developer-starts-here" rel="noopener noreferrer"&gt;here&lt;/a&gt;!&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Determine what work environment is best for you
&lt;/h3&gt;

&lt;p&gt;Before jumping into a career, you should consider the different work environments available to a web developer. You could work freelance, find a full-time job with a big company, join a start-up, or even go into teaching. Think about which environment is best for your life situation. This will determine how you market yourself, how you design your portfolio, and where you look for job postings.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Start building a portfolio of your awesome projects and skills
&lt;/h3&gt;

&lt;p&gt;A killer web developer portfolio is critical for getting jobs in the field. This is the website where you showcase all your hard-earned skills, beautiful designs, and best web projects. We know you’re just starting out, so don’t let this step overwhelm you. As you learn more and practice, you’ll start to compile pretty much everything you need for a portfolio. Your portfolio can even showcase your early work and your practice projects!&lt;/p&gt;

&lt;p&gt;There are a lot of hosting websites where you can publish your portfolios. Here are three great options for those of you starting out. Go check out them out and get some inspiration from other web developers: &lt;a href="https://github.com/simplonco/portfolio" rel="noopener noreferrer"&gt;Github Pages&lt;/a&gt;, &lt;a href="https://repl.it/" rel="noopener noreferrer"&gt;Repl&lt;/a&gt;, &lt;a href="https://carbonmade.com/" rel="noopener noreferrer"&gt;Carbonmade&lt;/a&gt;, &lt;a href="https://www.krop.com/" rel="noopener noreferrer"&gt;Krop&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%2Fp6w7obgxwtgrwtcfdlg4.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%2Fp6w7obgxwtgrwtcfdlg4.png" alt="Alt Text" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Where do I find job postings?
&lt;/h2&gt;

&lt;p&gt;Now that you know what kinds of jobs are out there, you need to know where to find them. There are a lot of resources for job searching that range from general to specialized.&lt;/p&gt;

&lt;p&gt;Important note: One of the best ways to learn about job openings is through the Web Dev community. Networking is a key way to learn about jobs and see what kind of work excites you. Don’t be afraid to go to meetups, conferences, and job workshops.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For general job boards:&lt;/strong&gt; &lt;br&gt;
&lt;a href="https://www.glassdoor.com/" rel="noopener noreferrer"&gt;Glassdoor&lt;/a&gt;, &lt;a href="https://www.indeed.com/" rel="noopener noreferrer"&gt;Indeed&lt;/a&gt;, and &lt;a href="https://www.indeed.com/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; are great places to start for a general, sweeping search of web development jobs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For remote / freelance job boards:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.upwork.com/" rel="noopener noreferrer"&gt;Upwork&lt;/a&gt;: tailor postings to your needs&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://justremote.co/" rel="noopener noreferrer"&gt;Just Remote&lt;/a&gt;: specific to tech jobs&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://jobspresso.co/" rel="noopener noreferrer"&gt;JobsPresso&lt;/a&gt;: diverse job options&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.flexjobs.com/" rel="noopener noreferrer"&gt;FlexJobs&lt;/a&gt;: features on major media outlets&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;For tech specific job boards:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://jobs.mashable.com/" rel="noopener noreferrer"&gt;Mashable Job Board&lt;/a&gt;: can search by company&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.smashingmagazine.com/jobs/" rel="noopener noreferrer"&gt;Smashing Jobs&lt;/a&gt;: minimalist interface&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.educative.io/blog/beginner-guide-to-web-dev" rel="noopener noreferrer"&gt;Krop&lt;/a&gt;: tailored to web designers&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://jobs.github.com/positions" rel="noopener noreferrer"&gt;GitHub Jobs&lt;/a&gt;: large community of users&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;For start-up job boards:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.startupers.com/" rel="noopener noreferrer"&gt;Startupers&lt;/a&gt;: specific to bay area&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://angel.co/jobs" rel="noopener noreferrer"&gt;Angel&lt;/a&gt;: speak directly with founders&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://hired.com/startup-jobs" rel="noopener noreferrer"&gt;Hired&lt;/a&gt;: only offers vetted start-ups&lt;/li&gt;
&lt;/ul&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%2Fi%2Fkwgondjvl01ytjgcz31m.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%2Fi%2Fkwgondjvl01ytjgcz31m.png" alt="Alt Text" width="800" height="371"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Part Three: The Resources
&lt;/h1&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;Where can I learn more about web dev?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Starting something new is scary and exciting. Luckily, there are tons of resources available to you where you can keep learning and seek advice. We’ve compiled a list of the most important resources, forums, and newsletters to get you started.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://awwwards.com/" rel="noopener noreferrer"&gt;Awwwards.com&lt;/a&gt;: Check out the work of other web developers for inspiration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://tympanus.net/codrops/" rel="noopener noreferrer"&gt;Codrops&lt;/a&gt;: A blog for web developers focused on the latest trends, tutorials, and design tips.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://codepen.io/" rel="noopener noreferrer"&gt;Codepen&lt;/a&gt;: A platform to build and test code&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://css-tricks.com/" rel="noopener noreferrer"&gt;CSS Tricks&lt;/a&gt;: Get daily articles on topics relating to CSS, HTML, and JavaScript.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.designerhangout.co/" rel="noopener noreferrer"&gt;Designer Hangout&lt;/a&gt;: The most active community for UX designers&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dzone.com/" rel="noopener noreferrer"&gt;DZone&lt;/a&gt;: An online hub for tutorials and tools for web dev beginners&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.educative.io/edpresso" rel="noopener noreferrer"&gt;EdPresso&lt;/a&gt;: Educative’s online dictionary for quick answers to common questions organized. These are organized by tags and have useful visualizations to help you learn quickly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; / &lt;a href="https://stackoverflow.com/" rel="noopener noreferrer"&gt;StackOverflow&lt;/a&gt;: Open-access forums and discussion boards where a global community of programmers and developers share code, answer questions, and give feedback on projects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.meetup.com/" rel="noopener noreferrer"&gt;Meetup&lt;/a&gt;: A search engine for local events that you can browse by category&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.smashingmagazine.com/" rel="noopener noreferrer"&gt;Smashing Magazine&lt;/a&gt;: An international blog and thriving community of web developers who talk about books, webinars, web dev discounts, and more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.webdevforums.com/" rel="noopener noreferrer"&gt;Webdevforums&lt;/a&gt;: A forum where you can get feedback on your projects and ask questions relating to SEO&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.webdeveloper.com/forum/" rel="noopener noreferrer"&gt;Webdeveloper Forum&lt;/a&gt;: A general forum for questions relating to web development and program that is organized by frontend and back end questions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://whatis.techtarget.com/" rel="noopener noreferrer"&gt;Whatis.com&lt;/a&gt;: A free, online dictionary for terms relating to coding and web development.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2Fi%2Foi8ux1670gj239s63z0r.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%2Fi%2Foi8ux1670gj239s63z0r.png" alt="Alt Text" width="800" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;You’ve made it this far! Bravo! You’re ready to begin your web dev journey. So, where do you start?&lt;/p&gt;

&lt;p&gt;Working with experts, we’ve put together an easy-to-use roadmap course for everything you need to know to get started. Our free &lt;a href="https://www.educative.io/courses/learn-web-development-from-scratch" rel="noopener noreferrer"&gt;Learn Web Development From Scratch&lt;/a&gt; course cuts through the muck and gently guides you into the world of web dev through hands-on practice, text-based instruction, and interactive playgrounds.&lt;/p&gt;

&lt;p&gt;The first three lessons familiarize you with web dev fundamentals and give you hands-on practice with this new language.&lt;/p&gt;

&lt;p&gt;The course then dives deeper into the programming interface and teaches you how to modify the language you now know how to write. By the time you complete the course, you’ll be able to apply your knowledge and develop fully functional web modules, such as an image carousel and a to-do list application.&lt;/p&gt;

&lt;p&gt;This course is also part of one of our carefully designed learning tracks. Once you complete the lesson, you’ll automatically know what to learn next with a simple click!&lt;/p&gt;

&lt;p&gt;We know that being a beginner is already hard, so we believe that taking the first step shouldn’t come at any extra cost or stress to you. That’s why we’ve made our &lt;strong&gt;Learn Web Development from Scratch course completely free!&lt;/strong&gt; You’ll get lifetime access to the course without any sneaky subscription fees. You could even start learning right now!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>codenewbie</category>
      <category>css</category>
    </item>
    <item>
      <title>Deploying my first service on Kubernetes: Demystifying ingress</title>
      <dc:creator>The Educative Team</dc:creator>
      <pubDate>Wed, 09 Oct 2019 21:28:19 +0000</pubDate>
      <link>https://forem.com/educative/deploying-my-first-service-on-kubernetes-demystifying-ingress-cj9</link>
      <guid>https://forem.com/educative/deploying-my-first-service-on-kubernetes-demystifying-ingress-cj9</guid>
      <description>&lt;p&gt;By: Scott Coulton, Microsoft Developer Advocate, CNCF Ambassador, and Docker Captain&lt;/p&gt;




&lt;p&gt;One of the toughest pieces of the puzzle to solve when you are new to Kubernetes is ingress. Firstly, you have native ingress resource types, but you also need to use a controller. There are many third-party ingress controllers available to you, so what’s the difference between them?&lt;/p&gt;

&lt;p&gt;Before going further, this is the second post in the series and will assume you have read the first post and have some understanding of Kubernetes services and namespaces. If you have not read the post you can find it &lt;a href="https://blog.educative.io/pods-services-deployments/" rel="noopener noreferrer"&gt;here&lt;/a&gt;. If you are comfortable with services and namespaces, then you can continue reading.&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction to Ingress
&lt;/h1&gt;

&lt;p&gt;Why do you need ingress in Kubernetes? You could just expose the service and specify &lt;code&gt;type LoadBalancer&lt;/code&gt;. Right?&lt;/p&gt;

&lt;p&gt;That would then speak to your cloud of choice and spin up a load balancer for you with a public IP address and your service would be available for consumption. Happy days!!!&lt;/p&gt;

&lt;p&gt;Now imagine that you are running 10, or maybe 100 services exposed to the public. Each service would spin up its own load balancer and public IP address. You can see how this would very quickly sprawl and become unmanageable. Not to mention that it will be costing you money from your cloud provider for the extra load balancers and IP addresses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enter ingress.&lt;/strong&gt; What ingress allows you to do is share a single public IP address and route your application via URLs or URI, commonly known as http routing. Once you have an ingress controller picked, you will be able to specify the URLs or URI that you need to route, and the controller will look after it for you.&lt;/p&gt;

&lt;h1&gt;
  
  
  Limitations to the ingress type
&lt;/h1&gt;

&lt;p&gt;When using ingress there are a couple of limitations that you really need to be aware of.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The first is that ingress resources are not namespaced.&lt;/strong&gt; Don’t get me wrong here, the controllers themselves can be namespaced with rbac controls. The definition of the actual ingress resource under Kind: “Ingress can’t not have rbac and is not namespaced.”&lt;/p&gt;

&lt;p&gt;So, what does that mean?&lt;/p&gt;

&lt;p&gt;This means that if you have multiple teams using the cluster, they will need to be wary of deployments involving ingress as if they have permissions to write their ingress; they will also have permission to change or modify someone else’s on the cluster.&lt;/p&gt;

&lt;p&gt;This brings me to the second limitation of ingress; &lt;strong&gt;Kubernetes can have multiple of the same ingress types pointing to different resources.&lt;/strong&gt; Now this can be of use to you, but this can also lead to traffic being routed to rouge services on your cluster that are not meant to be a part of that ingress rule. As mentioned earlier, this is something that you should be aware of when using ingress. Later on in the post, you’ll see some ways to make sure each ingress rule is unique.&lt;/p&gt;

&lt;h1&gt;
  
  
  How routing works
&lt;/h1&gt;

&lt;p&gt;In the diagram below, you can see the flow of how requests are coming in from the internet, then hit the ingress controller, and are then routed to the service running on your cluster.&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%2Fxxc8v3pxd8slc6azda8x.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%2Fxxc8v3pxd8slc6azda8x.png" alt="Alt Text" width="292" height="538"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that you have a good understanding of the flow of traffic to your service, let’s look at how you can define the ingress resource.&lt;/p&gt;

&lt;p&gt;For the examples, I am going to use the &lt;strong&gt;Nginx&lt;/strong&gt; controller which is the easiest to get up and running. In the next section, you’ll find some other controllers to give you options for your cluster.&lt;/p&gt;

&lt;p&gt;In the examples below, you’ll see that you can define your ingress rules via two methods: First with URI’s and the second with host headers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Defining ingress via URI
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: production-uri
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - host: production.com
    http:
      paths:
      - path: /users
        backend:
          serviceName: users-api
          servicePort: 4200
      - path: /payments
        backend:
          serviceName: payments-api
          servicePort: 8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above example, its been defined that there are two services on production.com: a users API and a payments API. You can see that if the traffic is going to production.com/users it will hit the service users-api.&lt;/p&gt;

&lt;h2&gt;
  
  
  Defining ingress via host header
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: my-production-v-host
spec:
  rules:
  - host: foo.production.com
    http:
      paths:
      - backend:
          serviceName: api-v1
          servicePort: 80
  - host: bar.production.com
    http:
      paths:
      - backend:
          serviceName: api-v2
          servicePort: 80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, its defining the routing via URL in the host header and your traffic will go to the service defined in the host header.&lt;/p&gt;

&lt;h1&gt;
  
  
  Choosing an ingress controller
&lt;/h1&gt;

&lt;p&gt;Choosing an ingress controller will be a personal choice and will depend on your business use case. Here are some that have different options for configurations that are definitely worth a look.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Nginx&lt;/strong&gt; &lt;a href="https://kubernetes.github.io/ingress-nginx/" rel="noopener noreferrer"&gt;https://kubernetes.github.io/ingress-nginx/&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Nginx is one of the easiest to get up and running. It does use the standard Kubernetes resource type, so you would need to implement something like &lt;a href="https://www.openpolicyagent.org/" rel="noopener noreferrer"&gt;open policy agent&lt;/a&gt; if you wanted to block multiple of the same entries of an ingress rule. Out of the box, Nginx gives you TLS/HTTPS support, load balancing, TCP/UDP, and interfaces to Prometheus for metrics which can come in handy.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Contour&lt;/strong&gt; &lt;a href="https://github.com/heptio/contour" rel="noopener noreferrer"&gt;https://github.com/heptio/contour&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Contour takes a completely different approach to ingress and uses a new ingress type via CRD’s (Kubernetes resource definitions). Remember earlier in the post there was mention of having multiple of the same ingress rule? Contour fixes this by only allowing one rule and also allows you to delegate your URI paths and parts of the URL. Additionally, it uses &lt;a href="https://github.com/envoyproxy/envoy" rel="noopener noreferrer"&gt;envoy&lt;/a&gt; as a reverse proxy. This is one that is worth your while researching.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Traefik&lt;/strong&gt; &lt;a href="https://traefik.io/" rel="noopener noreferrer"&gt;https://traefik.io/&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Traefik is another popular choice for ingress and comes packed full of features. Traefik ships with a dashboard that allows you to dig into your ingress rules. There is also integrations with tracing (Jaeger, Open tracing and Zipkin), metrics (Prometheus or statsd), and TLS/HTTPS.&lt;/p&gt;

&lt;p&gt;Depending on your business use case, you should definitely do some research on the open-source projects above for your ingress needs.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;About: Scott Coulton&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Scott Coulton is a Developer Advocate, CNCF Ambassador, and Docker Captain with 10 years of experience as a software engineer in the managed services and hosting space. He has extensive experience in architecture and rolling out distributed compute systems and network solutions for national and multinational companies with a wide variety of technologies, including Azure, Kubernetes, Puppet, Docker, Cisco, VMware, Microsoft, and Linux. His design strengths are in cloud computing, automation, and security space.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/scottcoulton" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; | &lt;a href="https://au.linkedin.com/in/scott-coulton-22864813" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; | &lt;a href="https://github.com/scotty-c" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
