IRC log of #novawebdev for Thursday, 2023-10-12

*** ledmer_ has quit (None)02:37
scooperGood afternoon ledmer02:38
scooperLet me check the repository to see02:38
scooperyes02:39
scooperyou did luis02:39
ledmerhi02:39
scooperdid you work on some part of the project02:40
ledmerare we talking here or in the personal message02:40
ledmer?02:40
scooperwhat you think??02:41
ledmerhere its fine02:41
ledmerwell02:41
scooperlet go in the personal message section02:41
*** scooper has quit (Quit: Leaving)03:58
*** ledmer has quit (Quit: Leaving)03:59
*** shmohamud has quit (Ping timeout: 480 seconds)11:29
*** mulbah has quit (Remote host closed the connection)18:11
*** mulbah has quit (Remote host closed the connection)18:46
*** mulbah has quit (Ping timeout: 480 seconds)19:31
*** sysadmin_ has quit (None)20:02
shmohamudHi scooper20:05
scooperHi Shanun20:06
shmohamuddo you have any questions before we start today's lesson?20:06
scooperSorry for yesterday my router batter last for at least 30 to 45 minuntes20:06
shmohamudno worries, I figure something came up20:06
scooperNo for now20:07
scooper*battery20:07
shmohamudCan you write me a function declaration that takes in a name parameter and logs out "Hello {name}" to the console?20:07
scooperok20:08
scooperfunction userName(name){20:11
scooper    console.log("Hello " + name)20:11
scooper}20:11
scooperuserName("Spencer");20:11
shmohamudWell done!20:11
scooperThanks20:11
shmohamudcan you think of another name for the function? Remember, you should try to use verbs when naming a function because they're usually performing an action20:12
scooperyes20:12
shmohamudlets hear it20:13
scooperfunction studentName(name){20:14
scooper    console.log("Hello " + name)20:14
scooper}20:14
scooperstudentName("Spencer");20:14
shmohamudwhat's the function actually doing?20:14
shmohamudbetter, but I want to work in a verb to the name.20:14
scooperthe function studentName is indicating that this function is about a person and that person is a student20:15
shmohamudstudentName is better than userName. What is the function actually doing though?20:16
shmohamuddon't overthink it, just explain in your own words what the function is doing20:18
scooperThe function that was defined about is telling a user that this function 20:18
scooperis being define to world a person who title is a student20:19
shmohamudThere's only one line in the function body. What does that line do?20:19
scooperis being define to welcome a person20:19
shmohamudok, that's close20:19
shmohamudwhat is console.log("Hello " + name) doing?20:20
scooperin the function body it's welcoming a person who title is a student20:20
scooperprinting out the name of a student20:20
shmohamudok, so how about we call it welcomePerson or sayHello?20:20
scooperthat naming convention is not bad too20:21
shmohamudyes, the key is that for functions, you want to have a verb in it. Welcome is a verb, Say is a verb20:22
shmohamudSo, can you write me the same function except make it an arrow function?20:23
scooperis a verb20:23
shmohamudwhat's a verb?20:24
scooperA verb is a word that show or convey action20:25
shmohamudyes20:25
shmohamudso can you rewrrite the function declaration as an arrow function?20:25
scooperok20:26
scooperyes20:27
*** shmohamud has quit (Remote host closed the connection)20:30
scooperstudentName = (name) => {20:30
scooper    console.log("Hello " +name)20:30
scooper}20:30
scooperstudentName("Spencer Cooper");20:30
scooperShmohamud20:35
scooperare you  still there??20:35
shmohamudyes20:35
shmohamudhave you rewritten the function?20:36
scooperyes20:36
scooperI send it already20:36
shmohamudOk I disconnected for a second so I missed it20:36
shmohamudThe logs show me though, looks good. However, what about the function name?20:37
shmohamudCan you name it using a verb?20:37
scooperok20:37
shmohamudyou don't want to name a function based on the parameter/argument. You want to name it based on the function body20:38
scoopersure20:38
scooperprintName = (name) => {20:39
scooper    console.log("Hello " +name)20:39
scooper}20:39
scooperprintName("Spencer Cooper");20:39
shmohamudawesome! I like it20:39
shmohamudSo, do you have any questions for me now?20:40
scooperyes20:40
shmohamudLets hear it20:41
scooperit's compulsory we name a function as a verb on base on what the function is doing????20:41
shmohamudit's highly recommended20:41
shmohamudif a function is logging out "Hello {name}" then the function name should reflect that20:42
shmohamudif a function is adding two numbers, the function name should reflect that.20:42
*** ledmer has quit (Read error: Connection reset by peer)20:42
shmohamudit's not _required_ because we can name a function anything we want, but it makes the code more readable and maintainable because other developers will understand what the function is doing without reading too closelh20:43
scooperok recommendation accepted 20:43
shmohamud:) 20:44
shmohamudany other questions for me?20:44
scooperno for now20:44
scooperany question for me from your end???20:44
shmohamudNope, you did great today. I'm going to take my mother out for her birthday now20:45
shmohamudKeep practicing in between our sessions. I'm already seeing excellent improvement.20:45
scooperThanks Sahnun20:46
scooperyou push me a lot to do this20:46
shmohamudYou're welcome. It's a pleasure to learn with you.20:47
scooperI m leaving you now to have a  session with ledmer/luis so we can work on our project...20:47
shmohamudSounds good. Have a good session and see you tomorrow or this weekend20:47
scooperok20:47
scooperACTION signing in to talk with Luis20:48
scooperLuis Are you still there????20:48
*** shmohamud has quit (Remote host closed the connection)20:52
ledmeryeah hello20:52
ledmerI was paying attention to the private chat notifications20:53
scooperok20:53
scooperlet go ther20:53
scooperthere20:53
*** shmohamud has quit (Ping timeout: 480 seconds)21:01
*** Julian has quit (None)21:22
*** scooper has quit (Quit: Leaving)21:32
*** ledmer has quit (Quit: Leaving)21:37

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!