Message from @Jacob
Discord ID: 500536873136029697
so
```java
try {
//lines 149-163, the whole outer while loop, until just before the function ends
}
catch Exception {
//leave blank because we're supposed to assume nothing will happen
}
//then exit the function
}
``` @Jacob
thanks
okay now I have a new exception
here is my new code
```java
------------------testAddLast()----
Exception in thread "main" java.lang.NullPointerException
at MyLinkedList$ListNode.access$2(MyLinkedList.java:11)
at MyLinkedList.add(MyLinkedList.java:205)
at MyLinkedListTester.testAddLast(MyLinkedListTester.java:42)
at MyLinkedListTester.main(MyLinkedListTester.java:214)
```
That's good, different errors now
Unfortunately it's 2am here so I have to get to bed
okay thanks for your help
good night
good night
by the way
for googling purposes
what I suggested with "try to see if it works, catch an exception if it doesn't" is called "duck typing" so for more info you can google "duck typing in java"
The idea of a function that can take in anything that implements a function (like the sort function that works on any node data that implements a `compareTo` function) is called "polymorphism"
though googling "polymorphism in Java didn't present any helpful examples to your problem, maybe you'll have better luck
ok good night
thanks a lot
good night
I'm trying to figure out how to fix it right now
you can keep a (global) list or set with the text of every comment you've printed before, so that if the text is already found in your list of already printed comments, then you don't print it.
There's a few slightly more optimized ways to do it, but that would be the laziest fastest to implement
hmm ya that's what I'm trying to do
@Jacob what difficulty are you running into?
I added this in interested_comments():
interesting_list = []
and then I modified the if statements to be like this
if "white" in comment_set and {"priviledge", "privilege", "privledge"}.intersection(comment_set) and comment not in interesting_list:
I think I can figure this out, though
@ThisIsChris I'm testing out my solution right now
In the meantime, I have some new ideas
How difficult do you think it would be to add this functionality? Detect what specific immigration topic is about, and automatically suggest counterarguments from a database.
Maybe I could put the arguments in a list, and look for phrases like "jobs Americans won't do" and the script would immediately pop out a refutation
I think it would be pretty straightforward. You need a list keywords/key phrases that indicate the topic of conversation, then you just need a pre-written counter argument for each topic
@Jacob "Maybe I could put the arguments in a list, and look for phrases like "jobs Americans won't do" and the script would immediately pop out a refutation" yeah exactly this
cool
This is gonna get pretty advanced
I'll see if I can make the script automatically run once a day and send me an email with pro-immigration comments and recommended counter arguments
@Jacob perfect MVP to work on. I look forward to seeing it