« first day (3070 days earlier)      last day (1865 days later) » 
00:00 - 13:0013:00 - 19:00

12:00 AM
To invent, you need a good imagination and a pile of junk. -- Thomas Edison (source)
 
 
1 hour later…
1:09 AM
morn
 
morn
 
2:06 AM
horn
 
3:04 AM
Hey, the SO 2019 Moderator Election has ended.
Looks like the winners are some French guy and a tree
Also: if someone could unpin this message of mine, that'd be great
cc @Tavo
 
done :)
 
Thanks
 
sorry, I was afk
just saw it
how's things?
 
I'm alright
brb, I just accidentally bumped a pushpin onto the floor
 
do people bump pushpins onto the floor on purpose?
 
3:19 AM
Maybe, idk
I found it btw
 
thumbs up
 
 
4 hours later…
7:23 AM
@Zoe Maybe next year.
/shrug
 
¯\_(ツ)_/¯
 
7:52 AM
there are 30,520 voters
that means that these people are high likely the core community of SO.
and that of 540,839 eligible voters
that is ~5.64 %
seems an acceptable ratio
 
8:08 AM
in any democracy that ratio would be a disaster...
but I also believe that a community of 30k active users is pretty big nonetheless
 
> Blinded by the silence of a thousand broken hearts
"For crying out loud" she screamed unto me
A free for all
Fuck 'em all
You're on your own side
 
Also, Java 12 is out!
4
(am I late to the party and someone already mentioned it?)
 
I don't think anyone's said it officially yet, no
 
\o/ wohoooooooooo!!
I'm not late!
 
CONGRATZ WIF SOMETHIN USELESS TAVO!
now you can do var attributename = ... 😲
ffs windows update
most updates just resets my cmd properties
 
8:30 AM
@KarelG I'll still take it
 
Zoe
@Neil maybe ^^"
@KarelG whandaws sux dawg
 
8:59 AM
@Zoe yo yea sux for da develop, but no sux for tho gamez
 
Zoe
9:10 AM
@KarelG sux für all teh thangz
 
9:42 AM
Want to learn something new today so asking this question: What's a thing that I could learn and apply to my code in 15 mins, and which would also be great to learn
Hope the question is alright
 
Zoe
DRY.
 
YAGNI
 
@DarshitPatel that's an incredibly vague question.. did you mean pertaining to Java specifically? Or a programming paradigm? What does the code do?
 
 
Zoe
@Neil all the things of course!
 
9:52 AM
Then a time machine would be a good investment
 
nice, an infinite watering can
 
@Neil Java related. I knew it was vague. It was a reddit style "lifehack" question
 
10:07 AM
@DarshitPatel meh. Streams are nice to know how to do properly
Though you don't strictly need to know how to use them to write code, it does offer some very elegant solutions to what would otherwise be rather lunky and complex to write in Java
 
Trying to learn them already! I wrote a couple of pieces of streams in my code some days ago
 
and I do think you can get the bulk of the idea reading up on it for 15 minutes
@DarshitPatel Good, what about java.util.Function ?
it helps to familiarize yourself with Function and all its interfaces like BiFunction, Consumer, Provider, Predicate, etc.
 
I have no idea about them
 
it can be useful when passing around lambdas
think of them as placeholders for methods
If you had your own List collection class, rather than creating a derived class which can perform an operation on each item contained within, you can simply pass a Consumer and then call it for each item
It gives you a bit of flexibility
 
Any blogs/tutorials which explain the above in a simple way?
 
10:13 AM
Before them, you'd have had to pass an interface which a specific method signature and call that
Suppliers.. they're called suppliers not providers
I always mess that up
 
@KarelG All of the watering cans in Pokemon are infinite
 
Pretty sure even if I implement them, I will mess up my own readability if I look at the code after a month
 
@DarshitPatel I find that I absorb new concepts in layers.. the first layer is just knowing they exist
 
born
 
Then knowing they exist, you find yourself in a situation in which you can use them, you look into it better and expand on your understanding
 
10:17 AM
Ooh, I agree with you on that
 
@nyconing lol
 
don't force yourself to use them, just know it exists if you need it :P
 
yeah! Will read up on them now
 
10:51 AM
Just making sure
Is it still the case for Java that "foo" == "foo" is false?
 
@MadaraUchiha No, it's true if I'm not mistaken
 
Really? Since when?
 
But only because literal strings are recycled, and not because it's doing a proper comparison
@MadaraUchiha since always I thought
 
It's rather confusing if you didn't know about string recycling
 
10:53 AM
No, it seems like "foo" + "bar" == "foo" + "bar" is also true
 
if you did new String("foo") == "foo" it would return false
 
How do you format code here in the textbox?
 
ctrl + k before you submit
 
@Neil @MadaraUchiha you're looking for this
Like this?    String(Foo)
 
No, it was definitely the case that you would often have to use .equals() and not == because otherwise it wouldn't work
 
10:55 AM
No inline formatting?
 
I think in Kotlin it does call .equals if it is not null
 
class Main {
  public static void main(String[] args) {
    System.out.println("foo" + "bar" == foo() + "bar");
  }

  public static String foo() {
    return "foo";
  }
}
 
so String("foo") == "foo" returns true in Kotlin
 
Yeah, no, this one is false
 
@MadaraUchiha If you're comparing a String and a String object, yes
 
10:56 AM
It seems like only for the trivial cases that == works
 
it only works if they're literals
 
No, it works for Characters and literals
 
a.k.a. for the useless cases
 
and to that effect, the concatenation of literals is no longer recyclable maybe
would be interesting to see if the compiler optimizes that
 
Nearly useless in real code, as you would almost never compare two literals.
 
10:57 AM
@Neil except that, in kotlin, there is no String("foo")
 
@Wietlol why not?
 
because
 
proxy proxy
 
😆
 
10:59 AM
Reporter: "Hey, do you need a dash for first–hand or not?"
Editor: "It doesn't really matter"
Reporter: "K, thanks!"
 
In my interview, they loved questions involving checking equality between string literals and string instances
I was glad I reviewed that beforehand
Even if that's a silly thing to check to gauge a programmer's ability
 
yall nasty
 
only Madara and Karel tho
 
in the second interview that I did, they gave me eclipse and told me I had 30 minutes to write a program which when given n, would draw a tree to the standard output
I don't think they were used to people getting done sooner, because they were all preoccupied doing something else when I finished 4 minutes later
 
Heh eclipse
 
11:06 AM
We had some kind of 2 week- internship in 10th grade, and I went to a large scientific instutute.
 
that is at least better than Netbeans
 
They gave me excercises that were meant to bother me for the two weeks
 
Had an interview where I had to code solutions to some coding problems on their work pc. The IDE was NetBeans.
 
I did them in the afternoon of the first day :)
 
NetBeans works better than eclipse imho
 
11:07 AM
I told the interviewer that the "IDE is bah"
a week later, I got an email where they revoked my candidature
🤷‍♂️
 
@Wietlol do you all just use IntelliJ, or are you coding in notepad?
 
Oh I'm careful to never give preference
 
currently, I use IJ
IJ is by far the best IDE I have seen
even compared to other Jetbrains IDEs
 
Here most use eclipse, so it's usually just convenient to use the same
 
same here
 
11:08 AM
I've used IJ, but still not used to it
from what I've seen, seems nice
 
IJ works for you, you work for Eclipse
 
Using IJ for kotlin development, so it's also hard to compare
 
@Neil wtf
 
@DarshitPatel yeah, ikr?
 
the way how IJ just works is so satisfying tho
 
11:10 AM
I couldn't have done that
Obviosuly because I have no prep
 
I always see people doing shit because their IDE doesnt do it for them
 
@DarshitPatel done it in 30 minutes? You'll learn
 
@Neil you want to do something challenging?
 
gotta work those logic muscles and it becomes easily to flex later :P
 
try Kattis
 
11:11 AM
@Wietlol I did euler.net for a while
 
I had most of them solved too, until they breached the users
 
Do you all collaborate on OSS here
 
that second one used to be the most difficult problem (rated 9.6 out of 10), but it dropped to 9.2 last night
 
Cause I consider myself 0 when compared to what you guys know
 
11:12 AM
now this is the most difficult one
(I solved snek ettec, but havent really started writing code for holmes)
 
Interesting
 
I thought it out perfectly tho, but I think it wont work well enough
the example cases will be solved, but I am afraid of a more complex tree
 
though I think if you could make a weighted value based on that, the rest is easy
the trick is knowing how to make a weighted value
 
weighted value?
@DarshitPatel I consider everyone 0 when comparing to me
 
yeah.. convert 3^2^2 to a value that will be lower than 2^3^3 for instance
 
11:15 AM
but ofcourse, 0 compared to 0 = 0
 
@Wietlol lol
 
then just sort the weighted values
 
oh, you mean the powers
I havent actually read it yet
just noticed that snek ettec got re-rated
 
trying to think.. maybe multiplying the powers together is enough?
 
try to solve holmes
that one has never been solved yet
as well as
those two
my intended approach for holmes is to generate a graph (where each node has N parent nodes and M child nodes)
 
11:17 AM
ugh, if you recall I didn't even bother with the pathfinding elves problems this year
 
and then merge nodes when possible
 
I guess I should study up on that
don't be deterred by the fact that it hasn't been solved yet
That really only means most haven't tried it because it's intimidating
 
not really true
you get a few tests
you can attempt to solve it
but if you cant make it solve those tests, then you wouldnt even submit an answer (which means you have not yet attempted to solve it, according to the website)
so, 1000000 people could have tried, but failed all example tests
 
that's not proof that many people have tried it and failed
 
for example, for snek ettec, I passed all example test cases
I posted my solution, but it failed on the third test of the website
the issue is that you have no clue what that test case actually is
(I think I could make it send me a message tho :D)
but I think they would have set it up to not have interwebz
@Neil but it is also not proof that almost noone bothered to do it
the absence of evidence is not the evidence of absence
 
11:24 AM
@Wietlol The burden of proof is on you, if you wish to convince me that it has been attempted by many and failed
You're the one disputing my claim
if you can't prove the contrary, then it doesn't mean I'm right, but nor does it mean that I'm wrong
 
russian dolls...
 
> 793 attempts, 15 succeeded
 
40% runtime errors and 3% compile errors
 
this isn't the same problem you showed me earlier
 
11:27 AM
me thinking that these attempts got made by people that are new in programming
 
@Neil if you care about the one with the most failures, that is the one
holmes just has 0 successes
which makes it interesting actually
you can be the only person who solved it ;)
 
well obviously "the one with the most failures" is going to have a lot of attempts
 
true
 
That's not how you defined it earlier. You said "that one has never been solved yet"
 
you want the one with the most number of attempts?
Hello World! 62866 attempts
:)
funny enough, hello world, even tho it only needs some output, is considered more difficult than open.kattis.com/problems/quadrant
(both rated 1.1, but hello world is below it :D)
Bjørn Dons challenged me to do holmes
(he is the 27th top user)
 
11:42 AM
What is the market repo of java as compare to other programming langauges ?
 
@ViperTecPro 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
 
@ViperTecPro java supports a lot of other languages
and it's not platform specific, so it's quite flexible
I couldn't give you a figure though, if that's what you're after
 
Then why major of the libraries are written in C or C++ example for apache
 
because they're faster
some java standard libraries are implemented using C or C++ for that matter
 
exactly so as we keep on going closer to the machine accessibility increases right ?
 
11:44 AM
accessibility? no. Performance perhaps yes
 
yes perfomance right
 
that comes with security risks
 
but there's also a good reason why we're not all assembly programmers
 
^
 
flexibility and abstraction are important for this
 
11:45 AM
:p
 
meh
if you are aware of the security caveats in C then you can do it well.
 
What do you guiz suggest what should be good for creating libraries ? i wanted to work for apache
 
maven.
 
YES
 
when apache makes libraries to use in your projects, it's pure java
 
11:47 AM
not always Neil
 
ohhhhh really
 
when they write like tomcat, they can also use C/C++ elements
@KarelG if all you have to use are jar files, there can't be C/C++ components
it becomes platform-specific at that point
 
There is a fraction of apache projects that are written in non-Java language
 
ohhk got it seems like java reached a place where mostly it treated as different than C/C++
 
I know that because I worked on two of them
 
11:48 AM
@KarelG fair enough
 
My point was only that unless you're working on the jdk, you can't rely on C/C++ components
not for java usage at any rate
 
okay got it
 
you should use the library as it is presented to you
 
but yeah, write yourself a good library to host on maven repository
it's easily accessible to everyone that way
 
11:50 AM
if there are C based execution code within that, well, so be it. There is a java layer around that. You only access that layer
 
cool...Does CEF(Chromium embeded Framework ) plays any role into the market ?
 
@KarelG if you're given an executable, it doesn't matter
but you can't, say, use a jar to call to a dll
 
@ViperTecPro you can say that it is just chromium in your .NET application window.
I think that Uplay uses that.
 
aggrr i wanted to build something for all (All Platforms) what and how should i do ?
 
what do you mean with "all platforms"? All OS?
or all languages? :P
 
11:53 AM
Yes all OS
 
Java :P
 
Hahahaha okay
 
it is possible to do that with eg C but that involves a lot work
my company have build engineers for that
 
yeah, stick with Java for this
 
But even in java is it possible to integrate everything in it ? like accessing php html css python.... ?
 
11:54 AM
This is literally Java's forte
yes and no..
There is like jython for python in java support
 
why no ?
 
and there are html parsers
There may even be something for php, but why would you need all of this?
are you writing a library or a platform?
 
nahh i wanted my front-end to be build using HTML, CSS and PHP and backed handled by java
 
PHP is backend ...
 
I wanted to build Desktop app like a browser where you can build any type of website
PHP is backend Agreed only when you're online
 
11:57 AM
if you want to offer backend services, you can do that in any serverside language you want to
 
sounds like a platform to me
more than a library
 
:D yes
 
my advice would be to use php to deal with php
Don't try to make it work all in java at that point
 
that's why i ended up with CEF
 
java can be the glue that puts it all together
 
11:59 AM
or you can just write everything in kotlin
 
@Wietlol you gonna write a php parser in kotlin, are ya?
 
All humans develop a tail in the womb that eventually dissolves. (source)
 
@Neil why would I write anything for php?
I write my server code in Kotlin
PHP is useless then
 
@Wietlol those are his prerequisites
it has to deal in php
 
12:01 PM
posted on March 20, 2019

archive - contact - sexy exciting merchandise - search - aboutspecial guest comic by Alex Norris of Webcomic Name! ← previousMarch 20th, 2019nextMarch 20th, 2019: I've had some minor hand surgery this week, so to, uh, celebrate (?) that and give my hand a break: here is a guest comic!! It is by the incredible Alex Norris of Webcomic Name and I hope you will like it. I will give you three

 
> Sorry, I'm a software developer. I misinterpreted the spec in my favor.
- fredoverflow
my specs are: dont use PHP
/afk lunch
 
@Wietlol Cya later
 
mine would be "don't use kotlin"
😛
 
12:34 PM
/back
 
@Wietlol Welcome back!
 
.
/back
/sandbox
 
Please go play in the sandbox
 
Java's switch expressions appear to be interesting
also, JEP 346
 
@Feeds lol
 
12:47 PM
Hey, how would you know if java version "1.8.0_152" is openJDK or Orcle JDK?
 
@DerekHaynes 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
 
@DerekHaynes try looking through the properties
I think "java.vm.vendor" is the one you need
System.getProperties().forEach((o, o2) -> System.out.println(o + ": " + o2));
 
why are you not checking in Runtime properties?
 
good point Karel, how did you think of that?
:p
 
Thanks for the suggestions. I wanted to run a shell script, as I have to check around 30 machines on which JDK they run. I´ll try it out
 
00:00 - 13:0013:00 - 19:00

« first day (3070 days earlier)      last day (1865 days later) »