<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jacqueline Wisdom</title>
    <description>The latest articles on DEV Community by Jacqueline Wisdom (@wisdomjackie).</description>
    <link>https://dev.to/wisdomjackie</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%2F1076931%2Fe2cb0b4a-03c1-45a9-9f19-245be8f646fb.PNG</url>
      <title>DEV Community: Jacqueline Wisdom</title>
      <link>https://dev.to/wisdomjackie</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wisdomjackie"/>
    <language>en</language>
    <item>
      <title>Intro to Ruby</title>
      <dc:creator>Jacqueline Wisdom</dc:creator>
      <pubDate>Sun, 27 Aug 2023 17:32:10 +0000</pubDate>
      <link>https://dev.to/wisdomjackie/intro-to-ruby-5376</link>
      <guid>https://dev.to/wisdomjackie/intro-to-ruby-5376</guid>
      <description>&lt;p&gt;Are you considering learning Ruby? Before you jump in, let's take a look at some of the basics of Ruby. It's history, it's design, and a brief look at the code will help any Ruby-beginner better understand the language, and decide if Ruby is the language for them. &lt;/p&gt;

&lt;h2&gt;
  
  
  A Brief History
&lt;/h2&gt;

&lt;p&gt;Ruby was created in 1993 by Yukihiro Matsumoto. The creation of Ruby was heavily influenced by Perl and Python. Although both are object-oriented languages, Matsumoto felt that the object-oriented aspects of these languages were more of an after-thought. He set out to create a language that was object-oriented in it's core design. Thus, he created Ruby. &lt;/p&gt;

&lt;p&gt;Matsumoto also designed Ruby with usability and simplicity in mind. He created Ruby with the intention of creating the best experience for developers. Rather than focusing on designing Ruby to best interact with the computer, his focus was to make a language that best interacted with the human using it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SotmiGNg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wmbukmuvbixz58ynhm2y.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SotmiGNg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wmbukmuvbixz58ynhm2y.jpeg" alt="Matsumoto headshot" width="300" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;                       -- Yukihiro Matsumoto&lt;/p&gt;

&lt;p&gt;In 2005, Ruby on Rails was released. This web development framework had a huge impact on the popularity of the language overall. Rails made it easier and more feasible for many people to create their own web applications with Ruby, including small businesses and startups. After Rails was released, the usage of Ruby took off. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GVpeZ6aX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/25b13st6g7kmvb7s2tna.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GVpeZ6aX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/25b13st6g7kmvb7s2tna.png" alt="Ruby on Rails logo" width="800" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For almost two decades now, Ruby has remained a popular programming language. It had been used to create many large websites, such as Github, Airbnb, Hulu, and Shopify. Although it's usage has decreased somewhat in recent years, Ruby remains consistently in the top 10 most popularly used languages.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Ruby?
&lt;/h2&gt;

&lt;p&gt;Ruby is a dynamically typed, object-oriented, interpreted programming language. Let's break all of that down into plain English. &lt;/p&gt;

&lt;p&gt;Ruby is &lt;strong&gt;dynamically typed&lt;/strong&gt; as opposed to statically typed. This means that types are checked at runtime. This may allow developers to write less code and for interpreters to load new code dynamically. For reference, examples of other dynamically typed languages include Javascript and Python. &lt;/p&gt;

&lt;p&gt;Ruby is an &lt;strong&gt;object-oriented&lt;/strong&gt; language, meaning it's design is organized around objects and data. Moreover, everything in Ruby is considered an object. Strings, integers, and booleans are all considered objects. &lt;/p&gt;

&lt;p&gt;Finally, Ruby is &lt;strong&gt;interpreted&lt;/strong&gt; rather than compiled. Another program interprets the language and executes instructions, rather than the target machine. &lt;/p&gt;

&lt;h2&gt;
  
  
  A Look At Ruby
&lt;/h2&gt;

&lt;p&gt;Let's get a feel for Ruby by writing some basic code. Since Ruby is heavily object-focused, I will demonstrate how to make a class constructor to create many like objects.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Cat
  def
    initialize(name, color)
    @name = name
    @color = color
    @ranking = 'the best cat ever'
  end
  def prnt
    puts "This is #{@name}, he is #{@color} and he is #{@ranking}!"
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we use the &lt;code&gt;class&lt;/code&gt; keyword to create a new class of Cat objects. The &lt;code&gt;def&lt;/code&gt; keyword lets Ruby know that you are defining a method. In particular, we first use &lt;code&gt;initialize&lt;/code&gt; to set some default values for our objects. We want to give every cat object default values of &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;color&lt;/code&gt;, and &lt;code&gt;ranking&lt;/code&gt;. In Ruby, the &lt;code&gt;@&lt;/code&gt; symbol is used to create an instance variable.&lt;/p&gt;

&lt;p&gt;Next, we create another method called &lt;code&gt;prnt&lt;/code&gt;. To keep the demonstration simple, all this method will do is print a sentence about my object. We could use the &lt;code&gt;print&lt;/code&gt; keyword to print any following code. Instead, we will use &lt;code&gt;puts&lt;/code&gt;, which also prints any following code, but with a built-in line break at the end. &lt;/p&gt;

&lt;p&gt;In our sentence, we use &lt;strong&gt;string interpolation&lt;/strong&gt; to refer to our object variables. For those who are familiar, this is comparable to template literals in ES6. &lt;/p&gt;

&lt;p&gt;Now that we have our Cat class created, let's create some new instances of cat objects.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat_one = Cat.new('Dr. Chocolate', 'brown')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we create a new variable &lt;code&gt;cat_one&lt;/code&gt;. Note that declarative keywords are not used in Ruby. Rather, the casing of the variable determines it's type. &lt;code&gt;cat_one&lt;/code&gt; is lower-case, therefore it is not constant and can be re-assigned. &lt;/p&gt;

&lt;p&gt;If we want to create a constant variable, we can use an upper-case variable name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CAT_TWO = Cat.new('Mr. Mustard', 'orange')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;CAT_TWO&lt;/code&gt; is a constant variable and cannot be reassigned. &lt;/p&gt;

&lt;p&gt;Now that we have created some cat objects, we can access their methods. Let's use the &lt;code&gt;prnt&lt;/code&gt; method to print descriptive sentences about our objects.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat_one.prnt
# =&amp;gt; This is Dr. Chocolate, he is brown and he is the best cat
# ever!
CAT_TWO.prnt
# =&amp;gt; This is Mr. Mustard, he is orange and he is the best cat 
# ever!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;In conclusion, Ruby is a general purpose programming languages used for many things, most often used for building web applications. Ruby has a strong online community because of it's long-held popularity. Because of it's simplicity, Ruby is a good language for beginners to learn. Additionally, it is especially intuitive for programmers who have prior experience with another language.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sources&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.oracle.com/learn/technical-articles/what-is-ruby#:%7E:text=Ruby%20was%20publicly%20released%20in,of%20the%20world's%20best%20applications"&gt;https://developer.oracle.com/learn/technical-articles/what-is-ruby#:~:text=Ruby%20was%20publicly%20released%20in,of%20the%20world's%20best%20applications&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://ruby-doc.org/docs/ruby-doc-bundle/FAQ/FAQ.html"&gt;https://ruby-doc.org/docs/ruby-doc-bundle/FAQ/FAQ.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://programmers.io/blog/the-benefits-and-applications-of-using-ruby-as-a-programming-language/"&gt;https://programmers.io/blog/the-benefits-and-applications-of-using-ruby-as-a-programming-language/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://ruby-doc.com/docs/ProgrammingRuby/"&gt;http://ruby-doc.com/docs/ProgrammingRuby/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>SSH Attackers VS Honeypots</title>
      <dc:creator>Jacqueline Wisdom</dc:creator>
      <pubDate>Mon, 14 Aug 2023 04:46:00 +0000</pubDate>
      <link>https://dev.to/wisdomjackie/ssh-attackers-vs-honeypots-2af4</link>
      <guid>https://dev.to/wisdomjackie/ssh-attackers-vs-honeypots-2af4</guid>
      <description>&lt;p&gt;The following is a classic tale of good versus evil.&lt;/p&gt;

&lt;p&gt;Ever since the advent of networking technology, there have been malicious parties trying to intercept the private and valuable information that it transports. All sorts of networking technologies are regularly targeted by attackers, with many attacks carefully tailored to that technologies' weaknesses.&lt;/p&gt;

&lt;p&gt;But as attacks become more deceptive and sophisticated, so does cybersecurity. In this blog, I will hone in on SSH attacks and SSH honeypots used to counteract these attacks. &lt;/p&gt;

&lt;h2&gt;
  
  
  What is SSH?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcofc37s0pvkjyv2o7q39.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcofc37s0pvkjyv2o7q39.jpg" alt="Encryption of data between SSH client and server"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SSH stands for Secure Shell. An SSH allows users or administrators to securely access or control another computer remotely. &lt;/p&gt;

&lt;p&gt;Before SSH, Telnet protocol was the leading technology used to for communication between computers across long distances. Telnet allows for two-way communication between a client and server via command line interface. However, any information transported using Telnet is easily intercepted by hackers.&lt;/p&gt;

&lt;p&gt;SSH was introduced as a secure alternative. All information passed between computers using SSH is encrypted. Even if information transported via SSH is intercepted, is protected because of the encryption. Because of this useful security, many developers now favor SSH instead of Telnet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is it really secure? SSH Attacks
&lt;/h2&gt;

&lt;p&gt;Unfortunately, as cybersecurity techniques and practices advance, so do those of attackers. &lt;/p&gt;

&lt;p&gt;SSH shells are not completely air-tight or infallible, and can be the subject of brute-force attacks. SSH doesn't have a built-in mechanism to stop malicious parties from spamming commonly used username and password combinations until the shell is broken into. &lt;/p&gt;

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

&lt;p&gt;There are many approaches to preventing SSH attacks. Developers can manually adjust their SSH settings to limit authentication attempts, use third party security tools to monitor and block repeated attempts, or implement two-factor authorization. These are all ways of blocking SSH attacks.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a honeypot?
&lt;/h2&gt;

&lt;p&gt;Although the above approaches are all good practice, perhaps the most fun approach is fighting deception with deception.&lt;/p&gt;

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

&lt;p&gt;A honeypot is a system used to deceive attackers. Honeypots are designed to appear to be vulnerable computers or networks, in order to entice hackers into attacking them. &lt;/p&gt;

&lt;p&gt;In reality, honeypots contain no real valuable or private information for the hackers to access. Instead, their real purpose is to alert the honeypot owner of malicious activity, waste the hackers time or resources and, most importantly, gather information on how hackers operate. &lt;/p&gt;

&lt;h2&gt;
  
  
  SSH Honeypots
&lt;/h2&gt;

&lt;p&gt;There are numerous open-source honeypots already created online, for various kinds of technologies. All the different features of honeypots are clever, inventive and amusingly diabolical. To illustrate these epic features, let's take a look  at the following SSH honeypots.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kippo&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/desaster/kippo" rel="noopener noreferrer"&gt;Kippo&lt;/a&gt; is a medium interactive honeypot that engages and responds to attackers. Although Kippo is older and somewhat dated, it has great features and is a good illustration of the inventive ways honeypots can be used to troll attackers.&lt;/p&gt;

&lt;p&gt;Kippo emulates a real shell and has an entire fake file structure, to convince attackers that they have broken in. Attackers can &lt;code&gt;cd&lt;/code&gt; into, create and remove files. Kippo also has a fake disconnect feature, where hackers can &lt;code&gt;ctrl + d&lt;/code&gt; "out" of the shell. Kippo only pretends to disconnect, but really stays connected to continue impeding the efforts of the hacker.&lt;/p&gt;

&lt;p&gt;Perhaps the greatest feature of Kippo is that it logs the entire attack. Every command entered by the attacker is logged and the owner of the honeypot can view the interaction at any time.&lt;/p&gt;

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

&lt;p&gt;Above is a Kippo honeypot foiling an attacker. For your entertainment, &lt;a href="http://kippo.rpg.fi/playlog/?l=20100316-233121-1847.log" rel="noopener noreferrer"&gt;here&lt;/a&gt; is the full log of Kippo VS a real SSH attack.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hellpot&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/yunginnanet/HellPot" rel="noopener noreferrer"&gt;Hellpot&lt;/a&gt; is an endless honeypot that sends a never ending stream of data to the attackers. The data is intentionally created to look like real data from a website, so that hackers will sink their time and or resources into the attack.&lt;/p&gt;

&lt;p&gt;But the data stream will never end, and there is no real private information to be stolen. In reality, the data is generated from random chunks of &lt;em&gt;The Birth of Tragedy (Hellenism and Pessimism)&lt;/em&gt; by Friedrich Nietzsche; a covert nod to the fate of the hackers, who will be left questioning their choices and even their very existence. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;T-Pot&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Finally, there is the powerful and awe-inspiring &lt;a href="https://github.com/telekom-security/tpotce" rel="noopener noreferrer"&gt;T-Pot&lt;/a&gt;. T-Pot is a platform that includes over 20 different honeypots and dashboards that give detailed information about any incoming attacks. &lt;/p&gt;

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

&lt;p&gt;These dashboards have an array of cool features: word clouds of your hackers most frequently used username and password combinations, lists of your hackers IP addresses, and world maps that visualize the location of your attackers in real-time. &lt;/p&gt;

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

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

&lt;p&gt;In conclusion, honeypots are one of the many approaches one can take in dealing with the ongoing threat of cyber attacks. Honeypots can be made for almost any kind of tech that attackers target. They allow us to not only waste the time and resources of attackers, but also gather valuable information about the techniques that attackers use, in order to better protect against such attacks in the future. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sources&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://blog.sucuri.net/2023/04/how-to-prevent-ssh-brute-force-login-attacks.html" rel="noopener noreferrer"&gt;https://blog.sucuri.net/2023/04/how-to-prevent-ssh-brute-force-login-attacks.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://pragmaticparanoia.com/why-is-telnet-insecure/" rel="noopener noreferrer"&gt;https://pragmaticparanoia.com/why-is-telnet-insecure/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.knowledgehut.com/blog/security/honeypot" rel="noopener noreferrer"&gt;https://www.knowledgehut.com/blog/security/honeypot&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/desaster/kippo" rel="noopener noreferrer"&gt;https://github.com/desaster/kippo&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/yunginnanet/HellPot" rel="noopener noreferrer"&gt;https://github.com/yunginnanet/HellPot&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/telekom-security/tpotce" rel="noopener noreferrer"&gt;https://github.com/telekom-security/tpotce&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>Intro to Kubernetes</title>
      <dc:creator>Jacqueline Wisdom</dc:creator>
      <pubDate>Mon, 31 Jul 2023 01:29:18 +0000</pubDate>
      <link>https://dev.to/wisdomjackie/intro-to-kubernetes-58p5</link>
      <guid>https://dev.to/wisdomjackie/intro-to-kubernetes-58p5</guid>
      <description>&lt;h2&gt;
  
  
  What is Kubernetes?
&lt;/h2&gt;

&lt;p&gt;Kubernetes is an open-source platform through which developers can manage, deploy and maintain groups of containers. Applications can be made up of hundreds of containers, all of which need to be managed. Additionally, these containers may need to be managed across different environments: physical machines, virtual machines, cloud environments, or even hybrid environments. Managing such containers without a container-orchestration technology would be an exceedingly complicated task.&lt;/p&gt;

&lt;p&gt;To address this problem, in 2003, developers at Google created the Borg system. The Borg system is the predecessor of Kubernetes. Kubernetes was then created in 2014 as an open-source alternative to the Borg system. Today, Kubernetes is the most widely-used container management tool. &lt;/p&gt;

&lt;h2&gt;
  
  
  How does it work?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--58_5aaOa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kye7crvfwpsvsllbpzdh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--58_5aaOa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kye7crvfwpsvsllbpzdh.png" alt="Kubernetes Architecture" width="607" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The structure of Kubernetes is divided into discrete components, each responsible for different things. Generally, there are Master Nodes, responsible for higher-order management, and Worker Nodes, responsible for running the applications. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Master Nodes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HUUATnxW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/momxo0l9lvn0sika6rm3.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HUUATnxW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/momxo0l9lvn0sika6rm3.jpeg" alt="Control Plane" width="800" height="719"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Master Nodes contain many important subcomponents that handle the greater management of the cluster. Firstly, there is an &lt;strong&gt;API server&lt;/strong&gt;, which functions as an entry point to the cluster and handles requests. Next, there is a &lt;strong&gt;controller manager&lt;/strong&gt;, which keeps running tabs on the state of all components in the cluster. If a component fails and needs repair, the controller manager will detect the failure and handle the repair.&lt;/p&gt;

&lt;p&gt;Additionally, the Master Node contains the &lt;strong&gt;scheduler&lt;/strong&gt;. The scheduler takes inventory of the available resources on the worker nodes and determines where incoming containers will go. Finally, the Master Node also houses the &lt;strong&gt;etcd&lt;/strong&gt; key-value storage. The etcd has all the configuration data and status data of each node and of each container it holds. Backups are created from snapshots from the etcd. These snapshots give the Master Node the ability to recover any container or node in the cluster.&lt;/p&gt;

&lt;p&gt;The Master Nodes are arguably the most important. They have the ability to restart or restore any part of the cluster that fails or is lost and are responsible for the greater functioning of all other nodes and containers. Worker Nodes, alternatively, tend to be larger and have the most load. This is because Worker Nodes are responsible for running applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Worker Nodes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ByAj_OLf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xy86q4eaa3er6wmq00qa.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ByAj_OLf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xy86q4eaa3er6wmq00qa.jpeg" alt="Master and Worker Nodes" width="800" height="625"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just like Master Nodes, Worker Nodes are made up of several different components. Each component is responsible for different functions. Firstly, each Worker Node has a &lt;strong&gt;kubelet&lt;/strong&gt; process. The kubelet allows communication between the nodes. If there is a problem with the status of it's Worker Node, the kubelet relays this message to the Master Node, receives instructions and carries them out. &lt;/p&gt;

&lt;p&gt;Worker Nodes also contain any number of &lt;strong&gt;containers&lt;/strong&gt;. A container is a single component of packaged up code and any needed dependencies. A popular container technology, often used in tandem with Kubernetes, is Docker. There may be a different number of containers in each Worker Node, depending on the distribution of the load.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Kubernetes Usability
&lt;/h2&gt;

&lt;p&gt;Kubernetes is currently the most popular container management tool. However, before deciding on whether to use any technology, developers should assess it's usability and benefits, as well as its challenges. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Scalability: As load increases or decreases, Kubernetes can quickly scale accordingly. It can manage a wide range in number of containers and can automatically add nodes to clusters as needed. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Disaster recovery and self-healing: if a disaster occurs and data is lost, there are backups saved and all data can be restored. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Load balancing: containers are sorted into nodes after an automatic assessment of each nodes available resources.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Complexity: Kubernetes is a complex technology and is not beginner friendly. It takes a minimum level of expertise to use Kubernetes, and those who do often must be explicitly trained to do so.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Not practical for small applications or startups: Kubernetes' ideal use is managing large groups of containers for complex applications. It may not be particularly useful depending on the scale of an app. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;In conclusion, Kubernetes is a popular, open-source technology that is widely used to manage large numbers of containers. It is comprised of separate, hierarchal components that control specific aspects of functioning. It is an ideal tool for complex applications. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Works Cited&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://blog.risingstack.com/the-history-of-kubernetes/#:%7E:text=Kubernetes%20is%20originally%20developed%20by,a%20large%20community%20of%20contributors"&gt;https://blog.risingstack.com/the-history-of-kubernetes/#:~:text=Kubernetes%20is%20originally%20developed%20by,a%20large%20community%20of%20contributors&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dl.acm.org/doi/10.1145/2741948.2741964"&gt;https://dl.acm.org/doi/10.1145/2741948.2741964&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.datadoghq.com/container-report/#:%7E:text=Kubernetes%20continues%20to%20be%20the,containers%20in%20a%20growing%20ecosystem"&gt;https://www.datadoghq.com/container-report/#:~:text=Kubernetes%20continues%20to%20be%20the,containers%20in%20a%20growing%20ecosystem&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://thenewstack.io/kube-node-let-k8s-cluster-auto-manage-nodes/"&gt;https://thenewstack.io/kube-node-let-k8s-cluster-auto-manage-nodes/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.learnsteps.com/what-is-a-control-plane-what-do-people-mean-by-this-basics-on-kubernetes/"&gt;https://www.learnsteps.com/what-is-a-control-plane-what-do-people-mean-by-this-basics-on-kubernetes/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://platform9.com/blog/kubernetes-enterprise-chapter-2-kubernetes-architecture-concepts/"&gt;https://platform9.com/blog/kubernetes-enterprise-chapter-2-kubernetes-architecture-concepts/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Behavior Driven Development</title>
      <dc:creator>Jacqueline Wisdom</dc:creator>
      <pubDate>Mon, 26 Jun 2023 16:55:18 +0000</pubDate>
      <link>https://dev.to/wisdomjackie/behavior-driven-development-4nfd</link>
      <guid>https://dev.to/wisdomjackie/behavior-driven-development-4nfd</guid>
      <description>&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&gt;Behavior driven development (BDD) is an outside-in approach to software development that promotes understanding in all members of a team. In order to understand BDD, one must first understand test driven development (TDD). BDD takes the general TDD approach, and adds an additional layer of guidance to further flesh out a concrete plan of action. One of the benefits of BDD is that this approach will aid intra-team communication, and thereby streamline efficiency of software development projects. &lt;/p&gt;

&lt;h2&gt;
  
  
  What does TDD have to do with BDD?
&lt;/h2&gt;

&lt;p&gt;These two approaches are not mutually exclusive. In fact, BDD emerged from TDD. TDD, on it's own, is a powerful and effective approach to software development that has changed the way developers implement code. BDD takes this approach and elaborates even further.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is TDD?
&lt;/h2&gt;

&lt;p&gt;Test-driven development is a process in which tests are created before code is implemented. First, developers write tests against which they will test their code. These tests are written before the code and therefore should initially fail. Code is then subsequently implemented with the goal of making the tests pass. Thus, development is driven by the tests. &lt;/p&gt;

&lt;h2&gt;
  
  
  How BDD Works: Outside-in
&lt;/h2&gt;

&lt;p&gt;BDD takes the TDD approach and adds a few more layers of specified action. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Narrative&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Starting at the top, team members can articulate their goals in the "narrative" phase. At this time, team members use natural language in a specific structure to describe the goals of their software project. That structure is as follows: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;As a (person's role)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I want (desired feature)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;So that (benefit/value)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A product owner will use this structured, natural language to articulate a narrative of how their want their product to work. For example, suppose the owner of a grocery store is implementing on online shopping service for grocery delivery. They want customers to be able to view grocery items, add selected items to a cart, and check out. They might articulate the following customer narrative:&lt;/p&gt;

&lt;p&gt;"As a grocery store customer, I want to add a desired items to my cart, so that I can purchase them."&lt;/p&gt;

&lt;p&gt;Using this natural language makes goals accessible and aids communication among the many members of the project's team, regardless of whether they are familiar with the technology. For example, designers, business owners and quality assurance can participate and communicate effectively.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4L2q9_yn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ui8xoqvk4xk8991zdn6t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4L2q9_yn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ui8xoqvk4xk8991zdn6t.png" alt="Development team" width="800" height="560"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://asperbrothers.com/blog/software-development-team/"&gt;Source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Acceptance Criteria&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This structured narrative is then easily translated into clearly stated acceptance criteria. Acceptance criteria are the goals that must be achieved by the software. They are stated in the following structure: Given (initial context), When (event that will trigger a scenario), Then (expectation or outcome).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CUmIGlJR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sy6citd0n5frp3pj43t6.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CUmIGlJR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sy6citd0n5frp3pj43t6.jpeg" alt="Given, When, Then" width="733" height="480"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.j-labs.pl/blog-technologiczny/given-when-then-pattern-in-unit-tests/"&gt;Source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To continue our online grocery service example, the acceptance criteria would be as follows: "Given that I am browsing items, when I click an item, the item should then be added to the cart."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Executable Tests&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that we have broken down the goals of our software in plain, understandable language, we can translate them into actual tests against which to test our code. Tests should be given descriptive names of whatever behavior they are testing for. Using test methods named actual descriptive sentences helps developers create documentation that everyone on the team can understand.&lt;/p&gt;

&lt;p&gt;Here is an example of what some of the tests may look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class AddItemToCart extends TestCase {

testAddItemToCollection() {
    …
};

testIncreaseItemCount () {
    …
};

testIncreaseTotalPrice () {
    …
};

(... and so on)
};

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

&lt;/div&gt;



&lt;p&gt;Now we all team members have been able to contribute thoughts and ideas. Developers are now able to use all of this information to hone in on features of the software, and create specific tests. &lt;/p&gt;

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

&lt;p&gt;In conclusion, BDD is a helpful, top-down approach that provides clear structure of how to achieve particular software features. The natural language allows all of the necessary parties to contribute to the project. The structure provides straightforward guidance on how to articulate goals, and how to proceed at each step. Finally, developers can get down to the detailed level of TDD, and implement their code against tests. &lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://lizkeogh.com/2011/06/27/atdd-vs-bdd-and-a-potted-history-of-some-related-stuff/"&gt;https://lizkeogh.com/2011/06/27/atdd-vs-bdd-and-a-potted-history-of-some-related-stuff/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dannorth.net/introducing-bdd/"&gt;https://dannorth.net/introducing-bdd/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dannorth.net/whats-in-a-story/"&gt;https://dannorth.net/whats-in-a-story/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.j-labs.pl/blog-technologiczny/given-when-then-pattern-in-unit-tests/"&gt;https://www.j-labs.pl/blog-technologiczny/given-when-then-pattern-in-unit-tests/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.rswebsols.com/build-culture-software-development-team/"&gt;https://www.rswebsols.com/build-culture-software-development-team/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>development</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Intro to Python</title>
      <dc:creator>Jacqueline Wisdom</dc:creator>
      <pubDate>Sun, 18 Jun 2023 22:09:08 +0000</pubDate>
      <link>https://dev.to/wisdomjackie/intro-to-python-242c</link>
      <guid>https://dev.to/wisdomjackie/intro-to-python-242c</guid>
      <description>&lt;h2&gt;
  
  
  A Brief History
&lt;/h2&gt;

&lt;p&gt;Python was released in 1991 by Guido Van Rossum. During team meetings in the early days of Python, the title "Benevolent Dictator for Life" was bestowed upon Van Rossum. This venerable title has since been reserved for only a small group of giants of the open-source software development world.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://python-history.blogspot.com/2009/01/brief-timeline-of-python.html"&gt;History&lt;/a&gt;, &lt;a href="https://www.artima.com/weblogs/viewpost.jsp?thread=235725"&gt;BDFL&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OsnFV997--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/usyigogbpzivb2t1si7h.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OsnFV997--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/usyigogbpzivb2t1si7h.jpg" alt="Guido Van Rossum" width="220" height="330"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://gvanrossum.github.io/"&gt;GVR&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And in case you were wondering: Yes, the Python programming language was named after &lt;em&gt;Monty Python&lt;/em&gt;, the British comedy sketches. Because, with Python, coding is fun! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.python.org/3/faq/general.html#why-is-it-called-python"&gt;Python name&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xsS1MIro--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xtt3lmgtsbwb0uyqdhke.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xsS1MIro--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xtt3lmgtsbwb0uyqdhke.jpeg" alt="Monty Python meme" width="800" height="791"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://programmerhumor.io/python-memes/image-generator-that-let-you-see-how-you-would-look-like-as-a-monty-python-character/"&gt;MP meme&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Python was created with usability, efficiency and simplicity in mind. Python developer Tim Peters expands on this mindset with the "Zen of Python" ... &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Beautiful is better than ugly.&lt;br&gt;
Explicit is better than implicit.&lt;br&gt;
Simple is better than complex.&lt;br&gt;
Readability counts."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://peps.python.org/pep-0020/"&gt;Zen of Python&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What is Python, anyway?
&lt;/h2&gt;

&lt;p&gt;Python is a multipurpose, server-side programming language that is rapidly gaining popularity. It's known for its ease of use, versatility and vast array of libraries. Python is used by Youtube, NASA, Pixar, Netflix and Facebook-- just to name a few. It is one of the top programming languages that developers use, are currently learning, or are requested to know by potential employers. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://codingnomads.co/wp-content/uploads/2019/06/PythonCompanies.png"&gt;Companies using Python&lt;/a&gt;, &lt;a href="https://survey.stackoverflow.co/2022/?utm_source=social-share&amp;amp;utm_medium=social&amp;amp;utm_campaign=dev-survey-2022"&gt;Stack Overflow Ranking&lt;/a&gt;, &lt;a href="https://www.jetbrains.com/lp/devecosystem-2020/"&gt;jetBrains Ranking&lt;/a&gt;, &lt;a href="https://pypl.github.io/PYPL.html"&gt;PYPL ranking&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Python is known for it's ease of use. The syntax and grammar of Python are specifically designed to be as straightforward, intuitive and concise as possible. It is often recommended as the first programming language to learn for beginners. And, it is especially easy to pick up for developers that have familiarity with other languages.&lt;/p&gt;

&lt;p&gt;Python is also known for it's versatility . It has great extensibility and versatility because of its modules. Extensibility is how much a framework can extend to another system and how easy this is to implement. There are many different modules, libraries and packages that can be used with Python. Whatever it may be that you want to build with Python, there is most likely already a built-out foundation for it. &lt;/p&gt;
&lt;h2&gt;
  
  
  What does it look like to code in Python?
&lt;/h2&gt;

&lt;p&gt;Now that you know all about it, let's see what it's like to actually code with Python. Here's a small astrology program, named Bob, that will ask for a user's birthday, and respond based on that information.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Let's build an astrology program!

# print a greeting
print('Hello astrologer!')
# ask user for name
print('What is your name? ')
# assign user name to a variable
my_name = input()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;print()&lt;/code&gt; method will print any value passed into it. Here, we print a greeting and ask for a users name. At this point, we can assign a variable to &lt;code&gt;input()&lt;/code&gt;, and whatever the user inputs will be saved as their name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# app introduces itself
print('Hi ' + my_name + '! My name is Bob.')
print('My birthday is 06/18/2023. That means I am a Gemini!')
# ask user for birthday
print('When is your birthday? (Please input in this format: 00/00/0000) ')
# assign user birthday to variable
my_birthday = input()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, we have our users birthdate information. But, anything passed into &lt;code&gt;input()&lt;/code&gt; will automatically be stored as a string. To use this data in the form of a number, we'll have to convert the datatype. &lt;/p&gt;

&lt;p&gt;We can use the &lt;code&gt;int()&lt;/code&gt; method to convert a string to an integer. We also only need certain positions from the input in order to determine the user's birthday and month. We can use bracket notation to access particular values of the input, based on their indexes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# create month and day variables
my_month = int(my_birthday[0:2])
my_day = int(my_birthday[3:5])
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we have stored the users birthday information data as numbers, and can use it as such.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# determine user's sign based on month and day variables
if my_month == 1 and my_day &amp;lt; 20 or my_month == 12 and my_day &amp;gt; 21:
    my_sign = 'Capricorn'
elif my_month == 1 and my_day &amp;gt; 19 or my_month == 2 and my_day &amp;lt; 19:
    my_sign = 'Aquarius'
elif my_month == 2 and my_day &amp;gt; 18 or my_month == 3 and my_day &amp;lt; 21:
    my_sign = 'Pisces'
elif my_month == 3 and my_day &amp;gt; 22 or my_month == 4 and my_day &amp;lt; 20:
    my_sign = 'Aries'
elif my_month == 4 and my_day &amp;gt; 21 or my_month == 5 and my_day &amp;lt; 21:
    my_sign = 'Taurus'
elif my_month == 5 and my_day &amp;gt; 22 or my_month == 6 and my_day &amp;lt; 21:
    my_sign = 'Gemini'
elif my_month == 6 and my_day &amp;gt; 22 or my_month == 7 and my_day &amp;lt; 23:
    my_sign = 'Cancer'
elif my_month == 7 and my_day &amp;gt; 24 or my_month == 8 and my_day &amp;lt; 23:
    my_sign = 'Leo'
elif my_month == 8 and my_day &amp;gt; 24 or my_month == 9 and my_day &amp;lt; 23:
    my_sign = 'Virgo'
elif my_month == 9 and my_day &amp;gt; 24 or my_month == 10 and my_day &amp;lt; 23:
    my_sign = 'Libra'
elif my_month == 10 and my_day &amp;gt; 24 or my_month == 11 and my_day &amp;lt; 22:
    my_sign = 'Scorpio'
elif my_month == 11 and my_day &amp;gt; 23 or my_month == 12 and my_day &amp;lt; 22:
    my_sign = 'Sagittarius'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These statements are known as conditions. Depending on the conditions of the users birthdate data, we can assign a variable to store the appropriate sign.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# respond with user sign
print('You are a ' + my_sign + '! I knew you were crazy.')
print('Wanna know your moon and rising?')
answer = input()

if answer == 'yes':
    print('Please enter your birth time and location!')
else:
    print('Typical ' + my_sign + '. Whatever!')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There you have it! In just a few moments, we've created a program that takes in data about a user and responds based on that data.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does Python stack up to other languages?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Usability: Python is easy to learn and use, and is quite powerful considering.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Extensibility: Python has many different libraries to support different kinds of applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Community: Python has a large community with many resources available online. This may be especially important for beginners. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scalability: Python is can be used for small, simple apps or it can be used for large projects by big companies.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Great for backend: Although Python is a general language, it is particularly useful for backend. Data science, automation, machine learning and AI are all areas of strength for Python.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://codingnomads.co/why-learn-python/"&gt;Pros of Python&lt;/a&gt;, &lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=Ou_hSDxzjMI"&gt;More Pros of Python&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So far, we've only looked at the advantages of using Python. As it is a popular language, it's no surprise there are so many. &lt;/p&gt;

&lt;p&gt;But, just like any programming tool, there are upsides and downsides. In the case of Python, there are aspects of it that may not be ideal for a given developer, depending on their specific goals. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Possibly too general: while in many ways this is an advantage of Python, it can also be a disadvantage. Sure, you can build pretty much anything with Python. But just because you can, doesn't mean you should. In particular, Python is weaker than other languages when it comes to mobile apps and 3D rendering. If your goal is build a game, mobile app, or website, Python may not be the best choice. Other languages are more specialist than Python, and may be a better choice for one specific project. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Slowness: Python is dynamically typed, and as such, it is read slower. It has a "global interpreter lock", meaning that only one thread of code can by read by the interpreter at a time. While this difference in speed may not be particularly dramatic compared to other languages, it is something to consider. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;In conclusion, there are many advantages to Python. It is versatile, intuitive and in high demand. If you are planning to work in data science, automation or machine learning, it may be especially great to use. Otherwise, if you are planning to work in an area that would be better suited by another specialized programming language, you can always focus on one language now and learn Python later on. For a software developer, Python is a great skill to have in your repertoire.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Cm6qTp3L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w9xvp6y3ysevoso8pu3r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Cm6qTp3L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w9xvp6y3ysevoso8pu3r.png" alt='Python "so hot right now" Zoolander meme' width="734" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ready to get started? &lt;a href="https://www.w3schools.com/python/python_exercises.asp"&gt;Here's&lt;/a&gt; a few simple exercises to help you dip your toes into Python.&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Intro to Heroku</title>
      <dc:creator>Jacqueline Wisdom</dc:creator>
      <pubDate>Sun, 11 Jun 2023 18:05:59 +0000</pubDate>
      <link>https://dev.to/wisdomjackie/intro-to-heroku-3k27</link>
      <guid>https://dev.to/wisdomjackie/intro-to-heroku-3k27</guid>
      <description>&lt;p&gt;So, you want to build an app. &lt;/p&gt;

&lt;p&gt;In order to get your app up and running, you'll need to deploy it somehow. You might consider Heroku-- a popular deployment platform. &lt;/p&gt;

&lt;p&gt;What is Heroku? Should I use this deployment platform? What is a deployment platform? What is deployment? &lt;/p&gt;

&lt;p&gt;Let's take a look.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Brief History of Heroku
&lt;/h2&gt;

&lt;p&gt;Heroku was founded in 2007 by James Lindenbaum, Adam Wiggins, and Orion Henry. &lt;/p&gt;

&lt;p&gt;Fun fact: the name “Heroku” was created by combining the words “hero” and “haiku.” This is an homage to Japanese programmer Yukihiro Matsumoto, creator of the Ruby programming language (and all-around cool guy). &lt;/p&gt;

&lt;p&gt;&lt;a href="https://news.ycombinator.com/item?id=815855"&gt;Heroku name origin&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Vbnl9gFx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/la6t69dho7t11iajt4ar.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Vbnl9gFx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/la6t69dho7t11iajt4ar.jpeg" alt="Yukihiro Matsumoto" width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.azquotes.com/author/50906-Yukihiro_Matsumoto"&gt;Matz image&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Originally, Ruby was the only programming language that Heroku supported. Since its origin as one of the first ever cloud platforms, Heroku has continually grown and adapted. It now supports many programming languages and has been used to create over 13 million apps. Wow! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.heroku.com/about#:~:text=Developers%20have%20created%20over%2013,next%20wave%20of%20groundbreaking%20apps."&gt;13 million apps&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Heroku, anyway?
&lt;/h2&gt;

&lt;p&gt;Heroku is a cloud platform that developers use to deploy applications. Deployment is the process of releasing an app and making it available to users on their devices. &lt;/p&gt;

&lt;p&gt;To make this possible, applications need infrastructure. There are many components that make up that infrastructure: web servers, application servers, storage servers, firewalls, and so on. Heroku streamlines this process for developers. It can help save time, and ensure that applications run smoothly across all systems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.atatus.com/glossary/application-infrastructure/#:~:text=The%20whole%20infrastructure%20that%20is,system%20management%20considerably%20more%20challenging"&gt;App infrastructure&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fLLHZsJ6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5uknsy4twwpp0fauxtke.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fLLHZsJ6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5uknsy4twwpp0fauxtke.jpeg" alt="Application Infrastructure" width="800" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.atatus.com/glossary/application-infrastructure/"&gt;App infrastructure image&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As was mentioned before, Heroku supports an array of programming languages. This includes Ruby, Java, Node.js, Python and Clojure-- just to name a few. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.heroku.com/"&gt;Supported languages&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For any language not officially supported by Heroku, there are buildpacks. A buildpack can be created by any user to support any language or framework not already covered by Heroku. Most likely, for any given framework or language a developer may want to use, such a buildpack has already been created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.heroku.com/elements/buildpacks"&gt;Heroku buildpacks&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How does it work?
&lt;/h2&gt;

&lt;p&gt;Developers can create their application by using the command “heroku create”, followed by the app name, in the terminal. At this time, Heroku creates an empty container in which the code can run. Heroku provides a link to a live, working version of the app that the developer can use to test out their code. &lt;/p&gt;

&lt;p&gt;To deploy, developers push code into Heroku with the command “git push heroku main.” Heroku then performs several actions on the code and packages it into a new release. Every push creates a new release, so all earlier versions of the app are preserved. Now the app is (in theory) production ready! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VTZXq6rp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3dcmvgihxlb6jsckh8pq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VTZXq6rp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3dcmvgihxlb6jsckh8pq.png" alt="Heroku commands" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.heroku.com/"&gt;Heroku commands&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As developers delve deeper into Heroku, there are many other actions they may want to perform. Here is a useful cheat sheet of Heroku commands.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1BwKA3XM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gf4uoj74v2r47q6tcldh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1BwKA3XM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gf4uoj74v2r47q6tcldh.png" alt="Heroku cheat sheet" width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/TechParida/status/1289255773919272965"&gt;Heroku cheat sheet&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(Note that this cheat sheet contains "git push heroku master" as the deployment command. As of 2020, Heroku also supports "main" in place of "master" as the primary branch.)&lt;/p&gt;

&lt;p&gt;After deploying, developers can use the many tools and add-ons Heroku provides to keep the app running smoothly. Heroku is also known for its ease of scaling; as the app grows, and as does the number of it's users, developers can simply use a drag slider to increase scale. &lt;/p&gt;

&lt;h2&gt;
  
  
  So what's the scoop?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are other options for cloud platforms. So why use Heroku? According to Stackshare, "&lt;a href="https://stackshare.io/heroku"&gt;https://stackshare.io/heroku&lt;/a&gt;", the following are the three most highly reported pros of Heroku: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Easy deployment &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Time efficiency&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Simple scaling&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Previously, one of the biggest advantages of Heroku was that it was free. However, as of 2022, Heroku no longer provides a free tier. In his blog post, "&lt;a href="https://blog.heroku.com/next-chapter"&gt;https://blog.heroku.com/next-chapter&lt;/a&gt;", general manager Bob Wise cited an “extraordinary amount of effort to manage fraud and abuse of the Heroku free product plans.” &lt;/p&gt;

&lt;p&gt;Thus, a noteworthy con of Heroku is the cost. The elimination of the free tier was not well received among many users. &lt;/p&gt;

&lt;p&gt;On his YouTube channel, "&lt;a href="https://www.youtube.com/watch?v=prjMJtXCR-g"&gt;https://www.youtube.com/watch?v=prjMJtXCR-g&lt;/a&gt;", Theo Browne, CEO of Ping, put it bluntly: "Heroku is dead." He states that "Heroku is no longer viable, by their own decisions and definitions, as a way to get started on a new app."&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o9XpZC4a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gopisiemmvkqpjcr99mb.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o9XpZC4a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gopisiemmvkqpjcr99mb.jpeg" alt='Heroku on a gravestone in "man poses over grave" meme format' width="800" height="681"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ngxcoder.dev/heroku-se-nos-va-y-ahora-que/"&gt;RIP Heroku image&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The takeaway form this change? In stark contrast to it's history, Heroku may no longer be ideal for small businesses or start-ups.&lt;/p&gt;

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

&lt;p&gt;In conclusion, Heroku is a long-standing platform known for it's ease of use. It can help developers get their apps off the ground and ready for users. It streamlines the process of deployment as well as maintenance. And, it can do this with mostly any favored programming language of the developer. &lt;/p&gt;

&lt;p&gt;Depending on your situation, Heroku may or may not be the right choice for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Want to learn more about Heroku? Helpful links:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;"Introduction to Heroku" video by Salesforce, with overview and live demo: &lt;a href="https://www.youtube.com/watch?v=QTOkqzCTGxw"&gt;https://www.youtube.com/watch?v=QTOkqzCTGxw&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"What is Heroku" episode of Dylan Israel's "Ask a Dev" Series: &lt;a href="https://www.youtube.com/watch?v=r5ZUQvl9BtE"&gt;https://www.youtube.com/watch?v=r5ZUQvl9BtE&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;About Heroku Buildpacks: &lt;a href="https://www.heroku.com/elements/buildpacks"&gt;https://www.heroku.com/elements/buildpacks&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;About Heroku Add-ons: &lt;a href="https://www.heroku.com/elements/addons"&gt;https://www.heroku.com/elements/addons&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Saying "No" to Heroku? Alternatives:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.makeuseof.com/heroku-alternatives-free-full-stack-hosting/"&gt;https://www.makeuseof.com/heroku-alternatives-free-full-stack-hosting/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=prjMJtXCR-g"&gt;https://www.youtube.com/watch?v=prjMJtXCR-g&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://blog.back4app.com/top-10-heroku-alternatives/"&gt;https://blog.back4app.com/top-10-heroku-alternatives/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>heroku</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Javascript Functions</title>
      <dc:creator>Jacqueline Wisdom</dc:creator>
      <pubDate>Thu, 04 May 2023 22:23:46 +0000</pubDate>
      <link>https://dev.to/wisdomjackie/javascript-functions-jb3</link>
      <guid>https://dev.to/wisdomjackie/javascript-functions-jb3</guid>
      <description>&lt;h2&gt;
  
  
  Function Declaration and Calls
&lt;/h2&gt;

&lt;p&gt;Functions are reusable blocks of code that take an input value, perform an action, and return an output value. The basic syntax of a Function Declaration is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; function add (num1, num2) {
      return num1 + num2
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a Function Declaration. Functions are declared with the keyword function, followed by the function name. Then, the parameters, or input values, follow the function name in quotes. Following the parameters, is the function action wrapped in curly brackets. In this case, the function is named 'add', takes in two parameters: 'num1' and 'num2', and the action is to return the value of these two parameters added together.&lt;/p&gt;

&lt;p&gt;Functions can also be declared as Function Expressions. The syntax of a Function Expression is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; var add = function(num1, num2) {
      return num1 + num2
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In a function expression, a variable is assigned to a function with an assignment operator. One important difference in whether a function is defined in a declaration or an expression is that entire function declarations are hoisted to the top of the code-- the name and the body. Function expressions, however, only have their names hoisted to the top. The function body is not hoisted along with the name.&lt;/p&gt;

&lt;p&gt;A function is evoked with the function named followed by parentheses.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;add(1,2) //=&amp;gt; 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case, 1 and 2 are the 'arguments' passed into the function. When 1 and 2 are passed in, the function will return their sum and the invocation resolves to 3. &lt;/p&gt;

&lt;p&gt;A more concise way of declaring functions is using arrow functions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var add = (num1, num2) =&amp;gt; num1 + num2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Arrow functions indicate a function while skipping the keyword 'function' entirely. They are declared by assigning a variable to the function parameters, followed by an arrow, followed by the action. In this case, since the action is only on one line, the curly brackets and the return statement can also be omitted. &lt;/p&gt;

&lt;p&gt;Anonymous functions are functions declared without a name. They are usually written when being passed through other functions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function alterNum(num, func){
     return func(num)
};

alterNum(1, function(num){return num * 10})
//=&amp;gt; 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The function that was passed unto alterNum is an anonymous function. &lt;/p&gt;

&lt;h2&gt;
  
  
  Functions and Scope
&lt;/h2&gt;

&lt;p&gt;Functions can access values from the parent scope.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     var firstName = 'Jackie';
     var lastName = 'Wisdom';

     function createName(){
        let fullName = firstName + ' ' + lastName
          return fullName
        }

     console.log(createName());//=&amp;gt; 'Jackie Wisdom'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above example, the createName function has access to variables created in the parent scope, outside of the function scope. However, variables created inside of a function are function-scoped; they cannot be accessed outside of the function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     var firstName = 'Jackie';
     var lastName = 'Wisdom';

     function createName(){
         let fullName = firstName + ' ' + lastName
          return fullName
         }

     console.log(fullName)//=&amp;gt; Reference Error: fullName is not defined
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above code, logging fullName to the console will result in an error. This is because fullName was created inside of the createName function, and therefore cannot be referenced outside of this function.&lt;/p&gt;

&lt;p&gt;Functions are capable of closure. This means they can contain references to variables in their parent scopes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     function makePizzaOrder(customer, total){

     var toppings = [];

     return {
     customer: customer,
     total: total,
     addToppings: function(top1, top2){
     toppings.push(top1, top2)
              }
     getToppings: function(){
     return toppings;
             }

         }
     };

     var order1 = makePizzaOrder('Bob', 20.00);
     order1.addToppings('cheese', 'pepperoni');
     console.log(order1.getToppings()); //=&amp;gt; ['cheese', 'pepperoni']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above is an example of closure because the functions inside of the makePizzaOrder function refer to the toppings array, which was created in the parent function. The toppings array is not available outside of the makePizzaOrder function, but, because of closure, it is kept alive.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>functions</category>
    </item>
  </channel>
</rss>
