<?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: Megan Miller</title>
    <description>The latest articles on DEV Community by Megan Miller (@smoldev).</description>
    <link>https://dev.to/smoldev</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%2F206033%2Fc3a12156-b529-40db-8cd1-63ae27fe0c6c.png</url>
      <title>DEV Community: Megan Miller</title>
      <link>https://dev.to/smoldev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/smoldev"/>
    <language>en</language>
    <item>
      <title>PHP For JavaScript Developers</title>
      <dc:creator>Megan Miller</dc:creator>
      <pubDate>Fri, 01 May 2020 21:06:50 +0000</pubDate>
      <link>https://dev.to/smoldev/php-for-javascript-developers-5ff8</link>
      <guid>https://dev.to/smoldev/php-for-javascript-developers-5ff8</guid>
      <description>&lt;p&gt;I started learning how to code in 2012 with HTML and CSS. Ever since the start of my coding journey, PHP has been one of the languages I’ve always wanted to learn. It’s everywhere. However, looking at it back in 2012, a freshly graduated high school student; I felt completely out of my depth. You can find out more about my journey &lt;a href="https://dev.to/smoldev/nevertheless-megan-miller-coded-5di"&gt;here&lt;/a&gt; if you’re curious.&lt;/p&gt;

&lt;p&gt;As a recent JavaScript-focused bootcamp grad, I’ve decided that I want to try to learn PHP again. It has been pretty difficult to find resources about PHP that aren’t focused on people who have never touched a line of code before. So, that’s why I’m writing this. I want to be able to help other people like me who just need a quick guide to the differences between their chosen language and the language they want to pick up.&lt;/p&gt;

&lt;h2&gt;
  
  
  General Syntax
&lt;/h2&gt;

&lt;p&gt;One of the biggest differences between PHP’s syntax and JavaScript’s is that semicolons are &lt;em&gt;required&lt;/em&gt; at the end of lines in PHP. I struggled with this a lot at first—still do sometimes—so that’s why I wanted to note it here first and foremost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using The Language&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript you don’t have to do anything particularly special to be able to run the code beyond making sure your file has a &lt;code&gt;.js&lt;/code&gt; extension. However, in PHP you need to use tags, even in a  file designated with the &lt;code&gt;.php&lt;/code&gt; extension.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt; 
&lt;span class="c1"&gt;# code here&lt;/span&gt;
&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Declaring Variables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Creating a variable in PHP is super simple. Much like JavaScript, PHP is a dynamically typed language, and as such you don’t have to declare the type of the variable when you create it. It uses the &lt;code&gt;$&lt;/code&gt; symbol to denote variables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$myvar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'value'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By default in PHP any variable you declare is &lt;em&gt;mutable&lt;/em&gt;. It can be changed absolutely &lt;em&gt;anywhere&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Declaring Constants&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;PHP has a special function called &lt;code&gt;define&lt;/code&gt; that is used to specifically create variables that can’t be changed. It takes two arguments: the name of the variable, and the value you want to assign to it. By default this function sets the variable name you create to be case sensitive. This can be overridden by passing &lt;code&gt;true&lt;/code&gt; as a third argument to the function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nb"&gt;define&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'CONSTANT_NAME'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Declaring Arrays&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Much like JavaScript arrays can be created with standard bracket notation or with a function in PHP. That said, PHP’s &lt;em&gt;associative array&lt;/em&gt; is equivalent to a JavaScript Object, and is the only way to create a collection of key/value pairs in PHP without importing a module of some kind. Assigning a value to a key in PHP is denoted by &lt;code&gt;=&amp;gt;&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$myArray&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'key1'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'value'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'key2'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'value'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'key3'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'value'&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Functions&lt;/strong&gt;&lt;br&gt;
Functions in PHP are very similar to JavaScript (ES5 specifically).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;myFunc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$param&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$param&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The only real difference I’ve been able to find between the two languages in this regard is that PHP has an operator that changes the argument you pass in from being value based, to being referential: the &lt;code&gt;&amp;amp;&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$myVar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$myVar&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;# displays 10&lt;/span&gt;

&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;addTen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;$param&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$param&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;addTen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$myVar&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$myVar&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;# displays 20&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Loops&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Much like Functions, loops aren’t that much different from the way they’re written in JavaScript. One exception being PHP’s &lt;code&gt;foreach&lt;/code&gt; loop which changes based on the type of array you’re trying to loop over.&lt;/p&gt;

&lt;p&gt;Normal Array:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;foreach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$arrayName&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nv"&gt;$item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;# do code&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Associative array:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;foreach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$myArray&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nv"&gt;$key&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;# do code&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Classes &amp;amp; OOP Methodology
&lt;/h2&gt;

&lt;p&gt;Classes are one place where PHP differs from JavaScript quite heavily. Though PHP didn’t start out as an Object Oriented Programming Language—similarly to JavaScript—the functionality was added in later. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Access Modifier Keywords&lt;/strong&gt;&lt;br&gt;
In standard JS, modifier keywords aren’t needed for classes. For PHP, however, they are.&lt;/p&gt;

&lt;p&gt;The Modifiers that you have in PHP are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;public&lt;/code&gt; - This can be used outside the class, either by a script or another class.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;private&lt;/code&gt; - The class that created this is the only one that can access it.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;protected&lt;/code&gt; - This can only be accessed outside of the class if it is being called in a class that is a child of the class this belongs to.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;static&lt;/code&gt; - Allows the use of a property or method without the class that property or method is a part of having to be instantiated.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When creating a class in PHP it’s best practice to utilize these keywords to tell the class what it needs to do with attributes and methods on the class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MyClass&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="nv"&gt;$classAttrib&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;__construct&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$classAttrib&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;classAttrib&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$classAttrib&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll notice a few things in the above the code snippet. The first will probably be the two modifier keywords. Here, we’re declaring a private variable called &lt;code&gt;classAttrib&lt;/code&gt; which will only be accessible via &lt;code&gt;MyClass&lt;/code&gt;. The second, is the public keyword which we’re using in conjunction with PHP’s built in &lt;code&gt;__construct&lt;/code&gt; method. This allows us to instantiate a class as though it were a function, just like we would in JavaScript.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$myClass&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;MyClass&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;someValue&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;This and The Arrow&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Continuing with the &lt;code&gt;MyClass&lt;/code&gt; example above, you’ll notice that we’re using &lt;code&gt;this&lt;/code&gt; in the same way that we would in JavaScript. The difference here, is that we’re using an arrow (&lt;code&gt;-&amp;gt;&lt;/code&gt;) to access &lt;code&gt;classAttrib&lt;/code&gt; on the class. We’ll also use this pointer to access anything on the class that we need to use throughout our code.&lt;/p&gt;

&lt;p&gt;Here’s the same class in JavaScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;MyClass&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;classAttrib&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classAttrib&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;classAttrib&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Getters and Setters&lt;/strong&gt;&lt;br&gt;
Getters and Setters are class methods used to get and set (or update) information to do with the class attributes. In JavaScript we don’t typically need to make them, and similarly they aren’t required in PHP. That said, you’ll see them far more frequently in PHP, so I thought it would be prudent to go over here. Basically, these methods are the only things that should be directly modifying or otherwise interacting with the class attributes outside of the class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;# ... inside MyClass&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;setClassAttrib&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$classAttrib&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;classAttrib&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$classAttrib&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;getClassAttrib&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;classAttrib&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Inheritance&lt;/strong&gt;&lt;br&gt;
Inheriting from parent classes in PHP is similar to JavaScript, with the exception being that we don’t use &lt;code&gt;super&lt;/code&gt; to pass in the parent class’ attributes. Instead we use the &lt;code&gt;::&lt;/code&gt; operator. Also called the Scope Resolution Operator.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SecondClass&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;MyClass&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="nv"&gt;$newAttrib&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;__construct&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$classAttrib&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$newAttrib&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;parent&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;__construct&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$classAttrib&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;newAttrib&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$newAttrib&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  PHP &amp;amp; JavaScript Similarities
&lt;/h2&gt;

&lt;p&gt;Now that we’ve talked about a fair few of the &lt;em&gt;differences&lt;/em&gt; between JavaScript and PHP, let’s talk about some similarities!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PHP has spread syntax! You can use the exact same syntax as in JavaScript, in both arguments (argument unpacking is available in PHP 5.6+) and arrays (available from PHP 7.4+)!&lt;/li&gt;
&lt;li&gt;PHP has ternaries!&lt;/li&gt;
&lt;li&gt;PHP has type coercion with the &lt;code&gt;==&lt;/code&gt;!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As I mentioned earlier, I'm still new to PHP, but I hope that this article was helpful to you! ❤️&lt;/p&gt;

</description>
      <category>php</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Nevertheless, Megan Miller Coded</title>
      <dc:creator>Megan Miller</dc:creator>
      <pubDate>Sat, 07 Mar 2020 06:13:00 +0000</pubDate>
      <link>https://dev.to/smoldev/nevertheless-megan-miller-coded-5di</link>
      <guid>https://dev.to/smoldev/nevertheless-megan-miller-coded-5di</guid>
      <description>&lt;h1&gt;
  
  
  A Little About Me...
&lt;/h1&gt;

&lt;p&gt;This is my very first DEV article, so I thought it might be prudent to mention a few things about myself. I've been coding off and on for somewhere around 8-12 years. I'm visually impaired, and I love to read.&lt;/p&gt;

&lt;h1&gt;
  
  
  My Journey With Code So Far...
&lt;/h1&gt;

&lt;p&gt;I began my coding journey sometime between 2008 and 2012. I hesitate to call it that because I wasn't really doing anything special. I was a bored high school student who had a hobby for writing, and I liked to create profiles for characters I was writing about. For the most part, all of the things I created were HTML &amp;amp; CSS. They weren't responsive. They didn't contain JavaScript. But I was so, so proud of them. &lt;/p&gt;

&lt;p&gt;So, while I hesitate to call that part of my life part of my "coding journey," it was the reason I fell in love with code. Over the next several years, I tried to learn a ton of different things off and on. I started with advanced CSS stuff (like learning how to make tabs on a page that don't use any JS!). I also learned about the accessibility features in HTML like aria-labels, and how the different HTML tags work with Text-To-Speech (although being visually impaired myself, I still have a long way to go with this part!).&lt;/p&gt;

&lt;p&gt;As I researched and learned, I picked up small amounts of knowledge on a bunch of different things. I learned some basic things about Linux (mostly Ubuntu and the CLI) and how to set up a server. I learned some things about PHP and MySQL. That said, I was aimless. I didn't have a goal, I was just learning to learn (I didn't even use git!). Learning to build. When things I wanted to do started to get too complicated, or the tutorial I was following ended up being incomplete, I would stop whatever project I was on and move to the next thing that interested me.&lt;/p&gt;

&lt;p&gt;In a way, I kind of miss those days. That period of time where I just built to build with no end goal in mind except, "Hey! I want to make this. How do I do that?"&lt;/p&gt;

&lt;p&gt;That said, as time went on, I felt kind of trapped. I loved building, but I didn't feel like I was going anywhere with it. As the realization crept up on me that I wanted a job in this field, it occurred to me exactly how much I didn't know. So, I continued to try and learn some "real" programming languages. I started with JavaScript and found myself bewildered. I didn't understand any of the syntax I read. I didn't know where to start to really learning about it. There had been so many tutorials about how to build specific things in what I had wanted to learn before. I could just google "How to build a blog from scratch" and get a ton of tutorials using PHP and MySQL.&lt;/p&gt;

&lt;p&gt;Eventually, I decided I wanted to go to college for development, maybe some structure would help me. In high school, my grades weren't great, so there was no way I was getting into a 4-year school. Instead, I decided to try my local community college. None of the classes I took initially had to do with code, which I was sad about, but for a while, it was great! I loved most of my classes, and I had made friends in my major who were as jazzed about building things as I was. One day, though, something changed. I'm not even exactly sure what it was; at this point, it seems so long ago. One day I went to campus, and I was scared. Nothing was even happening. No one was talking to me, I was just excruciatingly uncomfortable. Enough so, that I called one of my parents to come to take me home since I can't drive. I never went back to school.&lt;/p&gt;

&lt;p&gt;To this day, I don't know what happened, but I went to the doctor about a year after it happened and found out I had some form of anxiety that they gave me medication to help treat.&lt;/p&gt;

&lt;p&gt;Once I stopped going to college, I fell back into my old habits. I googled around trying to find out what I should be learning to be a "real" developer, this caused me to bounce around different languages. JavaScript changed to C# to C++; all the while, if I got stuck, I would drop back to my roots. HTML &amp;amp; CSS. Eventually, I learned about Python, and I finally understood what I was looking at. I was elated, to say the least. I finally felt like I was getting somewhere.&lt;/p&gt;

&lt;p&gt;Once I built a few things in Python, I decided to try and go back to learning JavaScript. I don't even remember why anymore. I was aimless again. I wanted structure, but I couldn't stick with anything, and it made me feel awful. &lt;/p&gt;

&lt;p&gt;In September of 2018, one of my friends expressed interest in learning to code and asked if I would help them. I agreed, excited to have someone else in my friend group who was interested in code. After about three months of assisting them to find resources and explaining some concepts to them, they sent me a link to a boot camp, one of their friends had sent them. Lambda School.&lt;/p&gt;

&lt;p&gt;After about three weeks of research. Looking at reviews, their CIRR report, and reading over the material available about their payment model, I decided to take the plunge and applied for a cohort starting on April 21st of 2019.&lt;/p&gt;

&lt;p&gt;What could go wrong?&lt;/p&gt;

&lt;h1&gt;
  
  
  Enter: Lambda School...
&lt;/h1&gt;

&lt;p&gt;I started the Fullstack Web Track on Monday, April 21st, 2019. I remember this date individually because the Friday before, I had moved from my parents' home in Virginia to Wisconsin to live with my long-distance partner of six years. The program started off simple, with things I already knew how to do: building sites in HTML and CSS. Then, we moved on to JavaScript. First, the basics, and later we learned about DOM manipulation. This was the first time I really understood &lt;em&gt;how&lt;/em&gt; manipulating the DOM worked. It finally made sense. We covered all of this in a month and then started our first &lt;em&gt;Build Week&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;A Build Week at Lambda is precisely what it sounds like. You spend a week building something. It's not just you, though, you work with a cross-functional team. This could be people further than you in the same track, and/or students in another track. In my case, I had a group consisting of a React Developer, an IOS Developer, a UX student, and a Node Backend Developer. I was tasked with building the marketing page for an app that the other students in my group were working on. It's been almost a year at this point, so I don't remember everything that occurred, but I remember the experience being a pleasant one. The teammates that shared my track were extremely accommodating, answering my questions about their parts of the curriculum. The IOS and UX members of my team were also super friendly and easy to talk to. I had a ton of fun that build week, and I learned a lot.&lt;/p&gt;

&lt;p&gt;The week following that build week, we started learning React. I struggled a ton with this part of the curriculum. It was a whole new way of thinking about things. This was also before Lambda started teaching functional React. Personally, I feel like learning the functional approach to React is much easier than classical at first, but I know not everyone will agree with me. &lt;/p&gt;

&lt;p&gt;Sometime between JavaScript and React, the Section Lead--henceforth SL--of my cohort created a Women's channel. I learned a ton from the women that were in it, and they're all wonderful. It was because of this channel that I was able to apply to be a Part-Time Team Lead--TL, or even knew that I could. I was so excited! Could I help other students the way my TL had helped me? Yes! The thought of being able to help students who were struggling, giving them the same support my TL had given me made me so unbelievably happy. However, because of TL training, I had to miss out on my React build week and make it up later.&lt;/p&gt;

&lt;p&gt;Because I was a PT TL, I was able to continue my student status into the Backend Unit, while working at night to help other students earlier on in the program than me. &lt;/p&gt;

&lt;p&gt;It was around this time that Lambda added Hooks to the curriculum, and so my cohort was given the option to go back through the React Unit to learn them. I chose not to because I was super excited for Backend. I could get exposure to them through being a TL, and so that would be fine with me! This meant, though, that I lost my original TL group, and that made me sad. I really loved that group. &lt;/p&gt;

&lt;p&gt;So, I moved through the backend unit, where we learned Node, Express, KnexJS to handle the SQL side of things, and Jest for testing. My excitement towards Backend was well placed. I lived for those lessons. Took to them like a fish to water. In a flash, the unit was over, and I was beginning another build week. For this one, I was tasked with building an API for my React Devs to pull in data from. In retrospect, I could have been a way better backend dev. I finished the schema and primary endpoints the weekend before the build week started, but I didn't fully understand what the app itself needed in terms of data, so my React Devs always had to ask me to add, and/or change things on my side of things. I also didn't realize I needed to write documentation for the API until near the end (it's been added to the build week rubric at this point, thankfully.)&lt;/p&gt;

&lt;p&gt;It's worth noting here that I was still a PT TL at this point, so while I had something I &lt;em&gt;could&lt;/em&gt; blame for my issues as a teammate, realistically, it had nothing to do with it. &lt;/p&gt;

&lt;p&gt;I learned a lot about what communication actually meant during that build week, and I've endeavored to better support any teams I'm on since then. It was that build week that made me realize I really wasn't mentally ready for labs. I understood the material, and I could write it out, but I needed to learn more about being a good teammate. So, I put my student status on hold and became a Full-Time TL for a cohort starting all the way back at the very beginning of the web track.&lt;/p&gt;

&lt;p&gt;I'm so glad I did.&lt;/p&gt;

&lt;p&gt;The group of TLs headed by our two SLs were fantastic. I love all of them so much. I learned so much from them as teammates and friends. We worked together to make the students' time with us the best that we could. I loved my PT group so much, but I couldn't handle both FT and PT, so I had to say good-bye to them. Once I did, I was able to focus on my students and help them through whatever they needed. Some of them flexed, and it always made me sad when that happened because I felt like there was more I could have done that I didn't, but overall my experience as a FT TL was incredibly fulfilling. I learned so much in those 5 months, not only from the team that I worked with day-to-day but from my students as well.&lt;/p&gt;

&lt;p&gt;Once my cohort reached &lt;em&gt;Labs&lt;/em&gt;, my student status kicked back in, and I joined them in that part of the curriculum. &lt;/p&gt;

&lt;p&gt;Labs is two months of building a production-level application and (potentially) deploying it with a group of other students from all across Lambda. My Labs team was made up of primarily team members from the former TLs of that cohort, the SL from my original cohort, one of our former students. Together, over 8 weeks, we built and deployed an app to the Google Play Store. It was a fantastic experience that I couldn't have done without my team. We were constantly talking in zoom while we coded. We had so many heart-to-heart conversations, and honestly, I consider all of them some of my closest friends. &lt;/p&gt;

&lt;p&gt;After Labs, I hit the final stretch of LS. The Computer Science section. I've been in this part of the curriculum for about a month. CS has been hard. Extremely hard. I didn't realize how bad I was at real problem solving until I hit this point in the program. I've felt imposter syndrome before, but the amount of mental anguish I've felt this month has been surreal. Even though I've been passing everything, I've asked myself at least twice a week if I really belonged in the field. I don't know if it's just anxiety. If changing the way I look at problems and try to solve them is just making my "lizard brain" react negatively, but it's been hard. My TL has been such a big help, though. Every time I've voiced my doubts, he's reassured me that I can do this. &lt;/p&gt;

&lt;p&gt;Today marks the completion of my first CS build week. I'm feeling pretty good about it right now. The build weeks for CS are separate from the primary curriculum, so all the students you're working with are at the same point as you. We were tasked with building a MUD in Python using whatever frontend framework we wanted, using either Django or Flask as our Backend. My team and I created our frontend using React using HTML5 canvas to render rooms generated on the Backend to the screen. I deployed the Backend, and one of my team members specifically worked on the algorithm to generate rooms.&lt;/p&gt;

&lt;p&gt;Monday marks the beginning of Unit 2 of CS. After this month, I'm nervous and excited. But most importantly, I'm going to keep going. &lt;/p&gt;

&lt;p&gt;I can't stop now. &lt;/p&gt;

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