| resl has quit (Ping timeout: 480 seconds) | 00:04 | |
| anthony_p has quit (Ping timeout: 480 seconds) | 02:53 | |
| smohamud has quit (Ping timeout: 480 seconds) | 06:38 | |
| smohamud has quit (Remote host closed the connection) | 07:32 | |
| smohamud has quit (Remote host closed the connection) | 08:00 | |
| anthony_p has quit (Ping timeout: 480 seconds) | 08:15 | |
| smohamud has quit (Remote host closed the connection) | 08:55 | |
| smohamud has quit (Ping timeout: 480 seconds) | 10:36 | |
| smohamud | Good morning comrades | 11:00 |
|---|---|---|
| smohamud | And good afternoon | 11:00 |
| gabriel_jetro | Good afternoon smohamud | 11:00 |
| jkollie | Good morning smohamud | 11:01 |
| smohamud | Standup update: worked on data-definitions document with Zonny & Tony yesterday. Continued working on Requiremenst document for CJS. Meeting planned for Tuesday with client Stephen to lock-in requirements. Prepped JS class. | 11:02 |
| smohamud | *not blocked | 11:02 |
| zOnny | Good morning everyone | 11:03 |
| gabriel_jetro | Good morning zonny | 11:04 |
| jkollie | Good morning zOnny | 11:05 |
| zOnny | Hey team, this weekend I've been working on some NS AMS updates and doing some thoughtful research into the best way to launch a project-based LibreOrganize. Taking the time to plan this out properly to make sure we get it right. No Blockers. | 11:06 |
| zOnny | ACTION done | 11:06 |
| dcammue | Good morning folks | 11:06 |
| jkollie | thomaboimah said he's having issues joining the hexchat this morning, that his connection keeps failing and being unreachable. | 11:07 |
| dcammue | zOnny, how every thing been going? | 11:08 |
| zOnny | Please don't mind my present in this meeting, I know it is most Jetro's meeting. I just got connected due that I'm not at my current job right now | 11:08 |
| dcammue | no, no worry zOnny, we are all one ;=) | 11:09 |
| zOnny | dcammue: life is good | 11:09 |
| zOnny | dcammue: how are you feeling | 11:09 |
| jkollie | dcammue: | 11:09 |
| dcammue | i am feeling much better now | 11:09 |
| dcammue | jkollie, | 11:09 |
| dcammue | how are you | 11:09 |
| smohamud | any other updates before we get to the Intro to JS class for today? | 11:10 |
| zOnny | dcammue: good to know dcammue | 11:10 |
| smohamud | welcome Mulbah | 11:10 |
| dcammue | zOnny, thanks | 11:10 |
| zOnny | ACTION let the meeting continue and goes back to his research | 11:10 |
| smohamud | I have only received the Developer Experience Survey from Thomas. | 11:11 |
| smohamud | Has anyone else completed it? | 11:11 |
| jkollie | I'm okay, did you see the message I sent from thomaboimah | 11:11 |
| dcammue | yes, jkollie | 11:11 |
| zOnny has quit (Remote host closed the connection) | 11:12 | |
| smohamud | I did not | 11:12 |
| jkollie | It's okay smohamud, Is in this chat | 11:13 |
| smohamud | Oh, gotcha. | 11:14 |
| smohamud | thanks | 11:14 |
| smohamud | No worries for Thomas. | 11:14 |
| smohamud | Ok, are there any other updates? If so, please write in the next 2m | 11:14 |
| jkollie | I think 1 | 11:14 |
| jkollie | Ln | 11:14 |
| jkollie | 0p | 11:14 |
| smohamud | Dcammue - can you start the Live Share session? | 11:15 |
| jkollie | He's trying to fix that | 11:15 |
| dcammue | smohamud, if that question comes to me as well, i don't think i may have knowledge of that survey, neither seeing it before | 11:15 |
| dcammue | okay, i will start it | 11:15 |
| smohamud | dcammue, I sent to your jetro email a few days ago. | 11:16 |
| smohamud | thanks | 11:16 |
| dcammue | https://prod.liveshare.vsengsaas.visualstudio.com/join?2B74EC0604942729B525AE5BD6DB5C104F00 | 11:16 |
| smohamud | dcammue, please pull the latest code down. I pushed a few things this morning. | 11:17 |
| smohamud | Gabriel, Mulabj, Janet great to see you. Please join the Live Share link dcammue just pasted. | 11:18 |
| smohamud | Can you navigate to the data_types.js? | 11:21 |
| smohamud | we will modify it directly. Don't be afraid to touch the files. | 11:21 |
| smohamud | So far, we've got Mulbah and Daniel. Gabriel & Janet - let me know if there's anything I can do to help you get in. | 11:22 |
| dcammue | okay, i am there | 11:22 |
| smohamud | We will give 3m for everyone to get in. | 11:23 |
| mulbah has quit (Remote host closed the connection) | 11:24 | |
| smohamud | Ok, let's get started. | 11:25 |
| smohamud | Mulbah - are you reconnecting? | 11:25 |
| mulbah | No | 11:25 |
| mulbah | I'm already connected | 11:25 |
| smohamud | To the Live Share? I don't see you anymore. | 11:26 |
| smohamud | Ok, there you are. | 11:28 |
| smohamud | Alright. Today's lesson is on Data Types. | 11:28 |
| smohamud | Mulbah and Daniel, what are some data types that you're familiar with from other languages? | 11:28 |
| mulbah | list, string, object | 11:29 |
| dcammue | string, number object | 11:29 |
| mulbah | int, float, | 11:29 |
| mulbah | set | 11:29 |
| mulbah | tuple | 11:29 |
| mulbah | yes I think that it | 11:30 |
| smohamud | Solid | 11:30 |
| smohamud | Ok, Javascript there are two types of data. Primitives and Objects. | 11:31 |
| smohamud | Sorry, two categories of data. | 11:31 |
| smohamud | Each of those categories has multiple types. | 11:32 |
| mulbah | sure | 11:32 |
| smohamud | Is an array a primitive or an object? | 11:32 |
| mulbah | I almost get confuse just now | 11:32 |
| smohamud | Oh, what're you thinking? | 11:32 |
| smohamud | Was it my data types point? | 11:32 |
| mulbah | array is a object | 11:33 |
| smohamud | In javacript, yes, arrays are of type object. Daniel, let's use typof [] and see what comes out. | 11:34 |
| mulbah | okay | 11:34 |
| smohamud | Can you run this Daniel? | 11:35 |
| smohamud | Here's a tip Daniel, if you want to autocomplete the name of a file in the terminal, you can press the "Tab" key once if it's the only one and twice if there are multiple that start with the same chars | 11:36 |
| smohamud | one more level down | 11:36 |
| smohamud | cd into in-class-examples | 11:36 |
| smohamud | Everyone see the output? | 11:37 |
| mulbah | yes | 11:37 |
| smohamud | if you're ever curious about the type of a variable, just slip in typeof [variable name] | 11:37 |
| smohamud | It will tell. So, an array is of type object. | 11:38 |
| smohamud | Let's start with the primitive types: String, Number, Boolean, Undefined, Null | 11:40 |
| smohamud | *Everything else is an object, some of which have special types but are treated as objects in memory. | 11:41 |
| smohamud | capitalCity and coopName are both Strings. | 11:41 |
| smohamud | We're used to strings from other languages, so let's continue. | 11:42 |
| smohamud | The next type is "Number" this is a little different (please read along, we're on line 13) | 11:42 |
| smohamud | Number is for numbers, naturally, and there's a new primitive that was introduced in a recent JS version called BigInt that handles numbers greater than 1 trillion (roughly) with precision. | 11:43 |
| smohamud | There's no floating point, Integer, etc that other languages break down into multiple types for numbers. This is a JavaScript quirk. | 11:44 |
| smohamud | Mulbah, can you define a variable called decimalNumber and assign it to a decimal, and finally console.log it? | 11:45 |
| smohamud | with typeof [variable name] to see if it gives anything besides Number? | 11:46 |
| smohamud | great start. Now, let's log it and see the type | 11:47 |
| mulbah | I should print the type of it too | 11:48 |
| smohamud | I like the string interpolation, but yes please include the type using typeof | 11:48 |
| smohamud | perfect. | 11:49 |
| mulbah | I don't have access to run it in the terminal DC you can just do it | 11:50 |
| smohamud | And good use of let. It's much better than var since var will let you run into undefined if it's referenced improperly. Good rule of thumb is to use const unless otherwise you have to reassign. | 11:50 |
| smohamud | Dcammue, please run it. | 11:51 |
| smohamud | Welcome Gabriel, are you looking to join class? | 11:51 |
| smohamud | We just got disconnected. | 11:51 |
| mulbah | I'm still in | 11:52 |
| dcammue | your are not in? | 11:52 |
| dcammue | https://prod.liveshare.vsengsaas.visualstudio.com/join?2B74EC0604942729B525AE5BD6DB5C104F00 | 11:52 |
| smohamud | Ok, I'm coming back. Was prob just me | 11:52 |
| smohamud | Did it run? | 11:53 |
| smohamud | What was the output | 11:53 |
| dcammue | yes | 11:53 |
| smohamud | Welcome Thomas | 11:53 |
| thomasboimah | Greetings comrades | 11:53 |
| smohamud | https://prod.liveshare.vsengsaas.visualstudio.com/join?2B74EC0604942729B525AE5BD6DB5C104F00 | 11:53 |
| thomasboimah | Sorry my connection was giving my so headache | 11:53 |
| thomasboimah | *me | 11:53 |
| thomasboimah | *some | 11:54 |
| smohamud | no problem. Today we're discussing Data Types in JavaScript | 11:54 |
| smohamud | I'm back in. | 11:54 |
| smohamud | So, what's the type of that Decimal? | 11:55 |
| dcammue | number | 11:55 |
| smohamud | Exactly. Now, let | 11:56 |
| thomasboimah | float | 11:57 |
| thomasboimah | oopss | 11:57 |
| smohamud | let's run to see the types of coopName, capitalCity, isJetroAwesome, membershipCountNextYear and expectedRainfall | 11:57 |
| smohamud | First, read the variables and their values, then, anticipate what the type will be. | 11:57 |
| smohamud | Dcammue, please execute the script in 30s. | 11:58 |
| smohamud | ok | 11:58 |
| smohamud | Ok, so the output is showing the types of the variables defined at the top. | 12:00 |
| smohamud | These are the primitives. Now, for object types, for now, let's just focus on Object itself, the kind we're used to that store key-value pairs. | 12:01 |
| smohamud | But before that, are there any questions? | 12:02 |
| thomasboimah | yes | 12:02 |
| smohamud | great, let's hear it | 12:03 |
| thomasboimah | Why this const hoursInOneDay = 24; print "number" not "interger"? | 12:03 |
| mulbah | JavaScript have this one name called number that it give both float and int | 12:04 |
| smohamud_ | This is because programming languages have different sets of primitives, and rather than have a separate primitive for Integer, Number incorporates decimal and integer | 12:05 |
| smohamud has quit (Remote host closed the connection) | 12:05 | |
| thomasboimah | cool | 12:05 |
| thomasboimah | that clear | 12:05 |
| smohamud_ | That said, JavaScript recently introduced BigInt type. Which makes massive integers more precise. | 12:06 |
| thomasboimah | just want to here | 12:06 |
| smohamud_ | Really good question. | 12:06 |
| thomasboimah | *wanted | 12:06 |
| smohamud_ | Any other questions? | 12:06 |
| gabriel_jetro | -1 | 12:06 |
| thomasboimah | -1 from me | 12:07 |
| mulbah | -1 but I have a subjection | 12:07 |
| dcammue | -1 | 12:07 |
| smohamud_ | Ok, so another thing to note before we move on is the difference between Null and Undefined. This is a lesson in itself, but in a Nutshell, use null when you want to make clear that this variable is supposed to be empty at this point in the program. Undefiend is the default for all variables. | 12:07 |
| mulbah | we can do a coding challenge every weekend | 12:07 |
| smohamud_ | Sure, I will start adding challenge problems to the HW on Fridays. But I need you all to start completing the HW regularly and on time. | 12:08 |
| smohamud_ | Deal? | 12:08 |
| dcammue | +1 | 12:09 |
| thomasboimah | yes! | 12:09 |
| gabriel_jetro | +1 | 12:10 |
| mulbah | okay | 12:10 |
| smohamud_ | Ok, challenge problem(s) will come Fridays with the HW. | 12:10 |
| smohamud_ | We have 5m left. | 12:10 |
| smohamud_ | Does anyone have any questions for me now? | 12:10 |
| smohamud_ | If not, let's move on. | 12:10 |
| mulbah | okay | 12:11 |
| smohamud_ | JavaScript has a unique way of handling "equality" between two values. | 12:11 |
| dcammue | so, we use the 5minutes to solve our last bug on Friday? | 12:12 |
| smohamud_ | There's "loose equality" which is when you do something like: variableA == variableB (using two "=" signs) | 12:12 |
| smohamud_ | Then, there's strict equality, when you do something like: variableA === variableB (using three "=" signs). | 12:13 |
| smohamud_ | I want you to debug it for Homework and then we can discuss Wednesday. I'll give you a hint, the reference error is because what we're logging out can't be found in the scope that the console.log() is in... Read the variable names carefully... | 12:14 |
| smohamud_ | Does that work? | 12:14 |
| dcammue | i did found the bug already | 12:14 |
| smohamud_ | Oh, nice! | 12:14 |
| smohamud_ | Well, that's good practice and you can tell us about your process next time if you'd like to share. | 12:15 |
| dcammue | so is not really important if we go back, i think ;-) | 12:15 |
| dcammue | okay | 12:15 |
| smohamud_ | Comrades, it's 3:15pm. Last question is for everyone to read jetroMember and anotherJetroMember values... Are they identical? | 12:16 |
| dcammue | you mean copyofjetromember? | 12:17 |
| smohamud_ | Sorry, yes that's what I meant (session disconnected) | 12:17 |
| smohamud_ | Now, who thinks the two objects will result in being equal if we use "loose" equality (the kind that is not super strict and will evaluate "24" the string as equal to 24 the number | 12:18 |
| smohamud_ | ? | 12:18 |
| dcammue | they appear to look the same but different in structure | 12:18 |
| smohamud_ | What's the difference in structure? | 12:19 |
| smohamud_ | I see, good catch. Erase the quotations around the city key for the copyOfJetroMember | 12:19 |
| smohamud_ | Now that the structure is *identical* who thinks it will evaluate to "True" if we test jetroMember == copyOfJetroMember? | 12:20 |
| dcammue | you have city: 'Monrovia', for jetromember, and 'city: monrovia' for copyofjetromember | 12:20 |
| thomasboimah | No. jetroMember and copyOfJetroMember are not identical objects. Their property values are the same, but they are two separate objects in memory. | 12:20 |
| smohamud_ | [Loose equality, not strict] | 12:20 |
| smohamud_ | Ok, Thomas, thank you for your response. Gabriel, Daniel and Mulbah, what do you think if two objects with the same exact properties are set equal with the loose equality operator? Will it evaluate True or False? | 12:21 |
| dcammue | you have city: 'Monrovia', for jetromember, and 'city': 'monrovia' for copyofjetromember | 12:22 |
| smohamud_ | Yes please remoe the quotations from 'city' | 12:22 |
| smohamud_ | So they're properly equal. | 12:22 |
| smohamud_ | or "Identical" | 12:22 |
| smohamud_ | abriel, Daniel and Mulbah, what do you think before we execute the script? | 12:23 |
| smohamud_ | True for "==" or false? | 12:23 |
| smohamud_ | Thomas says false | 12:23 |
| dcammue | they now have different name but same value and data-type | 12:23 |
| smohamud_ | exactly | 12:23 |
| gabriel | True | 12:24 |
| smohamud_ | I'll give 1 more minute for folks to share a response. | 12:24 |
| smohamud_ | Thank you Gabriel | 12:24 |
| smohamud_ | Thomas says False | 12:25 |
| smohamud_ | Gabriel says True | 12:25 |
| smohamud_ | Since there are no other takers, please execute the script Daniel. | 12:25 |
| smohamud_ | Once it executes, please write in the chat what the results are for the "loose equality" and "strict equality" of the jetroMember and copyOfJetroMember. | 12:26 |
| thomasboimah | dcammue, and smohamud_ i get drop for the share | 12:27 |
| thomasboimah | *from | 12:27 |
| smohamud_ | Me too Thomas but don't worry, we're done after this test. Also, you can open the Repoo locally after you pull the latest and run it there :) | 12:27 |
| smohamud_ | Daniel - do you see the output? | 12:28 |
| dcammue | https://prod.liveshare.vsengsaas.visualstudio.com/join?2B74EC0604942729B525AE5BD6DB5C104F00 | 12:28 |
| dcammue | no result shows | 12:28 |
| smohamud_ | Uncomment the lines where the equality is done it should say | 12:29 |
| smohamud_ | console.log("Is any object equal to another object, strictly : ", jetroMember === copyOfJetroMember) | 12:29 |
| smohamud_ | console.log("Is any object equal to another object, loosely? : ", jetroMember == copyOfJetroMember) | 12:29 |
| smohamud_ | CTRL - K - U or erase the double "//" before the line to unccoment. | 12:30 |
| smohamud_ | after highlighting the part to uncomment. | 12:30 |
| smohamud_ | Mulbah you don't want to share what you think will output? | 12:31 |
| dcammue | dcammue@gnucash:~/jstutorial/introduction-to-javascript-class/in-class-examples$ node data_types.js | 12:31 |
| dcammue | Type of jetroMember: object | 12:31 |
| dcammue | Is any object equal to another object, strictly : false | 12:31 |
| dcammue | Is any object equal to another object, loosely? : false | 12:31 |
| dcammue | dcammue@gnucash:~/jstutorial/introduction-to-javascript-class/in-class-examples$ | 12:31 |
| mulbah has quit (Remote host closed the connection) | 12:32 | |
| dcammue | smohamud_, did you see the result? | 12:33 |
| smohamud_ | Well, there it is! Gabriel, the reason why is what Thomas began explaining about "memory." In JavaScript every object gets its own "reference" in memory which has a "pointer" | 12:33 |
| smohamud_ | Yes I see the result. Whenever a variable is assigned, it's either assigned to the actual *value* OR it's assigned to a memory address, a "reference" | 12:34 |
| smohamud_ | Imagine that instead of the actual data, you're given a map to the data. | 12:34 |
| smohamud_ | With directions on how to get to it. | 12:34 |
| smohamud_ | Every single Object always has its own Address in the memory, so when comparing two Objects, it checks "are the addresses identical" and they won't be because each Object is assigned its own address. | 12:35 |
| dcammue | so that's mean, Java script compares two Array using their reference in memory? | 12:36 |
| smohamud_ | But primitives, like 1, "Jetro Web Development" or true will have the actual data in the variable so those comparisons will evaluate true for two different variables with the same value. | 12:37 |
| smohamud_ | Bingo! JS equality doesn't check if the actual data is equal, it checks if that memory address is equal...Which will not happen since new object type variables get their own address. | 12:38 |
| smohamud_ | Ok comrades we've gone over but this was a great and important session. | 12:39 |
| smohamud_ | Any final comments or questions for me? | 12:39 |
| smohamud_ | Gabriel - do you see why it didn't evaluate to True? | 12:39 |
| gabriel | sure | 12:40 |
| thomasboimah | smohamud_, question | 12:40 |
| smohamud_ | awesome. | 12:40 |
| smohamud_ | Yes Thomas? | 12:40 |
| thomasboimah | it is two question tho | 12:41 |
| smohamud_ | Ok, let's hear them | 12:41 |
| thomasboimah | 1. If two objects have the exact same properties and values but are stored as different objects in memory, what is the proper way in JavaScript to check whether their contents are equal? 2. When two variables reference the same object, what exactly is stored in memory for each variable, the whole object or just a reference to the object? | 12:43 |
| smohamud_ | Great questions. | 12:43 |
| smohamud_ | For 1.) two objects with same exact properties will never evaluate to be equal *unless* one of them was assigned to the same value as the other. E.g. objA = {}...objB = objA | 12:44 |
| smohamud_ | This is because Javascript evaluates objects by their address in memory, and when you set objA = objB, now objB is just pointing to the same memory address as objA. | 12:45 |
| smohamud_ | For 2.) You're on the right track here, it's just a reference. | 12:46 |
| smohamud_ | objA might have reference ID of "#ABCD1234" and if objB is set to objA it will also be "#ABCD1234". | 12:46 |
| thomasboimah | cool! | 12:47 |
| thomasboimah | Thanks | 12:47 |
| smohamud_ | Thank you for the great questions. | 12:47 |
| smohamud_ | Keep in mind: "the whole object" as in the raw object value is never stored in a JavaScript variable. All objects point to memory addresses that contain the actual data. | 12:48 |
| smohamud_ | This is partially why computations on primitives are faster, there's no step to go from memory address to actual data. The data *is* the value. | 12:50 |
| thomasboimah | I see | 12:50 |
| smohamud_ | Ok, any final questions? | 12:50 |
| thomasboimah | -1 from me | 12:50 |
| thomasboimah | smohamud_, is the requirement complete for Dr. Hubbard project now? | 12:51 |
| smohamud_ | Ok guys, was today's class helpful? Anything I can do to better teach? | 12:51 |
| smohamud_ | The meeting with Dr. Hubbard is supposed to be tomorrow at 12pm PDT. Can you make it? | 12:52 |
| thomasboimah | Sorry I am not really contributing that much on that project since i am still learning the stack. That is why i am greatful you are their to help. | 12:52 |
| smohamud_ | *around 12pm, he said before 11:30am is not good. | 12:52 |
| thomasboimah | sure | 12:52 |
| smohamud_ | Does anyone else want to join us for the Requirements discussion? | 12:53 |
| thomasboimah | I will try to be their, Thanks for moving this forward smohamud_ | 12:53 |
| smohamud_ | It will be late, so don't worry about it if it's tough. | 12:54 |
| thomasboimah | Jetro is greatful since, we are still learning the stack | 12:54 |
| thomasboimah | for this project | 12:54 |
| smohamud_ | You're welcome. I am here as a resource for you. Anytime. | 12:54 |
| smohamud_ | Since I hear no other questions, I will see you either tomorrow evening or Wednesday for class comrades. Have a great rest of your day and great work today. | 12:55 |
| thomasboimah | Okay have a nice day | 12:55 |
| smohamud_ has quit (Quit: Leaving) | 12:55 | |
| thomasboimah | Have a nice day everyone, I am having diarreah that is why i am not at the office today | 12:56 |
| thomasboimah | ACTION sign off to go to the bathroom | 12:57 |
| thomasboimah has quit (Quit: Leaving) | 12:57 | |
| gabriel has quit (Ping timeout: 480 seconds) | 13:46 | |
| jkollie has quit (Quit: Connection closed for inactivity) | 14:34 | |
| gabriel_jetro has quit (Quit: Connection closed for inactivity) | 14:40 | |
| mulbah has quit (Remote host closed the connection) | 14:41 | |
| smohamud has quit (Ping timeout: 480 seconds) | 14:49 | |
| smohamud has quit (Ping timeout: 480 seconds) | 15:17 | |
| resl has quit (Quit: resl) | 15:20 | |
| mulbah07_ has quit (Remote host closed the connection) | 15:31 | |
| mulbah07_ has quit (Remote host closed the connection) | 16:24 | |
| smohamud has quit (Ping timeout: 480 seconds) | 16:52 | |
| mulbah07_ has quit (Remote host closed the connection) | 16:56 | |
| smohamud has quit (Ping timeout: 480 seconds) | 17:12 | |
| mulbah has quit (Remote host closed the connection) | 17:22 | |
| dcammue_ has quit (Ping timeout: 480 seconds) | 19:33 | |
| smohamud has quit (Ping timeout: 480 seconds) | 19:57 | |
| dcammue has quit (Ping timeout: 480 seconds) | 21:28 | |
| anthony_p has quit (Ping timeout: 480 seconds) | 22:59 | |
| dcammue has quit (Remote host closed the connection) | 23:00 | |
| resl has quit (Ping timeout: 480 seconds) | 23:36 | |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!