CS 500 Fall 2022 and CS 500 Fall 2023: Difference between pages

From Computer Science at Indiana State University
(Difference between pages)
Jump to navigation Jump to search
m 1 revision imported
 
wiki_previous>Jkinne
m Jkinne moved page CS 500 to CS 500 Fall 2023
 
Line 3: Line 3:
It is assumed that students starting the course have passed the CS MS admissions process (see [[Graduate Admissions Interview]], in particular those taking the course should be proficient in some programming language). Those who are looking for an introductory programming course should consider [[CS 510]] instead.
It is assumed that students starting the course have passed the CS MS admissions process (see [[Graduate Admissions Interview]], in particular those taking the course should be proficient in some programming language). Those who are looking for an introductory programming course should consider [[CS 510]] instead.


This page contains the syllabus for CS 500 and is used to keep track of assignments, etc. as well for the most recent offering (fall 2022).
This page contains the syllabus for CS 500 and is used to keep track of assignments, etc. as well for the most recent offering (fall 2023).


=General Information=
=General Information=
Line 12: Line 12:
[https://kinnejeff.com Jeff Kinne], [http://mailto:jkinne@cs.indstate.edu jkinne@cs.indstate.edu] <br>
[https://kinnejeff.com Jeff Kinne], [http://mailto:jkinne@cs.indstate.edu jkinne@cs.indstate.edu] <br>
''Office:'' Root Hall A-142 and in Microsoft Teams, phone 812-237-2126 <br>
''Office:'' Root Hall A-142 and in Microsoft Teams, phone 812-237-2126 <br>
''Instructor Office Hours:'' MWF 10am-1pm, MTWRF 2-3pm
''Instructor Office Hours:'' MWF 10am-1pm, 2-2:45pm; TR 11-12:30pm, 1:30-2:45pm


'''Lecture, Exam'''
'''Lecture, Exam'''
Line 18: Line 18:
''Lecture:'' TR 9:30-10:45 in Root Hall A-017, over Zoom (link in Canvas, see below), and recorded<br>  
''Lecture:'' TR 9:30-10:45 in Root Hall A-017, over Zoom (link in Canvas, see below), and recorded<br>  
''Mid-term exam:'' TBA <br>  
''Mid-term exam:'' TBA <br>  
''Final exam:'' Tuesday, Dec 6, 10-11:50am <br>  
''Final exam:'' Thursday Dec 14, 10-11:50am <br>  
''Asynchronous students:'' For students who will be mostly participating asynchronously even though the course is being offered synchronously, you should pick a regular time each week to check in with the instructor. Make an appointment with the instructor during the first 2 weeks at this time to make sure you are on track. Each week at this time, write an email or Teams message to the instructor to let them know how things are going and if you have any questios.


'''Prerequisites''' - admission to the CS MS program or approval of instructor, should be a competent programmer in some programming language.
'''Prerequisites''' - admission to the CS MS program or approval of instructor, should be a competent programmer in some programming language. See section below on CS 500 versus CS 510 for helping to decide if you are ready to take this course, and you can contact the instructor as well.


'''CRN numbers''' - 53200 for the 001 face to face section, 52021 for the 301 online section
'''CRN numbers''' - 52238 for the 001 face to face section, 51536 for the 301 online section


'''Required text'''
'''Required text'''
* We will use the following free online sources.
We will use the following free online sources.
* For C programming - '''[http://cslibrary.stanford.edu/101/EssentialC.pdf Essential C]''' by Nick Parlante, [https://en.cppreference.com/w/c C Reference] at cppreference.com
* For C programming - '''[http://cslibrary.stanford.edu/101/EssentialC.pdf Essential C]''' by Nick Parlante, [https://en.cppreference.com/w/c C Reference] at cppreference.com
* For data structures and algorithms - '''[https://opendatastructures.org/ Open Data Stuctures]''' by Pat Morin, [http://jeffe.cs.illinois.edu/teaching/algorithms/ Algorithms] by Jeff Erickson
* For data structures and algorithms - '''[https://opendatastructures.org/ Open Data Stuctures]''' by Pat Morin, [http://jeffe.cs.illinois.edu/teaching/algorithms/ Algorithms] by Jeff Erickson
* For math content - [https://mfleck.cs.illinois.edu/building-blocks/index-sp2020.html Building Blocks for Theoretical Computer Science] by Margaret M. Fleck, [https://courses.csail.mit.edu/6.042/spring18/mcs.pdf Mathematics for Computer Science] by Eric Lehman, F Thomson Leighton, and Albert R Meyer
* For math content - [https://mfleck.cs.illinois.edu/building-blocks/index-sp2020.html Building Blocks for Theoretical Computer Science] by Margaret M. Fleck, [https://courses.csail.mit.edu/6.042/spring18/mcs.pdf Mathematics for Computer Science] by Eric Lehman, F Thomson Leighton, and Albert R Meyer
* Additional sources - as needed.
* Additional sources - as needed.
** [https://en.wikipedia.org/wiki/Master_theorem_(analysis_of_algorithms) Master Theorem]
** [https://en.wikipedia.org/wiki/Ncurses Ncurses] ([https://tldp.org/HOWTO/NCURSES-Programming-HOWTO/ HowTo]), [https://en.wikipedia.org/wiki/GLib GLib]
** Lists of C libraries to consider: [https://www.incredibuild.com/blog/top-13-c-libraries-to-watch-out-for 13 C libraries], [https://www.gnu.org/manual/blurbs.html GNU projects], [https://github.com/oz123/awesome-c Awesome C]


'''Class notes''' - Notes during class will mostly be kept in the '''[https://sycamoresindstate-my.sharepoint.com/:o:/g/personal/jeffrey_kinne_indstate_edu/EgVH_lYlo3pMqngNbvzxjBUBgjEgrbOPFUK7M0zA5vLybA?e=Da3CKu CS 500 OneNote notebook]''' and might be made available later as a PDF.  Note that you will need to authenticate with your ISU account to view the notebook.  Programs that we develop during lecture will be available on the CS server here: https://cs.indstate.edu/~cs500/.  If you are logged into one of the CS systems in a terminal, you can get to these files by doing: <code>cd ~cs500/public_html/</code>.
 
'''Class notes''' - Notes during class will mostly be kept in the '''[https://sycamoresindstate-my.sharepoint.com/personal/jeffrey_kinne_indstate_edu/Documents/Class%20Notebooks/CS%20500%20fall%202023%20-%20Programming%20Fundamentals CS 500 OneNote notebook] ([https://sycamoresindstate-my.sharepoint.com/:o:/g/personal/jeffrey_kinne_indstate_edu/EgVH_lYlo3pMqngNbvzxjBUBMfgWi4hPL9Z99Ry6OQ66tg?e=u1OYXm old notebook])''' and might be made available later as a PDF.  Note that you will need to authenticate with your ISU account to view the notebook.  Programs that we develop during lecture will be available on the CS server here: https://cs.indstate.edu/~cs500/.  If you are logged into one of the CS systems in a terminal, you can get to these files by doing: <code>cd ~cs500/public_html/</code>.


=Announcements/Assignments/Quizzes=
=Announcements/Assignments/Quizzes=
This section will be kept up to date with announcements of assigned reading, assignments, quizzes, etc.  This will be kept as a "stack" with the most recent at the top of the list.
This section will be kept up to date with information about assignments, quizzes, and exams.  This will be kept as a "stack" with the most recent at the top of the list.


==Assignments==
==Assignments==
===Exams===
====Exam 1====
* Oct 19 during class. Default testing window for those online is 9:30-10:50am. If that doesn't work for me, let me know your availability on Oct 19.
* Previous quizzes q1, q2, q3, q4 will be set to allow a retake during this time.
* New exam questions...
** Write some basic C programs, similar to things from HW or just basic stuff.
*** Example questions: read text file one line or character at a time and do some kind of processing, read a data file and do some processing, interaction with user and do some arithmetic or text/string processing, curses program to do something. Could have a program from class or HW and need to make some modifications to it.
** Questions about use of memory in C programs (stack, heap, data, limits on size for each, safe and secure programming).
** You should review the HW's, quizzes, and the Essential C text.
*** Will include some "trick" questions - evaluating expressions, what does code do that is a bit strange. E.g., <code>int x = 10; int z[3] = {11, 12, 13}; int *y = z; y[1] = 14; z++; y[1] = 15; z[1] = 16; (*y)++; y[1] = 17; (*z)++; z[1] = 18; y++; z = y; *y = 19;</code> Or, about size of variables, max/min values, overflow, ...
** You will be allowed to use anything except other people or AI's.
** Example questions are at the end of this page - https://cs.indstate.edu/wiki/index.php/CS_500#Midterm_Exam
** Reminder that first incidence of cheating/plagiarism is an F in the course.
** Total points will be set so the new exam questions add up to between 25-50% of the Course Content points so far. There will be at least one question that will count as Ingenuity points.
** People in the face to face section of the course need to be here physically for the test.
* Grading on the curses question... This is what I ended up doing...
** main exam question (out of 25)
<pre>0/25 does not compile or nothing handed in
-7 I am counting what you turned in late since your on time program did not work.
7/25 program runs but does not do anything (no moving anything, input from user does nothing).
-9 only one ball works.
-3 multiple balls work, but not up to 25.
-3 timing based on command-line argument does not work.
-3 program does not change based on keys pressed while it runs.
-2 balls don't bounce or wrap around.
-2 balls are not added in the locations indicated in the question.
-1 balls that are removed aren't removed all the way.</pre>
** ingenuity exam question (out of 3)
<pre>0/3 does not compile or nothing handed in
-.5 Up/down arrows do not work.
-.5 Speed not shown on screen.
-.5 No border around the screen.
-.5 Resizing window does not work.
-.5 No multiple colors.
-.5 Pause/unpause.</pre>
====Exam 2 (final exam)====
* Thursday, Dec 14, 10-11:50am, be here for face to face section
* Quizzes set to be able to be retaken: q9, q10, q11, q12
* The exam itself...
** Lecture/course content points worth about the same as the mid-term
** Do better on this one than the midterm and it will replace the midterm in the grades.
** Programs
*** A series of programs that build on each other, with hwcheck. You should review to get ready - C, h10, h11, h6e.
*** Around half of the exam 2 points
*** At least one ingenuity points program, maybe two
*** TBD whether there will be a take-home portion due by midnight on Dec 14.
** Canvas quiz/exam
*** Auto-graded questions on data structures and algorithms (some parts similar to q8, q12).
*** Maybe some additional questions on C and data structures.
*** Around half of the exam 2 points
*** Grading...
**** BST problems in canvas...
<pre>first_word: 6 points
longest_word_helper: 11 points
longest_word: 3 points
-1 Did not check for empty tree (NULL root).
-2 Using . where -> should have been used.
-2 using pointers that have not been checked for NULL.
-1 first_word - need to start from t->root, not p
-1 you are not returning the lower alphabetically when there is a tie.
-2 Incorrect C syntax (e.g., doing things that would work in Python but not in C, or doing things that wouldn’t work in any programming language).
-3 Did not use structures properly (e.g., trying to use word straight from inside of the tree or node, whereas you need to first go into a node, and then the data, and then the word).
-3 Incorrect logic on the first_word function, that does not seem to be on the right track. Note that this function needs to go to the left as long as it is possible, and return the left-most node.
-4 Incorrect logic for longest_word_helper function, that does not seem to be on the right track. Note that this function needs to recursively call itself on both the left and right, and then take the longest from among itself, the longest on the left, and longest on the right.
-4 for longest_word, did based on count rather than how long the word is.
-4 longest_word_helper - you were not supposed to change the prototypes for the functions. This problem is easily solved with a recursive function and does not require passing additional pointers.
In longest_word_helper, you could have used the fact that nodes to the left are <= in terms of alphabetic ordering (rather than doing additional strcmp’s, just take the one on the left if there is a tie).</pre>
**** programs on the server: counting as -10 points if a program was skipped, -5 if attempted but not correct.
===HW===
Planned assignments, with most recent on top.
* '''h15 some project''' maybe raspberry pi
* '''h14 sorting or data structure'''
* '''h13 data structure''' using Glib
* '''h12 CPP''' - something in C++, due Dec 16.
* '''h11''' from ODS and wikipedia - sorting, due Nov 29, only graded once.
* '''h10 data structure''' from ODS - BST, due Nov 22, only graded once.
* '''h9 some project''' (using ncurses probably)
* '''h8_fix_errors''' - on the CS server, when finished you also will do q7.
* '''h7 small C programs'''
* '''h6 small C programs''' - on the CS server.  Check out similar to h5_linux. Will be discussed in lecture. h6a due Aug 31. h6b due Sep 5. h6c due Sep 7. h6d due Sep14.
* '''h5_linux''' - on the CS server.  To check out the assignment, open a terminal on your computer, login to your cs500 account on the CS server, and run: <code>handin --checkout h5_linux</code><br> This will create a directory in your account with the files to complete for this assignment. Follow the instructions in the files.  Due by Aug 28 midnight.
* '''h4 - [[Text Editors]] Terminal''' - due TBD.
* '''h3 - [[Hello Unix Lab]]''' - due TBD.
* '''h2 - [[CS Server - Terminal]]''' - due Aug 24.
* '''h1 - [[CS Accounts and CS Lab Computers]]'''.  Note that your login information will be sent to you around the first day of classes, and you will need to work on h1 and h2 simultaneously.  Due Aug 24.


* File transfer between personal computer and server.  Instructions a bit later.
===Quizzes===
* Text editors on your personal computer.  Instructions coming a bit later.
Planned quizzes, with most recent on top.
* Install C on your personal computer.  Instructions coming a bit later.
* '''q?? git''' - commonly used syntax and features
* Quiz over [[Linux and CS Systems - Getting Started]] - commonly used commands, operators when running commands, etc.  When I get a chance to put it in.
* '''q12 - [https://indstate.instructure.com/courses/12565/quizzes/231869 big O asymptotics]''' - Nov 2
* Using the [[GNU Debugger]].  Also checking for memory leaks with [[Valgrind]]. 
* '''q11 - [https://indstate.instructure.com/courses/12565/quizzes/231882 miscellaneous math]''' - Nov 2
* '''[https://cs.indstate.edu/~cs500/assign/h6_ods_sorting/ h6_ods_sorting]''' - but you cannot start working on this until you have h5 complete.
* '''q10 - [https://indstate.instructure.com/courses/12565/quizzes/231880 math notation]''' - Nov 2
* '''[https://cs.indstate.edu/~cs500/assign/h5_ods_ch6/ h5_ods_ch6]'''
* '''q9 - [https://indstate.instructure.com/courses/12565/quizzes/231879 math and bases]''' - Nov 2. Note - may also have something like [https://indstate.instructure.com/courses/12565/quizzes/253728 this practice quiz].
* '''[https://cs.indstate.edu/~cs500/assign/h4_ods_ch5 h4_ods_ch5]''' - how you work on this is similar to h1, h2, h3.  Due Oct 25.
* '''q8 - [https://indstate.instructure.com/courses/12565/quizzes/239045 Data structures]''' - Oct 12.
* '''[https://cs.indstate.edu/~cs500/assign/h3_ods_ch2 h3_ods_ch2]''' - how you work on this is similar to h1 and h2.  Due Oct 1.
* '''q7 - fix errors''' - in Canvas, goes along with h8. Due Oct 3.  
* '''[https://cs.indstate.edu/~cs500/assign/h2_C/ h2_C]''' - how you work on this is similar to h1_C. Due Sept 28.
* '''q?? - GNU make''' - commonly used syntax and features
* '''C Basics Quizzes''' - you will have the quizzes listed under assignments at '''[[C Basics]]'''.  You can take the practice quizzes as many times as you like, but the quizzes in our canvas course just once. Note that the "fix errors" quiz involves a fair amount of debugging work, so get started on that one soon.  Due Sept 12.
* '''q?? - gcc and gdb''' - commonly used arguments and commands
* '''[https://cs.indstate.edu/~cs500/assign/h1_C/ h1_C]'''. Login to your cs500 account in the terminal, and use <code>handin --checkout h1_C</code> to checkout the assignment. When complete, run <code>submit</code> from within your <code>h1_C</code> directory to submit. See [[Handin]] and [[C Starting]].  See the grading.txt file at the link for comments on what people have done wrong. Due Sep 6.
* '''q4 - [https://indstate.instructure.com/courses/12565/quizzes/231870 C Errors]''' - that is a link to a practice quiz.   Sep 7, 10am.
* '''[[Text Editors]] Terminal''' assignment. Due Aug 26.
* '''q3 - [https://indstate.instructure.com/courses/12565/quizzes/231873 C Operators and expressions]''' - that is a link to a practice quiz. Sep 7, 10am.
* '''Hello unix lab'''.  Follow instructions in [[Hello Unix Lab]].  Due Aug 24.
* '''q2 - [https://indstate.instructure.com/courses/12565/quizzes/231872 C Keywords and Datatypes]''' - that is a link to a practice quiz. See also [[C Basics]] for quiz q2-q4 materialAug 31, 10am.
* Make sure your personal computer can connect to the CS server. Follow the directions in [[CS Server - Terminal]] and see Canvas for the submitting the assignment. Due Aug 19.
* '''q1 - [https://indstate.instructure.com/courses/12565/quizzes/244584 linux terminal]''' - that is a link to a practice quiz. Aug 31, 10am.
* Login to the CS systems.  See Canvas for the details, and [[CS Accounts and CS Lab Computers]] for more info.  Due Aug 19.
* '''q0 - [https://indstate.instructure.com/courses/12565/quizzes/252875 course policies]''' - that is a link to a practice quiz. Take the actual quiz in Canvas for our course. Must have 100% by Aug 28.


==Announcements==
==Announcements==
* 2022-12-07 - final exam (canvas quizzes), 10am-noon. To get to the quizzes, go to canvas, then Quizzes, then look for the quizzes that are labeled as "final exam" quizzes. These will become available to take at 10am, and they must be submitted by noon.  Reminder that you should start with any previous ones you did not have an 80% on yet (according to the letter grade email), and then take the new ones, and then take any old ones you did not have a 90% on yet. Good luck!
* For next term, see notes about next term for CS 203. Also, other things... Someone suggested a coding club.
* 2022-12-01 - finish running time of Prim's algorithm, talk about running time of shortest path algorithms. Final exam and grades - here is the plan - [[CS 500 final]]. Hoping to catch up on grading tomorrow and send out where everyone stands and more details on final exam.
* Jeff remember to - record, unmute, say something about me.
* 2022-11-29 - notes on letter grades and final exam for next time.
* What for the curses project? dungeon crawler, or flapy birds, or pacman.
* 2022-11-29 - applications of BFS and DFS, in particular why would any applications need DFS rather than BFS. Running time of BFS/DFS, depends on how we store the graph.
* Next hw assignments - C++ STL (word counts), C++ classes (chess), big O (see OneNote), hash tables, Glib, C++ Boost
* 2022-11-17 - graphs in ODS, last topic of the term probably.
* Dec 17 - last hw assignment (that is optional) due.
* 2022-11-17 - for h6, sticking with you need to have h4 and h5 complete before picking one of the algorithms to work on.
* Dec 14 - 10-11:50am - final exam, like the midterm.
* 2022-11-15 - notes on h4 grading, valgrind, gdb. Choices for h6.  Limits on comparison based sorting.
* Dec 11 - note, optional h12_cpp is on the server, due Dec 16.
* 2022-11-10 - see ~cs500/h6_ods_sorting/README for what the next assignment will be.  Also the lecture from today.
* Dec 7 - a bit more C++ if we have the time.
* 2022-11-03 - update on h5, heaps, sorting. Note - final exam will have an interview component that is required to be face to face for those who are in the face to face section.
* Dec 5 - talk about the final exam - see above, exam 2. And we looked at some parts of my solution for h10 BST.
* 2022-11-01 - starting to set up h5, play computer with heaps, starting sorting (BST sort, heap sort, slow sorts).
* Nov 30 - new assignment h6e with some smallish C programs. More C++ and another hw assignment (maybe - word counts, chess, a few easier C programs). h11 - whenever I start looking over the weekend, whatever is handed in is on time, and whatever is not is not.
* 2022-10-27 - next up is - heaps, sorting, HW on binary trees, using GDB and Valgrind (see links above).
* Nov 28 - h11 - note that the book has typos in the pseudocode for merge sort. h11 due - Nov Dec 1.
* 2022-10-27 - last chance for h2, h3 is before lecture on this day. We'll look at Jeff's solutions to h1, h2, h3.  We'll start with whatever you all ask about.
* Nov 28 - letter grades - as of now the cutoffs for letter grades are roughly... A - high 80s. B - low 70s. C+ - low 60s. Note that C is the lowest grade that is not F, so C+ is the lowest meaningful grade. Note also that B- is an important cutoff because you normally need to keep a B average overall. When I have to make a judgement call on a close case, I care more about what you know and can do now (at the end of the term) than the beginning of the term.
* 2022-10-25 - updates on the midterm, see the link from last time.
* Nov 28 - grades... exam1 grading - see what I did with the curses questions in the exam section above. h10 grading - how it worked, see GRADING and test cases. h6d grading - same, see GRADING and test cases. Not going to be graded - h6c, h7a.
* 2022-10-20 - outline for the midterm - [[CS 500 Midterm]].
* Nov 16 - grades up to date? No. Questions on h10, h11? Note - h10 and h11 - I am only going to look at them once, so get started, ask questions as needed, and get them done on time. New for today - c++, STL. Note - h10 due Nov 22. Maybe Jeff gets hwcheck working tomorrow.
* 2022-10-18 - upcoming plans - BST assignment, red black trees (assignment, for A level), heaps, sorting algorithms, graphs.
* Nov 14 - questions on h10? introducing h11 (due Nov 28).
* 2022-10-18 - midterm is likely to be next week, will have a part you do on the server, a part on canvas (thinking to have these parts open and available Friday and Saturday Oct 28-29), and an interview component (you pick a time from my schedule for the following week, Oct 30 - Nov 4, link is https://cs.indstate.edu/scheduler).  Probably I'll have information about this on Thursday.  Topics will be everything we have done up until now, focusing more on things that have already been graded (up through h3).
* Nov 9 - questions on h10? h10 due date - Nov 17. questions on courses? average-case running time of quick sort, lower bound for comparison-based sorting.
* 2022-10-18 - new hw assignment, h4_ods_ch5 - see above or on the server.
* Nov 7 - Assignment h10 on BST. Don't ask me about grades today.
* 2022-10-11 - today - finish chained hashing, start binary search tree.
* Nov 6 - the drop deadline, fwiw. Whatever I have graded by Monday 4pm, that's it, other old assignments will be left ungraded.
* 2022-10-11 - grading update - no update, still working on your h2 and h3's.
* Nov 2 - note that we'll likely have a quiz on sorting algorithms as well at some point. New OneNote notebook link above that I'll be using.
* 2022-10-11 - note that I am planning to keep going with code/algorithms for the data structures, and we will come back to do the analysis near the end of the term. Most of you are in CS 600, so your analysis skills hopefully are improving, and should be easier to do the analysis later.
* Nov 2 - quizzes open until midnight, 15 minutes each.
* 2022-10-06 - grading - will be looking at h2 again this weekend, and h3. Will be making up estimated letter grades this weekend as well, check the grading section below for how this will work. I'll send a mail to the class when this is ready. Midterm will be designed to confirm the skills you have already demonstrated, and give people a second chance to demonstrate skills that you have missed.
* Oct 31 - reminder that there will be a bunch of quizzes in Canvas on Thursday, to be taken any time, and 15 minutes each.
* 2022-10-6 - '''make sure to test your programs on more test cases than just the hwcheck ones''' - I will generally use basic test cases initially but then also include larger ones, more boundary cases, etc.
* Oct 26 - bunch of quizzes next week, will have them available any time Thursday so we don't take lecture time for them. Retake of data structures quiz - tomorrow, any time. Today - review of big O, asymptotic notation. Still catching up on grading, will let you all know when that's done.
* 2022-10-6 - '''note that <code>handin --hwcheck</code> does NOT submit your code''', so you need to still run <code>handin</code> without <code>--hwcheck</code> to submit your code. You can always run <code>handin</code> with no parameters to check when your code was last submitted.
* Oct 19 - midterm during lecture time, see above for information.
* 2022-10-04 - see grading.txt for the h2 assignment. There will be one for h3 soon as well. You will be getting emails with updates in the h1 grade, initial h2 grades, and initial h3 grades.  For h2, it will be like h1 - you need to fix anything that I mention or you won't get any credit for that problem.
* Oct 17 - Data structures quiz... BST question did have incorrect answer sometimes, has been fixed now on the practice quiz, and manually fixed ones that were graded wrong on the quiz. People that had formatting mistakes on some of the questions - it would take too long for me to go and check all of those. I will set the quiz so people can take it again, and make sure to get the formatting right (take the practice quiz a few times to make sure you are getting the questions correct to confirm you have the formatting right). Most people ran out of time, so do the practice quiz to make sure you'll finish fast enough, and I'll set it to allow 40 minutes. We'll do the retake next week.
* 2022-10-04 - more copying, this time from the internet on h2 and/or h3. If you are guilty of this, notify me immediately to try to get a lower penalty than F in the course.
* Oct 12 - after the midterm, bunch of other quizzes coming (see ones above listed for Oct 26), let's look at those. Try them out yourself and make note of any questions or things on them you haven't done or heard of before.
* 2022-09-29 - midterm coming soon.
* Oct 12 - Grading update - finishing h6b second round, next is h6c second round, let's say h6d is collected for the last time Monday 8am and only gets one round of grading, h7a collected Wednesday 8am and only gets one round of grading. "Midterm" exam - Oct 19, see above for outline. Quiz grades have been scaled, have set the Total grade in Canvas to calculate properly (20% professionalism, 20% ingenuity, 60% course content), and have put a letter grade estimate in Canvas.
* 2022-09-29 - note about academic misconduct policy - some people in this class had their first offence, and the second offence (in any course) will be an F for the course.  See https://cs.indstate.edu/wiki/index.php/Policies#Cheating.2C_Plagiarism.2C_and_Collaboration Note that anyone involved gets the same penalty - so don't share your code or solutions with others (you will get an F just the same as them).
* Oct 10 - no lecture.
* 2022-09-29 - next topic after linked lists will be- hash tables (sections 5.1-5.3 in ODS).
* Oct 5 - we'll look at h8 answers. Finishing the data structures quiz - hash table, binary heap.
* 2022-09-27 - today's topic - linked lists (sections 3.1-3.2 in ODS). There will be an assignment on this most likely.
* Oct 3 - on time deadline for h7a, h8. Questions? Today and next time - data structures. Data structures quiz Oct 12.
* 2022-09-27 - will grade h2 and h3 like h1, so make sure to - free memory, don't use strcpy/etc., have room for '\0', initialize variables, etc.
* Sep 28 - h8 fix errors due next time.
* 2022-09-27 - fyi putting in grades for C fix errors, should be done tonight. Same goes for looking at the h1 programs again.
* Sep 26 - h6c collected before class, let's look at Jeff's h6c. Note - no quiz this week. Question for online people - how often is there a buzzing/clicking sound like there was at the end of last lecture? Some said it was the first time.
* 2022-09-22 - no lecture today, there is a recording to watch - check your email.
* Sep 21 - questions on hw's, want to look at yours to make sure it looks right? A bit more curses stuff.
* 2022-09-21 - use Teams team for the course for help, if you like.
* Sep 19 - last chance for h6c is Thursday, I'll show mine on Thursday. No quizzes on Thursday.
* 2022-09-21 - new assignment h3_ods_ch2 is available, see above.
* Sep 19 - if you haven't gotten any feedback from me on h6c or h6d and have something handed in, ask me to take a look.
* 2022-09-20 - new assignment h2_C is available, see above.
* Sep 19 - grading notes, for all programs... Put in the right amount of comments (at the top of the file with your name, what the program is for; at least a line for each function of what it does; throughout as needed - it is better to put comments as your outline of what you will do, and then put the code in under each comment line). If user gives invalid input, keep asking until they give valid input.
* 2022-09-20 - no lecture this day, I will probably give you some videos instead and will send out an email about that.
* Sep 19 - curses programs - will do a few smaller ones, then maybe a bigger project. Starting off with h7a.
* 2022-09-15 - reminder to read through Essential C again.  You will pick up bits and pieces we haven't talked about in lecture, and clarify things that may not be clear.
* Sep 14 - h6d - if you want to handle bad input, better to use getline and sscanf, but my test cases do not test that right now.
* 2022-09-15 - See grading.txt at https://cs.indstate.edu/~cs500/assign/h1_C/ for comments on what people have done wrong. Everyone should check all of the comments and make sure to follow all the recommendations. '''Note that you need to get your programs completely correct to get a "pass" rating on a problem. So, make corrections and resubmit. I will look at them again next week. Ask about anything you are not sure of.'''
* Sep 14 - any questions on h6c, h6d? My h6b. curses.
* 2022-09015 - h1_C reverse - hwcheck should work for this one now, so let's say you need your reverse to pass with hwcheck on this one too.
* Sep 12 - h6d assigned - demo. My solution for h6a. h6b last chance is by class on Thursday - I will show my solution Thursday in class. No quizzes this Thursday, just lecture.
* 2022-09-15 - In h1_C, I have noticed some programs that either (a) don't give a citation to online resources being used, or (b) are clearly being worked on by multiple people in the class together (again, without giving a citation). Either is plagiarism.  Anyone who used any online sources for h1_C, worked with someone else in the class, or got significant help from anyone (even if it was one of the GAs) should edit their files to include citations and explanation of anyone they got help from or worked with, and resubmit your files. Do this today. I will then check files again tomorrow. Citation/explanation should go at the top of each file. In terms of needing to cite internet sources, you do not need to if it is general information about how to use a given C function; you do need to cite anything that talks about solving the particular problem.
* Sep 8 - there is hwcheck available for h6c now.
* 2022-09-13 - no lecture today.
* Sep 8 - GA help - for extra help you can ask GA Ben Johnson to take a look at things. You can email cs500@cs.indstate.edu (which forwards to Ben) or message him on Teams (make sure to get the right Ben Johnson, bjohnson114@sycamores.indstate.edu).
* 2022-09-08 - aside back into some more examples in C.
* Sep 7 - a closer look at h6b, how C strings and arrays work in C, * and &, C is pass by value.
* 2022-09-08 - ODS sections we will be doing in lecture (for now) - chapter 1 (Intro), 2.1-2.4 (array stack and queue), 3.1-3.2 (linked list stack and queue), 5.1-5.3 (hash table), 6.1-6.2 (binary tree), 7.1-7.2 (randomized binary tree). After that, TBD which parts of ODS we'll continue with.
* Sep 7 - h6b... Make sure your program does not have any compile warnings, let's look at some that people are getting. If you get a seg fault, how to figure that out - let's look at an example - volunteers?
* 2022-09-08 - h1_C - programs are looking better, but let's look again at whether your programs are exactly matching mine.  First, run yours and mine on a few different inputs to see if it looks like they are matching.  Second, run your program through the handin hwcheck:
* Sep 7 - reminder to read the Essential C text. q3 and q4 today. Questions on h6c? h6d delayed, will release on Tuesday.
<pre>
* Sep 5 - h6b has hwcheck now. h6c released.
cd ~/h1_C
* Sep 5 - q1 and q2 - set to be able to retake at any time today. quizzes for Thursday - q3, q4. Note that the links above are practice quizzes, and work if either (a) you open in an incognito or private window, or (b) join the canvas course that has those quizzes.
make # programs need to be compiled before running hwcheck
* Sep 5 - we'll take attendance at 9:30 from now on. Quizzes - people in the face to face section need to be in the room, I'll check next time. If you come on the zoom meeting just for a short time I won't count that as attending.
check
* Sep 1 - Jeff does initial grading of h6a.
# or
* Aug 31 - quizzes at 10am. h6a - reminder on checking out, handing in, using hwcheck. Pointers/memory and introducing h6b.
cd ~
* Aug 29 - h6a - the for_loop.c program I sent last night, is available now to check out with handin, due Thursday. How to use hwcheck to check. Reminder to use good programming style, and safe & secure code. Quizzes for Thursday - q1, q2.
handin --hwcheck h1_C
* Aug 29 - the following are all past due - h1, h2, h5, q0. If you don't have q0 100% tonight you get an F. h1, h2, h5 - will be 0s if not completed today.
# if you want to save the result into a file,
* Aug 24 - h1, h2 are due tonight, so get them done. q0 due Monday with 100%, so get that done, ask me if there are any that you can't figure out what the right answer is.
handin --hwcheck h1_C > hwcheck.txt
* Aug 24 - start reading Essential C (link in General Information above).
</pre>
* Aug 24 - announce when we'll be doing quizzes - Thursdays 10-10:30am looks good. A look at quizzes q2-q4. Introducing C, gcc, gdb ([[GNU Debugger]]), nano/vim/emacs ([[Text Editors]]), handin ([[Handin]]), make ([[Make]]).
And then a printout shows if there were any test inputs where your program had different output than mine.
* Aug 22 - results from grading most of the first day quizzes (should you stay in CS 500 or switch to CS 510)... Are you ready for CS 500, my best guess from looking at the quizzes: 27% yes, 22% probably, 8% borderline case, 11% no (you should switch to CS 510), 19% I cannot tell because you did not follow the instructions (not a good sign...), 14% either did not take the quiz or did not properly attach submission to your email. See email for more information and context.
* 2022-09-07 - an easy C assignment as well to practice?
* Aug 22 - when we will have quizzes - I will poll the online students to pick a time that hopefully works for all of them. Check email today or tonight.
* 2022-09-06 - Jeff - recreate bigger_pal.txt.
* Aug 22 - logins to the CS server for this course will be sent out to you tonight.
* 2022-09-06 - see C Basics Quizzes above.  I'll put them in our Canvas course at some point, but you can check out the practice quizzes already. For the fixing errors quiz, you can also check out the files with handin (<code>handin --checkout C_fix_errors</code>), but will need to do the Canvas quiz as well when it's released.
* Aug 22 - assignments and quizzes - see due dates above.
* 2022-09-06 - h1_C grading - your program should have the exact same output as mine on all inputs, and it needs to be handed in on the system.
* Aug 22 - reading assignment - quizzes q0, q1, assignments h1, h2, h3, h4, h5 and linked pages from those.
* 2022-09-01 - h1_C reverse.c - there was an issue with running: echo -e -n "1\n2\n3" | ./reverse.o that would happen sometimes and other times not.  A -e was showing up in the printout.  It depends on which shell you are using.  If using tcsh, it has a builtin echo command that doesn't have the -e option, so that just gets printed (what echo does in general). If using bash, it uses a different version of echo that takes -e as an argument (to tell it to interpret \n as newline). Just need to keep in mind when testing the program.
* Aug 22 - attendance for when you are not in the room... If joining by zoom, you need to post a comment in the chat to say if you have any questions about the current assignments, reading, the last lecture, etc. If watching the lecture, you need to watch it before the next lecture and send me a message by Teams or email saying if you have any questions or want any more examples about a particular topic. So, if not in the room, you have to participate at least as much as "no questions from me right now" to get credit for attendance. Also, if joining by zoom, set a profile picture so that I will see a picture of you in the list of zoom participants (like mine); or leave your video one - in either case, so I can associate a face with the name.
* 2022-09-01 - h1_C updates. Note that strncpy_ call in strings.c should have been with max_length 99.  And swap.c copying strings should behave like strncpy in terms of the length.  reverse.c - don't worry about the \n or not at the end of the file. Jeff - fix "./jeff_calc.o 3 "*"" and \n on the reverse.c.  In general - our programs should not crash.
* Aug 22 - first day of class - syllabus, how the course works, q0, h1, h2, "should you be in this course" quiz (ungraded).  
* 2022-09-01 - for Open Data Structures, the html version is missing some of the figures, so check the pdf version if something seems to be missing or improperly formatted.
* Aug 22 - note that in college you need to - go to class, do assigned reading, start assignments promptly, ask if you have questions when you don't understand, study for quizzes and exams, try to get A's in your major.
* 2022-08-30 - h1_C updates.  reverse - what to do if input does not end in a newline - see lecture and reverse.c  strcmp - what to return (just +/- 1 or 0, or other +/- values based on the difference between characters) - just +/- 1 or 0, like jeff_strings.o does. time_scale.c - change the (if argc < 2) to (if argc < 3).
* Why C? Various reasons, but this is a good summary - [https://www.toptal.com/c/after-all-these-years-the-world-is-still-powered-by-c-programming After All These Years, the World is Still Powered by C Programming]
* 2022-08-30 - reading assignment - Open Data Structures chapters 1 and 2 (introduction, array-based lists).
* Previous semesters of this course - [[CS 500 Fall 2022]], [[CS 500 Spring 2023]]
* 2022-08-30 - reading assignment - the rest of Essential C.
* 2022-08-28 - for homework programs, if you can't figure it out and want to ask me, then hand it in so I can look at the program as well, and send me a screenshot of what you are seeing. FYI in terms of when I tend to reply to messages - starting some time around 7am depending on the day, up until about 4pm (with gaps for classes, meetings, etc.), then again roughly 8-10pm.  Weekends I will often have longer periods of not checking messages but try to at least a few times per day.
* 2022-08-26 - reading assignment - [[Linux and CS Systems - Getting Started]] and wiki pages linked from there (in particular the ones about using the terminal).
* 2022-08-18 - reading/viewing assignment - 2's complement.
* 2022-08-17 - reading assignment - Essential C introduction and sections 1,2,3.
* 2022-08-06 - creation of this site, including the preliminary list of topics, outcomes, achievements, etc.


=Course Description and Content=
=Course Description and Content=
Line 157: Line 241:
* Algorithms - understanding of basic algorithms, arguments for correctness and efficiency, can use the right algorithms to solve problems efficiently.
* Algorithms - understanding of basic algorithms, arguments for correctness and efficiency, can use the right algorithms to solve problems efficiently.


=Grading and Assignments=
=Course Policies, Grading=
 
See [[Jeff Kinne Course Policies]] for course policies and how your overall letter grade will be determined.
We will be trying out what I am calling "achievements-based" grading. There are a series of skills, knowledge, and experiences that I want you to achieve.  Your final letter grades will be based strictly on which of these you have completed.  For each achievement, you can achieve the rating of incomplete, pass-, pass, pass+.  The following will be our starting point for how letter grades will be assigned. I will reevaluate this throughout the term to make sure we are on track. I will also be setting the standards for pass-, pass, and pass+ for each of the achievements as we get to them in the course.
 
'''Letter grades as of 10/5/2022'''
To assign estimated letter grades as of 10/5/2022, I am doing the following.
* C - requires pass rating on all of these
** CS class account, CS server terminal, hello unix lab, text editors
** C programming - correct on at least 3 C programming problems so far
** C programming - pass on at least one of the C quizzes
* B - in addition, requires pass rating on all but one of the these
** C programming - pass on at least two of the C quizzes (keywords & data types, conditional logic, fixing errors)
** C programming - pass on loops at least half of the following - (calc.c, sum.c, or count.c), conditional logic (time_scale.c), pass by reference (swap.c), strings (strings.c), arrays (reverse.c), scanning input (user_info.c)
* A - in addition, requires pass rating on all of these
** C programming - pass on all of the C quizzes
** C programming - pass on all of the categories listed under the B grade


'''C - lowest passing grade in a grad course'''
=Prerequisite, CS 500 versus CS 510=
* Pass or higher achievement for ''all'' of the following
The prerequisite for CS 500 is admission to the CS MS program or permission of instructor. You should be a competent programmer in some programming language and have studied data structures and algorithms as a part of some course in the past. If your background in programming and CS is too weak, you should start in CS 510 Intro to Programming and Computer Science rather than CS 500. Also note that CS 500 uses the C programming language, while CS 510 uses the python programming language. CS 510 is meant for those with little or no background in CS, and for those outside of CS wanting to take a CS course. CS 510 is also meant to help students with a weak CS background get ready to pass the CS MS admissions interview and to prepare for CS 500. To assist in deciding whether to start in CS 500 or CS 510, those enrolled in CS 500 will take a quiz the first day of class; this will not be for a grade but just to decide whether to start in CS 510 or not. The quiz will be something like the following.
* System setup, git, linux, bash, make, apache, math background, personal computer
* C programming basics
* Data structures basic understanding - arrays (stack and queue), linked lists (stack and queue), binary search trees, hash tables
* Data structures programming - can write the code for methods for ''some'' of the above
* Data structures programming - can use ''some'' of the above data structures to solve problems
* Sorting algorithms - basic understanding of at least one slow and at least one efficient sorting algorithm
* Sorting algorithms - can write the code for at least one sorting algorithm
* Algorithm techniques - basic understanding of ''at least one'' greedy, divide and conquer, brute force, and dynamic programming algorithm.
* Asymptotic resource usage - basic understanding, can use Jeff's rules of thumb in simplifying expressions


'''B - satisfactory'''
* Quiz to be taken closed notes, no internet, on your own, on paper, and should be complete in about 30 minutes (or 50, we'll see whether 30 minutes seems to be enough or not). Note that programming questions ask for a complete working program in whatever programming language you want (most commonly Python, C, C++, Java, Javascript, C#, or Swift). "Passing" will be getting at least one of the programming questions completely correct (maybe just a typo or two) and at least one of the data structures / algorithms questions completely correct. That is the minimum standard to be considered ready for this course; if you cannot get even one of the programming problems correct then you definitely are not ready for this course (CS 500 does not teach basic programming and debugging concepts and skills, you should have those already).
* In addition to the above...
* '''Programming question, nested loops and logic''': a question where the correct program will use some nesting of loops and conditional logic, and where a correct solution can be done with 10-20 lines of code. 
* Data structures programming - can write the code for methods for ''most'' of the "C grade" basic data structures
** For example: Write a program that asks the user for a word and prints the word out one letter per line. The program should ask for another word, and print the word one letter per line; the program should keep asking until the user types "quit". You can assume the words are all at most 99 characters.
* Data structures programming - can use ''most'' of the "C grade" basic data structures to solve problems
* '''Programming question, use recursion''': a question asking for a recursive solution to some basic problem, where a correct solution can be done with 10-20 lines of code.
* Data structures basic understanding - skip list, red black trees, heap, B tree
** For example: Write a recursive function that computes the product of integers between two values. The function should not use any loops. Your program should ask the user for two integers, call your function to get the product between them, and print the result. For example, if the integers entered were 4 and 8, the program would print 6720. The program should contain no loops. If the user enters the numbers in reverse order (e.g., 10 5) then the result should be 0.
* Sorting algorithms - can write the code for at least one slow and at least one efficient sorting algorithm
* '''Programming question, design functions''': a question asking to create and code a set of functions to solve a given problem, where the best solution will have a few functions and take 10-20 lines total.
* Sorting algorithms - basic understanding of multiple slow and multiple efficient sorting algorithms
** For example: Write a program that keeps an array of strings that are meant to be times that an alarm is set to go off. The program will give the user the following choices: (a) print all alarms, (b) add new alarm, (c) select alarm and remove it. Your program should make use of a number of functions that you write for for keeping track of the alarms. You can assume there will be at most 10 alarms stored at any given time, and that each alarm string is at most 99 characters. ''Note - this program gets to be a bit long, so you would only need to give the code for the functions, and would not need to give the main program that gets input from the user and calls the appropriate function.''
* Graph algorithms - basic understanding of the adjacency lists, adjacency matrices, graph algorithms DFS and BFS
* '''Data structures question, choose the best''': a question where you are asked which data structure is best for a given task. You will choose between unsorted array, sorted array, doubly linked list, singly linked list, stack, queue, balanced binary search tree, non-balancing binary search tree, and hash table.
* Asymptotic resource usage - can apply the precise definitions of big-O, little-o, big-Omega, little-omega, big-Theta to simplify and compare expressions; can apply the master theorem ''or'' recursion tree methods to recursive resource formulae
** For example: Suppose you need a data structure to keep track of all facebook accounts. You need to be able to add, remove, and lookup. You will do a bulk add of all current accounts (assume there are 10 billion), and then will need to do around 1 million of each type of operation per day. Choose a data structure to keep track of this information, and justify your choice. You can let n=10,000,000,000 and m=1,000,000 so you can discuss the big-O asymptotic running times.
 
* '''Data structures question, running time''': a question where you are given some pseudocode using one of the data structures above, or given a particular data structure to analyse, and you are asked to analyse the running time.
'''A - good/excellent'''
** For example: Consider the same scenario as above (keeping track of facebook accounts). Suppose you use an ordered array to keep track of the accounts. Letting n=10,000,000,000 and m=1,000,000, what is the big-O asymptotic running time of doing the bulk add of 10 billion accounts, and what is the big-O asymptotic running time of doing the 1,000,000 lookups each day? Justify your answers.
* In addition to the above...
* Pass+ rating on most of the above
* Pass or higher achievement for ''all'' of the following
* Graph algorithms - can write the code for some of the "B level" graph algorithms
* Graph algorithms - basic understanding of an MST algorithm and shortest path algorithm
* Asymptotic resource usage - can apply the master theorem ''and'' recursion tree methods to recursive resource formulae
* Integer algorithms - basic understanding of faster-than-obvious multiplication and exponentiation algorithms
* Algorithm techniques - can write code for at least one algorithm for each of the "C level" algorithm techniques
* Algorithm techniques - basic understanding of ''multiple'' algorithms for each of the "C level" algorithm techniques
* Complexity theory - basic understanding of the definitions of L, P, NP, PSPACE, EXP and a few canonical problems in each
 
Achievements can be earned based on quizzes, assignments, in-class work, and exams. Rather than having numerical scores for these, I will use them to mark off your achievements. Note that achievements can be "lost" if you demonstrate a skill early in the term and then demonstrate a lack of the skill later in the term. I expect this will not normally be the case, but I will continue to evaluate you based on all of the skills throughout the term.
 
'''Late Work''' -
Assignments will generally be available to still handin for around a week after their due date.  Once the solutions are posted and discussed, late submissions will no longer be graded.  Quizzes will normally need to be taken on the day they are due, or perhaps within a few days of when they are due. Solutions will normally be discussed or posted within a week of their due date. Not accepting late work that is more than about a week old is in part because it takes much longer to grade quizzes/assignments that are no longer super fresh in the instructor's head, and in part to try to keep everyone in the class working on the same material.


=Assignments=
'''Start Assignments and Quiz Studying Early''' -  
'''Start Assignments and Quiz Studying Early''' -  
I suggest attempting an assignment the day it is given, or the day after, so that if you have a problem you can ask early. If you continue to have problems in trying to complete the assignment, you will have time to ask again. Many of the assignments require thought and problem solving, which takes "time on the calendar" not just "time on the clock". By that I mean that spending an hour on 3 consecutive days is likely to be more productive than trying to spend 3 hours at once on the assignment.
I suggest attempting an assignment the day it is given, or the day after, so that if you have a problem you can ask early. If you continue to have problems in trying to complete the assignment, you will have time to ask again. Many of the assignments require thought and problem solving, which takes "time on the calendar" not just "time on the clock". By that I mean that spending an hour on 3 consecutive days is likely to be more productive than trying to spend 3 hours at once on the assignment.
Line 223: Line 270:
Note - please find a way to spend enough time on this class (the investment will pay off in terms of skills, being able to get a job, etc.).
Note - please find a way to spend enough time on this class (the investment will pay off in terms of skills, being able to get a job, etc.).


'''Grade Meanings''' -
=Grade Meanings=
The letter grades are intended to have the following rough meaning.  The list of achievements needed for each was chosen with this in mind.
Letter grades in this course are intended to have the following rough meaning.   
* A+/A: You understand everything and probably could teach the course yourself.
* A+/A: You understand everything and probably could teach the course yourself.
* B+/A-: You understand nearly everything, and should be all set to use this knowledge in other courses or in a job.
* B+/A-: You understand nearly everything, and should be all set to use this knowledge in other courses or in a job.
Line 230: Line 277:
* D-/D+/C-: You did put some effort in, and understand many things at a high level, but you haven't mastered the details well enough to be able to use this knowledge in the future.  '''Note that the lowest grade for grad courses is a C, so if you fall in the range below C then your letter grade will be an F.'''
* D-/D+/C-: You did put some effort in, and understand many things at a high level, but you haven't mastered the details well enough to be able to use this knowledge in the future.  '''Note that the lowest grade for grad courses is a C, so if you fall in the range below C then your letter grade will be an F.'''
* F: Normally, students that get an F simply stopped doing the required work at some point.
* F: Normally, students that get an F simply stopped doing the required work at some point.
The default assignment of letter grades will initially be the usual one (90 is an A-, 80 is a B-, etc.), but these cutoffs will be adjusted down (in your favor). I will adjust these cutoffs and let you know where you stand periodically throughout the term.


=CS-Specific Items=
=CS-Specific Items=
Line 247: Line 295:


==Academic Integrity==
==Academic Integrity==
'''See also [[Jeff Kinne Course Policies]]''' for additional information for more specifics about how I am handling these things for this course.
Please follow these guidelines to avoid problems with academic misconduct in this course:
Please follow these guidelines to avoid problems with academic misconduct in this course:


Line 261: Line 311:


==Office hours (using Teams)==
==Office hours (using Teams)==
Office hours will be through Microsoft Teams by default. If you would like to meet in person you should reserve an appointment using http://cs.indstate.edu/scheduler to reserve an in person meeting with Jeff Kinne. I am normally in my office during my listed office hours, but by making an appointment you can be more certain. For meeting through Teams, you should start Teams in your browser or start the application. You should be logged in using your ISU credentials. Once you have Teams open you can message me to ask me questions or to ask to talk. We can use Teams to message (better than emailing back and forth repeatedly if you have questions about something that you just want to write about) or to talk and share screens (e.g., to take a look at your code). I normally have Teams open on my computer all of the time, including during my office hours. During my office hours I will normally reply right away; at other times I will reply when I get a chance.
Office hours will be through Microsoft Teams by default. If you would like to meet in person you should reserve an appointment using http://cs.indstate.edu/jkinne-meeting to reserve an in person meeting with Jeff Kinne. I am normally in my office during my listed office hours, but by making an appointment you can be more certain. For meeting through Teams, you should start Teams in your browser or start the application. You should be logged in using your ISU credentials. Once you have Teams open you can message me to ask me questions or to ask to talk. We can use Teams to message (better than emailing back and forth repeatedly if you have questions about something that you just want to write about) or to talk and share screens (e.g., to take a look at your code). I normally have Teams open on my computer all of the time, including during my office hours. During my office hours I will normally reply right away; at other times I will reply when I get a chance.


==Canvas==
==Canvas==
Line 276: Line 326:


==Participating online==
==Participating online==
If you are participating online, please see the information at https://www.indstate.edu/services/student-success/cfss about participating in online courses. You are expected to either join lectures live through Zoom or watch the recordings once they are available. You will complete assignments, quizzes, and exams on the same schedule as the rest of the class. For quizzes and exams you will normally have a 24 hour period during which to take the quiz/exam (note that different students will have slightly different questions and any communication between students about quiz/exam content is academic misconduct).
If you are participating online, please see the information at https://www.indstate.edu/services/student-success/cfss about participating in online courses. You are expected to either join lectures live through Zoom or watch the recordings once they are available. You will complete assignments, quizzes, and exams on the same schedule as the rest of the class.  


So also the General Information section at the top of this page for setting up a normal check-in time with the instructor.
For quizzes, I will try to find a time each week that works for everyone to take the quizzes at the same time. The mid-term will be scheduled when it gets closer.
 
For attendance when you are not in the room... If joining by zoom, you need to post a comment in the chat to say if you have any questions about the current assignments, reading, the last lecture, etc. If watching the lecture later, you need to watch it before the next lecture and send me a message by Teams or email saying if you have any questions or want any more examples about a particular topic. So, if not in the room, you have to participate at least as much as "no questions from me right now" to get credit for attendance. Also, if joining by zoom, please set a profile picture so that I will see a picture of you in the list of zoom participants (like mine); or leave your video on - in either case, so I can associate a face with the name; if you have a good reason to not do either of these let me know.


=ISU Required Syllabus Items=
=ISU Required Syllabus Items=
Line 318: Line 370:
''Victim Advocate:'' (812) 237-3829; HMSU 7th Floor <br>  
''Victim Advocate:'' (812) 237-3829; HMSU 7th Floor <br>  
''UAP Clinic/ISU Health Center:'' (812) 237-3883; 567 N. 5th Street
''UAP Clinic/ISU Health Center:'' (812) 237-3883; 567 N. 5th Street
=Assignments and Exams=
==Midterm Exam==
Some sample questions...
* Which part of memory would each of the arrays be contained in?
<pre>
int array1[100];
int main(int argc, char *argv[]) {
  int array2[100];
  int *array3 = (int *)malloc(sizeof(int)*100);
  return 0;
}
</pre>
* Which part of memory (stack, data/globals, or heap) is most restricted in how large it can be, and what is a rough estimate?
* Which part of memory contains the call stack (to keep track of which functions are currently running)?
* Which part of memory contains local variables?
* Give C code to demonstrate the error of a buffer overflow for an array declared in BLANK.
* Give C code to demonstrate the error of using an uninitialized heap pointer.
* Give C code to demonstrate other errors.
* Give C code to declare an array of type BLANK that is contained in BLANK part of memory.
* Give C code to define a structure that is called point_t and contains: double precision floating point values for x, y, and z coordinates, and a label that is a C string.
* Give C code for a function prototype for a function named BLANK that has BLANK parameters and returns BLANK.
* Give C code for a function that takes an array of BLANK and does BLANK to the array.
* Give C code for a function that takes pointers to type BLANK and does BLANK to them.
* Take h6a/for_loop.c and change it so it runs the is_prime function on any command-line arguments.
* (Related to h6b) - Give a complete C program to take a filename as command-line argument, take an additional character as command-line argument, read the entire file and output how many times the character occurs in the file. Note - your program should work on any type of file (does not need to be text).
* (Related to h6c) - Give a complete C program to read a file and print it out with the lines in reverse order. If a command-line argument is given, it is the filename to open; if no argument is given, the program should use stdin (read until EOF, store the lines, then print them in reverse order). You can assume the file will be at most 1000 lines; your program should work regardless of how long the lines will be.
* (Related to h6d) - Give a complete C program to take a hex command-line argument, print how many bits are in the binary representation, and print the hex representation that would result from flipping all of the bits.
* (Related to h7a) - Give a complete C program that is a curses program that prints an additional '.' character each second, pauses/unpauses this if the 'p' key is pressed, and stops if the 'q' key is pressed.

Revision as of 13:22, 16 January 2024

CS 500 Fundamentals of Programming is taken by CS MS students during their first term in the MS program. The main outcomes of the course are proficiency in C programming and data structures and algorithms.

It is assumed that students starting the course have passed the CS MS admissions process (see Graduate Admissions Interview, in particular those taking the course should be proficient in some programming language). Those who are looking for an introductory programming course should consider CS 510 instead.

This page contains the syllabus for CS 500 and is used to keep track of assignments, etc. as well for the most recent offering (fall 2023).

General Information

Course website - https://cs.indstate.edu/wiki/index.php/CS_500

Your Instructor

Jeff Kinne, jkinne@cs.indstate.edu
Office: Root Hall A-142 and in Microsoft Teams, phone 812-237-2126
Instructor Office Hours: MWF 10am-1pm, 2-2:45pm; TR 11-12:30pm, 1:30-2:45pm

Lecture, Exam

Lecture: TR 9:30-10:45 in Root Hall A-017, over Zoom (link in Canvas, see below), and recorded
Mid-term exam: TBA
Final exam: Thursday Dec 14, 10-11:50am

Prerequisites - admission to the CS MS program or approval of instructor, should be a competent programmer in some programming language. See section below on CS 500 versus CS 510 for helping to decide if you are ready to take this course, and you can contact the instructor as well.

CRN numbers - 52238 for the 001 face to face section, 51536 for the 301 online section

Required text We will use the following free online sources.


Class notes - Notes during class will mostly be kept in the CS 500 OneNote notebook (old notebook) and might be made available later as a PDF. Note that you will need to authenticate with your ISU account to view the notebook. Programs that we develop during lecture will be available on the CS server here: https://cs.indstate.edu/~cs500/. If you are logged into one of the CS systems in a terminal, you can get to these files by doing: cd ~cs500/public_html/.

Announcements/Assignments/Quizzes

This section will be kept up to date with information about assignments, quizzes, and exams. This will be kept as a "stack" with the most recent at the top of the list.

Assignments

Exams

Exam 1

  • Oct 19 during class. Default testing window for those online is 9:30-10:50am. If that doesn't work for me, let me know your availability on Oct 19.
  • Previous quizzes q1, q2, q3, q4 will be set to allow a retake during this time.
  • New exam questions...
    • Write some basic C programs, similar to things from HW or just basic stuff.
      • Example questions: read text file one line or character at a time and do some kind of processing, read a data file and do some processing, interaction with user and do some arithmetic or text/string processing, curses program to do something. Could have a program from class or HW and need to make some modifications to it.
    • Questions about use of memory in C programs (stack, heap, data, limits on size for each, safe and secure programming).
    • You should review the HW's, quizzes, and the Essential C text.
      • Will include some "trick" questions - evaluating expressions, what does code do that is a bit strange. E.g., int x = 10; int z[3] = {11, 12, 13}; int *y = z; y[1] = 14; z++; y[1] = 15; z[1] = 16; (*y)++; y[1] = 17; (*z)++; z[1] = 18; y++; z = y; *y = 19; Or, about size of variables, max/min values, overflow, ...
    • You will be allowed to use anything except other people or AI's.
    • Example questions are at the end of this page - https://cs.indstate.edu/wiki/index.php/CS_500#Midterm_Exam
    • Reminder that first incidence of cheating/plagiarism is an F in the course.
    • Total points will be set so the new exam questions add up to between 25-50% of the Course Content points so far. There will be at least one question that will count as Ingenuity points.
    • People in the face to face section of the course need to be here physically for the test.
  • Grading on the curses question... This is what I ended up doing...
    • main exam question (out of 25)
0/25 does not compile or nothing handed in
-7 I am counting what you turned in late since your on time program did not work.
7/25 program runs but does not do anything (no moving anything, input from user does nothing).
-9 only one ball works. 
-3 multiple balls work, but not up to 25.
-3 timing based on command-line argument does not work.
-3 program does not change based on keys pressed while it runs.
-2 balls don't bounce or wrap around.
-2 balls are not added in the locations indicated in the question.
-1 balls that are removed aren't removed all the way.
    • ingenuity exam question (out of 3)
0/3 does not compile or nothing handed in
-.5 Up/down arrows do not work.
-.5 Speed not shown on screen.
-.5 No border around the screen.
-.5 Resizing window does not work.
-.5 No multiple colors.
-.5 Pause/unpause.

Exam 2 (final exam)

  • Thursday, Dec 14, 10-11:50am, be here for face to face section
  • Quizzes set to be able to be retaken: q9, q10, q11, q12
  • The exam itself...
    • Lecture/course content points worth about the same as the mid-term
    • Do better on this one than the midterm and it will replace the midterm in the grades.
    • Programs
      • A series of programs that build on each other, with hwcheck. You should review to get ready - C, h10, h11, h6e.
      • Around half of the exam 2 points
      • At least one ingenuity points program, maybe two
      • TBD whether there will be a take-home portion due by midnight on Dec 14.
    • Canvas quiz/exam
      • Auto-graded questions on data structures and algorithms (some parts similar to q8, q12).
      • Maybe some additional questions on C and data structures.
      • Around half of the exam 2 points
      • Grading...
        • BST problems in canvas...
first_word: 6 points
longest_word_helper: 11 points
longest_word: 3 points
-1 Did not check for empty tree (NULL root).
-2 Using . where -> should have been used.
-2 using pointers that have not been checked for NULL.
-1 first_word - need to start from t->root, not p
-1 you are not returning the lower alphabetically when there is a tie.
-2 Incorrect C syntax (e.g., doing things that would work in Python but not in C, or doing things that wouldn’t work in any programming language).
-3 Did not use structures properly (e.g., trying to use word straight from inside of the tree or node, whereas you need to first go into a node, and then the data, and then the word).
-3 Incorrect logic on the first_word function, that does not seem to be on the right track. Note that this function needs to go to the left as long as it is possible, and return the left-most node.
-4 Incorrect logic for longest_word_helper function, that does not seem to be on the right track. Note that this function needs to recursively call itself on both the left and right, and then take the longest from among itself, the longest on the left, and longest on the right.
-4 for longest_word, did based on count rather than how long the word is.
-4 longest_word_helper - you were not supposed to change the prototypes for the functions. This problem is easily solved with a recursive function and does not require passing additional pointers.
In longest_word_helper, you could have used the fact that nodes to the left are <= in terms of alphabetic ordering (rather than doing additional strcmp’s, just take the one on the left if there is a tie).
        • programs on the server: counting as -10 points if a program was skipped, -5 if attempted but not correct.

HW

Planned assignments, with most recent on top.

  • h15 some project maybe raspberry pi
  • h14 sorting or data structure
  • h13 data structure using Glib
  • h12 CPP - something in C++, due Dec 16.
  • h11 from ODS and wikipedia - sorting, due Nov 29, only graded once.
  • h10 data structure from ODS - BST, due Nov 22, only graded once.
  • h9 some project (using ncurses probably)
  • h8_fix_errors - on the CS server, when finished you also will do q7.
  • h7 small C programs
  • h6 small C programs - on the CS server. Check out similar to h5_linux. Will be discussed in lecture. h6a due Aug 31. h6b due Sep 5. h6c due Sep 7. h6d due Sep14.
  • h5_linux - on the CS server. To check out the assignment, open a terminal on your computer, login to your cs500 account on the CS server, and run: handin --checkout h5_linux
    This will create a directory in your account with the files to complete for this assignment. Follow the instructions in the files. Due by Aug 28 midnight.
  • h4 - Text Editors Terminal - due TBD.
  • h3 - Hello Unix Lab - due TBD.
  • h2 - CS Server - Terminal - due Aug 24.
  • h1 - CS Accounts and CS Lab Computers. Note that your login information will be sent to you around the first day of classes, and you will need to work on h1 and h2 simultaneously. Due Aug 24.

Quizzes

Planned quizzes, with most recent on top.

Announcements

  • For next term, see notes about next term for CS 203. Also, other things... Someone suggested a coding club.
  • Jeff remember to - record, unmute, say something about me.
  • What for the curses project? dungeon crawler, or flapy birds, or pacman.
  • Next hw assignments - C++ STL (word counts), C++ classes (chess), big O (see OneNote), hash tables, Glib, C++ Boost
  • Dec 17 - last hw assignment (that is optional) due.
  • Dec 14 - 10-11:50am - final exam, like the midterm.
  • Dec 11 - note, optional h12_cpp is on the server, due Dec 16.
  • Dec 7 - a bit more C++ if we have the time.
  • Dec 5 - talk about the final exam - see above, exam 2. And we looked at some parts of my solution for h10 BST.
  • Nov 30 - new assignment h6e with some smallish C programs. More C++ and another hw assignment (maybe - word counts, chess, a few easier C programs). h11 - whenever I start looking over the weekend, whatever is handed in is on time, and whatever is not is not.
  • Nov 28 - h11 - note that the book has typos in the pseudocode for merge sort. h11 due - Nov Dec 1.
  • Nov 28 - letter grades - as of now the cutoffs for letter grades are roughly... A - high 80s. B - low 70s. C+ - low 60s. Note that C is the lowest grade that is not F, so C+ is the lowest meaningful grade. Note also that B- is an important cutoff because you normally need to keep a B average overall. When I have to make a judgement call on a close case, I care more about what you know and can do now (at the end of the term) than the beginning of the term.
  • Nov 28 - grades... exam1 grading - see what I did with the curses questions in the exam section above. h10 grading - how it worked, see GRADING and test cases. h6d grading - same, see GRADING and test cases. Not going to be graded - h6c, h7a.
  • Nov 16 - grades up to date? No. Questions on h10, h11? Note - h10 and h11 - I am only going to look at them once, so get started, ask questions as needed, and get them done on time. New for today - c++, STL. Note - h10 due Nov 22. Maybe Jeff gets hwcheck working tomorrow.
  • Nov 14 - questions on h10? introducing h11 (due Nov 28).
  • Nov 9 - questions on h10? h10 due date - Nov 17. questions on courses? average-case running time of quick sort, lower bound for comparison-based sorting.
  • Nov 7 - Assignment h10 on BST. Don't ask me about grades today.
  • Nov 6 - the drop deadline, fwiw. Whatever I have graded by Monday 4pm, that's it, other old assignments will be left ungraded.
  • Nov 2 - note that we'll likely have a quiz on sorting algorithms as well at some point. New OneNote notebook link above that I'll be using.
  • Nov 2 - quizzes open until midnight, 15 minutes each.
  • Oct 31 - reminder that there will be a bunch of quizzes in Canvas on Thursday, to be taken any time, and 15 minutes each.
  • Oct 26 - bunch of quizzes next week, will have them available any time Thursday so we don't take lecture time for them. Retake of data structures quiz - tomorrow, any time. Today - review of big O, asymptotic notation. Still catching up on grading, will let you all know when that's done.
  • Oct 19 - midterm during lecture time, see above for information.
  • Oct 17 - Data structures quiz... BST question did have incorrect answer sometimes, has been fixed now on the practice quiz, and manually fixed ones that were graded wrong on the quiz. People that had formatting mistakes on some of the questions - it would take too long for me to go and check all of those. I will set the quiz so people can take it again, and make sure to get the formatting right (take the practice quiz a few times to make sure you are getting the questions correct to confirm you have the formatting right). Most people ran out of time, so do the practice quiz to make sure you'll finish fast enough, and I'll set it to allow 40 minutes. We'll do the retake next week.
  • Oct 12 - after the midterm, bunch of other quizzes coming (see ones above listed for Oct 26), let's look at those. Try them out yourself and make note of any questions or things on them you haven't done or heard of before.
  • Oct 12 - Grading update - finishing h6b second round, next is h6c second round, let's say h6d is collected for the last time Monday 8am and only gets one round of grading, h7a collected Wednesday 8am and only gets one round of grading. "Midterm" exam - Oct 19, see above for outline. Quiz grades have been scaled, have set the Total grade in Canvas to calculate properly (20% professionalism, 20% ingenuity, 60% course content), and have put a letter grade estimate in Canvas.
  • Oct 10 - no lecture.
  • Oct 5 - we'll look at h8 answers. Finishing the data structures quiz - hash table, binary heap.
  • Oct 3 - on time deadline for h7a, h8. Questions? Today and next time - data structures. Data structures quiz Oct 12.
  • Sep 28 - h8 fix errors due next time.
  • Sep 26 - h6c collected before class, let's look at Jeff's h6c. Note - no quiz this week. Question for online people - how often is there a buzzing/clicking sound like there was at the end of last lecture? Some said it was the first time.
  • Sep 21 - questions on hw's, want to look at yours to make sure it looks right? A bit more curses stuff.
  • Sep 19 - last chance for h6c is Thursday, I'll show mine on Thursday. No quizzes on Thursday.
  • Sep 19 - if you haven't gotten any feedback from me on h6c or h6d and have something handed in, ask me to take a look.
  • Sep 19 - grading notes, for all programs... Put in the right amount of comments (at the top of the file with your name, what the program is for; at least a line for each function of what it does; throughout as needed - it is better to put comments as your outline of what you will do, and then put the code in under each comment line). If user gives invalid input, keep asking until they give valid input.
  • Sep 19 - curses programs - will do a few smaller ones, then maybe a bigger project. Starting off with h7a.
  • Sep 14 - h6d - if you want to handle bad input, better to use getline and sscanf, but my test cases do not test that right now.
  • Sep 14 - any questions on h6c, h6d? My h6b. curses.
  • Sep 12 - h6d assigned - demo. My solution for h6a. h6b last chance is by class on Thursday - I will show my solution Thursday in class. No quizzes this Thursday, just lecture.
  • Sep 8 - there is hwcheck available for h6c now.
  • Sep 8 - GA help - for extra help you can ask GA Ben Johnson to take a look at things. You can email cs500@cs.indstate.edu (which forwards to Ben) or message him on Teams (make sure to get the right Ben Johnson, bjohnson114@sycamores.indstate.edu).
  • Sep 7 - a closer look at h6b, how C strings and arrays work in C, * and &, C is pass by value.
  • Sep 7 - h6b... Make sure your program does not have any compile warnings, let's look at some that people are getting. If you get a seg fault, how to figure that out - let's look at an example - volunteers?
  • Sep 7 - reminder to read the Essential C text. q3 and q4 today. Questions on h6c? h6d delayed, will release on Tuesday.
  • Sep 5 - h6b has hwcheck now. h6c released.
  • Sep 5 - q1 and q2 - set to be able to retake at any time today. quizzes for Thursday - q3, q4. Note that the links above are practice quizzes, and work if either (a) you open in an incognito or private window, or (b) join the canvas course that has those quizzes.
  • Sep 5 - we'll take attendance at 9:30 from now on. Quizzes - people in the face to face section need to be in the room, I'll check next time. If you come on the zoom meeting just for a short time I won't count that as attending.
  • Sep 1 - Jeff does initial grading of h6a.
  • Aug 31 - quizzes at 10am. h6a - reminder on checking out, handing in, using hwcheck. Pointers/memory and introducing h6b.
  • Aug 29 - h6a - the for_loop.c program I sent last night, is available now to check out with handin, due Thursday. How to use hwcheck to check. Reminder to use good programming style, and safe & secure code. Quizzes for Thursday - q1, q2.
  • Aug 29 - the following are all past due - h1, h2, h5, q0. If you don't have q0 100% tonight you get an F. h1, h2, h5 - will be 0s if not completed today.
  • Aug 24 - h1, h2 are due tonight, so get them done. q0 due Monday with 100%, so get that done, ask me if there are any that you can't figure out what the right answer is.
  • Aug 24 - start reading Essential C (link in General Information above).
  • Aug 24 - announce when we'll be doing quizzes - Thursdays 10-10:30am looks good. A look at quizzes q2-q4. Introducing C, gcc, gdb (GNU Debugger), nano/vim/emacs (Text Editors), handin (Handin), make (Make).
  • Aug 22 - results from grading most of the first day quizzes (should you stay in CS 500 or switch to CS 510)... Are you ready for CS 500, my best guess from looking at the quizzes: 27% yes, 22% probably, 8% borderline case, 11% no (you should switch to CS 510), 19% I cannot tell because you did not follow the instructions (not a good sign...), 14% either did not take the quiz or did not properly attach submission to your email. See email for more information and context.
  • Aug 22 - when we will have quizzes - I will poll the online students to pick a time that hopefully works for all of them. Check email today or tonight.
  • Aug 22 - logins to the CS server for this course will be sent out to you tonight.
  • Aug 22 - assignments and quizzes - see due dates above.
  • Aug 22 - reading assignment - quizzes q0, q1, assignments h1, h2, h3, h4, h5 and linked pages from those.
  • Aug 22 - attendance for when you are not in the room... If joining by zoom, you need to post a comment in the chat to say if you have any questions about the current assignments, reading, the last lecture, etc. If watching the lecture, you need to watch it before the next lecture and send me a message by Teams or email saying if you have any questions or want any more examples about a particular topic. So, if not in the room, you have to participate at least as much as "no questions from me right now" to get credit for attendance. Also, if joining by zoom, set a profile picture so that I will see a picture of you in the list of zoom participants (like mine); or leave your video one - in either case, so I can associate a face with the name.
  • Aug 22 - first day of class - syllabus, how the course works, q0, h1, h2, "should you be in this course" quiz (ungraded).
  • Aug 22 - note that in college you need to - go to class, do assigned reading, start assignments promptly, ask if you have questions when you don't understand, study for quizzes and exams, try to get A's in your major.
  • Why C? Various reasons, but this is a good summary - After All These Years, the World is Still Powered by C Programming
  • Previous semesters of this course - CS 500 Fall 2022, CS 500 Spring 2023

Course Description and Content

Course Description

The catalog description for this course is: "Review of undergraduate topics in Computer Science including Data Structures, Computer Architecture, and Computer Organization. Review of a computer programming language that students can expect to use in advanced courses." The two main goals are that you leave the course as proficient C programmers and proficient at using and analyzing the most important data structures and algorithms.

Course Outline

  • Getting started - system setup, git, linux, bash, make, apache, math background, development on your personal computer.
  • C programming basics - operators, reserved words, data types, base systems, overflow.
  • C programming strings - manipulation of C strings.
  • C programming memory management - different types of memory in C, how to use them, pros and cons.
  • C programming style - good programming style for reliability, readability, extensibility, security.
  • Data structures - understanding/use of most important data structures - arrays, linked lists, skip list, binary search trees, red black trees, hash tables, heaps, B tree. Implementation of some of these in C.
  • Algorithms - understanding/use of basic algorithms - sorting (various), binary/linear search (and uses), graph algorithms (basic properties, BFS, DFS, MST, shortest path), strings (edit distance) - including some algorithms that are each of - greedy, dynamic programming, heuristic, randomized, brute force / backtracking.
  • Vocab - additional terms, algorithms, concepts at a shallow level.

Learning Outcomes

  • System setup - personal computer setup for both remote (connecting to CS server with terminal, sftp, X windows) and local development (editor, compiler).
  • Git - basic use of git for source code management.
  • Linux - proficient using the Linux terminal for development.
  • Bash - basic use of bash scripts for testing code.
  • Make - basic use of GNU make for compiling code.
  • Apache - able to post content to your CS accounts to be viewable over the web.
  • Math background - proficient in math background needed for data structures and algorithms.
  • Personal computer - is setup for development so you can do coursework from your home computer as well.
  • C programming - understanding of all language features, proficient in writing code using the most common, write code using good programming style.
  • Data structures - understanding of operations, efficiency, use cases, can write code in C for data structure operations.
  • Algorithms - understanding of basic algorithms, arguments for correctness and efficiency, can use the right algorithms to solve problems efficiently.

Course Policies, Grading

See Jeff Kinne Course Policies for course policies and how your overall letter grade will be determined.

Prerequisite, CS 500 versus CS 510

The prerequisite for CS 500 is admission to the CS MS program or permission of instructor. You should be a competent programmer in some programming language and have studied data structures and algorithms as a part of some course in the past. If your background in programming and CS is too weak, you should start in CS 510 Intro to Programming and Computer Science rather than CS 500. Also note that CS 500 uses the C programming language, while CS 510 uses the python programming language. CS 510 is meant for those with little or no background in CS, and for those outside of CS wanting to take a CS course. CS 510 is also meant to help students with a weak CS background get ready to pass the CS MS admissions interview and to prepare for CS 500. To assist in deciding whether to start in CS 500 or CS 510, those enrolled in CS 500 will take a quiz the first day of class; this will not be for a grade but just to decide whether to start in CS 510 or not. The quiz will be something like the following.

  • Quiz to be taken closed notes, no internet, on your own, on paper, and should be complete in about 30 minutes (or 50, we'll see whether 30 minutes seems to be enough or not). Note that programming questions ask for a complete working program in whatever programming language you want (most commonly Python, C, C++, Java, Javascript, C#, or Swift). "Passing" will be getting at least one of the programming questions completely correct (maybe just a typo or two) and at least one of the data structures / algorithms questions completely correct. That is the minimum standard to be considered ready for this course; if you cannot get even one of the programming problems correct then you definitely are not ready for this course (CS 500 does not teach basic programming and debugging concepts and skills, you should have those already).
  • Programming question, nested loops and logic: a question where the correct program will use some nesting of loops and conditional logic, and where a correct solution can be done with 10-20 lines of code.
    • For example: Write a program that asks the user for a word and prints the word out one letter per line. The program should ask for another word, and print the word one letter per line; the program should keep asking until the user types "quit". You can assume the words are all at most 99 characters.
  • Programming question, use recursion: a question asking for a recursive solution to some basic problem, where a correct solution can be done with 10-20 lines of code.
    • For example: Write a recursive function that computes the product of integers between two values. The function should not use any loops. Your program should ask the user for two integers, call your function to get the product between them, and print the result. For example, if the integers entered were 4 and 8, the program would print 6720. The program should contain no loops. If the user enters the numbers in reverse order (e.g., 10 5) then the result should be 0.
  • Programming question, design functions: a question asking to create and code a set of functions to solve a given problem, where the best solution will have a few functions and take 10-20 lines total.
    • For example: Write a program that keeps an array of strings that are meant to be times that an alarm is set to go off. The program will give the user the following choices: (a) print all alarms, (b) add new alarm, (c) select alarm and remove it. Your program should make use of a number of functions that you write for for keeping track of the alarms. You can assume there will be at most 10 alarms stored at any given time, and that each alarm string is at most 99 characters. Note - this program gets to be a bit long, so you would only need to give the code for the functions, and would not need to give the main program that gets input from the user and calls the appropriate function.
  • Data structures question, choose the best: a question where you are asked which data structure is best for a given task. You will choose between unsorted array, sorted array, doubly linked list, singly linked list, stack, queue, balanced binary search tree, non-balancing binary search tree, and hash table.
    • For example: Suppose you need a data structure to keep track of all facebook accounts. You need to be able to add, remove, and lookup. You will do a bulk add of all current accounts (assume there are 10 billion), and then will need to do around 1 million of each type of operation per day. Choose a data structure to keep track of this information, and justify your choice. You can let n=10,000,000,000 and m=1,000,000 so you can discuss the big-O asymptotic running times.
  • Data structures question, running time: a question where you are given some pseudocode using one of the data structures above, or given a particular data structure to analyse, and you are asked to analyse the running time.
    • For example: Consider the same scenario as above (keeping track of facebook accounts). Suppose you use an ordered array to keep track of the accounts. Letting n=10,000,000,000 and m=1,000,000, what is the big-O asymptotic running time of doing the bulk add of 10 billion accounts, and what is the big-O asymptotic running time of doing the 1,000,000 lookups each day? Justify your answers.

Assignments

Start Assignments and Quiz Studying Early - I suggest attempting an assignment the day it is given, or the day after, so that if you have a problem you can ask early. If you continue to have problems in trying to complete the assignment, you will have time to ask again. Many of the assignments require thought and problem solving, which takes "time on the calendar" not just "time on the clock". By that I mean that spending an hour on 3 consecutive days is likely to be more productive than trying to spend 3 hours at once on the assignment.

Expected Amount of Work - My expectation is that an average student will spend about 5-10 hours OUTSIDE of class each week (that is in addition to class time or viewing lecture videos) WORKING PRODUCTIVELY/EFFICIENTLY (not just staring at the computer) to complete their coursework for this class. Some students may spend less time than this, and some students will spend more.

This is the foundation for the rest of CS, so it definitely pays off to do your best here.

Note - please find a way to spend enough time on this class (the investment will pay off in terms of skills, being able to get a job, etc.).

Grade Meanings

Letter grades in this course are intended to have the following rough meaning.

  • A+/A: You understand everything and probably could teach the course yourself.
  • B+/A-: You understand nearly everything, and should be all set to use this knowledge in other courses or in a job.
  • C/C+/B-/B: Some things you understand very well and others you don't (more towards the former for a B and more towards the latter for a C).
  • D-/D+/C-: You did put some effort in, and understand many things at a high level, but you haven't mastered the details well enough to be able to use this knowledge in the future. Note that the lowest grade for grad courses is a C, so if you fall in the range below C then your letter grade will be an F.
  • F: Normally, students that get an F simply stopped doing the required work at some point.

The default assignment of letter grades will initially be the usual one (90 is an A-, 80 is a B-, etc.), but these cutoffs will be adjusted down (in your favor). I will adjust these cutoffs and let you know where you stand periodically throughout the term.

CS-Specific Items

This section contains items that are generally the same for all CS courses (and in particular those taught by this instructor).

CS Course Policies

Note that this course follows all standard CS course policies. In particular, (a) cheating/plagiarism by graduate students results in an F in the course, (b) and there will be no makeup exams. See http://cs.indstate.edu/info/policies.html for details.

Lab Help

We have a few lab assistants who are available to help students in beginning computer science courses. Please see https://cs.indstate.edu/wiki/index.php/Unix_Lab_and_Help for details. The lab hours are in a calendar on the CS homepage, at http://cs.indstate.edu/info/index.php#lab_hours. You can join the lab when working on your programs. You can ask the lab assistants to look at your programs, and you can work with any other CS students that are there (you could use the lab as a regular meeting place to work with your classmates).

Course Announcements

Announcements regarding the course will be made both during class and via email to your @sycamores.indstate.edu email address. You should regularly check this email account or have it forwarded to an account that you check regularly. You can set the account to forward by logging into your indstate.edu email online (if you aren't able to find the option, try a different browser or search online for things like - outlook online forward email setting).

Classroom conduct

You may not use cell phones, iPods/music players, etc. during class. You should be civil and respectful to both the instructor and your classmates, and you should arrive to class a few minutes before the scheduled lecture so you are ready for lecture to begin on time. You may use your computer during class if you are using it to follow along with the examples that are being discussed. You should avoid spending time on email, Facebook, work on other courses, etc. during the lecture for this class (be fully present wherever you are, make the most of each experience).

Academic Integrity

See also Jeff Kinne Course Policies for additional information for more specifics about how I am handling these things for this course.

Please follow these guidelines to avoid problems with academic misconduct in this course:

Homework: You may discuss the homework assignments, but should solve and finish them on your own. To make sure you are not violating this, if you discuss with someone, you should DESTROY any work or evidence of the discussion, go your separate ways, SPEND at least an hour doing something completely unrelated to the assignment, and then you should be able to RECREATE the program/solution on your own, then turn that in. If you cannot recreate the solution on your own, then it is not your work, and you should not turn it in.

Note on sources: if you use some other source, the web or whatever, you better cite it! Not doing so is plagiarism.

Exams: This should be clear no cheating during exams. Each instructor has different rules for what is allowed on exams in terms of notes, etc. If not noted otherwise, you should assume that a quiz or exam is closed notes, no computer, no calculator.

Projects: You should not copy from the Internet or anywhere else. The project should be your own work. It will be fairly obvious to me if you do copy code from the Internet, and the consequences will be at the least a 0 on the project. If cheating is observed, you will at the least receive a 0 for the assignment (and may receive an F for the course), and I will file a Notification of Academic Integrity Violation Report with Student Judicial Programs, as required by the university's policy on Academic Integrity. A student who is caught cheating twice (whether in a single course or different courses) is likely to be brought before the All University Court hearing panel, which can impose sanctions up to and including suspension/expulsion. See http://www.indstate.edu/sjp/docs/code.pdf and http://www.indstate.edu/academicintegrity/ for more information.

Please ask the instructor if you have doubts about what is considered cheating in this course.

Office hours (using Teams)

Office hours will be through Microsoft Teams by default. If you would like to meet in person you should reserve an appointment using http://cs.indstate.edu/jkinne-meeting to reserve an in person meeting with Jeff Kinne. I am normally in my office during my listed office hours, but by making an appointment you can be more certain. For meeting through Teams, you should start Teams in your browser or start the application. You should be logged in using your ISU credentials. Once you have Teams open you can message me to ask me questions or to ask to talk. We can use Teams to message (better than emailing back and forth repeatedly if you have questions about something that you just want to write about) or to talk and share screens (e.g., to take a look at your code). I normally have Teams open on my computer all of the time, including during my office hours. During my office hours I will normally reply right away; at other times I will reply when I get a chance.

Canvas

The course has a canvas site. Click https://indstate.instructure.com/ to go to canvas. You should see this course listed under your courses for the current term. If you don't you may need to click on the Courses icon and then click the "All courses" link. The canvas site is used for giving you your grades, for quizzes/exams, and for getting to online lectures (which are done using Zoom). Announcements will be sent through canvas and to your university email. Links and such will be kept on this website.

Lectures (using Zoom)

Here at ISU section numbers starting with the number 3 (e.g.3xx: 301, 302, etc.) are generally online sections. There are 2 types of online sections, synchronous online and asynchronous online. Sections that are synchronous should be joined at the regularly scheduled time of the course, whereas sections that are asynchronous generally keep up with the material independently without regularly scheduled meetings. In general async sections are more difficult to stay on top of, and require a great deal of self-discipline (it is much easier to think "I can watch the videos tomorrow" and just get behind). So if you are in one of these sections make sure you get off to a strong start, and ask for help sooner rather than later. If you are in an online section, check your course schedule for course meeting times; if you have a meeting time, then your section is synchronous, otherwise it is asynchronous (or there is an error in the system).

This course has a 301 section (synchronous online) and 001 section (face to face). Students in either section can participate in whatever way you need to.

For ISU's links to information on getting started with Zoom, see https://indstate.teamdynamix.com/TDClient/1851/Portal/KB/ArticleDet?ID=107534. You can also see the information linked at https://www.indstate.edu/services/student-success/cfss. You will get to the lectures for this course by going to Canvas, select this course, click Modules on the menu on the left, and click on the Zoom module. Once there you should see a schedule of lectures and be able to view recorded lectures. Note that you should install the Zoom application for your computer, and you will need to be logged into to Zoom with your ISU credentials to be able to connect. Also note that the lectures are recorded and only available to those in our class. Recorded lectures normally appear later the same day as the lecture.

Note that if you have not used Zoom with your ISU account previously, you need to go to https://indstate-edu.zoom.us and login with your ISU email address and password to get it setup.

Participating online

If you are participating online, please see the information at https://www.indstate.edu/services/student-success/cfss about participating in online courses. You are expected to either join lectures live through Zoom or watch the recordings once they are available. You will complete assignments, quizzes, and exams on the same schedule as the rest of the class.

For quizzes, I will try to find a time each week that works for everyone to take the quizzes at the same time. The mid-term will be scheduled when it gets closer.

For attendance when you are not in the room... If joining by zoom, you need to post a comment in the chat to say if you have any questions about the current assignments, reading, the last lecture, etc. If watching the lecture later, you need to watch it before the next lecture and send me a message by Teams or email saying if you have any questions or want any more examples about a particular topic. So, if not in the room, you have to participate at least as much as "no questions from me right now" to get credit for attendance. Also, if joining by zoom, please set a profile picture so that I will see a picture of you in the list of zoom participants (like mine); or leave your video on - in either case, so I can associate a face with the name; if you have a good reason to not do either of these let me know.

ISU Required Syllabus Items

The items in this section are required and are the same for every ISU course.

COVID-19 Information

Information specific to CS courses - Start of Term Announcements

Standard ISU language required in all syllabi (read this all once, then skim for your other courses)...

Students are expected to adhere to course attendance policies, as stated in the course syllabus. Documented COVID-related absences will be treated like any other serious medical issue. Following University policy, students with a documented, serious medical issue must contact the Office of the Dean of Students for assistance. The Office of the Dean of Students will supply documentation for faculty. Students with a documented serious medical issue should not be penalized and will be given a reasonable chance to complete exams or assignments. Once notification is made, faculty will make reasonable efforts to accommodate the student’s absence and will communicate that accommodation directly to the student. Please note that faculty are not required to accommodate a serious medical issue with virtual content options, like streaming or recorded lectures. To avoid the potential of missing significant class time, students are strongly encouraged to receive the COVID vaccination that has been made available on campus. For more information about the vaccines or to find a vaccination site, go to: https://ourshot.in.gov. The ISU Health Center also administers COVID-19 vaccines by appointment.

Students should contact the Office of the Dean of Students with questions by calling 812-237-3829.

The information provided in this section of the syllabus is subject to modification based on guidance by public health authorities. Changes to Covid-related policies or updated information will, as always, be posted on the ISU website and communicated in multiple ways.

Special Needs / Disability Services

Standard ISU language required in all syllabi...

Indiana State University recognizes that students with disabilities may have special needs that must be met to give them equal access to college programs and facilities. If you need course adaptations or accommodations because of a disability, please contact us as soon as possible in a confidential setting either after class or in my office. All conversations regarding your disability will be kept in strict confidence. Indiana State University's Student Support Services (SSS) office coordinates services for students with disabilities: documentation of a disability needs to be on file in that office before any accommodations can be provided. Student Support Services is located on the lower level of Normal Hall in the Center for Student Success and can be contacted at 812-237-2700, or you can visit the ISU website under A-Z, Disability Student Services and submit a Contact Form. Appointments to discuss accommodations with SSS staff members are encouraged.

Once a faculty member is notified by Student Support Services that a student is qualified to receive academic accommodations, a faculty member is obligated to provide or allow a reasonable classroom accommodation under ADA.

Disclosures Regarding Sexual Misconduct

Standard ISU language required in all syllabi...

Indiana State University Policy 923 strictly prohibits discrimination on the basis of: age, disability, genetic information, national origin, pregnancy, race/color, religion, sex, gender identity or expression, sexual orientation, veteran status, or any other class protected by federal and state statutes in ISU programs and activities or that interferes with the educational or workplace environment.

Title IX of the Educational Amendments of 1972 prohibits discrimination based on sex, including sexual harassment. Sexual harassment includes quid pro quo harassment, unwelcome verbal or physical conduct, sexual assault, dating violence, domestic violence, and stalking.

If you witness or experience any forms of the above discrimination, you may report to:

Office: Equal Opportunity & Title IX; (812) 237-8954; Rankin Hall, Room 426
Email: ISU-equalopportunity-titleix@mail.indstate.edu
Online: https://cm.maxient.com/reportingform.php?IndianaStateUniv&layout_id=10

Disclosures made to the following confidential campus resources will not be reported to the Office of Equal Opportunity and Title IX:
ISU Student Counseling Center: (812) 237-3939; Gillum Hall, 2nd Floor
Victim Advocate: (812) 237-3829; HMSU 7th Floor
UAP Clinic/ISU Health Center: (812) 237-3883; 567 N. 5th Street

Assignments and Exams

Midterm Exam

Some sample questions...

  • Which part of memory would each of the arrays be contained in?
int array1[100];
int main(int argc, char *argv[]) {
  int array2[100];
  int *array3 = (int *)malloc(sizeof(int)*100);
  return 0;
}
  • Which part of memory (stack, data/globals, or heap) is most restricted in how large it can be, and what is a rough estimate?
  • Which part of memory contains the call stack (to keep track of which functions are currently running)?
  • Which part of memory contains local variables?
  • Give C code to demonstrate the error of a buffer overflow for an array declared in BLANK.
  • Give C code to demonstrate the error of using an uninitialized heap pointer.
  • Give C code to demonstrate other errors.
  • Give C code to declare an array of type BLANK that is contained in BLANK part of memory.
  • Give C code to define a structure that is called point_t and contains: double precision floating point values for x, y, and z coordinates, and a label that is a C string.
  • Give C code for a function prototype for a function named BLANK that has BLANK parameters and returns BLANK.
  • Give C code for a function that takes an array of BLANK and does BLANK to the array.
  • Give C code for a function that takes pointers to type BLANK and does BLANK to them.
  • Take h6a/for_loop.c and change it so it runs the is_prime function on any command-line arguments.
  • (Related to h6b) - Give a complete C program to take a filename as command-line argument, take an additional character as command-line argument, read the entire file and output how many times the character occurs in the file. Note - your program should work on any type of file (does not need to be text).
  • (Related to h6c) - Give a complete C program to read a file and print it out with the lines in reverse order. If a command-line argument is given, it is the filename to open; if no argument is given, the program should use stdin (read until EOF, store the lines, then print them in reverse order). You can assume the file will be at most 1000 lines; your program should work regardless of how long the lines will be.
  • (Related to h6d) - Give a complete C program to take a hex command-line argument, print how many bits are in the binary representation, and print the hex representation that would result from flipping all of the bits.
  • (Related to h7a) - Give a complete C program that is a curses program that prints an additional '.' character each second, pauses/unpauses this if the 'p' key is pressed, and stops if the 'q' key is pressed.