IRC log of #novawebdev for Monday, 2023-09-25

*** tboimah has quit (Remote host closed the connection)08:08
*** dcammue has quit (Quit: Leaving)11:19
tboimahGood morning Mr. Cole12:59
ubuntouristHi13:00
ubuntouristtboimah, do you know if we're waiting for mulbah?13:00
tboimahlet give he some minute and see13:01
tboimahhim*13:01
ubuntouristOK13:01
tboimahIs there going to be any task for us to do today.13:02
ubuntouristGood question: I really should plan better and come up with a better curriculum.13:03
ubuntouristI'm thinking about going back to the end of the long movie I sent where I was trying to find13:04
ubuntouristall files ending in ".ly" and do something with them. It was a very practical example, because it13:04
tboimahyeah, it is going to be good when you give us problem to solve on our own13:04
ubuntouristreally was something that I needed to do for myself.13:04
ubuntouristBut on Friday I suggested that you should experiment with creating an environment variable in your 13:06
ubuntouristcomputer's /etc/skel/.profile and create a new user, and you should experiment with "diff"13:07
ubuntouristWere you able to do any of that?13:07
tboimahyeah, i experiment on that13:07
ubuntouristI think the plan from Jeff is for you to become systems administrators for the school, and the Jetro co-op will be13:09
ubuntouristpart of the school. So you will be systems administrators for the co-op too. Am I ccrrect?13:10
tboimahyes13:10
ubuntouristOK. So, think about what students and teachers might need to have on a computer. We will start with their needs13:11
ubuntouristfirst, because they are the "customers" that you will probably know the best. I do not know if Jetro Web Development has13:12
ubuntouristclients yet. Do you know if anyone is asking for web development from the co-op?13:12
tboimahno we have not yet have any clients13:13
tboimahfor now13:13
ubuntouristWhen I say "think about the needs of teachers and students" use your imagination: What subjects are being taught?13:14
ubuntouristThere may  be software that helps teach a particular subject. There may be free books to download and make available in shared 13:14
ubuntouristdirectories.13:15
ubuntouristYou will need to help choose the software, documents, etc. Install them, learn about configuring them, and how to share them,13:15
ubuntouristand keep them updated.13:16
ubuntouristUsing dpkg, apt, and apt-cache we learned aobut what sofrware is already installed, how to install new software, and how to search for sofftware.13:17
tboimahsure.13:18
ubuntouristUsing mkdir, chmod and chown, we learned about ownership and file permissions, and sharing documents and little programs we can write.13:19
ubuntouristNow we're looking at "configuring" the sofftware to behave a specific way, starting with configuring the Bash shell itself, 13:20
ubuntouristaltering ~/.profile, ~/.bashrc, and ~/.bash_aliases first, -- for our own personal use, and then the same files in /etc/skel/ to configure 13:21
ubuntouristnew users with changes that are beneficial to all users.13:22
ubuntouristReally, these tasks -- install and update software packages, configure software for system-wide use, and install documents and share data13:23
ubuntouristwill be 85% of your job.13:23
ubuntouristTroubleshooting and diagnosing problems will be the other 15%.13:24
ubuntouristThat last 15% is hard to teach: It means I have to break something and then have you try to find what I have broken and how13:24
ubuntouristto fix it.13:24
ubuntouristAlso, for troubleshooting and diagnosing you will both need "not be shy" about talking with complete strangers. I have been doing systems admin13:26
tboimahokay13:26
ubuntouristfor a long time, and I still join mailing lists and ask questions. And I am a registered user on several StackExchange sites where I ask questions.13:27
ubuntouristI do not know enough about your environment. Can you tell me approximately how many teachers and students, which age range and levels are taught, 13:29
ubuntouristand which subjects? Testing schedule? Hours of instruction? Time off / vacations?13:30
ubuntouristI'm trying to use my imagination: Maybe teachers and students will want a shared calendar for keeping track of teacher meetings and exam schedules.13:31
ubuntouristMaybe they will want mailing lists for different groups.13:31
ubuntouristMaybe a database to keep track of students enrolled or keep track of grading.13:32
ubuntouristStudents might need software that teaches typing or math skills and then quizzes them to see what they have learned.13:33
ubuntouristWhich languages, other than English, are common where you live?13:34
tboimahonly English13:34
tboimahsome time french but it is not really common13:35
ubuntouristOK. I asked, because Linux offers "language packs" and you can install them. So, you could install a French language pack,13:35
ubuntouristand configure a user's environment so that when they log in, everything is in French instead of English. All error messages, help and documentation13:36
ubuntouristfor those users would be in French. But, if it is not very common, then it will not be an advantage, unless some students are studying a foreign language.13:37
ubuntouristI'm thinking about where to go next today. I think I want to go back to the movie and README and TestData that I sent... 13:39
tboimah_Ok. it will not ba a problem13:40
tboimah_be*13:40
ubuntouristBut I'm trying to remember where we stopped. I think it was at the beginning of the section on the "for" loop.13:40
tboimah_yeah13:41
tboimah_Mulbah just call me he say he will not be able to come online today13:42
tboimah_said*13:42
ubuntouristReview: Can you summarize what you remember about the movie an README?13:42
tboimah_in the movie we locate all the file that have ly in it13:43
*** fkoikoi has quit (Ping timeout: 480 seconds)13:44
*** tboimah has quit (Ping timeout: 480 seconds)13:44
tboimah_and not stoping their all the file that was having the extension .ly at the end13:44
tboimah_and some file was in /etc/... but we was wanted the file that was in /home/kjcole, so we locate all file that was ending in .ly that was in the directory /home/kjcole13:46
ubuntouristPretty good so far. Just a little bit more filtering happened...13:47
tboimah_we also eliminate all file that was not create by use, we was only want file that was create by us so we use the egrep -v to do that13:48
ubuntouristExcellent! I THINK that is where we stopped...13:49
tboimah_sure13:49
ubuntouristI need a short bathroom break. When I come back we will use your tmate.13:51
ubuntouristACTION takes a break13:51
tboimah_okay13:51
ubuntouristACTION is back13:53
tboimah_ssh G6SVxJRrUFCQ9dfMuT25zpqKV@lon1.tmate.io13:54
ubuntouristOK we're good to continue.13:55
ubuntouristYou have learned some basic Python programming, right?13:57
tboimah_yeah, a little13:57
ubuntouristDid you do "for" loops with Python?13:57
ubuntourist(We will be using a "for" loop in Bash, and it is a similar idea.)13:58
tboimah_i am reading python because i learn that to become a good sysadimi you need to know python. yes13:58
ubuntouristThat is true: There are several good languages to know about. Especially Python and Perl, but Perl is harder to learn.14:00
ubuntouristFor now focus on both the Bash shell -- which is what I have been focusing on, and Python. Perl can come later..14:00
tboimah_okay14:01
ubuntouristSo, in your terminal, can you use Python right now and demonstrate a simple for loop?14:01
ubuntourist(You can make the program do whatever you want. Just include a for loop. Maybe a program that prints numbers from 0 to 10.)14:02
ubuntouristACTION is grabbing a glass of water. Be right back.14:04
ubuntouristACTION is back and waiting to see a for loop demonstation...14:05
ubuntouristNow just enter14:09
ubuntouristenter again14:09
ubuntouristOK. 14:09
tboimah_ACTION done14:10
ubuntourist(This is why you need to practice. Obviously, you knew what to do, but there were lots of small mistakes before you got14:10
ubuntouristall of the pieces working.)14:10
tboimah_yeah14:10
ubuntouristAnd when you sent me e-mail where you tried to use the Bash for loop and had many errors, it was14:11
ubuntouristthe same problem. Sometimes you had a starting quote without an ending quote14:11
ubuntouristand sometimes you included a space where there should not be a space.14:12
ubuntouristBut it was hard to see those mistakes. When I looked at your message, it took me several minutes to14:13
ubuntouristfigure out where you had added a space or missed a quotation mark.14:13
ubuntouristSo, exit python.14:13
ubuntouristIn Bash, for loops look like:14:14
ubuntouristfor variable in a list of values14:15
ubuntouristdo14:15
ubuntourist     first command variable14:15
ubuntourist    second command variable14:15
ubuntourist    third command variable14:16
ubuntouristdone14:16
ubuntouristThat's not very clear, but I hope you see the basic idea:14:16
tboimah_sure14:16
ubuntouristfor ... in ... ... ... ...14:16
ubuntouristdo14:16
ubuntourist    ls ...14:16
ubuntourist    most ...14:17
ubuntouristdone14:17
ubuntouristSo let's try a simple example:14:17
ubuntouristfor i in *14:17
ubuntouristdo14:17
ubuntourist    echo $i14:17
ubuntouristdone14:17
ubuntourist(Go ahead adn type those four lines.)14:18
tboimah_ACTION done14:19
ubuntourist"i" is just a variable name. When you use it in the "for" line it defines the variable14:19
ubuntouristthe same way as "for num in range(1, number)" defined "num".14:20
ubuntouristTo use it after you define it, you need to add the "$" to it --- "$i"14:20
ubuntouristThe "*" was the "wildcard" character.. So, Bash expanded it and made it into a list of all the files that it could see in the directory.14:21
ubuntourist"echo" is like the Python "print(...)"14:21
ubuntouristand the for loop needs a "do" which is like the ":" in Python, and a "done" to tell it wnen to finish.14:22
ubuntouristBut if you press the up-arrow only once right now, it will show you the whole program on one line. Do that.14:23
ubuntouristIt adds the ";" automatically. It will take time to determine when you want a ";" and when you do not.14:24
ubuntouristI prefer to enter the program in the way you typed it originally (and the way I showed above)14:25
ubuntouristbecause it is much clearer to read.14:25
ubuntouristYou can have more than one command in the for loop 14:26
ubuntouristfor filename in *14:26
ubuntouristdo14:26
ubuntourist      echo "The next line shows the filename"14:26
ubuntourist      echo $i14:27
ubuntouristdone14:27
ubuntourist(Ctrl-U to erase the current line and then type the five lines above)14:27
ubuntouristOops. There is a mistake in my code above. Can you see it? I made a typo.14:28
ubuntourist(Can you tell me what the mistake is?)14:29
tboimah__sorry my connection drop14:31
ubuntouristYep. I saw that. So, what is the last thing you saw me type in IRC?14:31
tboimah__for filename in *14:32
tboimah__that was the last thing i saw14:32
ubuntouristOK. 14:32
ubuntouristfor filename in *14:32
ubuntouristdo14:32
ubuntourist    echo "The next line will print a filename"14:33
ubuntourist    echo $i14:33
ubuntouristdone14:33
ubuntouristOoops. There is a mistake!14:33
ubuntouristI typed something wrong.14:33
ubuntouristCan you tell me what the mistake is above? There are two different ways to fix it.14:34
tboimah__yeah14:34
*** fkoikoi_ has quit (Ping timeout: 480 seconds)14:34
*** tboimah_ has quit (Ping timeout: 480 seconds)14:34
tboimah__firstly i am seeing to print statement which is echo "The next line will print a filename" and echo $i14:35
ubuntourist(By the way, the keyboard shortcut Ctrl-U will erase the current line in the terminal when you are at the command prompt.)14:39
ubuntouristSo, how would you fix the typing mistake I made? There are two different ways you could fix it.14:41
ubuntouristI am hoping you can tell me both ways.14:41
tboimah__hmmm i do not think so i just started learning python14:43
ubuntourist(Seventeen minutes left today.)14:43
ubuntouristWell, then I think i will stop for today. Read through today's IRC log and see if can get the answer. 14:44
tboimah__okay14:45
ubuntouristI think you will find the right answer if you review today's log.14:45
ubuntouristBoth you and mulbah have demonstrated good skills for understanding this. So, I am 14:45
ubuntouristfairly confident that you will see it when you review.14:46
tboimah__okay i will do that14:46
ubuntouristSend me a short e-mail when you see the mistake. And remember: There are two different ways14:46
ubuntouristto fix it. Explain briefly, both ways.14:47
ubuntouristBye for now!14:47
tboimah__okay14:47
tboimah__okay thanks for today14:47
*** ubuntourist has quit (Quit: Leaving)14:47
tboimah__bye!14:47
*** fkoikoi__ has quit (Ping timeout: 480 seconds)15:37
*** tboimah__ has quit (Ping timeout: 480 seconds)15:37
*** fkoikoi has quit (Ping timeout: 480 seconds)15:47
*** fkoikoi_ has quit (Quit: Leaving)16:35
*** mulbah has quit (Ping timeout: 480 seconds)17:59
*** tboimah has quit (Ping timeout: 480 seconds)22:11
*** tboimah has quit (Ping timeout: 480 seconds)22:30
*** tboimah_ has quit (Ping timeout: 480 seconds)22:34
*** shmohamud has quit (Remote host closed the connection)22:38
*** shmohamud has quit (Remote host closed the connection)22:41
*** tboimah has quit (Ping timeout: 480 seconds)22:47

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