School of Code Bootcamp 4.0 Weeks 2-3
Tags: codenewbie, womenintech, database, node
Published: 2020-10-09 16:40:25

Week 1 went extremely quick and my brain was filled with so much new knowledge! In week 2, we moved onto advanced JavaScript to build on our existing knowledge and learn how to write functions differently. 

During week 2, we moved onto : 
<ul>
<li>Advanced functions</li>
<li>Composition</li>
<li>Immediately Invoked Function Expression</li>
<li>Refactoring</li>
<li>Destructuring</li>
<li>Methods</li>
<li>Callback Functions</li>
<li>Asynchronous JavaScript</li>
<li>JSON</li>
<li>Scope</li>
</ul>

Week 2 was building on our frontend knowledge and getting to grips with some of the more advanced parts of JavaScript. Week 3 was the real battle! 👇

At the end of each day we've been encouraged to complete a 'daily reflection'

I've recorded what I have learnt from the lectures and what my feelings are at the end of each day. For each DEV post I'll give a brief overview of what I wrote in these reflection tasks...

####Week 3 Day 1-4 Reflections
<ul>
<li>Persistent storage is any database that retains data even if the power is shut off to that machine.</li>
<li>C(reate) R(ead) U(pdate) D(elete)</li>
<li>Servers or databases could be on your own computer, or on different machines entirely (the "cloud"). As long as they're talking to each other, they can exist on the same machine.</li>
<li>There are relational databases and non relational databases.</li>
<li>SQL stands for Structured Query Language.</li>
<li>SQL has more 'human readable' syntax. A few examples are:</li>
<ul><li>The * means is a wildcard and selects all information.</li>
<li>We SELECT information FROM a database WHERE a condition is present.</li>
<li>We can UPDATE users by applying SET to their new information.</li>
<li>DELETE FROM shows where we are deleting somewhere and WHERE shows what we're deleting.</li></ul>
<li>SQL also contains operators such as =, BETWEEN, NOT BETWEEN, IN, NOT IN, LIKE, NOT LIKE, %,  and - to create conditions when finding information from a database.</li>
<li>SQL can be used to navigate between different tables and select relevant information from them.</li>
<li>Node.js is a way to use JavaScript without the browser. It runs in the terminal in VS Code and is our way to backend code.</li>
<li>We can run files in node by typing 'node main.js'  in the terminal.</li>
<li>Importing modules into a file uses the require("") syntax.</li>
<li>In the Pg Module, "Pool" is the active connection to the database from node.js.</li>
<li>Npm init will create a package.json file with the relevant information in.</li>
<li>Environment variables allow us to hide our credentials from GitHub without hiding the rest of our code (by putting them in the .gitignore folder).</li>

<strong>Thoughts and Feelings</strong>
This week has felt more overwhelming than the last 2 combined! We've had our introduction to the backend (node.js, SQL) and I've definitely found some parts much easier than others. The SQL Murder Mystery was way more fun than creating a server and making it listen to requests. Nervous about the hackathon but looking forward to seeing what I learn!

####Week 3 Day 5
<strong>Reflection</strong>
<ul>
<li>Today's hackathon was difficult!</li>
<li>We git cloned a web application that had already been designed and needed to get the server to listen on the correct port.</li>
<li>We added functionality so we could get the data as needed for the front-end.</li> 
<li>Turned the data into persistent storage by refactoring our code and made it interact with a database instead of an array.</li>
<li>Created a Postgres DB on Heroku, connected to it, and then interacted with it through SQL queries to allow all the same functionality as we had earlier.</li></ul>

<strong>Thoughts and Feelings</strong>
Glad I made it through the week! The intensity definitely ramped up this week but with enough notes during class and practice in the evenings, I had enough confidence with node.js to work through it systematically. I even understood why I had some of the errors that flagged up!

####End of Week 3
Phew! I'm happy I've learned backend and have now got a knowledge of the full stack rather than just front end. Looking forward to building onto my skills and understanding the code instinctively. Definitely glad for this weekend though!