IRC log of #novawebdev for Tuesday, 2023-05-16

*** shmohamud has quit (Remote host closed the connection)01:16
*** shmohamud has quit (Remote host closed the connection)01:18
*** shmohamud has quit (Remote host closed the connection)02:04
tmickelsonhello scooper and fkoikoi 13:27
scooperGood morning tmickelson13:28
fkoikoiHi tmickelson 13:28
fkoikoiHow are you?13:28
scooperand Jeff13:28
tmickelsonim good how are you13:28
jelknerGood day, fkoikoi and scooper!13:28
fkoikoiGood morning Jeff13:28
tmickelsonscooper, what output did running `git tag` give13:31
fkoikoiScooper went to the latrine but he will soon be back13:34
tmickelsonok13:34
scoopersorry for late respond13:37
scooperi m back13:37
scoopertmickelson 13:38
tmickelsonok13:39
scooperunfortunately "git tag" didn't give me any fedback in my directory13:39
tmickelsonrun `git tag -m "test"`13:40
scooperI cd into a directory called "ForkWithTmickelson" and type the command "git tag"13:40
tmickelsonit didnt return anything because you didnt have any tagged commits13:40
scooperyes13:41
scoopera set of git instruction13:41
scooperwhich include but not limited to: usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]13:41
scooperor: git tag -d <tagname>...13:42
scooper   or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]13:42
scooper                [--format=<format>] [--merged <commit>] [--no-merged <commit>] [<pattern>...]13:42
scooper   or: git tag -v [--format=<format>] <tagname>...13:42
scooper    -l, --list            list tag names13:42
scooper    -n[<n>]               print <n> lines of each tag message13:42
scooper    -d, --delete          delete tags13:42
scooper    -v, --verify          verify tags13:42
tmickelsontry this `git commit -a v0.0 -m "test"`13:42
scooperfatal: paths 'v0.0 ...' with -a does not make sense13:44
scooperthat was what I got13:44
tmickelsonare you in a git repo13:45
scooperyes13:45
scooperthe first project I clone when you were teaching me13:45
tmickelsoncan you copy and paste the exact command that you ran13:46
scoopergit commit -a v0.0 -m "test"13:47
scooperthis is the path to my git repos: Desktop/ForkwithTmickelson/website$13:48
tmickelsonsorry, my mistake13:48
tmickelsongit tag not git commit13:48
tmickelsondid that work13:49
scoopersorry thing like this right "git tag -a v0.0 - "test"13:49
scoopersomething like that right???13:50
tmickelsonyes13:50
tmickelson`-m` before test not `-`13:50
scooperit tag -a v0.0 - "test"13:50
scooperfatal: too many params13:50
tmickelsongit tag -a v0.0 -m "test"13:51
scoopergit tag -a v0.0 - "test"13:51
scooperfatal: too many params13:51
scooperyes it what I did13:51
tmickelsonyoure missing `m` after the second `-`13:52
scoopercommand ran without feedback13:53
scoopergit tag -a v0.0 -m "test"13:54
tmickelsonthat should be correct13:54
scooperit work13:54
tmickelsonnow run `git tag` or `git tag -l`13:55
scooperBecause I tried running it again and I was told fatal: tag 'v0.0' already exists13:55
tmickelsonthat means the tag was created13:55
scooperYes that what I suspend too13:56
scooperI got v0.0 as the result13:56
tmickelsonnow you can push the changes13:58
tmickelson(no files were changed but a tag was added)13:58
scoopertmickelson13:58
scooperthis repos don't have another branch into it... I m presently on the main branch13:59
scooperBut for the other repos I created called "codeeatsleep" with my colleagues have branches13:59
scooperhope you understand..14:00
tmickelsonyou could push to a new branch14:00
scooperby creating a new branch right???14:00
tmickelsonyes14:01
tmickelsonthen `git push -u origin <new branch>`14:02
scoopergot  you14:02
tmickelsonbye14:02
scooperusing this command will push directly to the master or to the new branch origin14:03
scooperOK14:03
tmickelsonthe new branch14:03
tmickelsonACTION leaves14:03
*** tmickelson has quit (Quit: leaving)14:03
scooperGood morning shmohamud14:03
shmohamudgood morning scooper14:03
shmohamudhave you completed the homeowork?14:04
*** sysadmin_ has quit (None)14:07
*** scooper has quit (Ping timeout: 480 seconds)14:11
shmohamudyou there scooper?14:14
scooperI will complete it today.... been reading the book and the links you give me14:14
scooperyes14:14
scooperI m here14:14
shmohamudOk, just checking :)14:14
scooperfkoikoi is here today is there anything you have for us???14:15
shmohamudSo, I read the assignment more carefully, and noticed it specifically wants to know the behaviors you expect from different user mouse movements14:15
scooperyes14:15
shmohamudspecifically, Mouse Events14:15
shmohamudJust read the lines carefully and look at the links I shared14:15
scooperThe link you give me14:15
shmohamudWell, I don't have anything off the top of my head - do you have any questions that I might be able to answer?14:15
scooperintroduce me to lot of MOuse Events14:15
shmohamudGood good14:16
shmohamudHi fkoikoi :)14:16
fkoikoiHello shmohamud14:16
shmohamuddo you have any questions I can help with today?14:17
scooperNot really14:17
scooperI m finding that links to be so interesting..... so no question for now14:17
shmohamudthat's cool! Shall I come back tomorrow, same time?14:18
scoopershmohamud14:18
scooperthought you said you are going to help fkoikoi and I will some lesson14:18
shmohamudWould you like to do some javascript today?14:19
scooperyes if the time is available for your end14:19
shmohamudtime is available!14:19
scoopergiving us books will also help14:20
shmohamudOk, do you have a way to run javascript and see output?14:20
scooperMainly beginner books in javascript14:20
shmohamudOr should we work on finding a way for you to do that on your system. 14:20
shmohamudThe best book on JS is Eloquent Javascript - let me see if I can find a free copy (I doubt it)14:20
scooperyes14:21
scooperby running it in the browser14:21
shmohamudhttps://developer.mozilla.org/en-US/docs/Web/javascript14:21
scooperor IDE???14:21
shmohamudthis is the best JS resource i know, it goes into detail on specific built-in functions, language features, and keywords in JS14:21
shmohamudBrowser or IDE works14:22
shmohamudso, if I asked you to write a program that logs out "Hello World" using JS, would you be able to do it?14:22
scooperI think for beginner it good to start in the browser14:22
shmohamudThat works!14:23
shmohamudCould you write a JS program that logs "Hello World!" to the console?14:23
scooperyes14:24
shmohamudwrite it and paste it to me please14:24
scooperconsole.log('Hello, World!');14:25
shmohamudperfect14:25
shmohamuddo you know the difference between an Arrow Function and a Regular Function?14:26
scooperNo14:26
scooperBut I know about function in Python14:26
scooperAre they similar???14:27
shmohamudThey are very similar. There are a few important differences.14:27
shmohamudArrow functions don't have their own bindings to this, arguments, or super, and should not be used as methods.14:28
shmohamudArrow functions cannot be used as constructors. Calling them with new throws a TypeError. They also don't have access to the new.target keyword.14:28
shmohamudSo basically, if you're defining a new class, do not use arrow functions because they don't have the binding to "this" keyword which is usually important14:29
shmohamudThey're becoming popular in JS code though, because they're more readable for a lot of people than clunky regular functions.14:29
shmohamudconst logHelloWorld = () => console.log("Hello World!")14:30
shmohamudfunction logHelloWorld(){ return console.log("Hello World!")}14:32
shmohamudnotice that the second one is longer and must explicitly return something (otherwise it would return undefined).14:32
shmohamudCan you write me an arrow function that logs out "This is a practice arrow function" ?14:34
scooperconst logHelloWorld = () => console.log("Hello Spencer");14:34
scooperI type in the console and receive an error message "say undefined"14:35
shmohamudThat's good, but don't get in the habit of copying and pasting. 14:35
shmohamudIt's better to rewrite even if you're copying - not that you copied just in case.14:35
scooperNo I rewrite14:35
scooperthe code that you paste in here14:36
shmohamudCool, gotcha. Ok, so that's a good arrow function expression.14:36
scoopershmohamud14:36
shmohamudcan you write me a regular function expression logging the same thing?14:36
shmohamudyes?14:36
scooperI didn't answer your first question yet14:36
scooperI was explaining to you what I  encounter why writing the code14:37
shmohamudWhich question?14:37
shmohamudOh, you're getting an error14:37
scooperYes14:37
shmohamudconst logHelloWorld = () => console.log("Hello Spencer"); 14:37
shmohamudThis is giving an error?14:37
scooperyes in the browser14:38
shmohamuddid you call the function?14:38
scooperif you run the command in the browser it get executed immediately14:39
shmohamudyou have to do "logHelloWorld()"14:39
shmohamudthat will run it. The expression evaluates to undefined initially, that doesn't mean the function doesn't work. Really good question!!14:40
shmohamudGoogle Chrome's console shows return value as undefined for everything that doesn't return any value in addition to expressions that actually evaluate into undefined. That means, that it will show undefined for statements that simply cannot return anything because it's not allowed by language specification, like variable and function declarations.14:42
shmohamudSo, no you're not doing anything wrong, it's just the way how console works.14:42
scoopershmohamud starting from the basic should include variables, and data type in javascript I think it will be ok for now because I have fkoikoi here 14:42
shmohamudreally good questions scooper. Ok, thanks for letting me know.14:43
shmohamudFkoikoi are you guys in the same room by the way? Just curious14:43
scooperyes14:43
scoopershe is here with me14:43
shmohamudFkoikoi are you familiar with variables and functions?14:43
fkoikoiI just begun with python 14:44
shmohamudI don't want to confuse you. Do you understand how variables and functions are defined in Python yet?14:44
fkoikoiyes i do14:45
shmohamudOk, can you declare a variable called "price" and set it to 20. Then print the price?14:45
fkoikoiyes14:46
shmohamudplease do it here so I can see14:47
fkoikoiprice = 2014:47
fkoikoiprint (price)14:48
shmohamudperfect14:48
shmohamudare you familiar with loops and conditionals?14:48
fkoikoino14:48
shmohamudspencer, are you?14:48
scooperyes14:49
shmohamudcan you write us a for loop that prints every even number between 0 and 100?14:49
shmohamudhere please14:49
scooperfirstly the are two loops in python for and while loop14:49
scooperok14:50
shmohamudgood14:50
scoopergive me two minutes14:50
shmohamudOk, please do it without the aid of any outside materials14:51
scoopersure14:51
scooperlet me  do it bit by here14:52
scoopervalue = 10014:52
shmohamudok first take your time thinking. Thinking should be 80% of programming at least, only 20%  writing14:52
scooperif value % 2 == 0 print("even number") elif value / 2 == 1 print("odd number") 14:54
shmohamudclose, but read the question carefully. What did I ask you to print?14:55
scooperoh14:55
shmohamudand this is half of the solution, where is the loop>14:56
shmohamud*?14:56
scooperthe question says even number betwewwn 0 and 10014:56
shmohamudyes, I want you to loop through every number and *only* print it if it's even14:56
scooperok coming14:56
shmohamudok14:56
shmohamudfkoikoi are you following so far?14:57
scoopervalue = 100 for x in value:14:57
fkoikoiyes, I'm following14:57
shmohamudgood14:57
shmohamudscooper, is that how we declare for loop or variable?14:57
scooperno14:58
scooperindention most be observed14:58
shmohamudI'll let you finish first, then we wlil run it to see.14:58
shmohamudok?14:58
shmohamudfkoikoi start reading this: https://www.w3schools.com/python/python_for_loops.asp15:00
scooperI m a bit lost on the increamenting part15:00
scooperbut the logical is there15:00
shmohamudthat's fine, so can you write what your current solution is and we'll tweak it?15:00
scooperlogic is the15:00
shmohamudok let me give you a hint. Start with a simpler problem.15:00
shmohamudWrite me a loop that prints *every* number between 0 and 10015:01
shmohamudcan you do that?15:01
scooperyes15:01
shmohamudok, let's see it15:01
scoopercountnumber = 10015:01
scooperfor num in countnumber15:02
scooperprint(num)15:02
shmohamudClose again , but when you run are you getting error?15:03
shmohamudTraceback (most recent call last):15:03
shmohamud  File "main.py", line 6, in <module>15:03
shmohamud    for num in count:15:03
shmohamudTypeError: 'int' object is not iterable15:03
shmohamud15:03
shmohamudI'm getting this one: 15:03
shmohamudyou can't iterate of a number in python with that syntax15:03
scooperno15:04
scooperI did try it in the terminal15:04
scooperI type directly here15:04
shmohamudthat worked?15:04
scooperLet me try it in ther terminal before paste here15:04
shmohamudcount = 10015:05
shmohamudfor num in range(0, count):15:05
shmohamud  print(num)15:05
shmohamudthis is what works for me: 15:05
scooperyes15:05
shmohamudYou're missing the range keyword, unless my python interpreter is not working properly15:05
scooperyou got it15:05
shmohamuddid you include the "range" keyword?15:05
scooperI did mentioned the python in built function "range15:06
shmohamudwell keep in mind I'm only seeing what you paster here.15:06
shmohamudNow that we have something that prints every number15:06
shmohamudcount = 10015:06
shmohamudfor num in range(0, count):15:06
shmohamud  print(num)15:06
shmohamudhow can you make sure this only prints evens? You almost had it earlier.15:06
scooperfirstly you need to include a condition statement15:07
shmohamudyes15:08
scoopershould I continue??15:08
shmohamudyes please. change the current answer that prints all numbers so it only prints even numbers15:09
shmohamudfkoikoi do you have any questions for me?15:12
fkoikoiyes I do15:13
shmohamudplease share while scooper thinks15:13
fkoikoiIn the book, the reading talks about the condition being a boolean expression15:14
shmohamudyes15:15
fkoikoiso I want to know what is a boolean expression15:15
shmohamudgreat question15:15
shmohamudBoolean means it's either True or False15:15
shmohamudThere are lots of conditions we can use in if/else statemenets15:16
shmohamudif 2 > 3: (this won't execute because 2 is not greater than 3)15:17
scooperfor num in range(0, count):15:17
scooper    if num % 2 == 0:15:17
scooper        print(num)15:17
scooper    else:15:17
scooper        print("No answer")15:17
shmohamudif 5 > 2: (this will execute because 5 is greater than 2)15:17
shmohamudScooper, you got it! There's one important thing though, did I ask you to print "no answer" if it's not even?15:17
scooperNO15:18
scooperFOR THE QUESTION IT ONLY ASK FOR 15:18
shmohamudfkoikoi notice that scooper has the condition (if num % 2 == 0) ---> This evaluates to a Boolean of True15:18
shmohamudIf it's even15:18
fkoikoiso are they saying that when you are using a condition statement like "if or else" the answer either be true or false15:19
shmohamudclose fkoikoi.15:19
shmohamudSo, we use conditionals to tell the program to ONLY execute the following code IF it's True15:20
fkoikoialright15:20
shmohamudIt's not about an answer, it's about telling the program how to flow15:20
shmohamudComputers are dumb, they need us to tell them exactly when to execute code in a program.15:20
shmohamudLOL Scooper15:21
shmohamudYou're good my friend, and you're correct15:21
shmohamudI only emphasize this because thinking as a programmer you must become very good at catching details of questions.15:21
shmohamudIf you wanted to add that, you should've asked me and I would've said nope, I only want to see the evens printed. Remove the extra lines15:22
shmohamuddoes that make sense?15:22
scooperfor num in range(0, count):15:23
scooper    if num % 2 == 0:15:23
scooper        print(num)15:23
scooper   15:23
scooperyes15:23
shmohamudbeautiful :)15:23
shmohamudwell done. I think we've had a successful session so far, what do you guys think?15:24
scooperSure can we know what time we should be online everyday excluding saturday with you????15:25
fkoikoisure it was great15:25
shmohamudsame time as today15:25
shmohamudgood to hear :)15:25
fkoikoibut I hope this continue everyday15:25
shmohamudI will put in at least as much effort as you guys15:25
shmohamudThe hard part is studying on your own in between our sessions. It takes time for concepts to sink in.15:26
shmohamudDo you have any more questions for today?15:26
scooperYes15:26
shmohamudOk, let's hear it15:26
scoopersorry not a question but a suggestion15:27
shmohamudYes15:27
scooperI advice we stick with python for a while before proceeding to javascript....15:27
shmohamudI think that's a great idea. Once we have Python down, we will be able to learn Javascript much more easily.15:27
scooperWhat I notice when you tried asking me to do some stuff I got lost because I was in hurry to give you a result15:28
shmohamudAs a programmer, you must prioritize thinking above typing15:28
shmohamudThink through the solution first, have at least some big ideas, then type it up15:29
shmohamudGood that you caught yourself rushing.15:29
shmohamudany further questions?15:30
scooperNO I think we are done for today15:30
scooperThanks Shmohamud and Jeff15:30
shmohamudsounds good. Make sure to get some of the reading done, both of you.15:30
fkoikoiWe will definitely put in more effort because i am looking forward to learning from you.15:30
shmohamudI'm looking forward to learning with you, I love to teach :)15:31
*** scooper has quit (Quit: Leaving)15:31
fkoikoialright 15:31
shmohamudYou're welcome Scooper. Have a good rest of your day Fkoikoi15:31
fkoikoiThank you so much15:31
shmohamudYou're welcome fkoikoi :)15:31
fkoikoihave a nice day too shmohamud15:31
shmohamudthank you15:32
*** shmohamud has quit (Remote host closed the connection)15:32
fkoikoiokay15:34
*** fkoikoi has quit (Remote host closed the connection)15:39
*** fkoikoi has quit (Read error: Connection reset by peer)15:40
*** shmohamud has quit (Ping timeout: 480 seconds)15:41
*** fkoikoi_ has quit (Remote host closed the connection)15:43
*** shmohamud has quit (Ping timeout: 480 seconds)15:57
*** fkoikoi_ has quit (Quit: Leaving)16:03
*** shmohamud has quit (Ping timeout: 480 seconds)17:01
*** shmohamud has quit (Ping timeout: 480 seconds)18:11
*** shmohamud has quit (Ping timeout: 480 seconds)18:26
*** jelkner has quit (Quit: Leaving)18:31
*** shmohamud has quit (Ping timeout: 480 seconds)19:25
*** shmohamud has quit (Ping timeout: 480 seconds)20:55
*** shmohamud has quit (Ping timeout: 480 seconds)22:49

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