lab-brussels-1 / home

Home repository for Lab Brussels 1.
https://lab-brussels-1.github.io/home
MIT License
4 stars 5 forks source link

Cristobal: inside JS - 4 weeks #329

Open alexander-lopez-s opened 2 years ago

alexander-lopez-s commented 2 years ago

Inside JS


Learning Objectives

Priorities: πŸ₯š, 🐣, πŸ₯, πŸ” (click to learn more)
There is a lot to learn in this repository. If you can't master all the material at once, that's expected! Anything you don't master now will always be waiting for you to review when you need it. These 4 emoji's will help you prioritize your study time and to measure your progress: - πŸ₯š: Understanding this material is required, it covers the base skills you'll need to move on. You do not need to finish all of them but should feel comfortable that you could with enough time. - 🐣: You have started all of these exercises and feel you could complete them all if you just had more time. It may not be easy for you but with effort you can make it through. - πŸ₯: You have studied the examples and started some exercises if you had time. You should have a big-picture understanding of these concepts/skills, but may not be confident completing the exercises. - πŸ”: These concepts or skills are not necessary but are related to this module. If you are finished with πŸ₯š, 🐣 and πŸ₯ you can use the πŸ” exercises to push yourself without getting distracted from the module's main objectives. ---

0. Asserting

1. Primitives and Operators

2. Control Flow

3. Functions

5. Unit Testing

6. ES Modules

6. Using Functions

7. Arrays

8. Functional Array Methods

9. Objects

alexander-lopez-s commented 2 years ago

Week 1

I Need Help With:

My learning process is positively affected when I get explanations in a slow, practical and easy way, I don’t learn by given β€œa written example” of something. That’s why I prefer watching YouTube tutorials or any other interactive material. Finding answers by myself at this stage (on the internet) is really difficult, either I get more confused or I don’t understand anything.

What went well?

What went less well?

Lessons Learned

Sunday Prep Work

colevandersWands commented 2 years ago

My learning process is positively affected when I get explanations in a slow, practical and easy way, I don’t learn by given β€œa written example” of something. That’s why I prefer watching YouTube tutorials or any other interactive material.

Watching other tutorials or interactive materials is great! the exercises in the repository are meant for practicing, they're not supposed to be the explanation that works for everyone.
Either way you should continue to practice learning from example code. As a developer you will spend much more time reading code than writing it, so the more you practice learning from examples now the easier it will be when you need to read full applications written by someone else. (which is unavoidable, companies don't have video tutorials explaining how their code bases work)

That said, what could we make that might help you? more guide videos maybe?

Finding answers by myself at this stage (on the internet) is really difficult, either I get more confused or I don’t understand anything

Searching the internet is much harder than people say it is. "Just google it" ignores a lot of the hidden skills it takes to filter through all the pages and find the answers you need. Maybe you could also ask questions about searching in the Need Help channel?

I think that nested functions is something confusing at this point, I need an example using apples and tomatoes to understand better

You don't need to understand nested functions at this point. the CallStack examples were just to help you explore the debugger and visualize the CallStack, you won't need to write nested functions any time soon.

alexander-lopez-s commented 2 years ago

Thank you very much @colevandersWands 😎😎

danielhalasz commented 2 years ago

or any other interactive material

you can check out Scrimba if you like interactive material..they have some free courses

alexander-lopez-s commented 2 years ago

Week 2

I Need Help With:

This has been a very challenging module for me. I think I need to have a better understanding of the basic JavaScript syntaxes and concepts before jumping to functions and more advanced stuff. The current exercises in Study Lenses are beyond "basic" and console.assert is making them even harder to understand. I know we have had enough time to study and master the basis but I still need to fill some gaps in my brain. Explanations are sometimes too advanced also.

What went well?

What went less well?

Lessons Learned

Sunday Prep Work

danielhalasz commented 2 years ago
  • Passing arrays as functions is super difficult. I need more examples please.

can you explain what you mean with this? do you mean passing an array into a function?

alexander-lopez-s commented 2 years ago

yes that is what I mean @danielhalasz passing an array into a function

danielhalasz commented 2 years ago

ok, let's see.

const myArray = [1999, "Caracas", 'music'];
const myFunction = (someInput) => {
  console.log(someInput[1])
};

myFunction(myArray);
danielhalasz commented 2 years ago

can you predict what is the outcome of this?

alexander-lopez-s commented 2 years ago

I think the console will be printing "Caracas" as this object occupies the position #1 in the array? No? πŸ€”

alexander-lopez-s commented 2 years ago

can I just say:

const myArray = [1999, "Caracas", 'music']; console.log(myArray[1]);

Why do we need to encapsule the array in a function??

danielhalasz commented 2 years ago

of course you can, but the purpose of functions is that they are reusable.. and there can be much more complex stuff within its scope..this was just the simplest example.. also, arrays can be much bigger are more complex.

danielhalasz commented 2 years ago

I think the console will be printing "Caracas" as this object occupies the position #1 in the array? No? πŸ€”

yes, it is "Caracas", but to be precise, it actually occupies index 1 (which is position 2)

alexander-lopez-s commented 2 years ago

oh, index 1, got it, for me it's more than clear now, I wanted this explanation!!! Thank you Daniel.

danielhalasz commented 2 years ago

for a more complex example, you can think about an array or object that contains for example data about a user profile.. and then a function that does something with a certain element inside that.. and then each time you need, you can call that function on a different user's profile data, let's say..

danielhalasz commented 2 years ago

let's say based on the address, calculating how far it is..or whatever :)

alexander-lopez-s commented 2 years ago

like a group of workers in a company with their available vacation days so, the function will check how many days they have, and show the names and tell if they can already go on Hollidays?

danielhalasz commented 2 years ago

yep

alexander-lopez-s commented 2 years ago

Week 3

I Need Help With:

What went well?

What went less well?

Lessons Learned

Sunday Prep-Work

danielhalasz commented 2 years ago
  • the while loop and the switch statement if necessary.

you can if you like them, but as mentioned, you can also completely avoid them in your projects..as Louis said too..just good to know they exist..

  • an arrow function is a compact alternative to a traditional function

well again, good to know to read both, they arrow functions are the newer standard..and they remind us that functions are variables too

const myFunction = (number1, number2) => {
     let sum = number1 + number2 ;
     return sum;
};
console.log(myFunction(2, 3));
  • Therefore, I am currently solving the exercises again but this time without using any libraries, all the code in the same JS file.

yes, this can be good practice, to first do it in one file, then later separate them..

alexander-lopez-s commented 2 years ago

Week 4

I Need Help With:

What went well?

What went less well?

Lessons Learned

Sunday Prep-Work

danielhalasz commented 2 years ago
  • I have problems understanding things when they are explained in a fast way. Last week's lesson was hard to follow. I would prefer to have someone who explains like: Ok students, let's create a function following these steps: number 1, let's declare a variable, number 2, let's write a statement, number 3, let's create the loop, etc. instead of switching between topics, tabs, and windows and not being able to follow what they are doing. It would be nicer if the topics were explained in the most basic possible manner and, in a tutorial approach.

yes, the first part was quick, but it was just a review of homework, that all of you were supposed to do before and it was already taking time from the class. this is why we have Discord, so if there are questions during the week about an assignment, the coaches can reply, or even have an extra Zoom session. Plus, you can rewatch the video :)

  • I sometimes have difficulties finding logic in the exercises, they are logical but I think and re-think again to find a correlation. It's not an easy task to link functions with other functions.

would more detailed description in the readmes and more comments in the files help?

  • I believe that my logic is not working in the exercises given lately.

can you post some code in Discord of the specific code in question?