« first day (2470 days earlier)      last day (2695 days later) » 
00:00 - 12:0012:00 - 00:00

12:00
like quit, and not just today!
kill him
no message like that, lemme tell you
if only it was possible, half the world would be dead already!
there you go
i've yet to compile it
but it's something like that
@AceVez applauds
i need to clean my pc
12:01
@AceVez wash it ;)
brb. something's coming up
it would work like that, but due to loop-optimisation, the first one might be faster (would need proper testing).
however, you really shouldn't write
while(true)
if(condition) break;
@CrowleyAstray why not?
because it's ugly and I don't see why you would do that
as it is equivalent to while(!condition)
12:16
anyone here works on Spring MVC ?
@Wietlol I honestly don't see a break at all in there
true
but that is because I put it in a method
so it is not related to what I said, which was that it is bad style to use while(true) followed by if(condition) break;
I didn't say that while true is always bad (although I personally would rewrite your loop into while(iterator.hasNext()) as well)
you need to remove the return, otherwise it would throw a compiler error because there is a line after return
but I suppose it can be handy for formatting, however that is a special exception (and not the case for AceVez)
12:21
whoops :D
not that writing this is good because of long methods
but yes, I suppose it has some legitimacy in being used for String formatting
but these kind of designs could be useful where the condition is half way through the loop
but if you want to only go through half the loop, half the loop is the whole loop again 「(°ヘ°)
if you only want to go through half the loop IF the check would fail at the first time
then yes
else, it will do the first half an additional time
not really
ok
> game is hard
12:26
game of thrones?
as ever, I think that is a very specific scenario and I still oppose the general use of while(true)
whats the best way to pass time in office except SOChat ?
arguing over coding style in SOChat
I just have to pass half an hour and then I can go home.
okay, your's suck. :)
bloody fight me mate (ง'̀-'́)ง
12:32
do you use tabs or spaces?
tabs for intendation (ง'̀-'́)ง
eh, same.
okay,
if{
or
if
{
well, it is easier to have everything on the same level and have the levels have a reasonable size after all
if{ (ง'̀-'́)ง
eh, same.
when I started coding I used to write { in next line
if() oneLine();

or

if(){ oneLine()}
@SajalGupta same actually
I just kinda stopped
12:34
yeah, since I started using Eclipse, I just stopped
nice, I also use Eclipse
Netbeans has some weird-ass behaviours
haha yeah. I used netbeans first. but after using Eclipse, No more netbeans\
did you know that you can execute code from comments? >:
like from lines between /* */
that actually doesn't work, but from stuff after
//
12:40
if I have to execute code from //, then why would I put it in comments?
malicious code mainly
It's not something you want to do, it's something you want to recognise when you see it
also if a coworker trolls you with that, it can be useful
@CrowleyAstray haha makes me think about my company.
There's me and 1 another coder, ONLY.
I work on Spring and he works on Servlets.
if you are using Java, you could put it into his code and see if he finds it :<
@CrowleyAstray we dont get to use each other's computer
well, does he always lock it when he briefly leaves his workplace?
12:45
he does.
and his place is just in front of boss's. So ...
people make mistakes ( ͡° ͜ʖ ͡°)
you want to quit anyway ( ͡° ͜ʖ ͡°)
I'm quitting asap.
Put System.out.print()s in his comments and let him wonder where the output comes from ( ͡° ͜ʖ ͡°)
i shall try
you need to enter \u000d first though
12:47
SOP's are easy to find -.-
but most people don't expect them in comments
like, would you check your comments for code? because I usually don't
yeah I see.
( ͡° ͜ʖ ͡°)
@azro try the exclusions in your dependency to exclude old versions and keep yours
and what he does is code everything from the beginning of the line
12:48
@CrowleyAstray tabs make sense because then you can write the code in your preferred number of "spaces" and it still shows nicely for stupid people who use 1 space
except that tabs are horrible
are you bipolar by any chance?
( ͡° ͜ʖ ͡°)
bi... polar?
@Wietlol what? -.-
Bipolar disorder, previously known as manic depression, is a mental disorder that causes periods of depression and periods of elevated mood. The elevated mood is significant and is known as mania or hypomania, depending on its severity, or whether symptoms of psychosis are present. During mania, an individual behaves or feels abnormally energetic, happy, or irritable. Individuals often make poorly thought out decisions with little regard to the consequences. The need for sleep is usually reduced during manic phases. During periods of depression, there may be crying, a negative outlook on life,...
no i dont
im a happy person
until someone makes me sad
12:51
it was a joke because in the first line you wrote how great tabs are and in the next line you wrote that they suck
you said "tabs make sense" and then in next line you said "tabs are horrible"
yea, but its the truth
( ͡° ͜ʖ ͡°)
tabs make sense to be used
the creepy face declares you bipolar
12:51
they are awesome in design
and behavior
but still noone uses them
because they are ugly to work with
I use them for intendation, and I think pretty much everyone does actually
and it only works if everyone uses them
I use tabs. why the fuck would i press space 4-8 times instead of 1 tab ?
( ͡° ͜ʖ ͡°)
@SajalGupta i press tab as well
but it generates 4 spaces
12:53
BIPOLAR I TELL YOU! ABSOLUTE MADMAN!
yeah. so ? makes it look much better
( ͡° ͜ʖ ͡°)
so, i dont have to press space 4-8 times
so your statement doesnt make sense any more
confused screaming
I think I get too little sleep
omg what is wrong with you
12:54
nothing :D
( ͡° ͜ʖ ͡°) Lemmy thinks it is time to go
@Wietlol yes, you are bipolar. don't deny it. ( ͡° ͜ʖ ͡°)
you need some sleep.
12:54
@CrowleyAstray TRUE!!
I gotta go too. Its time to head home :)
I am addicted to this smiley ( ͡° ͜ʖ ͡°)
_please send help_
NO FORMATTING IN MULTI-LINE MESSAGES STRIKE AGAIN!
( ͡° ͜ʖ ͡°)
13:04
I'm back!
God
I was called? :>
( ͡°⊖ ͡°)
( ͡° ͜ʖ ͡°) You have summoned me?
Back to my question. Wha do you think @CrowleyAstray?
basically correct, just that I'd refrain from using while(true) if(condition)break;
https://paste.ofcode.org/bPcz8CNk9xVpTvpHYddSar

this is how I'd do it (almost the same)
13:06
Oh that one
it's the first thing that came in my mind. I don't really use while(true). Makes the code harder to read
But somehow faster to write
Do you thing working around the nested loop makes it faster than using nested loop?
as I said before (you might have already been gone), I doubt there is much difference performance-wise, but it mainly depends on optimisation
the second one can certainly utilize Branch Prediction, but loop optimisation is already very strong and maybe the loops can be removed as a whole by the compiler (I am no expert so I can't give definitive answers)
I mean the complexity (forgive me if I'm wrong, I barely pass this class) for the nested one is around n^2 and the workaround is n. Which means the workaround is more fast. At least, that's what I'm thinking
As for the readability though, I prefer the nested one
the relative complexity yes, however in many cases, the compiler could skimp the first one to n as well
13:12
Yes! that one. I've heard it before.
it is common practice for compiler-optimisation to replace loops with equivalent, faster statements
however the second statement will incur almost nothing at the ifs since it will always predict correctly
since, in case you didn't know, there are quite complex and advanced algorithms at play to predict the outcome of an if-statement before it is parsed, and I believe this is one of the easier ones.
@CrowleyAstray which one?
if(width > 0){
System.out.print("*");
width--;
} else {
width = initialWidth;
System.out.print("\n");
row--;
}
he will almost always be able to correctly guess which condition will be entered
final initialWidth = 3;
width = 3;
row = 3;
uhm... ok
> don't judge me
13:15
That's embarassing.
I was in a hurry
Ahem
judges CrowleyAstray
stars geisterfurz saying he is retarded
I forgot online compiler exists
@AceVez, I don't know which school you are attending, but I find it highly unlikely that you need to know what code the compiler can handle faster
@CrowleyAstray It's nothing like that.
13:19
but, since we are so avidly talking about performance, I once read in a book that on average, LinkedList is a hundred times slower than ArrayList, altough I didn't try
Just some random thought
How so?
@CrowleyAstray it sometimes makes sense
because the arraylist can completely be put in RAM (unless it is huge of course) while the LinkedList needs to write on the HardDrive
look at java nested anonymous classes
which will take 25 minutes to compile when you have 16 of them
that's why we don't use nested anonymous classes
( ͡° ͜ʖ ͡°)
13:21
who is "we"?
we are ( ͡° ͜ʖ ͡°)
every single programmer in the world that has the potential of workgin with me?
if so, im fine with it
I won't o/
ofcourse we are the master programmers
we make functions at least 4,500 lines long
we make code duplication of at least 7 times per library
we write everything on one line
and ... ow wait, that contradicts the first statement
@Wietlol not if you program in word and use line-wrapping ( ͡° ͜ʖ ͡°)
also, we are in a java channel, so use the right vocabulary, it is a method, not a function >:|
13:28
i program in notepad, everything can be on one line
depends
methods and functions both exist
@CrowleyAstray always messing them up. I don't get why one should bother differentiating between them
because functions exist in the context of Lambdas in Java
and function -> method in C
method -> function in Java
functions are the non static ones?
functions arent properties of an object afaik
methods are
ok so functions are the static ones?
13:30
...
1257
A: Difference between a method and a function

Andrew EdgecombeA function is a piece of code that is called by name. It can be passed data to operate on (i.e. the parameters) and can optionally return data (the return value). All data that is passed to a function is explicitly passed. A method is a piece of code that is called by a name that is associated w...

> A method is on an object.
A function is independent of an object.

For Java, there are only methods.
that is limitedly true
a function is an Interface with a single method in Java
a single non-default method
(that was Introduced in Java 8)
@CrowleyAstray that is not true
that is a functional interface
I don't like that answer in a strict sense of "function" vs "method"
13:32
not a function
@Wietlol it is called function since you can extend Function to get it
gets a bowl of popcorn, a pen and paper
-_-
Function is just a functional interface that is used to represent a generic function
it is a generic functional interface
13:33
same as consumer
provider
action
etc
not really, those have a special purpose
function too
That difference is actually subjective
Function has no purpose except for being universally usable
Provider takes nothing and creates something
consumer takes something and creates nothing
13:34
yes
Function takes something and creates something
hes not asking about functional inerface :p
hes talking only about function
Java use Functional interface to not break the OOP
which is a functional Interface
well, anywho, I am going home now, so have a nice remaining day everyone I argued with today
@Sayros what function would this be?
13:37
what exactly explained in the answer of the post
function in pascal,C, Haskell,etc
not necessary JAVA
java already inspired from them
13:49
...
@Sayros That needs some clarification because on first sight it does not make a sense
clarification of what ?
the comment i've linked to ...
those functional interfaces are introduced to allow you to work with collections in a functional way
like .map
it doesn't break OOP
how would it break OOP?
hence i've asked for clarification
* sudden silence *
14:15
Need help with java mail, regarding receiving email using java mail I get the following error after being connected for sometime: javax.mail.AuthenticationFailedException: Lookup failed
@LamteiW Welcome to the Java Chat, the room for Java enthusiasts! Please use a code snippet tool when posting code snippets. If you have an Android question, you're in the wrong place! And remember: this is not tech support! Thanks for visiting and have fun! :D
@KarelG I didn't say functional interface break OOP
I said java use Functional interface just to not break the OOP
and the link wasn't about the functional interface
did you see any tag for java or functional interface?
did you learn C, Pascal ?
@LamteiW What makes you think you are connected for some time?
I meant the link of Weitlol
"the comment I've linked to" = that arrow thingie to your comment
(just to clarify)
> I said java use Functional interface just to not break the OOP
^-- still needs an explanation :)
14:25
@geisterfurz007 When I started the service, It has connected and read a mail if any new mail came but after some time (5 hours) I got a email server drops a connection so I will retry to connect the server but after 2 or more attempts server will throw a same error
strange :/ I doubt I can help you there, sorry
/http 302
@geisterfurz007 H⊥⊥Ԁ Ɛ0ᄅ (Ⅎonup): ⊥ɥǝ Ɛ0ᄅ (Ⅎonup) sʇɐʇns ɔopǝ ıupıɔɐʇǝs ʇɥɐʇ ʇɥǝ ʇɐɹƃǝʇ ɹǝsonɹɔǝ ɹǝsıpǝs ʇǝɯdoɹɐɹılʎ nupǝɹ ɐ pıɟɟǝɹǝuʇ ∩ᴚI˙ Sıuɔǝ ʇɥǝ ɹǝpıɹǝɔʇıou ɯıƃɥʇ qǝ ɐlʇǝɹǝp ou oɔɔɐsıou' ʇɥǝ ɔlıǝuʇ onƃɥʇ ʇo ɔouʇıunǝ ʇo nsǝ ʇɥǝ ǝɟɟǝɔʇıʌǝ ɹǝbnǝsʇ ∩ᴚI ɟoɹ ɟnʇnɹǝ ɹǝbnǝsʇs˙ (Ɩ/Ɛ)
@geisterfurz007 ϛ
14:34
Ͻoɯɯɐups=====================
/8qɐll Sıɯnlɐʇǝs ɐ ɯɐƃıɔ 8-qɐll˙
/ɐqonʇ ᗡısdlɐʎs ıuɟoɹɯɐʇıou ɐqonʇ ʇɥıs qoʇ˙
/ɐɟʞ ∀lloʍs nsǝɹs ʇo ɯɐɹʞ ʇɥǝɯsǝlʌǝs ɐs „ɐʍɐʎ„˙
/ɔɐʇ ᗡısdlɐʎs ɐ ɹɐupoɯ ɔɐʇ dıɔʇnɹǝ˙ :Ɛ
/pǝɟıuǝ ᗡısdlɐʎs ʍoɹp pǝɟıuıʇıous ɟɹoɯ ʇɥǝ pıɔʇıouɐɹʎ˙
/ƃɹooʇ I ɐɯ ƃɹooʇ˙
/ɥǝld ᗡısdlɐʎs ʇɥıs ɥǝld ɯǝssɐƃǝ˙
/ɥʇʇd ᗡısdlɐʎs ıuɟoɹɯɐʇıou ɐqonʇ H⊥⊥Ԁ sʇɐʇns ɔopǝs ɐup ɯǝʇɥops˙
/ɾɐʌɐpoɔ ᗡısdlɐʎs ɔlɐss poɔnɯǝuʇɐʇıou ɟɹoɯ ʇɥǝ ſɐʌɐpoɔs˙
/lǝɐɹu ⊥ǝɐɔɥǝs ʇɥǝ qoʇ ɐ uǝʍ ɔoɯɯɐup˙
/roolover
/http 302
/halp
@geisterfurz007 H⊥⊥Ԁ Ɛ0ᄅ (Ⅎonup): ⊥ɥǝ Ɛ0ᄅ (Ⅎonup) sʇɐʇns ɔopǝ ıupıɔɐʇǝs ʇɥɐʇ ʇɥǝ ʇɐɹƃǝʇ ɹǝsonɹɔǝ ɹǝsıpǝs ʇǝɯdoɹɐɹılʎ nupǝɹ ɐ pıɟɟǝɹǝuʇ ∩ᴚI˙ Sıuɔǝ ʇɥǝ ɹǝpıɹǝɔʇıou ɯıƃɥʇ qǝ ɐlʇǝɹǝp ou oɔɔɐsıou' ʇɥǝ ɔlıǝuʇ onƃɥʇ ʇo ɔouʇıunǝ ʇo nsǝ ʇɥǝ ǝɟɟǝɔʇıʌǝ ɹǝbnǝsʇ ∩ᴚI ɟoɹ ɟnʇnɹǝ ɹǝbnǝsʇs˙ (Ɩ/Ɛ)
spelling is hard retard me >.>
/rollover
/http 302
@geisterfurz007 HTTP 302 (Found): The 302 (Found) status code indicates that the target resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client ought to continue to use the effective request URI for future requests. (1/3)
15:09
@Wietlol Sorry for the late response, the design pattern is very specific for a case where a message is received with a command hierarchy. A routine will split the list of commands and "walk" through the classes and inner classes. That is why they have been designed this way, it is a sort of JSON object filled with functions, but adpated to classes since JAVA can't do it the same way it can be done in Javascript
So, let's say I received a command list as follows "documents|files|extension|jpg" it will walk down the classes like this: Documents.Files.Extension.JPG.load() where "load" is an example of a function that might or might not run at the end of this process
if it were javascript all I would need would be
{ documents: {files: {extension: {jpg: { load: function(){}}}}}}
and walk down via the object keys
15:59
Hey, I've got an entity that I use for both XML mapping and JPA and some other mappings as well. What annoys me is XMLGregorianCalendar, I'd like to have LocalDate. Of course, I could use an adapter for the XML mapping, but if this happens for other mappings that do not allow adapters, is it okay in theory to have different getters and do annotation mappings on them? That would mean that when i use any of the related setters I would be changing multiple class fields.
ping - I need help with a tagging issue, if someone can assit?
@Shadow i would suggest you to take a look at Groovy scripting in a Java program using a groovy shell
 
6 hours later…
22:06
farts
 
1 hour later…
23:30
/me gets sad
00:00 - 12:0012:00 - 00:00

« first day (2470 days earlier)      last day (2695 days later) »