IRC log of #novawebdev for Monday, 2023-05-15

scoopergood morning Jeff13:25
tmickelsonhello scooper 13:26
scooperGood morning tmickelson13:26
jelknerGood day, scooper 13:27
jelknerNo fkoiko today?13:27
scooperI m sorry I forgot to informed you this gone saturday13:27
scoopertoday is holiday in liberia13:28
jelkneroh, np13:28
jelknerlet's meet tomorrow then13:28
jelkneryou should enjoy your holiday, my friend!13:28
scooperNo work at MCSS office13:28
scooperBut I m here today to learn from tmickelson13:29
jelknerscooper, is today a good day to help you with Java?13:29
jelknerwe could chat at 2 pm, after tmickelson leaves13:29
jelkneri have a planning period today at that time13:29
scooperBy to 2pm Sahnun will be online with us, have you forget13:30
jelknerperfect13:30
jelkneryes, i did forget13:31
scooperJeff13:31
jelknerSpencer13:31
scooperplease inform Aaron about the mcss domain expiration day13:31
scooper*date13:31
scoopertmickelson is there any lesson today????13:32
jelknerscooper, thehedgeh0g is here, and i just told them13:32
scooperThanks13:32
tmickelsonscooper, were you able to get other people to fork the repo and merge changes back into main13:33
jelknerok, scooper, this will be a process13:33
jelknerhere's what we need to do:13:34
jelkner1. You need to create an MCSS account on Namecheap13:34
jelkner2. I need to transfer ownership of the mcssliberia.org domaing from NOVA Web Development to you.13:34
jelkner3. You need to give thehedgeh0g, tmickelson, and me access to that new account as admins13:35
scooperyes tmickeson everyone fork the repos and push to their own branch this gone saturday....13:35
tmickelsondo you know how branching works13:36
jelknerhttps://www.namecheap.com/13:36
scooperyes but let me explain what I did with them.... on branch13:37
scooperfirst I told everyone to click on the link I posted in the hexchat13:38
scooperclick on fork and copy the URLs of that repos13:38
scooperclone the reposi on their computer after creating a directory on their computer where that urls will be cloned...13:39
scooperNext I told everyone to type the command "git checkout -b "new of the branch they which to name it"13:40
scooperAfter typing in that command, I told them to type "git branch" to see after the branch naming work13:41
scooperI you following? tmickelson13:41
scooperare13:41
tmickelsonyes13:42
scooperNow I told everyone to create a file or folder which will only be in the branch that was created....13:43
scooperafter that I told them to type "git add .", git commit -m and lastly git push"13:44
scooperNote if it your first time pushing to the remote repository you will encounter "upstream"13:44
scooperAnd the command line will provide an instruction for you to following which will include your user and and password13:46
scooperafter doing so, I need to add make sure I add everyone as a collaborator push what they are  pushing can be found in their own of branch13:47
tmickelsondo you know how git tagging works13:47
scooperno13:48
scooperjust hearing of it???13:48
scoopertmickelson are those steps in placed??13:48
tmickelsonthe steps for forking13:48
tmickelson*?13:48
scooperI m mean after forking13:49
scooperpushing back to the repos13:49
tmickelsonyes13:50
tmickelsondo you want to know how git tags work13:51
scooperYes13:51
scooperthat why I m here to learn alot from you13:51
tmickelsontagging can be used to track versions13:54
tmickelsonrunning `git tag` will display a list of tags13:55
tmickelson* tagged commits13:55
scooperyou mean running it in my terminal???13:56
tmickelsonyes13:56
tmickelsonto tag the current commit, use `git tag -a <version>`13:57
tmickelsonwhere verion would be something like v1.0.3_113:57
tmickelsonyou can also add a message using `git tag -m <message>`13:59
scooperI just type the "git tag" in my directory these are the information I got13:59
scooper-a, --annotate , sysadmin@learningToDeploy:~/Desktop/ForkwithTmickelson$ git tag 14:00
shmohamudhi scooper14:01
scooperGood morning shomhamud14:01
scooperhow are you doing14:01
jelknershmohamud, how's your Java?14:01
shmohamudgood how are you?14:01
jelknerscooper has a class at UoPeople, and could use help with Java homework14:02
shmohamudI can read Java14:02
*** tmickelson has quit (Quit: leaving)14:02
shmohamudI can help!14:02
shmohamudcan you email me the assignment Scooper?14:03
scooperyes I will shmohamud14:03
shmohamudsounds good :)14:03
*** tmickelson_ has quit (None)14:06
jelknerscooper, send it to me too.14:07
scooperOK Jeff I will any movement from now14:07
jelknerscooper, shmohamud, we should get in the habit of using our git repo server to collaborate on things like this14:07
jelknerscooper, what text are you using?14:08
shmohamudthat's a great idea14:08
scooperYou the Java Book???14:08
shmohamudpracticing Version Control and streamlining communication14:08
jelkner+114:08
jelknerall UoPeople books are OER14:08
scooperIntroduction to Java Programming14:08
jelknerhttps://beginnersbook.com/2013/05/java-introduction/14:09
jelkneris it that one?14:09
scooperSorry "Introduction to Programming Using Java" by David J Eck14:10
scooperfile:///home/sysadmin/Desktop/Extra-Activities/javanotes8-linked.pdf14:10
jelkneror https://math.hws.edu/javanotes/#:~:text=Downloading%20And%20Other%20Links14:11
jelkneryour link won't work, scooper 14:11
shmohamudfound it14:11
shmohamudhttps://my.uopeople.edu/pluginfile.php/57436/mod_book/chapter/37613/javanotes8-linked.pdf14:12
jelknerit is on your local system14:12
jelknerhttps://math.hws.edu/eck/cs124/downloads/javanotes9-linked.pdf14:12
jelknerthe one i just posted will work14:12
jelknerscooper, this is a "teachable moment"14:12
shmohamud+1 Jelkner. Important to notice that our directories wouldn't have it since we haven't downloaded or saved it yet14:12
scooper+1 shmohamud got it14:12
jelknerwhen you see a url that starts with "file:///" that is the file protocol14:12
jelknerit means its on your local machine14:13
jelkneryou can't give that someones else14:13
shmohamud+114:13
jelknersince it isn't publicly accessible14:13
jelknerok, since shmohamud has this one now, i'm going to grade a quiz i just gave14:15
shmohamud+114:15
jelknerscooper, see you tomorrow at 1:30 pm your time.14:15
jelknerand thank you, shmohamud!14:15
scooperOK Jeff14:15
jelknerACTION signs off for the day...14:15
*** jelkner has quit (Quit: Leaving)14:15
shmohamudHave you emailed the assignment Scooper?14:15
scooperYes14:17
scooperI just did but will like to try from now to tomorrow if I can't make it I will send you a mail asking for your assistant14:17
shmohamudGot it14:18
shmohamudConsider the following Java program. Describe what it does in response to specific operations of the mouse, and how it does it. (You are encouraged to run the program for yourself to test its behavior. Then read through the program carefully to understand how that behavior arises.)14:18
shmohamudimport java.awt.event.*;14:18
shmohamudimport javax.swing.*;14:18
shmohamudpublic class MouseWhisperer extends JFrame implements MouseListener {14:18
shmohamud    MouseWhisperer() {14:18
shmohamud        super("COME CLOSER");14:18
shmohamud        setSize(300,100);14:18
shmohamud        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);14:18
shmohamud        addMouseListener(this);14:18
shmohamud        setVisible(true);14:18
shmohamud    }14:18
shmohamud    public void mouseClicked(MouseEvent e) { setTitle("OUCH"); }14:18
shmohamud    public void mousePressed(MouseEvent e) { setTitle("LET GO"); }14:18
shmohamud    public void mouseReleased(MouseEvent e) { setTitle("WHEW"); }14:18
shmohamud    public void mouseEntered(MouseEvent e) { setTitle("I SEE YOU"); }14:18
shmohamud    public void mouseExited(MouseEvent e) { setTitle("COME CLOSER"); }14:18
shmohamud    public static void main(String[] args) { new MouseWhisperer(); }14:18
shmohamud}14:18
shmohamudYour Discussion should be at least 250 words in length, but not more than 750 words. Once you’ve completed your initial post, be sure to respond to the posts of at least 3 of your classmates.14:18
scooperyes that it's14:19
shmohamudIf you look at the first line14:19
shmohamudYou notice it's a class called MouseWhisperer which extends Jframe and implements MouseListener14:19
shmohamudDo you know the difference between extending a class and implementing a class in Java?14:20
scooperextending mean inheritance in java right14:20
shmohamudboth are keywords, and both are associated with inheritance14:21
shmohamudExtends means that the class which is being defined is derived from the base class using inheritance. Basically, used to extend the functionality of the parent class to the subclass.14:23
shmohamudImplements keyword means to implement an interface. An interface is a *special* type of class which only contains abstract methods14:24
shmohamudSo, in the first line we should understand that all the abstract methods from MouseListener are being implemented and all the functionality of JFrame are being inherited by this class MouseWhisperer14:25
shmohamud Does this make sense so far?14:25
scooperyes 14:26
scoopercan I ask a question14:27
shmohamudYes14:27
scooperMouseWhisperer is consider to be a parent class right? that is inherating from Jframe which is a subclass is that what you mean???14:28
shmohamudMouseWhisperer is the subcass/child class *because* it's extending and implementing other classes14:29
shmohamudDoes that make sense?14:29
scoopergot you now14:29
shmohamudCool. Whenever you're defining a new class it is the subclass since it's taking the functionality of the classes it's extending and implementing. 14:30
shmohamudAnd that's the basic thing we're doing here, we're *defining* a new class, MouseWhisperer.14:30
shmohamudShall we move to the next line?14:31
scooperyes14:31
shmohamudLet's google real quick what defining a class in Java is syntactically. Syntax is VERY important, the structure of the code tells you how to interpret the code.14:32
scooperA class in java is a blue print14:32
shmohamudAs you can see here, the second line also says MouseWhisperer, so I'm wondering, why is it named the same as the class? This is unusual practice in the language syntax I'm used to14:32
scooperyou mean the second line???14:33
shmohamudThat's a good way to think about a class! It's the same in most languages14:33
shmohamudYes, the second line: MouseWhisperer(){14:33
shmohamudWhy is it the same name as the class?14:33
scooperOK I this is a method in java14:34
shmohamudIt's certainly a *constructor* function because I notice the keyword *super* is used inside of it. But,14:34
shmohamudYes, it's a method, that's a good way to put it, but how come the method is named the same as the class?14:34
shmohamudIs that normal to do in Java?14:35
shmohamud// Create a Main class14:36
shmohamudpublic class Main {14:36
shmohamud  int x;  // Create a class attribute14:36
shmohamud  // Create a class constructor for the Main class14:36
shmohamud  public Main() {14:36
shmohamud    x = 5;  // Set the initial value for the class attribute x14:36
shmohamud  }14:36
shmohamud  public static void main(String[] args) {14:36
shmohamud    Main myObj = new Main(); // Create an object of class Main (This will call the constructor)14:36
shmohamud    System.out.println(myObj.x); // Print the value of x14:36
shmohamud  }14:36
shmohamud}14:36
shmohamud// Outputs 514:36
shmohamudThis is an example i found from a reputable website. It looks like it's normal practice to name the constructor as the class!14:36
scooperaccording to this search14:36
scooperes, It is allowed to define a method with the same name as that of a class. There is no compile-time or runtime error will occur. But this is not recommended as per coding standards in Java. Normally the constructor name and class name always the same in Java14:36
shmohamudThat makes sense, based on what I've just pasted it follows that practice. Sometimes the compiler won't throw an error, but it makes the code less readable to other developers if you don't follow the practices14:37
shmohamudSo, what's the second line, MouseWhisperer(){ doing in your own words?14:38
scooperI m on what to say here14:38
scooperNo I m lost on what to say here concerning what the second line is doing14:39
shmohamudDo you know what a constructor is in a class?14:40
shmohamudThat's totally understandable, this is complex stuff!14:40
shmohamudFor later: https://docs.oracle.com/javase/tutorial/uiswing/components/frame.html14:41
shmohamudFor later: https://docs.oracle.com/javase/8/docs/api/java/awt/event/MouseListener.html14:42
scooperOk thanks I will follow it later when we are done14:42
shmohamudThose are the classes that are being inherited and extended in the homework example. Do you want me to help explain the second line now?14:42
scooperyou mean "public void mouseCLicked???14:43
shmohamudThat's a class method. I'm talking about MouseWhisperer() {14:44
shmohamudFor later: https://docs.oracle.com/javase/tutorial/java/IandI/abstract.html14:45
shmohamudAll of the lines that start with "public void" are implementations of abstract methods that are coming from the MouseListener class (that we're implementing). Does this make sense for what the remaining code is doing?14:46
scoopergradually14:47
scooperbut it will take me few time to go through then.....14:48
scooperFrom my understanding is that anytime I see "public void being defined it indicate that it's a method that can be access anywhere in the program14:49
shmohamudThe third link is about abstract classes in Java. Understanding an abstract methods is not easy, but you can do it! Think about it like defining a method but leaving out certain details about how to implement it so that any subclass can implement the details themself. In this case, MouseListener is the interface with abstract methods that it has given to the subclass we define, MouseWhisperer14:50
shmohamudYou're correct, public void defines a public method in Java. But it goes a step deeper when we're inheriting from parent classes/interfaces.14:51
shmohamudSometimes, we can inherit what're called abstract methods, and those methods have the details implemented in the subclass. For example, the MouseListener interface defines the mouseClicked abstract method and we implement it in the MouseWhisperer class.14:52
shmohamudBased on your understanding now, how would you answer the homework question of describing the code in 250 words or less?14:53
scooperI will share with you later after I have analysis all those instruction you give before submitting.. hope that sound good14:55
shmohamud1.) We're defining a class called MouseWhisperer. It extends and implements JFrame and MouseListener. It has a constructor that gives it access to parent classes and sets the size, defaultCloseOperation, adds a Mouse Listener and sets visible to true. Then, it implements several abstract methods that occur when the mouse is clicked, pressed, released, entered and exited, which are all mouse events.Each even14:58
shmohamudt results in a different title being set in the JFrame, starting with "OUCH" and ending with "COME CLOSER." Finally it creates an instance of the MouseWhisperer class we define. 14:58
shmohamudThat's my abbreviated version, but I recommend looking at those links and understanding abstract classes, JFrame and MouseListener before answering the question. Also would be useful to maybe check out https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/event/package-summary.html15:00
shmohamudAlso javax.swing: https://docs.oracle.com/javase/8/docs/api/javax/swing/package-summary.html15:01
shmohamudI know this a lot, weeks worth of knowledge, so don't rush. I want to introduce you to the complexity involved, not overwhelm you. Are we good for today or do you have any more questions?15:01
scooperThanks shmohamud I need to follow those link you posted for additional understanding toward this topic...15:03
shmohamudYou're welcome. Has this session been useful?15:03
scooperVery useful15:03
shmohamudI'm glad to hear it :) Keep up the good work. Shall we meet Wednesday?15:04
scooperWhat is our schedule here for javascript 15:04
shmohamudI can meet most days, when are you free?15:04
scooperis it Monday to Friday or Monday Wednesday and Friday15:05
shmohamudI can meet everyday if you can meet everyday - I'll put in at least as much effort as you do.15:05
scooperI m available at your convenience time 15:05
shmohamudYou email me and I'll reach out ASAP. So, when's the next good time for you?15:06
shmohamudTomorrow same time?15:06
scooperI m here everyday monday to saturday15:06
shmohamudOk, so how's tomorrow same time?15:06
scooperYes15:06
shmohamudSounds good scooper :) any more questions before I log off?15:07
scooperNothing for now shmohamud... I appreciate the time......15:08
shmohamudSounds good, have a great rest of your day :) You're welcome, it's my pleasure.15:08
scooperOk thanks15:08
*** shmohamud has quit (Remote host closed the connection)15:08
*** scooper has quit (Quit: Leaving)15:08
*** shmohamud has quit (Remote host closed the connection)16:26
*** shmohamud has quit (Ping timeout: 480 seconds)18:35

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