« first day (1641 days earlier)      last day (3314 days later) » 

fge
12:16 PM
<-- highly frustrated each time he sees a java question where File is mentioned but it turns out to be an Android question
Has no one ever taken the plunge to implement JSR 203 for Android at all??
 
yes
Truth hurts.
 
Vogel.... Done :)
Here is the solution
def applicationNode = new XmlParser().parseText(rtn.text())
 
close ;)
so close yet so far ;)
feel free to answer it yourself, you did the hard part after all ;)
anyone want some legacy project madness?
 
Sure, I'm having a streak of sanity anyway.
 
Consider a class, which extends some Abstract class and overrides a method with following signature:
public Result execute (HttpServletRequest req, HttpServletResponse res)
add in a bunch of filters, properties, static final fields and bloat the method to some 200 lines
proceed to add about 5 different private void methods, that take at least 5 references in, throw Exception and are also at least 150 lines each
then add in an additional 2 static inner classes of which one contains a nested static inner class
move all useful field declarations to the bottom of the file
add in String-Based storage in weakly typed map structures
and to top it off give it some business requirements and about 5 to 10 classes in similar fashion that are used in that class
then go and hide a NullPointerException in there....
oh and I forgot the lack of useful comments, the missing indentation that's preserved for the sake of the SVN history, and the complete and utter lack of documentation of said business requirements
now you know what my day until now was like (T.T)
 
12:35 PM
:O
 
oh and did I mention that fixing the NullPointer by instantiating an object breaks the functionality of something as simple as summing?
hi @ShubhamGupta
 
can u write code here ?
 
to post code, please use services such as pastie, hastebin and similar
 
12:40 PM
but yes, I can actually write code, whether it works is a different question ;)
 
sdgehguioethruhrth
^ best code ever 10/10
in Python, 35 mins ago, by Unihedro
wtf https://vine.co/v/OgLdEuvUIW6
 
Which of the following statements is false regarding the use of the keyword final?
(a). Non static fields may be declared final.
(b). Classes may be declared final.
(c). Parameters may be declared final.
(d). Assignments may be declared final.
How can you have "final" parameters??
 
what is a parameter?
and how is it different from an argument?
if you can answer these questions, the answer to a "final parameter" should be obvious
@Unihedro shush, no prompting
 
this question sucks
quit your school
 
@Vogel612 parameter is an input to a method, and an argument is the list of the parameters?
 
12:50 PM
Uni's answer to everything: quit your school :-P
2
 
@Unihedro it does suck indeed
 
@cp101020304 hmm... you maybe mean the right thing, but no.
 
Solving all your school problems (with Uni): quit it
 
@Vogel612 then?
 
a parameter is the thing you declare in the method signature
the argument is what you give when you actually call the method
public abstract static void example(String thisIsAParameter);

{
    example("And this is an argument");
}
and that thing actually compiles ;)
 
12:52 PM
JLS uses "parameters", so I'd say it's a correct term for java
 
@cp101020304 now can you declare the parameter final?
 
@Vogel612 so how do you declare a "final" parameter?

public abstract static void example(final String thisIsAParameter); ??
 
fully correct
 
so would that just mean that whatever argument you use, it cannot be changed in the "example" method?
im using the word "changed" very loosely
since string is a reference type
 
yes.
well Strings are immutable, so it acutally works well for them
 
12:55 PM
"(d). Assignments may be declared final."
wtf does that even mean (if anything)
 
final {
  x = 45; // DEADLOCK x
}
 
i know that initialisations can be final
@Unihedro is that legal?
 
no
 
public final int = 0;
thats legal
but not
 
it's not an assignment
you can't declare "this equals sign is final now"
 
12:57 PM
assignment is when you try and change the value after you've initialised it right
 
fge
@cp101020304 an assignment is attached to a declaration or a valid variable reference
No it isn't
AN assignment is assigning a value to a variable
Initialization is simply a special case of an assignment
 
what a horrible question
 
10 mins ago, by Unihedro
this question sucks
no need to reiterate
 
reiteration creates emphasis
 
no it doesn't
 
1:01 PM
@Unihedro meh...
 
Your teacher seems to have a knack for making horrible questions
 
@Unihedro do you refute everything?
 
@cp101020304 Of course not! That's ridiculous.
 
@kiheru pretty much my life right now hahah
 
reminds me of the german green party
 
1:05 PM
in The 2nd Monitor on The Stack Exchange Network Chat, 50 secs ago, by nhgrif
You're not going to write code that doesn't crash before you write code that does.
So true.
 
hmm... se chat not loading properly for me...
oh well..
 
fge
@Unihedro worth an email signature, that one
 
Are email signatures still a thing?
 
fge
Yes
 
I wouldn't ask fge whether whatever still is a thing...
mostly because he says he's old....
 
fge
That doesn't mean I don't keep up with times ;)
 
Why does "B" get printed?
 
fge
Rather, I prioritize content over form
 
doesn't the "f" method expect parameters of type "A"?
 
even in italics....
Feb 13 at 14:20, by fge
(hey, I'm old)
 
1:14 PM
@cp101020304 Yes.
 
@cp101020304 B is A, so passing it where A is expected is ok
 
So there is no "priority" given to a method with the exact parameter type?
 
Wait, what?
 
wait stop, waht?
 
nothing
i just confused myself lolol
i get it
 
1:16 PM
There is, but think about how you're calling f()
 
@cp101020304 There's no precedence over which method is invoked - the method being called is called
Your A test object refers to a B, hence it has (A a) -> void and (B b) -> void.
By doing test.f(b), you're delegating its methods to that of ones which are visible to A: which in this case there is only one: (A a) -> void (from class A)
tah dah, that method is called
 
okay wait what???
 
but (A a) -> void (from class B) has overridden it because polymorphism
so it does System.out.println("B");
 
I think its because B is-a A object
so passing B as an argument where A is expected is ok
like kiheru said
 
private void prepareSomeStuff(ReferenceObject one, PreparationParameter param, boolean showData) {
    // some 20 lines of code
    if (!showData)
        return;
}
 
1:20 PM
@cp101020304 Yes. But because test is A, its f(A a) method is the only one accessible. 'Cuz you downcasted the object reference from B to A.
 
particularly because you're treating test as A. Therefore the only f() available is the one that takes A
 
^
 
@Unihedro yeah i'm referring to just the first "f" invocation, but I get it now :)
 
((B) test).f(b); will invoke f(B b) instead
 
i have another horrible question
are you guys ready
well this one isnt as bad
Which of the statements below about the following code is false?
(a). Objects constructed from QuestionClass have the field field1.
(b). Objects constructed from QuestionClass have only the members
field1, field2, method1, method2, method3 and no others.
(c). Objects constructed from QuestionClass have the public members
method1 and method3.
(d). Objects constructed from QuestionClass have the field field2, which
can be accessed by objects from some other classes.
 
1:24 PM
all
 
fge
@cp101020304 if you mean by that that the "better fit method" will be called then yes
 
@cp101020304 All of those statements are false.
 
fge
But sometimes the compiler cannot even determine what the better fit is
 
@Unihedro explanation?
Answer is b, which i understand
i know field1 is still inherited (although it is private) but is not visible/accessible by the inheriting class so a is somewhat true
and d is correct because field2 = protected so it can be accessed by other classes in the same package?
I didn't like the use of the word "have" in the options though
 
any class extending; does not need to be in the same package
 
1:27 PM
b is also false as ParentClass inherits from Object and picks up those methods. And b says "only"
 
oh, maybe i meant directory then
@JoeG yes thats what the question explanation said :)
 
oh - duh! didn't see that! Sorry
 
All these statements are false logically.
 
@SecondRikudo A sweden query?
 
@Omama can you explain why?
 
1:29 PM
Why would any of the others than b be false?
 
@Gemtastic Is it true that it's forbidden by law to sell Alcohol, except for the government's/king's?
 
SELECT människa FROM svenskar WHERE last_name = 'svensson';
Yes and no
Booze/hard liquor can only be sold by the government and bars, low alcoholic beer and cider can be sold anywhere to people above the age of 18
 
@kiheru wondering the same thing
 
20
A: Why can we reduce visibility of a property in extended class?

UnihedroThis is because Parent.a and Child.a are different things. Child#method() @Overrides Parent#method(), as they are methods. Inheritance does not apply to fields. From the Oracle JavaTM Tutorials - Inheritance, it was written that: What You Can Do in a Subclass The inherited fields...

 
We're technically not allowed to have the booze monopoly like we do according to the EU, but we DGAF :P
 
1:33 PM
Instances of QuestionClass are instances of ParentClass.
 
@Gemtastic that's pretty nasty...
what country is this?
 
6 mins ago, by Gemtastic
@SecondRikudo A sweden query?
read like 10 lines above?
 
@Unihedro how is that related? The code does not try to do that
 
@kiheru Exactly because the code did not try to do that, the statements do not hold.
 
There's not that bad really. All bars and clubs still serve alcohol, you can get wine to your dinner in restaurants and that, you just can't buy anything but cooking wine in a regular food store
 
1:36 PM
Fields and methods are inherited from their superclasses but members aren't
brb
ugh so many interruptions today
 
@Gemtastic @kiheru Is it any different from Finnish laws?
 
protected members are still accessible ;)
 
"A subclass inherits all the members (fields, methods, and nested classes) from its superclass. Constructors are not members, so they are not inherited by subclasses, but the constructor of the superclass can be invoked from the subclass."
why does it say members are inherited?
 
@OlegKuznetsov The law in Finland is pretty similar to what it's in Sweden
 
subclasses can access protected methods of parent class
 
1:38 PM
@cp101020304 because either that or uni is wrong..
 
fge
Members which are not private are inherited
 
@cp101020304 Because all (non-private) members are inherited.
 
OBJECTS of subclasses contain private fields of their superclasses. The subclass itself has NO NOTION of private fields of its superclass.
 
fge
@SecondRikudo was the lunch worth the brain warp? :p
 
1:42 PM
@fge Definitely.
 
The subclass has all the non-private members too doesn't it? They just cant be "used" for lack of a better word?
 
The statement was "has the field field1", not "inherits the field field1"
 
@kiheru yeah contains the private field, but does not INHERIT it
 
@OlegKuznetsov It's a bit unfair with sweden and finland; finland has to learn about sweden because sweden used to "own" finland, sweden barely even know what Helsinki is :P
 
which is exactly why i thought that statement was correct
I can't see how it could be false
 
1:43 PM
In other words, I have no clue what any finnish laws are :P
 
fge
@SecondRikudo the brain warp or the lunch? :p
 
I just know that the inheritance stuff was nasty when great grandma died. Aparently there are some differences in that law in finland...
 
fge
@Gemtastic don't you know the saying in motorsports, and rally in particular? "If you want to win, hire a Finn"; well, OK, now it doesn't hold; if you want to win in rallying, hire a Frenchman
 
@Gemtastic the alcohol law is familiar to me mostly because I have been enough times in Sweden
 
@fge Mika!
 
fge
1:45 PM
Loeb and Ogier are proof enough
@Gemtastic Salonen?
 
@fge Do you know why they say that? Finns have a long history of racing from a very early age. Everyone drives, and everyone races.
 
@kiheru Then you should know that you don't go to sweden to buy booze ;P
 
@JoeG "But the interviewer thinks that they are inherited, because we can access such fields indirectly or using reflection and they still exist in the object."
 
fge
@ShotgunNinja yes I know, although this part seems to have dwindled in the last 20 years or so
 
@Gemtastic yep. I'll rather buy it on the way to Sweden, on the ship
 
1:46 PM
sorry that's wrong. by using .listAllMethods or .listAllFields it will reveal that this is NOT the case
 
@fge Both
 
@SecondRikudo :O
 
I always went out of my way to make sure my PreparedStatement object is kept in state
 
@kiheru True... I'm from the wrong side of sweden though, we have denmark and germany as our goto :P
 
@SecondRikudo wat
 
1:48 PM
Knowing I can just call prepare and instantly execute without keeping the PreparedStatement as state is a refreshing change.
 
@Gemtastic Germany is cheaper anyway than the ships
 
Huh, never tried that, I guess.
 
@kiheru You have to count the travel cost though
 
Or I could be totally misunderstanding what you're describing because it's 8:48am (read: too damn early) and I haven't had any coffee yet.
 
nut minnä olen ihan alasti
 
1:50 PM
in RegEx - Regular Expressions, 36 mins ago, by nhahtdh
Quiz time. Which ones of these regexes compiles in Java:
A. "(?<=.*a)"
B. "(?<=a.*)"
C. "(?<=.*a.*)"
D. "(?<=.*a.*.*)"
E. "(?<=.*)"
F. "(?<=.*..*..*..*..*)"
No googling.
 
"nut" -> "nyt"
 
@Unihedro If I had to guess, B.
 
It's that dang u sounding like y :P
 
fge
@SecondRikudo huh, well, I guess we do have different backgrounds :) As a systems engineering guy I knew from the start that this was not a problem
 
I wonder if grandma had any ulterior motives in teaching me that phrase :P
 
1:51 PM
@kiheru "minnä" -> "minä"? :P
 
@OlegKuznetsov yes, that too
 
I spell like a 8 year old XD
 
It can be used to catch attention :-P
 
The context was that I have a Finnish male friend whom were gonna help me learn Finnish
So uh, one does wonder.
It was kinda funny when my brother said "voi vitto" once. :P
 
all these scandinavian jokes....
 
1:54 PM
If he hadn't been 17 I'm sure she would have readied the soap XD
 
I think, I'll give up learning Finnish [I underestimated it: it's way too hard :( ]
 
Toma on taivas~
 
Another common mistake: swedish o is pronounced like finnish u :-D
 
Yeah, o sounds like u, u sounds like y
 
(for the brother's sentence)
 
1:56 PM
å sounds like o :P
@kiheru maybe we should leave it misspelled... Considering what it means...
 
Yeah, you have weird definitions for the letters :-P
 
I bet we could argue forever who has the "weird" sound for the letters XD
 
Well, looks like, I've got enough NPEs for one day (it's even more like NPE-overdose!), so see ya!
 
Follow the IPA and you're pretty close to finnish
 
IPA?
Gylle?
 
1:58 PM
International Phonetic Alphabet
 
@fge It always made sense to me that the PreparedStatement represents the compiled query object, and that preparing again is costly.
 
not India Pale Ale
 
@ShotgunNinja Would have made sense too; drink some pale ale and you'll sound finnish XD
A kinda grim sense perhaps... Lost of the fennoswedes are acloholics :(
Apart from grandma I don't know any finn living here* who isn't alcoholic :(
 
fge
@SecondRikudo define "prepare" here
 
@fge Calling conn.prepare(sql)
 
2:01 PM
Map<String extends Object,Integer> map;
why is that illegal?
 
fge
@cp101020304 go read the JLS
 
JLS?
 
fge
Java Language Specification
 
@fge That's not a very fair thing to say, lol
 
it is...
 
2:02 PM
RTFM instead then
 
765 pages.....
 
better than: "google it, moron"
 
fge
And why are you so uptight about such details anyway? Just code; if it doesn't compile, learn from your IDE what the error is and if you don't understand it, investigate it
 
@cp101020304 You got a problem with that?
 
That's like me telling you to go and read the HTML, CSS and then ECMAScript specifications when you have a syntax/runtime question.
 
2:02 PM
tip: you're asking about the difference between a wildcard and a type.
 
More specifically, there's a section for generics.
 
fge
@SecondRikudo yeah, true enough
I'm too used to Java and its pecularities
@cp101020304 basically, you cannot use extends or super in generics where the left hand side is not either of a type parameter or a wildcard
The language definition enforces that
 
mostly because it would be rather stupid to allow that...
 
Map<? extends Object,Integer> map;
 
since it's basically moot to bound a type. it's already a bound.
 
2:06 PM
thats legal woo
 
do you understand why?
 
somewhat
 
fge
@Vogel612 yes but then javac is stupid :p
 
ya right...
 
fge
So you need to tell it what to accept :p
 
2:07 PM
@Unihedro could not connect to server: Connection refused (0x0000274D/10061) Is the server running on hose "localhost" (::1) and accepting TCP/IP connections on part 5435? could not connect to server: Connection refused ...

I'm getting when i start up Postgres, it was working few works ago. When i open my db, this error is coming. Searched in google, but all solutions are for linux. any help please?
 
fge
In fact its greatest leap in intelligence is Java 8 and being able to parse all possible lambda forms; that and the appearance of generics
 
@JudeNiroshan Uninstall Windows. I recommend Ubuntu.
This is the third time I've said the same thing, I'm not repeating any more.
 
fge
Why Ubuntu? Any Linux distribution will do; but yes, Ubuntu is the easiest to get started
 
:|
!!urban recommend
 
@Unihedro No definition found for recommend
 
fge
2:09 PM
!!urban nih
 
@Unihedro But this is the first time for me... hey please. i can't do that at time moment.
 
!!recommend
 
@ShotgunNinja That didn't make much sense. Use the !!/help command to learn more.
@fge [NIH](http://nih.urbanup.com/1973301) Not Invented Here

The German art of humiliating any technology, agricultural product, or (medical) scientific work that has not been ivented or produced in Germany, Switzerland, or Austria.
 
^typo in "invented" in last sentence
 
fge
Eh? Why German?
Germans did not invent the car, sure, but the best cars in the world today are German, without a shred of doubt
 
2:10 PM
Because German engineering
 
@JudeNiroshan Whoops, sorry, I confused you with another user.
 
fge
(except if you want to have fun; in this case nobody beats England)
 
yesterday, by Unihedro
@AniketDeshmukh Windows?
yesterday, by Unihedro
Uninstall it. I recommend Ubuntu.
 
ohh man.. you are maintaining a log file for this chatroom
 
No but seriously, Windows can't maintain constant internal connections without hitting the threshold easily, which it does fails at everything.
 
fge
2:12 PM
@JudeNiroshan if "log file" == "@Unihedro" then yes; this chap is just a living SO chatroom dictionary for some reason
 
ok. i will move to mysql
 
please don't mysql is worse
 
ohh... i could find a host provider who supports for postgres :(
 
@JudeNiroshan everything but shared hosting tends pretty heavily towards postgres
it's just a little more complex to admin, so shared usually goes with the LCD
 
who made javabot?
 
2:16 PM
@ssube can you give guide me to choose a good host provider to deploy my web app which i almost developed with postgress ?
 
look under contributors tab
Ignore waffle-iron, it's a bot.
 
fge
@JudeNiroshan heroku
 
@JudeNiroshan not really, that's a very big question. Heroku definitely offers hosted postgres, Amazon has an offering, and any machine where you can install things will work.
I personally have a half-dozen boxen from ramnode where I host most of my stuff, but I'm fairly comfortable running servers.
These guys seem to offer semi-hosted SQL on AWS, GCE, and Azure (never used them before, but they were the first result).
 
@JudeNiroshan about everybody who gives you your own vm and just gives you a portforward
 
thanks for your links. i'll refer to them. if i have any issue, i'll ping you later
 
2:33 PM
OMG KILL ME NOW
THAT'S A PICTURE OF WINDOWS
 
ohhh :(
 
hahahah
previous error
 
:D
 
It’s not you, it’s us. This is our fault.
if only women said that
 
2:36 PM
Maybe in an alternate universe.
 
@cp101020304 I don't understand why you would think that...
I actually heard that from a girl..
 
^^^
 
@Vogel612 either you're one of the few lucky ones
or
she wasn't a girl
 
These jokes are inappropriate anyway, since SE is a gender-agnostic network.
 
you dealing with girls.... wow :P
 
2:37 PM
You mean you don't? #rekt
 
@cp101020304 well it was for when she broke up with me, soooooo there's that
 
ohhh
so sad.
 
she broke up with you
so that pretty much means it was your fault in her mind
i.e she didn't mean it
 
@cp101020304 meh...
 
RIP
 
2:38 PM
don't make it more complicated than it was.
 
dude, don't fill anyone's head with your worthless drivel.
 
also I'm definitely not listening to advice of some strange person from the interwebz
 
relationships are hard, breakups are hard. Let's leave this room for discussing Java.
 
sadly, i have to move into mysql as my customer wanted.... just got confirmation :(
 
@JudeNiroshan This is the saddest story I've heard in 2015.
 
2:40 PM
@Unihedro yet ...
 
i'll try to suggest the heroku to him and try to stick to postgress
will see
 
@Vogel612 It's already a third of the year, I'm not negative with this.
 
hmm.. okay
 
3:10 PM
hello there
 
Hi!
 
!iH
?uoy era woH
 
Quite fine.
 
YES!
Checkmated someone else.
 
fge
3:34 PM
@Unihedro and what about HTTP/2?
 
fge
@Unihedro what does this have to do with HTTP/2?
 
@fge What does this not have to?
 
@Unihedro hahahahahaha
that's some serious bullshit
 
@Unihedro didn't you link to the 31 ticket before already??
 

« first day (1641 days earlier)      last day (3314 days later) »