« first day (2285 days earlier)      last day (2658 days later) » 

4:21 AM
I never thought I would see a conversation between a cactus and a lobster.
 
 
2 hours later…
6:07 AM
@MartianCactus you still have a lot to see. Me dying and Madara coming back from the dead.
Spoiler Alert!!!
 
6:25 AM
Morn o/
 
6:42 AM
!!throw
 
static
 
 
1 hour later…
7:45 AM
lol
 
8:09 AM
morn
 
8:39 AM
Had a question. Why would u use a superclass refernce to create a sub class object? For instance what are the benefits of writting List l = new ArrayList(); instead of ArrayList l = new ArrayList();
 
I didn't understand that either... Note though that List is an interface.
 
it's shorter
 
Thats it?
 
morning
 
not sure :P
 
8:44 AM
Morn @motaa
@TimCastelijns hmm :/ and morning ;)
 
List is an Interface... so ArrayList is a Class that implements the List interface :)
 
@NullPointer because you shouldn't care that l is an ArrayList
you need a List and you get an ArrayList, so you can pass around a List instead of passing around an ArrayList
 
and since it is an interface you can switch between different implementations
 
LSP I guess
but generally it makes it easier to understand what you're doing when you look at it again
also, List is an interface and you cannot do new List()
 
So if I was using ArrayList<E> l = new ArrayList<>(); I could only use an ArrayList whereas I can change when using List<E> ...?
 
8:50 AM
@geisterfurz007 what if suddenly you want to copy contents of l into a sorted list and start using the sorted list instead?
 
@Unihedron Makes sense
 
51
Q: Why should the interface for a Java class be prefered?

jnanchetaPMD would report a violation for: ArrayList<Object> list = new ArrayList<Object>(); The violation was "Avoid using implementation types like 'ArrayList'; use the interface instead". The following line would correct the violation: List<Object> list = new ArrayList<Object>(); Why should the ...

 
haha i was about to post the same :D
 
26
A: Why should the interface for a Java class be prefered?

AdamCThis is preferred because you decouple your code from the implementation of the list. Using the interface lets you easily change the implementation, ArrayList in this case, to another list implementation without changing any of the rest of the code as long as it only uses methods defined in List.

 
8:52 AM
here is a good answer on that question
 
@TimCastelijns lol , also morning
 
what was this about
13 hours ago, by Cold Fire
@TimCastelijns hey you here still?
 
there are cases where using ArrayList type is suitable over List, but if and only if that dependency exists
 
@TimCastelijns aah nothing much was just asking if you were online
 
awwwwww
 
8:59 AM
:(
 
morn
 
morn
 
@NullPointer In local (non-public) scopes List<T> l = new ListImpl<T>(); is more of a convention & interface names are shorter too as @TimCastelijns notes. In exposed public APIs return values and method parameters are much better off as List<T>, due to substitution possibilities ^^ mentioned.
 
9:12 AM
yes. I was right
 
For comparison: ArrayList<T> or List<T> functional difference in local scope is minimal. One gets additional #ensureCapacity(int minCapacity) and #trimToSize() with ArrayList<T>. When one really needs control over memory use, they might prefer using ArrayList<T> variables of concrete implementation class in local scope -- but mostly still return List<T> (or even Collection<T>).
 
Yes, there are implementation details that you can interact with by having an ArrayList over a List, but if you won't need to use them, as in you need a List and not an ArrayList, you should use a List. In APIs, they prefer returning the most general type, such as Guava returning ImmutableList when necessary and List when not.
 
@TimCastelijns pure luck :P
 
Realistically, the differences between ArrayList and List are minimal, and ArrayList works under the List contract, so does every other List implementation.
 
I think he understood
 
9:18 AM
@FlyingGambit there's nothing else to do...
 
We need a public chat room or we could use the trash can
 
@FlyingGambit Yes i think i have understood :D
 
@NullPointer Good boy, me passes a cookie
 
man in the middle attack nomnomnom
 
You get my 256 bit encrypted cookie .. hehe he
 
9:22 AM
damnit :D
seems impossible to get through ^^
 
is the cookie salted?
 
user6857832
@TimCastelijns Lol
 
@TimCastelijns yes salty and spicy
 
so many dad jokes
 
@TimCastelijns naah its sour and digital
 
9:23 AM
DadJokesOverflow
 
user6857832
@FlyingGambit Isn't it sweet?
 
In cryptography, a salt is random data that is used as an additional input to a one-way function that "hashes" a password or passphrase. Salts are closely related to the concept of nonce. The primary function of salts is to defend against dictionary attacks or against its hashed equivalent, a pre-computed rainbow table attack. Salts are used to safeguard passwords in storage. Historically a password was stored in plaintext on a system, but over time additional safeguards developed to protect a user's password against being read from the system. A salt is one of those methods. A new salt is randomly...
 
user6857832
Ah! Lol
 
user6857832
But I was talkin bout real cookie lol
 
5 mins ago, by Flying Gambit
You get my 256 bit encrypted cookie .. hehe he
 
user6857832
9:27 AM
Lol
 
!!wiki aes 256
 
The Advanced Encryption Standard (AES), also known by its original name Rijndael, is a specification for the encryption of electronic data established by the U.S. National Institute of Standards and Technology (NIST) in 2001. AES is a subset of the Rijndael cipher developed by two Belgian cryptographers, Joan Daemen and Vincent Rijmen, who submitted a proposal to NIST during the AES selection process. Rijndael is a family of ciphers with different key and block sizes. For AES, NIST selected three members of the Rijndael family, each with a block size of 128 bits, but three different key lengths...
 
KilledJokesOverflow
 
sadly
 
user6857832
Lol
 
9:27 AM
 
user6857832
I want a cookie haha
 
but I had a feeling most didn't understand my brilliant joke
 
I did, and I cringed.
 
user6857832
Yea, I didn't haha
 
lol
 
9:28 AM
I know you got it :)
 
I got it
!!feelsgoodman
 
@Unihedron I like that one :)
 
user6857832
9:43 AM
Hi @ItachiUchiha
 
user6857832
My code is workin for strike, but can ya help me how should I add that score in the frames?
 
user6857832
I mean the score for strikes only
 
user6857832
And later add the previous value and those strike value in the frame as well.
 
I've restarted IntelliJ and my laptop's fan is spinning so fast it's going to lift off :/
 
user6857832
Lol
 
user6857832
9:47 AM
@Tavo Can ya please help me?
 
I'm a bit busy atm, but tell me
 
user6857832
The question I asked jus now.
 
user6857832
I can share code on github
 
@Tavo gg overheating laptop
 
@Tavo :D I went to a friend of mine once to build together his new Desktop-PC and he used the boxed fan of the cpu and that tiny thing went of to a constant 6k rpm O-O
It was so damn loud and on a high-pitch :/
 
user6857832
Can someone please help me how should I add score in the frames?
 
double package declaration
 
@Hemlata I can't open github from the work laptop, sorry Hem
 
user6857832
Yea I edited it and posted it again, So I forget to remove it.
 
eagle-eye-Castelijns on duty :P
 
user6857832
9:53 AM
@Tavo Um, no worries.
 
@Unihedron I have to handle it back tomorrow, so I'm not too bothered
 
user6857832
@TimCastelijns Can ya please help me?
 
user6857832
I will give ya hershey chocolate If ya gonna help me haha
 
I know nothing about your game though
 
user6857832
@Tavo Can I post code here? Then later ya can delete it.
 
user6857832
9:58 AM
@TimCastelijns It's bowling game
 
not if it's too big
 
@TimCastelijns Yeah.... bowling is not that common :P
 
user6857832
92 lines?
 
user6857832
How many lines code I can post here?
 
@Hemlata 1.
 
10:00 AM
can you tell me at what stage in development you are and what the problem with the next step is?
 
@TimCastelijns It does not work hides
 
voting to close geister as unclear :D
 
Why the downvotes? :(
 
@Hem you using java 1.7?
 
user6857832
@TimCastelijns In the setStrikeValue () it is returning the score, So I jus want to add in the frames (ArrayList)
 
user6857832
10:04 AM
@TimCastelijns Lol idk.
 
user6857832
How do ya know that which java version you're using?
 
cmd -> java -version
 
user6857832
Oh you mean in eclipse?
 
cmd
 
windows-key + r
or are you having something different?
 
user6857832
10:06 AM
I need to type it in terminal?
 
yes
 
windows shudders
 
user6857832
I'm using Mac
 
don't check cmd, check the project settings
 
10:06 AM
I am sorry
 
user6857832
You mean where my code is saved in eclipse?
 
never mind
 
@TimCastelijns well played
 
In eclipse:
 
10:08 AM
you just got a highscore
 
user6857832
Nvm I got it
 
Window -> Preferences -> Java -> Installed JREs
 
@JonahSloan The Chrome browser does not support NPAPI plug-ins and therefore will not run all Java content. Switch to a different browser (Firefox, Internet Explorer or Safari on Mac) to run the Java plug-in. More info
 
@Unihedron That's because Chrome is already a security risk.
 
10:11 AM
!!wrong
 
I'm sorry :D
 
no it's because the site you linked to sucks and isn't supported
 
!!\helpcommands
 
@FlyingGambit That didn't make much sense. Use the !!/help command to learn more.
 
10:11 AM
!!help
 
@FlyingGambit Information on interacting with me can be found at this page
 
!!/listcommands
 
@geisterfurz007 help, afk, ban, convert, define, die, doge, eval, forget, google, hang, imdb, info, jquery, learn, listcommands, listen, live, mdn, meme, moustache, msdn, mustache, nudge, refresh, spec, stat, stats, summon, tell, unban, undo, unonebox, unsummon, urban, weather, welcome, wiki, xkcd, youtube, zalgo, !, !!, $.baby, (4337654<<1)+1, (y), /somecommand, 0, 1, 2020/07/23, 3, 666, :3, :p, </pissing>, ?, @tim, ^, ^5, abesnacking, abhi, abhishekpornfreak, acronym, adhd, ah, ahah
algosmarts, aliens, all, am, angryticks, answer_to_everything, apocalypse, appreciated, archerneat, armforc
 
@Unihedron It works fine for me.
 
@geisterfurz007 thanky
 
10:13 AM
Hem your program doesn't compile
 
aye
No main, no run, I guess?
 
user6857832
It says version 8
 
user6857832
@TimCastelijns Yea you need main as well
 
user6857832
@TimCastelijns
 
10:14 AM
undefined references to frame.setStrikeTrue for example
 
user6857832
But it's workin when I run it
 
can you push the working code
 
1 min ago, by Hemlata
https://github.com/HemHershey/Bowling
 
user6857832
Do ya have frame class, main class and bowlingGame class?
 
user6857832
You need all those three classes to run
 
10:17 AM
yea
 
!!fuckthis
 
cat
 
cat cat
 
user6857832
Is it runnin now?
 
10:17 AM
you should rename it to vaadin :>
 
Listen, I cloned your repo and put it in a project, but it doesn't compile
 
hehe
@geisterfurz007
 
user6857832
@TimCastelijns What does it says?
 
I fixed it, but nothing happens when i run it
just welcome
 
user6857832
10:18 AM
Oh you gotta give input like any number
 
user6857832
I didn't wrote that in println haha
 
nope
pretty sure you have not pushed the most recent code
 
user6857832
Wait let me update my code again
 
user6857832
Nah, I have to jus add some println, So ya can know what's going on.
 
look at the main
there is only a setPlayerName and a println
 
user6857832
10:21 AM
Oh, I'm sorry. I didn't updated the main class
 
user6857832
Please have a look at it again
 
got it
you want the returned score to be added in a frame?
 
user6857832
Yes
 
user6857832
I changed jus a lil in bowling class, I added some more println.
 
10:27 AM
change this
frames.add(frame);
if (strikeCounter > 0 && frame.strike == false) {
setStrikeValue();
}
to this
if (strikeCounter > 0 && frame.strike == false) {
int score = setStrikeValue();
frame.setScore(score);
}
frames.add(frame);
and add a setScore method in Frame.class
 
user6857832
Um, ok.
 
tip, in intellij you can generate get/set methods for a class by pressing cmd+n
 
user6857832
public int setScore(int score) {
this.score = score;
return score;

}
 
user6857832
Like this?
 
user6857832
@TimCastelijns I use eclipse.
 
10:31 AM
public void setScore(int score) {
this.score = score;
}
 
user6857832
But I can't put frames.add(frame); after the if statement
 
why not
 
user6857832
Cuz I need value in frames, Like If I enter the values in frame 1 then It won't gonna calculate the score for it, as it need frame 2 value as well. So I gotta add it first.
 
user6857832
And If I will add it after then it can't get the value
 
I see
are you open to suggestions for improvements?
 
user6857832
10:36 AM
Um yea.
 
wait let me download eclipse, this is not working
 
user6857832
Um, ok.
 
10:47 AM
can't import your code into a project :|
or at least I don't know how to
 
lol
just copy and paste dude
 
user6857832
Um, no worries.
 
hem what is your issue ?
 
copy and paste sucks because then i can't pull changes
 
i have some time
 
user6857832
10:48 AM
I wanna add value in frames.
 
user6857832
if (strikeCounter > 0 && frame.strike == false) {
int score = setStrikeValue();
frame.setScore(score);


}
 
user6857832
I wanna add score in frames, frames is an arrayList.
 
user6857832
@ColdFire
 
user6857832
@ColdFire
 
10:50 AM
checking....
 
user6857832
Um, ok.
 
Welp will be less active... Got a deadline for my application
 
@geisterfurz007 why are you reporting to us?
 
@Hemlata so why cant you add it?
and what is spare?
 
user6857832
@ColdFire I don't know how to add it.
 
10:57 AM
spare is getting score of 10 in 2 rolls
 
@Unihedron Because there are others not as grumpy as you are :)
 
user6857832
@ColdFire I haven't coded code for it. It's like when it's a spare like firstRoll + secondRoll == 10
 
Hem I think it would be best to try to improve the code structure before advancing
 
user6857832
Um, yea..
 
First tip I have is to use meaningful names for methods and variables
e.g. we now have a public void frame() but I have no idea what it should do :)
should be able to tell by reading the name
 
11:00 AM
thats an important point
meaningfull variables/method names
 
user6857832
Well frame is right name for it lol, It's like you've 10 frames in a bowling game, So that's what a frame is.
 
its easy to oversee
:/
 
it's not up for discussion, this is not a good name :P
 
user6857832
Yea, but this I have used right names lol, cuz Itachi helped me in it.
 
method names must be descriptive
the method frame(), what does it do?
 
user6857832
11:01 AM
Well what should I call a frame then?
 
what does it do?
 
a frame is a frame, but method that does a bunch of stuff is not a frame
 
user6857832
It let you enter values for firstRoll and secondRoll in a frame.
 
EnterValueFrame()
 
promptValues()
 
11:02 AM
its not great
but its better
 
user6857832
But I can't name it that, cuz I'm adding a frame in frames (ArrayList)
 
askUserWhatValuesHeRolledForFirstAndSecond would be perfect
3
 
user6857832
And it's really a right name lol
 
@Hemlata frames.add(frame);
 
user6857832
@TimCastelijns No lol
 
11:03 AM
yes
 
user6857832
I can add comments for that, So others can understand.
 
if your method has a good name, comment is not required, that is the point
 
user6857832
@ColdFire But I will add values in current frame, but I want it to add in the previous frame.
 
@TimCastelijns i agree
 
user6857832
But frame is a good name lol
 
11:05 AM
Don't paint the word "house" in front of a house
 
user6857832
Plus itachi named it
 
3 mins ago, by Tim Castelijns
a frame is a frame, but method that does a bunch of stuff is not a frame
 
user6857832
And I think it's right
 
@Hemlata Voting to close as too broad
 
@Hemlata frames.get(i).setscore(score);
@Hemlata voting to close as POB
 
11:06 AM
I thought you were open to suggestions for improvements
 
user6857832
@ColdFire Um, ok. I will try it
 
user6857832
@geisterfurz007 Itachi will open it lol
 
@Hemlata I doubt it
 
where i is the index of frame whose score you want to change
 
@ColdFire POB?
 
user6857832
11:07 AM
@geisterfurz007 Well then ask him lol
 
and score is the new score
 
user6857832
@ColdFire Yeah.
 
@geisterfurz007 primary opinion based
 
:D true
 
don't abuse close votes
 
11:13 AM
@MadaraUchiha
 
Can you have a look on the second and third question currently under the batch-file tag? Seems like a guy made the same post twice as another user. What to do? @MadaraUchiha
 
close one as dupe of the other if possible
 
No upvoted/accepted answer @TimCastelijns
 
why is this:
fileprocessing.stateProperty().addListener((ObservableValue<? extends Worker.State> observable, Worker.State oldval, Worker.State newval) -> {});
not working
This is the message the compiler gives me:
The method addListener(ChangeListener) in the type ObservableValue is not applicable for the arguments ((ObservableValue<? extends Worker.State> observable, Worker.State oldval, Worker.State newval) -> {})

When checking SO it's quite exactly like that in the AA
 
11:17 AM
@geisterfurz007 They aren't sharing votes, so far as I can tell
So vote to dupe and go one
 
Thank you Madara :) Vote dupe is not possible as the answer on the other one is not upvoted...
 
Calling a mod was the right call, although flags are preferred to chat pings, if it's not an urgent matter.
 
Yeah I was not sure what to do and thought there was something else, that I could have done. Sorry
 
It's cool
 
@motaa Can you do new ChangeListener(<yourStuffHere>)?
 
11:20 AM
@Hemlata Renaming methods and classes (as your code grows) to something which makes more sense is a good habit.
 
user6857832
Um, yea.
 
as far as I know, a method name should never be a noun
but I don't know everything
 
Except it is bacon... then its fine :>
 
yeah hard to disagree with that
 
11:22 AM
@TimCastelijns Enum.name()
 
user6857832
frames.get(i - 1).setScore(score);
 
user6857832
This ain't workin
 
user6857832
It's still not adding values in the list
 
!!wrong
 
11:23 AM
16 mins ago, by Tim Castelijns
I thought you were open to suggestions for improvements
@Hemlata ^
 
user6857832
@ItachiUchiha Yea?
 
@Unihedron I would argue it should be called getName, but oh well
 
@Hemlata people here will guide you the right way :)
 
user6857832
Yea
 
user6857832
11:26 AM
I will ask a question in a bit lol. Be back in a few.
 
you can refactor those if elses to if (strikeCounter < 4) {frames.get(i - strikeCounter).setScore(score)}
 
@Hemlata how many days have you been working on this?
 
@geisterfurz007 yes I can and it works as expected when using this
fileprocessing.stateProperty().addListener(new ChangeListener<Worker.State>(){
@Override
public void changed(ObservableValue<? extends Worker.State> observable, Worker.State oldValue, Worker.State newValue){}});
but I don't know why the lambda expression is not working :)
 
did you let android studio convert it to lambda for you?
 
@TimCastelijns ? :)
 
11:35 AM
Your code can be written as fileprocessing.stateProperty().addListener((observable, oldValue, newValue) -> {});
 
and the compiler infers newValue of type Worker.State?
 
I mean to ask, how did you come to the lambda
normally the IDE suggests to replace code with lambdas wherever possible
 
Are you asking me?
 
no motaa
 
11:39 AM
ok
 
thanks @ItachiUchiha and I finally found out why the type casting didnt work out :D
in the line before adding the Listener I declared fileprocessing as
Task fileprocessing = new FileProcessor(selectedFile);
instead of Task<double[]> or Task<?>
 
raw type D:
 
user6857832
11:59 AM
@Unihedron Now 6 days, but I started it all over after 3 days. Plus I only spend 2 hours a day.
 
user6857832
But I will complete it today or maybe till tomorrow
 

« first day (2285 days earlier)      last day (2658 days later) »