jameshughes89 / cs102 Goto Github PK
View Code? Open in Web Editor NEWCS 102: Data Structures --- Java
Home Page: http://csci162.com/
License: GNU General Public License v3.0
CS 102: Data Structures --- Java
Home Page: http://csci162.com/
License: GNU General Public License v3.0
Create an aside (or something similar) covering the creation of classes/objects in C++. The focus will be on headers and the class files.
Will introduce students to another similar language. This shows what is similar/disimilar, which is cool. It will also provide students with some details on C++ for if/when they use it.
After Topic 3.
Copy/paste contents from last year's slides.
Not looking to cover enough details such that they are proficient in C++, but that they are familiar with important concepts that they can go look into if/when they need it.
As @twentylemon mentioned, it would be best to change the format of if
/else
lines & braces to match the following.
if (condition) {
...
} else {
...
}
This is a more typical style.
Everywhere up to and including topic11.rst
Should also be included with formatting.
Either setup the formatter #56 or go through each file and change.
Not needed, but would be a good change.
imgmath was changed out for mathjax due to LaTeX dependencies, however @twentylemon noticed that mathjax renders client side.
This may not be a problem, but to eliminate potential issues, this could be addressed.
src/site/conf.py, however it is recommended to set imgmath_latex
using an argument to the sphinx-build.
Will need to figure out the LaTeX dependency
Update topics to include reference to bags. This will require making the indexed and sorted lists bags, or at least calling them that.
Lists were replaced with Bags, so bags should be discussed.
I think this will come up only in the first few topics.
Make an aside for the end of Topic6 for testing.
Use branch topic6-aside-test.
Add a topic for hashing.
Important topic, but there likely will not be time to cover it. This is fine since it's typically a 2nd year thing, but I'm a big believer of communicating high expectations pedagogy.
Idk where exactly it would fit in best, but probably tack it on at the end.
Just make the topic and add it to the repo. Decide on adding it to the index later.
Create an aside for a quick introduction to the debugger.
I somewhat talk on it in CS101 (161), but at that point few students are using an IDE. By introducing it to CS102 (162) I know they are using IntelliJ.
A lot of people never take the time to look into using the debugger, so breaking the ice, so to speak, would give them a bit of a heads start.
Not sure yet, but probably somewhere earlier in the course. Perhaps around the testing aside?
Things to hit:
Some of the images I sole from slides that I used back in the day. The textbook that went with the slides does not contain the images in the slides, which makes me think they were added by one of the other instructors back at UWO.
Either way, although they may be fine, will need to actually look into this. Putting this as an issue as a reminder for later.
Title
I never liked the postfix, and neither does @twentylemon, so that settles it.
RE #75, @twentylemon suggests
Again semi related to #46, but you could include these as actual main classes in the repo; like, actual java source files.
Which I think is a great idea.
Pick a consistent word for refering to the stuff in the collection and update the content.
As of know I have used the words item, element, and target to refer to the same thing. Perhaps element and target are used in kinda' a different context, but either way, this can be cleaned up.
In .java files (including the javadoc comments) and topic pages.
After PR #40 is merged, make an aside for Topic 6 on unit tests. Keep them simple since this is the first time they've seen them.
I figure going forward, it will be part of each topic, but I'll make the first one an aside that they are to investigate on their own.
Noted in #134
Would get fixed through #56
Go through the content and make try/catch
follow the following format:
try {
something;
} catch (SomeException e) {
somethingElse;
}
More typical formatting.
Up to and including topic 12 content. Areas of note would be:
"ctrl-f catch ("
Would get addressed with #56, but this would make a nice easy and accessible way for someone to contribute.
Find and add an rst file formatter for the repo.
The Java formatter is working just fine (#56 & #152), but it won't apply to java code within rst files. Further, unfortunately the rst plugin for IntelliJ doesn't add a formatter.
Currently there are settings for a formatter for arbitrary files, but it only allows setting indents and it also doesn't quite seem to work the way you'd expect on rst files.
I saw a few formatters out there on github. Look into these and see what can be done. I'm wondering if there is an action for this too.
Not critical, but nice to have.
Related #148
Add an aside on exception causes to topic16.
While acknowledging that this is outside the scope of the course, an aside on the topic seems fitting as it would be something to have students be familiar with. The idea being that when they come across them in the future, they're not intimidating.
A new aside, something like topic16-cause.rst
Perhaps low priority, but good idea nontheless.
As @twentylemon notes
On the gif, the exit cell and the popped cells will be nearly identical colours to colour blind folks. Deuteranopia is the most common, roughly 1% of the male population, dontchaknow. Colour blind colour wheel google.
Change the recursive binary search method based on @twentylemon's comments on not modifying the params, but change the values in the recursive call's params.
It's cleaner, for lack of a better term.
I suspect this is a consequence of trying to have one return for the non-base case.
Topic20's recursive binary search.
Within the search methods class
Create an aside (or something similar) covering C++ static and dynamic arrays.
Will introduce students to another similar language. This shows what is similar/disimilar, which is cool. It will also provide students with some details on C++ for if/when they use it.
Early in the course. Probably after Topic 2.
Copy/paste contents from last year's slides.
Not looking to cover enough details such that they are proficient in C++, but that they are familiar with important concepts that they can go look into if/when they need it.
Replace the use of EmptyStackException
for NoSuchElementException
in the stack interface, implementations, tests, and topic pages.
Looks like EmptyStackException
is ancient. I don't believe there is anything intrinsically wrong with using the EmptyStackException
, but since there is no EmptyQueueException
, I suggest being consistent with the exceptions thrown ๐. It appears that the exception of choice would be NoSuchElementException
.
src/test/java/LinkedStackTest.java
src/test/java/ArrayStackTest.java
src/main/java/ArrayStack.java
src/main/java/LinkedStack.java
/src/site/topic6.rst
src/site/topic8.rst
src/site/topic8-nested.rst
src/site/topic9.rst
EmptyStackException
-> NoSuchElementException
Not needed, but would be good for consistency.
RE #65, I have been inconsistent with using <> when creating instances.
Go through and check
For example
SomeObject<SomeType> anInstance = new SomeObject<
SomeType>()
-> SomeObject<SomeType> anInstance = new SomeObject<>()
This repo is open source, but there's a few pieces missing to add to bring it up to standard.
CONTRIBUTING.md
CODE_OF_CONDUCT.md
can also be it's own thing, if you want to be formalFinally, yeet repo options that are not used. Like projects and wiki. Don't advertise stuff that doesn't exist.
Building guidelines (and a community, even if students don't engage) is effort. Start small and add things as you think of them, don't try to define the whole universe at once. At some point, pulling out what is written for this into a template repo makes a lot of sense, so you can re-use for any number of courses (you can pretty easily update from a template repo as well).
๐ถ might not be the best for good first issue.
Top of the issues page sometimes writes:
Now, GitHub will help potential first-time contributors discover issues labeled with good first issue --- baby ๐ถ
"good first issue -- baby" kinda sounds like we're saying "baby" in the derogatory manner.
Issue template, PR template, repository labels.
Other emoji options I can thing of, in a rough preference order of mine:
As @twentylemon notes, the use of cells is perhaps not as natural.
I may have used pull paths instead of steps, I think it's more akin to how people solve a maze (we don't think of cells, for example). By path I mean all steps taken until an intersection or a dead end, can use a squiggly line, like you would on a real maze. Though, think on it. Can be follow up work. What's there still works, it's just more robotic.
Consider a rework of the visualization.
Basically, chat > email for notifications.
See a tutorial: https://gist.github.com/jagrosh/5b1761213e33fc5b54ec7f6379034a22
Could also be in Friends Chat if Grae would oblige. Probably a new channel for it.
Add explination of including another method that would call the recursive one with the initial conditions.
You typically do this, and the binary tree classes that follow use this strategy
In both linear and binary recursive methods
Re #144.
Add more details on the ArrayStack
's expandCapacity
before the details on the more complex ArrayQueue
's expandCapacity
.
As @twentylemon suggested, it may be easier to start with what issimpler and what we know already before hitting the added complexities.
topic12-expand.rst
Not a priority as of now, but would defo add value to the content.
After #40 merge, go through all content and verify paths to stuff.
As of now I just dump some code to play with asses on the website. Should probably make these actual downloadable files to play with.
Create an aside (or something similar) covering C++ pointers, address of, dereference, reference variables, etc.
Will introduce students to another similar language. This shows what is similar/disimilar, which is cool. It will also provide students with some details on C++ for if/when they use it.
Early in the course. Probably after Topic 2.
Copy/paste contents from last year's slides.
Not looking to cover enough details such that they are proficient in C++, but that they are familiar with important concepts that they can go look into if/when they need it.
As mentioned in #190
As @twentylemon suggests in #190, add an aside for spliterator
which discusses (a) streams, (b) parallel, and (c) a tad functional stuff in high level.
Although these topics are well out of scope for a first year course, being exposed to these important ideas early is only going to be a good thing. I also am a fan of including bigger picture ideas too so students can get a sense of where things will/can go.
Topic 16 on iterators. If the point is streams, parallel, and functional programming, this may seem off, but iterator
-> spliterator
-> these ideas is a great segue.
Related #100
Think of a better example for for the queue. Move the current rotating cipher example to an aside for Topic 10.
As @twentylemon notes, the example seems forced, which I agree with. Although it does serve its purpose, it may not be as obvious an example. If the example is more natural, it will be easier to understand.
Topic10.rst
A new Toipic10 aside, likely Topic10-cipher.rst
Could do a simple simulation example where we simulate wait times for checking out at a grocery store depending on the number of cashier.
Probably a lower priority issue since the rotating cipher isn't horrible.
As observed in #158
Rename image files such that there is a consistent nameing conventions.
Some start with upper case, some lower. Some start with the topic name followed by an underscore and then specifics. This inconsistency is annoying to me.
As mentioned in #168
Go through implementations to check for places where method calls from the interface can replace fields. This may require changes in topic files too.
Consistency, and as @twentylemon said program to the interface as much as possible!
.java files and probably some topics pages.
Add more detail/improve the Towers of Hanoi explination in Topic19.
There is nothing wrong with the current explination, but it feels like it could be better.
Topic19
Not quite sure. As @twentylemon suggested in #269, pseudocode may be a good way. If this route is taken, perhaps an aside would be best since Towers of Hanoi are not super important for them to know at this stage, and adding more details about it to the main topic page may give the wrong impression. An aside will give a chance to really dig into extra details too.
It may only need some time to settle, and then after a bit, a re-look at it may make helpful changes obvious.
Change "count" to "size" in various figures.
I do not like the use of count, especiallu since I refer to it as size in the content and code.
topic8.rst
src/site/img/linkedstack0.png
src/site/img/linkedstack1.png
src/site/img/linkedstack2.png
src/site/img/linkedstack3.png
topic12.rst
src/site/img/linkedqueue0.png
src/site/img/linkedqueue1.png
src/site/img/linkedqueue2.png
There may be other images too.
Paint, or from slides
Related #131
Add an aside to topic12 going into additional details on why expandCapacity
be like it do for our ArrayQueue
The additional details will be helpful. As @twentylemon notes:
I'd expand of why here. What stateful values are coupled to the array? May be beneficial to go back to the stack example and see why top is still correct after the expansion.
This is a fantastic idea --- both going into the details and tying (tieing?) it to the ArrayStack
's expandCapacity
.
topic12.rst
also an aside, probably topic12-expand.rst
If it's found that the amount of content doesn't quite fit in an aside, this new content can be added to the topic12 main page.
Introduce proving algorithm correctness.
Defo beyond the scope of this course, but I think being made aware of this early is cool.
Probably an aside for the searching or sorting topics, but we'll see.
Probably prove, pseudo-formally, linear search or bubble sort or something.
This will be something to add once all the main content is done. Once that's all in place, it will be easier to see if, how, and where this would fit in.
Replace all the T
s with E
s in the generic collections.
Could follow the convention mentioned here:
By convention, type parameter names are single, uppercase letters. This stands in sharp contrast to the variable naming conventions that you already know about, and with good reason: Without this convention, it would be difficult to tell the difference between a type variable and an ordinary class or interface name.
The most commonly used type parameter names are:
E - Element (used extensively by the Java Collections Framework)
K - Key
N - Number
T - Type
V - Value
S,U,V etc. - 2nd, 3rd, 4th types
Anywhere T
is used, so both the topic pages and the code itself
Low priority.
Add Brian Cranston video of fixing a lightbulb to topic 18.
It shows them that they do do this irl, and hopefully it will help get the point across.
Somewhere where talking about a call stack.
Add this link https://youtu.be/AbSehcT19u0
Maybe add something like "you all use a stack in your heads"
Need to incorporate code formatting for the repo. Both the Java and ReStructuredText.
Currently, the website is laid out as:
src/site
-- root
src/site/topicX.rst
-- lecture topic #Xsrc/site/topicX-aside.rst
-- aside for topic #Xsrc/site/img/Y.png
-- some image Y.png
Instead, maybe group related items together into subdirectories.
src/site
-- root
src/site/topicX/index.rst
-- lecture topic #Xsrc/site/topicX/img/Y.png
-- some image used in topic #X; src/site/topicX/Y.png
would be fine toosrc/site/topicX/aside.rst
-- aside for topic #XMaybe also naming the directories topicX_title
for added information.
The main benefit is just organizational. Searching for given topics is faster, and it gives more direct links between images/asides and where they are used.
A new aside for replacing the getCount
with a binary search strategy for improved time complexity.
ALSO, implement all things with binary search (add, remove, contains, etc.).
Good application of binary search that they will have juse seen.
x
>x
Related to #128
Change src/site/img/arrayqueue_3idea0.png to end with indices 97, 98, 99
instead of n-3, n-2, n-1
.
This will make the image consistent with the subsequent two.
src/site/img/arrayqueue_3idea0.png
Idk, paint? Probably easier if I change on the slide and then copy/paste into paint.
Currently all the code is in the code
folder.
Either (a) make sub directories of code/src/
and code/tst
or (b) just rename code
to src
and add tst
.
Option (b) may be easier with how sphinx works.
Brought up in #208
Go through the test names and come up with a more consistent naming convention.
As of now, the tests are all over the place. Not the end of the world, but could absolutely be improved.
Both the tests and anywhere in the topics where tests are discussed.
I like @twentylemon's suggestion of:
unitUnderTest_conditionUnderTest_expectedResult
e.g. isEmpty_emptyTree_returnsTrue
Would be cool.
As per @twentylemon's suggestion in #57
Or, better yet, this should be a static inner class of the linked list class
Move the Node
class into a nested class. For Topic7 it will simply be a top level class for learning. Once on Topic 8 however, we will move it to a nested class and reflect on the design.
In an attempt to ground stuff in reality, introduce a deque.
Could probably have a new topic or an aside topic later in the course to talk about java.util.
Make a Hello World YouTube video for Topic1. Part of the emphasis will be on IntelliJ.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.