« first day (1859 days earlier)      last day (3065 days later) » 

3:52 AM
Folks, while reading a tutorial, I came across this construct
// Various callback methods defined by the BLE API.
private final Foo objFoo = new Foo() {

	@Override
    public void onSomethingOrOther() {
        // useful things ...
    }

    @Override
    public void onSomethingElse() {
        // other useful things ...
    }
}
It looks like they are declaring an object and overriding some of the virtual methods. It looks like they are creating a kind of an implicit inner class.
Does this kind of technique (or idiom) have a name?
 
anonymous inner class?
 
@Aequitas Your guess as good as mine.
 
?
168
Q: How are Anonymous (inner) classes used in Java?

WarriorWhat is the use of anonymous classes in java? Can we say that usage of anonymous class is one of the advantages of java?

 
 
2 hours later…
6:12 AM
@MadaraUchiha gz!!!
 
 
1 hour later…
7:31 AM
Congratulations to Madara-sama for winning the election!
11
 
hi
 
8:22 AM
morn
Congratulations, @MadaraUchiha
 
ohaiou
 
morn java
 
@wonderb0lt Thanks :)
 
congrats @madara :)
 
8:59 AM
Morning
 
Morning
 
The blue color suits you
 
It does :)
 
I am using the maven tomcat plugin to run my project
however it seems to depend on guava 10
and i am using guava 18 in my project
 
so?
 
9:06 AM
as a result i am getiing a NoSUchMethod error in guava
whenever i try to run
can i exclude the guava from my plugin?
 
run where? scnr
 
i tried <configuration><excludes><exclude>/**guava* in my pom
but that doesnt work
i am running it in intelli j
using the maven tomcat plugin
 
@AbhiroopSarkar you may want to exclude the dependency in the tomcat plugin configuration
 
thats what i am trying
but it doesnt seem to be excluded
 
<configuration><dependencies><dependency><exclusions><exclusion><groupId> ..
 
9:09 AM
i tried this
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<excludes>
<exclude>
**/guava/*
</exclude>
</excludes>
</configuration>
</plugin>
i guess its wrong
what should i put in the excludes tag
 
Vogel gave you a hint already
 
you could exclude the guava 10 dependency from the tomcat7 plugin, too...
@wonderb0lt that one only works for dependencies required by the plugin and their transitive dependencies.
there might be a chance to exclude guava 10 from the tomcat plugin
 
thats what i tried above using the excludes tag
 
@Vogel612 Yes but it shows him that he has to use the groupId/artifactId/version thingy right?
 
oh that... that depends on where you try to exclude...
btw can I just say that maven suck and tomcat sucks even more?
 
9:17 AM
Agreed.
 
yeah i agree
but the exludes doesnt take groupid artifact id etc
any other tag inside the plugin where i can use this>
 
in the dependency configuration... as already mentioned above...
 
<dependencies> tag is not supported inside the <configuration> tag it seems
 
then you're doing something wrong
^ official manual says that you can use it
 
9:33 AM
in the link you provided
<dependencies> is not inside the <configuration> tag
 
whoops.
 
And here I thought @Vogel612 was infallible
 
meh. to err is human
 
10:11 AM
Is there anyone here know about HBase?
 
10:29 AM
as per the link pointed by vogel i tried this
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
</dependencies>
</plugin>
i am still getting this everytime i run
Downloading: http://repo.maven.apache.org/maven2/com/google/guava/guava/10.0.1/guava-10.0.1.pom
Downloaded: http://repo.maven.apache.org/maven2/com/google/guava/guava/10.0.1/guava-10.0.1.pom (6 KB at 2.7 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/com/google/guava/guava-parent/10.0.1/guava-parent-10.0.1.pom
Downloaded: http://repo.maven.apache.org/maven2/com/google/guava/guava-parent/10.0.1/guava-parent-10.0.1.pom (2 KB at 1.9 KB/sec)
why is it fetching guava 10 X(
 
did you clean and build?
 
removed the whole guava folder from m2
 
Clean your project
 
the common-tomcat-maven-plugin uses guava inside the tomcat plugon pom
didnt work
cleaned the project
 
 
5 hours later…
3:32 PM
Morning!
 
 
1 hour later…
4:50 PM
@Ballbreaker yo
 
@Tavo Hey man, hows it goin
 
fge
My word how do I hate badly specified requirements
 
@fge Well, your job as a programmer is to take ambiguous specs and transform them into unambiguous programs.
 
@MadaraUchiha that never meet the real requirements
@Ballbreaker not bad. Working is flowing well today. Yourself?
 
fge
Yeah, what @Tavo said
I trust the client to specify correctly from the ground up
But I guess I lack experience, right?
 
5:01 PM
@fge I've been in the industry for just over a year and I know for a fact that will almost never happen
 
@fge :D
 
Unless maybe it's a nuclear power plant :p
 
TBF, it really depends on what clients you deal with
I've been to projects where product gives you a low res crappy image of what they want it to look like
And then when you're done, you get comments like "This button should be more yellow" or "Plus move that 7px to the left"
Which is especially annoying once you've written hundreds of tests that now need refactoring because they CBA to be consistent with their specs.
 
@Tavo Oh righteous, that's always good. Got put on a new task today, designing a modbus interface to map our application to RTUs.. fun stuff.. just drowning myself in technical specs and documents right now to understand what's going on
That and girl#2 ended things last night for goodsies lol ah well ¯_(ăƒ„)_/¯
 
fge
@MadaraUchiha that is all the more annoying when such comments/rectifications come only days before the final deadline
@Ballbreaker it's not even been a year for me but now I start to feel the pain
 
5:03 PM
@fge XD
 
@fge Ahh fair enough, it's even worse when your not just programming, but doing more hardware specific engineering
You end up basically writing legal documents instead of specifications
 
fge
Hardware engineering? That's another kettle of fish altogether
The costs implied by redesign are very different
 
Yeah.. or writing software to control/monitor things like nuclear power plants and subway systems
The worst is when your dealing with unionized clients.. takes forever to get anything back from them.. you end up designing/implementing things before they are even verified
Out of pure necessity in order to meet deadlines and budgetary restrictions
 
@Ballbreaker was meant to happen
 
fge
considers doing freelance in the future -- maybe
 
5:19 PM
@Tavo Yep, I agree
Sucks, but I can't really have my cake and eat it, all the time at least
@fge From what I could tell, freelance might be just as bad if not worse for people having really bad specifications
 
fge
@Ballbreaker but at least I'd be in control of telling the client when to answer and how, and quantify the delays; which I cannot do at the moment
 
@fge That's fair, you would definitely have some more control, and you could be pickier about the clients you choose
Would have to work out if you could make the same amount of money through freelancing though..
Or similar enough to make you happy still
It would be enjoyable though to be your own boss, and have the flexibility behind it. But then there are the added risks I suppose as well
 
Hey Guys!
Spring Framework provides powerful abstraction to JavaEE specifications such as JMS, JDBC, JPA and JTA. Can anyone help me understand this?
 
5:49 PM
@abhimanyu435 avoid Spring as much as you can
 
Unless it's preceded by Winter
 
Which is the better one according to you? :(
 
better what?
 
the season, obviously.
 
Spring takes the control of your code away from you and add a layer of (possibly xml) magic to it
@Vogel612 lol
Spring is best at causing people's frustration
I haven't tried Struts though, so I can't say it's the best at that
 
5:51 PM
@Vogel612 hahahaha
 
@Tavo struts is servlets in shit
or rather, struts is servlets with enough shit thrown at it so some stuck
did I mention servlets are a pain?
 
I didn't get that
servlets what?
 
sorry. SERVLETS SHOULD GO DIE!... better?
 
fge
@abhimanyu435 for some definition of "powerful", maybe
The power to drive you mad, certainly, as far as I'm concerned
 
@Vogel612 clearer, thanks
waves hand
 
5:56 PM
Cya @tav
 
fge
Silly question of the day: are thrust vectoring nozzles worth the hassle
 
@fge derp
 
fge
What does "derp" mean anyway?
 
@fge That ^
 
fge
Hmm, I get it... I guess
Anyway, the question is legitimate if you are curious about modern jet fighter design :p
The only three airframes using that technology so far are: Harrier (retired), F-22 and F-35B
 
6:09 PM
Aviation ftw?
and yes, there is an SE for everything
 
6:48 PM
http://www.commitstrip.com/en/2015/11/25/get-your-colleagues-to-test-your-app-they-said/
CommitStrip
Get your colleagues to test your app, they said…
CommitStrip
1448476570
 
@fge Silly, yet legitimate?
 
 
1 hour later…
fge
8:16 PM
2
Q: Enum, interfaces and Streams: code compiles but fails at runtime; is this expected?

fgeJDK is Oracle' JDK 1.8u65 but the problem has been seen with "as low as" 1.8u25 as well. Here is the full SSCCE: public final class Foo { private interface X { void x(); } private enum E1 implements X { INSTANCE, ; @Override ...

 
fge
8:41 PM
Great
I "rediscovered" a bug in javac, it seems
 
8:55 PM
so... Code Review is now fully graduated!
 
 
2 hours later…
10:55 PM
Dang it, @fge! Stop breaking Java!
 

« first day (1859 days earlier)      last day (3065 days later) »