Week 6 Presenting the first projects and working with node.js

Day 24: Group project presentation

Today was the day! 🌟 we finally presented our first team project and I feel really proud of how we were able to develop it no matter the circumstances 🦸🏼‍♀️. You can check the presentation and final platform in the following lines

As you saw on the other diaries this was a challenging project, but definitely is something that helps me learn and discover new things that I didn’t think I was able to do, and now I do! At the end of class, we cover a little on the backend as in the upcoming days we are going to cover node

Day 25: Starting with node.js

Today we started class reviewing node js, which basically is a “Node.js is an open source, cross-platform JavaScript runtime environment designed to be run outside of browsers” ✌🏼Normally it is us to complete, scripts and monitor but the main characteristic that is used for is a basic for web servers. 🔦 We did a research on the which companies are currently using node, and we found a business such as Netflix, Walmart, LinkedIn, it doesn’t mean that they use the technology 100% of the times for their tasks👩🏼‍💻.

We continue the class working with a node in the terminal being able to create files 📖 and run the console log inside the program, we created a calculator ( below you can find my code) and we also did a band searcher 🥁.

Finally, we covered some codes featuring:

  • Process.argv
  • Require
  • Module.exports
  • Package.json
//We link the array from process so we can add it
var operator = process.argv[2];
var firstNumber = process.argv[3];
var secondNumber = process.argv[4];
var thirdNumber = process.argv[5];



// + adding values
if (operator === "add") {
    var result = parseFloat(firstNumber) + parseFloat(secondNumber)
    console.log(firstNumber + " + " + secondNumber + " = " + result)
}


// - subtract values
else if (operator === "subtract") {
    var result = parseFloat(firstNumber) - parseFloat(secondNumber)
    console.log(firstNumber + " - " + secondNumber + " = " + result)
}


// * multiply values
else if (operator === "multiply") {
    var result = parseFloat(firstNumber) * parseFloat(secondNumber)
    console.log(firstNumber + " x " + secondNumber + " = " + result)
}


// / divide values
else if (operator === "divide") {
    var result = parseFloat(firstNumber) / parseFloat(secondNumber)
    console.log(firstNumber + " / " + secondNumber + " = " + result)
}
// % reminder values
else if (operator === "remainder") {
    var result = parseFloat(firstNumber) % parseFloat(secondNumber)
    console.log(firstNumber + " % " + secondNumber + " = " + result)
}


//BONUS
//exponential values
else if (operator === "exp") {
    var result = parseFloat(firstNumber) ** parseFloat(secondNumber)
    console.log(firstNumber + " ** " + secondNumber + " = " + result)
}


//Algebra 
//4x+2=10 want to console log 2
else if (operator === "algebra") {
    var result = (parseFloat(thirdNumber)-parseFloat(secondNumber))/parseFloat(firstNumber)
    console.log(firstNumber + "x + " + secondNumber + " = " + thirdNumber)
    console.log(" x  = " + result)

//Make sure we share the right input
else{
    console.log("invalid input")
}


}

Day 26: Axios to call an API

Another class of coding and I am so excited🌟! I always come early class so I can practice whiteboarding problems. Today I didn’t get the answer but at least I tried and I learned new ways to solve problems📑:

Write a function that takes in a string and returns true if it’s a pangram or false otherwise.
Pangram: a sentence that contains every letter in the alphabet.


Ex:
Input: “Watch Jeopardy, Alex Trebek’s fun TV quiz game”
Output: true


Input: “Five hexing wizard bots jump quickly” 
Output: true


Input: “JavaScript is the best”
Output: false

My solution:

We continue the class understanding the packages of information that we can download such as FS 💾. Using this package we can read, write and append information to a particular document (.txt), which can open a lot of possibilities if you want to search particular data 👍🏼. But, I have to say that one of the activities we did was particularly challenging, this activity was to create a simulator of a bank account 💸, where you can withdraw, check your total or even play the lottery.

We were then introduced to Axios as the substituted of Ajax😎, and we use it to for the same purpose, we call APIS, we did an exercise for searching for a particular film that the user inputs in the terminal and it searches it on the API 🎡and then we finally cover the sync and async, features that you can use in order to have control on the order 🤔.

Day 27: Axios to calling API

As always I came early to class to do whiteboarding, every time I whiteboard and I don’t get it I learn more if I had it right✌🏼. I learned the advantages of using sets to remove duplicates inside an Array 📩, which was the problem we had to solve.

We started class reviewing the steps we need to follow in npm in order to install, manage, remove or update packages📦, which are crucial steps for when working with other team members🤝.

We then continue the class using geocode as an API📍, to search for locations the user inputs inside the terminal which is really interesting and is another way of getting inputs🧠.

 We were then finally introduced to constructions🙌🏼, that help us create functions that can create objects with the same keys but different values, and we did this to create a “game” where you can create characters📖

Day 28: Constructors and game creation

Friday has arrived 🥁 and today we continue the beginning of the class doing contractors, and we created our own version of Tamagotchis👾, that had the same values, we then use constructors with User inputs, making the code more interesting, making the code more interesting 👏🏼.

We then worked with recursion, so we can use it as a substitute for loops for those nonimmediate executions and we tried to develop a game 🕹 where you can create teams through the terminal, it was challenging, but definitely the more we work on it the better we will execute. For this weekend homework, we need to create LIRI 📑 (Language_ Interpretation and Recognition Interface) that takes user input and search on songs on Spotify, bands and OMBD. Let’s get coding 👩🏼‍💻!

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión /  Cambiar )

Google photo

Estás comentando usando tu cuenta de Google. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )

Conectando a %s

A %d blogueros les gusta esto: