HYF-Class19 / home

Home repository for Class19
https://hyf-class19.github.io/home/
MIT License
9 stars 12 forks source link

Maha: Behavior - Strategy - Implementation, 3 Weeks #294

Open MahaLubbad opened 1 year ago

MahaLubbad commented 1 year ago

my fork of module repository

Behavior, Strategy, Implementation

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. ---

1. Remix

Practice studying and remixing other people's solutions to coding challenges. Create your own solutions by mixing and matching pieces from other people's code.

2. Write

3. Review


MahaLubbad commented 1 year ago

Week 1

I Need Help With:

What went well?

Writing the readme file. Solving daily exercises.

What went less well?

Passing the tests in our challenge .

Lessons Learned

Sunday Prep Work

Not yet .

vkoldus commented 1 year ago

Hi @MahaLubbad, for the problem where you can't run the tests, can you please describe what problems are you having? If there is an error you see in your VSCode, can you paste it here?

About the testing before coding, indeed, it is a bit confusing. For me there are three main advantages:

What I mean by empathy is this. By writing the tests first, you are putting yourself in the shoes of your colleague or a customer who will use your function, without knowing how it's implemented. This is very important. People will not read the inside of your function. They will only look at its name, parameters and if you're lucky the documentation. That's it. By not knowing the implementation yourself, you can think about it as they will. How should it be named so that it's clear what it's doing? What should be the parameters? What should the function return when I put in some data? What if I put in some nonsense by accident? All this reasoning is more successful, when done without knowing the actual implementation.

The advantage of isolated environment will become even more clear when you will try to work on something a bit bigger than just one function. Imagine you are working on a big web app and you want to code just one small calculation. Without starting with the test, you would have to navigate through the application to a place where the function you want to implement is used and put everything in the right state. This can include logging in, going to the right part of the site and possibly inserting some data through the UI. Every time you want to try a new implementation, you would need to do that again. With unit testing you can do all this much more quickly. Now of course, you can get all these advantages by starting with one or two tests and adding more later, but then you would be loosing the "empathy".

Finally, self organization. Software development is a fast paced environment. People are often under pressure to deliver as much as possible as quickly as possible. This forces us to take shortcuts wherever we can. One of the first things people start to skip are tests and documentation. If we do that, we very often regret that later, but at the given moment, we get a quick win. We finished sooner and we can deliver. By starting with the tests, we minimize the risk that we decide to skip the testing later because something else comes in or we forget. That also happens. People forget. It's a way how to trick ourselves into having good test coverage even when we don't have that much time.

Is it more clear like that? If you have some more specific question, hit me on Slack, I'll be happy to answer them.

MahaLubbad commented 1 year ago

Hello @vkoldus Thank You very much for your great clarifications πŸ™ And for the testing problem , our coaches helped me to fix the error on Sunday.

MahaLubbad commented 1 year ago

Week 2

What went well?

What went less well?

Difficulty with dealing with NaN

Lessons Learned

Sunday Prep Work

I will start soon .

MahaLubbad commented 1 year ago

Week 3

Group Forked Repo

What went well?

Writing function and tests.

What went less well?

Struggling with passing jest tests by using export and import with separated files for functions and tests.

Lessons Learned

Sunday Prep Work

Not yet .