• cheeser
  • ernimril
  • joed
  • kinabalu
  • lunk
  • ojacobson
  • r0bby
  • ThaDon
  • ricky_clarkson
  • topriddy

« 2019-08-13


2019-08-15 »

Nick Message Date
slosh [slosh!~slosh@] has joined ##java [12:03]
Warfront1 [Warfront1!] has joined ##java [12:06]
comrad [comrad!~quassel@holarse/core/comrad] has joined ##java [12:13]
Sasazuka [Sasazuka!~Sasazuka@unaffiliated/sasazuka] has joined ##java [12:14]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [12:16]
mr_lou [mr_lou!] has joined ##java [12:25]
hussam [hussam!uid193284@gateway/web/] has joined ##java [12:37]
lalitmee [lalitmee!~lalitmee@] has joined ##java [12:43]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [12:47]
nexii [nexii!~nexii@] has joined ##java [01:03]
nexii hello. I was wondering if anyone can advise on a tutorial on building a dropwizard rest api with mysql support using gradle [01:03]
snowmanbamm [snowmanbamm!~textual@2600:1702:4360:6d60:2cd4:8ab5:2ae1:d45b] has joined ##java [01:06]
Bombe Google can. [01:15]
tasse [tasse!] has joined ##java [01:20]
Sauvin [Sauvin!sauvin@about/linux/staff/sauvin] has joined ##java [01:25]
macroprep [macroprep!] has joined ##java [01:44]
Kol [Kol!] has joined ##java [01:50]
t2mkn [t2mkn!~t2mkn@] has joined ##java [01:50]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [01:50]
extor [extor!~extor@unaffiliated/extor] has joined ##java [02:02]
twoone [twoone!twoone@gateway/vpn/mullvad/twoone] has joined ##java [02:06]
adder` [adder`!~adder@gateway/tor-sasl/adder] has joined ##java [02:21]
Tichodroma [Tichodroma!~lutz@fsf/member/Tichodroma] has joined ##java [02:27]
t2mkn_ [t2mkn_!~t2mkn@] has joined ##java [02:29]
puppy_za [puppy_za!uid277586@gateway/web/] has joined ##java [02:39]
exonity01 [exonity01!uid364582@gateway/web/] has joined ##java [02:45]
sdu [sdu!] has joined ##java [02:51]
comrad [comrad!~quassel@holarse/core/comrad] has joined ##java [02:56]
sdu [sdu!] has joined ##java [03:05]
acidjnk [acidjnk!] has joined ##java [03:09]
therue [therue!] has joined ##java [03:10]
Zee- [Zee-!~Zee-@] has joined ##java [03:11]
AMcBain [AMcBain!] has joined ##java [03:18]
ertiportline [ertiportline!~ertiportl@unaffiliated/ertiportline] has joined ##java [03:24]
Chuguniy [Chuguniy!~Chuguniy@] has joined ##java [03:30]
qwedfg [qwedfg!~qwedfg@] has joined ##java [03:36]
deebo hmm drawing a blank, is there a functional interface for void no param functions [03:40]
deebo guess runnable works, but seems weird to use [03:42]
Bombe Hmm, yeah, it?s kind of tainted by it being used for threads mostly but it?s still weirdly appropriate just for being triggered? [03:43]
g00s [g00s!~g00s@unaffiliated/g00s] has joined ##java [03:45]
ravenousmoose [ravenousmoose!~ravenousm@] has joined ##java [03:46]
Ox11de_ [Ox11de_!~jake@2a02:810a:8c0:77e0:635a:d717:b6d9:2618] has joined ##java [03:49]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [03:56]
ernimril Bombe, Consumer? [04:00]
ernimril ugh, forget that, that one takes one thing [04:00]
ernimril Supplier is the one I meant, but I guess it is as awkward as Runnable [04:01]
lalitmee [lalitmee!~lalitmee@] has joined ##java [04:03]
progart [progart!~kamee@] has joined ##java [04:11]
progart [progart!~kamee@] has joined ##java [04:12]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [04:17]
rx7a [rx7a!9a7e65af@] has joined ##java [04:21]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [04:24]
Diablo-D3 [Diablo-D3!] has joined ##java [04:25]
Maldivia deebo: Runnable is the default for that, or create your own [04:25]
tiagoE [tiagoE!tfvematrix@gateway/shell/] has joined ##java [04:28]
Diablo-D3 [Diablo-D3!] has joined ##java [04:35]
Cahaan [Cahaan!~Cahaan@] has joined ##java [04:38]
bolovanos [bolovanos!] has joined ##java [04:40]
HumanG33k [HumanG33k!~HumanG33k@] has joined ##java [04:52]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [04:53]
tristianc [tristianc!] has joined ##java [04:58]
Bombe I have a JPA repository, and I want to select the top 5 entries of a table where a field has one of two states. In a @Query I can not limit the number of results, and when using the method name I can not filter by the two values. [04:59]
Bombe Is there anything I can do, short of creating the query using the entity manager? [04:59]
ernimril Bombe, @NamedQuery? [05:00]
mevodad [mevodad!~jottinger@unaffiliated/dreamreal] has joined ##java [05:00]
mniip [mniip!mniip@freenode/staff/mniip] has joined ##java [05:01]
Bombe That?s also JPQL, isn?t it? [05:01]
m1m3-50 [m1m3-50!~m1m3-50@unaffiliated/mimicize] has joined ##java [05:02]
magz [magz!] has joined ##java [05:02]
DTZUZO [DTZUZO!] has joined ##java [05:04]
Gazooo [Gazooo!~Gazooo@] has joined ##java [05:07]
Maldivia Bombe: why cant you filter when using the method name? [05:08]
Bombe Maldivia, because I don?t want the values to filter for be the parameters. They are always the same. [05:09]
Maldivia em.createQuery("select ....").setMaxResults(5).getResultList() ? [05:11]
Bombe Sure but that?s the least-favoured solution? :/ [05:11]
Maldivia so a @query combined with a findTop5 ? [05:12]
Bombe That would be awesome! [05:12]
Maldivia did you try that? [05:13]
Maldivia Bombe: or use Pageable? [05:14]
Bombe Using both method name and @Query results in the method name being ignored (i.e. it returns 6 elements). [05:15]
Maldivia bah :( [05:16]
Bombe And the pageable would have to be a parameter again? [05:16]
x256 [x256!~Jace@2001:638:60f:1000:bc27:83aa:5f:1586] has joined ##java [05:16]
Bombe This is slightly unsatisfying. [05:16]
Maldivia @Query(...) findAllFoo(Pageable p); default findTop5() { return findAllFoo(new PageRequest(0, 5)); } ? [05:17]
Maldivia don't know if that would work, but :D [05:18]
mevodad this is spring data? [05:18]
Maldivia I'm assuming since Repository was mentioned [05:18]
Bombe Yes, it is. [05:19]
mevodad notes time of joining, which postdated such things [05:19]
Maldivia logs [05:19]
Maldivia channel logs can be found at (Select the channel from the list on the left-hand side.) [05:19]
mevodad Bombe: the two states are constants? [05:19]
v01d4lph4 [v01d4lph4!~v01d4lph4@] has joined ##java [05:20]
Bombe mevodad, strings but always the same, yes. [05:20]
Maldivia (in before "view") [05:20]
mevodad why wouldn't a named query work? select a from entityname a where a.val = 'a' or a.val='b' top 5, with setmaxresults? [05:21]
Bombe Maldivia, combining the two methods doesn?t work either, because Spring complains about not being able to create a query from the name of the first method. [05:21]
mevodad you'd create a custom repository interface - it pollutes the namespace with two or three extra classes but is really pretty easy to do [05:21]
Bombe mevodad, see ?short of creating the query using the entity manager? and ?Sure but that?s the least-favoured solution.? [05:22]
Bombe Yes, those work but I?d rather Spring did that for me. :) [05:22]
mevodad shrugs. Okay, fair enough, but Spring won't, and working > elegant but nonworking [05:22]
Bombe True. [05:22]
Bombe Guess I?ll create queries by hand. Like a peasant. [05:23]
ernimril I've never understood why so many are afraid to create their own queries. Do you not want to use your database to the fullest? [05:23]
paws_ [paws_!uid89121@gateway/web/] has joined ##java [05:23]
Bombe I?m not afraid, I just prefer solutions where I have to write, test, and maintain less code. [05:24]
ernimril sure, it can make it harder to run on several different databases, but not many actually needs that [05:24]
Ox11de [Ox11de!~jake@2a02:810a:8c0:77e0:635a:d717:b6d9:2618] has joined ##java [05:32]
progart [progart!~kamee@] has joined ##java [05:37]
Cecil [Cecil!] has joined ##java [05:43]
Alina-malina [Alina-malina!~Alina-mal@unaffiliated/alina-malina] has joined ##java [05:47]
progart [progart!~kamee@] has joined ##java [05:48]
HumanG33k [HumanG33k!~HumanG33k@] has joined ##java [05:49]
HumanG33k [HumanG33k!~HumanG33k@] has joined ##java [05:51]
Diablo-D3 [Diablo-D3!] has joined ##java [05:55]
mr_lou [mr_lou!] has joined ##java [05:59]
Diablo-D3 [Diablo-D3!] has joined ##java [06:06]
t2mkn [t2mkn!~t2mkn@] has joined ##java [06:07]
baiguai [baiguai!] has joined ##java [06:10]
spuz [spuz!6dee4b8e@gateway/web/cgi-irc/] has joined ##java [06:24]
jak2000 [jak2000!~jak2000@] has joined ##java [06:29]
progart [progart!~kamee@] has joined ##java [06:32]
ottoshmidt [ottoshmidt!~ottoshmid@] has joined ##java [06:34]
t2mkn [t2mkn!~t2mkn@] has joined ##java [06:34]
dez [dez!uid92154@fedora/deSouza] has joined ##java [06:38]
sexy1233 [sexy1233!] has joined ##java [06:39]
sexy1233 mevodad thanks [06:39]
gregf_ [gregf_!] has joined ##java [06:40]
mevodad tutorial [06:40]
mevodad The Oracle tutorial for Java is probably your best starting point, at . Skip the Netbeans bits. Another option: - has a list of others as well. [06:40]
mevodad books [06:40]
mevodad Some good java books are listed at Also see ~general books [06:40]
sexy1233 help [06:40]
sexy1233 for a FAQ and a quick tutorial on how to use javabot, see: [06:40]
learningc [learningc!~learningc@] has joined ##java [06:41]
mevodad sexy1233: if you know how to program, java takes about a week to learn. If you don't know how to program, well, it takes longer. [06:41]
Jantz [Jantz!] has joined ##java [06:42]
whaley [whaley!~whaley@] has joined ##java [06:48]
[twisti] what prompted that outburst, mevodad ? [06:53]
mevodad [twisti]: conversation in a different channel. [06:54]
[twisti] ah, ok [06:54]
mevodad high school student, said they needed to learn java in the coming year, so: resources [06:54]
conan [conan!~conan@] has joined ##java [06:55]
whaley java is dead [07:00]
odinsbane d3 is pretty cool. [07:00]
spuz d3? [07:01]
ottoshmidt whaley, long live java [07:01]
whaley *high five* [07:02]
ottoshmidt *five high* [07:02]
sdu [sdu!] has joined ##java [07:02]
madghost [madghost!~kvirc@] has joined ##java [07:04]
DiabloD3 [DiabloD3!] has joined ##java [07:06]
jak2000 friends... where can download jdk 8u222 ? i only found: 8u212 ... [07:07]
mevodad jak2000: sdkman has it [07:08]
mevodad adoptopenjdk should also have it (as that's the source for sdkman) [07:08]
ernimril jak2000, what is the reason you want that exact version? [07:09]
bf_ [bf_!] has joined ##java [07:09]
mevodad ernimril: we've asked multiple times [07:10]
jak2000 sdkman is a page? [07:11]
mevodad sdkman [07:11]
mevodad SDKMAN is a tool for managing parallel installations of JVMs and tools on Mac/Linux/Unix. See [07:11]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [07:11]
jak2000 a friend tell me: but its 8u212 [07:12]
jak2000 jak2000's title: "Releases frekele/oracle-java GitHub" [07:12]
mevodad I'm trying to care but failing [07:12]
mevodad you asked us, we told you [07:12]
mevodad and somehow the idea of a github repo holding an *oracle* release sounds like a legal issue [07:13]
Maldivia shakes his fist at WildFly 17... damn you for identifying a bug we have with JDK13 [07:14]
madghost hello, I try to connect to Oracle DB, in windows in IntellJ IDEA I use ojdbc8 and it's work perfectly, but I need do in on Linux in command line, how I can do it? javac -classpath ./ojdbc8.jar and then java app get me message: No suitable driver found for jdbc:oracle:thin [07:14]
mevodad madghost: that's the command line you're using? [07:14]
Maldivia classpath [07:14]
Maldivia The classpath tells Java or the compiler which jar files and folders to search for classes and resources. Use the -cp/-classpath run-time options to specify the classpath (does NOT work with -jar!). Also see [cheeser's blog], [], or for more information. [07:14]
madghost How I can use drivers ojdbc in compile in command line? [07:14]
mevodad you supply the classpath to both the compilation AND the runtime [07:14]
mevodad you actually don't need the jdbc driver to compile [07:15]
Maldivia madghost: remember you need to add the jdbc driver on runtime classpath as well [07:15]
madghost Maldivia: how? [07:15]
madghost ( [07:15]
sonOfRa jak2000: I'd be very careful about downloading "oracle" releases from non-oracle sites. [07:15]
madghost I newbee [07:15]
Maldivia java -cp ojdbc8.jar:. app [07:15]
ernimril you might need the drivers if you do oracle specific stuff, but most probably you are not [07:15]
madghost I donwloaded ojdbc from Oracle [07:15]
mevodad madghost: well, we're telling you as if you're a newbie [07:15]
Maldivia madghost: but read the links posted above [07:15]
mevodad you don't need the drivers to *compile* [07:15]
madghost thanks [07:15]
sonOfRa They do provide .md5 and .sha1 files, but that doesn't help you! They're just md5s and sha1s of *the files that are there*. There are no signatures on them that tell you that the binaries were not tampered with prior to uploading. [07:16]
ernimril mevodad, you might, if you do oracle-specific stuff (we do so we need it) [07:16]
madghost mevodad: I need to connect them, but how? [07:16]
mevodad ernimril: if you need the driver-specific classes, sure [07:16]
mevodad like, you use the actual driver names in your source [07:16]
Maldivia madghost: read the classpath links above, it should explain [07:16]
mevodad do you think madghost is at that point in his or her career? [07:16]
mevodad sonOfRa: I'm thinking that github repo might be illegal [07:17]
madghost Maldivia: ok, I doing it right now, thanks [07:17]
jak2000 sonOfRa recomend me please a site [07:17]
mevodad jak2000: no. [07:18]
kicked jak2000 (asked and answered.) [07:18]
sonOfRa mevodad: very likely so, yes [07:18]
jak2000 [jak2000!~jak2000@] has joined ##java [07:18]
v01d4lph4 [v01d4lph4!~v01d4lph4@] has joined ##java [07:20]
mniip_ [mniip_!mniip@freenode/staff/mniip] has joined ##java [07:23]
bn_work [bn_work!uid268505@gateway/web/] has joined ##java [07:26]
Diablo-D3 [Diablo-D3!] has joined ##java [07:26]
madghost thanks a lot! [07:30]
madghost java -cp ./ojdbc8.jar:. app works perfectly :-) [07:30]
madghost thank you [07:30]
mevodad madghost: note that you'll want to use packages for *soon* [07:31]
Maldivia ... and then maven/gradle :D [07:31]
madghost -) I'm PHP developer, but OCI for PHP don't work correctly, then I need to create some API service for adding data into Oracle on Java :-) I write on Java rarely [07:33]
intellect [intellect!uid258908@gateway/web/] has joined ##java [07:34]
mevodad so noted [07:35]
DiabloD3 [DiabloD3!] has joined ##java [07:47]
royal_screwup21 [royal_screwup21!d98a3b22@gateway/web/cgi-irc/] has joined ##java [07:49]
DTZUZO [DTZUZO!] has joined ##java [07:50]
v01d4lph4 [v01d4lph4!~v01d4lph4@] has joined ##java [07:55]
Diablo-D3 [Diablo-D3!] has joined ##java [07:57]
wedr [wedr!90792eca@gateway/web/cgi-irc/] has joined ##java [07:59]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [08:01]
Diablo-D3 [Diablo-D3!] has joined ##java [08:07]
v01d4lph4 [v01d4lph4!~v01d4lph4@] has joined ##java [08:12]
DrDonkey [DrDonkey!~DrDonkey@unaffiliated/drdonkey] has joined ##java [08:14]
DrDonkey [DrDonkey!~DrDonkey@unaffiliated/drdonkey] has joined ##java [08:16]
wedr morning [08:18]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [08:18]
learningc [learningc!~learningc@] has joined ##java [08:26]
Diablo-D3 [Diablo-D3!] has joined ##java [08:27]
Bombe Hmm. That whole creating-queries-manually thing really irks me. [08:28]
Bombe Now, in addition to my nice, clean @Repository interface that Spring manages for me, I have to create another class right next to it that needs to fiddle around with the EntityManager. [08:28]
Bombe And the line on which they are split is ?JPQL can/can?t do this.? [08:29]
progart [progart!~kamee@] has joined ##java [08:32]
julius_ [julius_!c2726878@] has joined ##java [08:33]
julius_ hi [08:33]
julius_ is there a way to load a database dump into a database just before junit runs? [08:33]
wedr Using Mockito, is there a way to get a response outputstream after an invocation has been made when attempting to get a request? [08:33]
ottoshmidt julius_, there is always a way. [08:33]
julius_ ottoshmidt yes there is [08:34]
cheeser dbunit [08:34]
ottoshmidt or do the whole thing manually (via sql queries) [08:37]
julius_ im used to import dumbs from the command line with pgsql [08:39]
julius_ is there also a sql query way to import dumbs? [08:39]
ottoshmidt julius_, you'd have to execute a commandline programme from java then. [08:39]
julius_ development system and database are not the same [08:39]
ottoshmidt Not the best way, but technically could be done. [08:40]
julius_ the best would be to connect via ssh to the remote and start a bash sript [08:41]
julius_ so the dumb is already on the db system [08:41]
ottoshmidt julius_, that's part of "execute a command line programme from java" [08:41]
ottoshmidt calling ssh [08:41]
v01d4lph4 [v01d4lph4!~v01d4lph4@] has joined ##java [08:41]
julius_ yes, was hoping for a shortcut [08:42]
ottoshmidt julius_, like? [08:42]
julius_ the test is supposed to show differences in imports to database when the code gets modified [08:42]
julius_ of course, i got smaller tests that check for part of the data [08:43]
ottoshmidt so you import, run test case, and check [08:43]
ottoshmidt right? [08:43]
julius_ yes [08:43]
ottoshmidt and you need to solve import part? [08:43]
julius_ yes, it can be done with jenkins of course [08:45]
julius_ but would be nice to have a way to start it from my local machine [08:45]
ottoshmidt julius_, you cannot run tests on the remote machine? [08:45]
julius_ jenkins runs the tests on the remote [08:46]
Xatenev [Xatenev!~I@] has joined ##java [08:46]
ottoshmidt julius_, but you don't want to keep dumps on the remote? [08:46]
julius_ i will play around with that [08:46]
Xatenev hi [08:46]
Xatenev is java doing similar compiler optimizations like C? I find different answers on that. [08:46]
Xatenev loop unrolling etc [08:47]
julius_ ottoshmidt sure i do. i think i got all i need for further experimentation. thanks [08:47]
Xatenev I guess a lot of this is probably part of the jit? [08:47]
ottoshmidt julius_, cheers [08:47]
ottoshmidt Xatenev, java compiler and jvm do a lot of optimisations [08:48]
ottoshmidt depends on what you meant under 'similar to C++' [08:48]
Xatenev is java capable of doing optimizations on stuff that comes from a database? [08:48]
Xatenev e.g. I retrieve a list of entries [08:48]
ottoshmidt and? [08:49]
Xatenev now I have 2x .stream().anyMatch() { ...} [08:49]
Xatenev on the same list [08:49]
Xatenev is java capable of optimizing that? [08:49]
cheeser faptimization [08:49]
cheeser cheeser, faptimization is the process of optimizing code without measuring for performance problems first [08:49]
mindCrime [mindCrime!~mindCrime@] has joined ##java [08:49]
ottoshmidt Xatenev, you want to say: would anyMatch() do better than sql? [08:50]
Xatenev ottoshmidt, no? [08:50]
Xatenev my question is if java is capable of optimizing the 2x anyMatch into e.g. one loop only [08:50]
Xatenev (or however it works internally) [08:50]
ottoshmidt ahm, don't know exactly, but whatever I have read from java docs on other data structure implementations in java, most of the time their algorithms are pretty optimal [08:51]
ottoshmidt almost state of the art in most cases [08:51]
Jantz [Jantz!] has joined ##java [08:52]
Xatenev cheeser, I dont think that is faptimization lol [08:52]
conan [conan!~conan@] has joined ##java [08:52]
cheeser have you seen a performance problem and profiled to see where it is? [08:52]
Xatenev cheeser, as a dev you shouldnt write intentionally slow code [08:53]
cheeser or are you just worrying about what might happen? [08:53]
ottoshmidt Docs frequently mention the techniques used behind the searches etc. So maybe reading more on streams in java could find you something [08:53]
cheeser Xatenev: i don't. [08:53]
Xatenev cheeser, i didnt say you write intentionally slow code. [08:53]
Xatenev i just say one shouldn't do it [08:54]
Xatenev and having two anyMatches when one loop could do it [08:54]
Xatenev seems like intentionally slow to me. [08:54]
impermanence [impermanence!c01c0114@gateway/web/cgi-irc/] has joined ##java [08:54]
cheeser *could* do it. [08:54]
Xatenev cheeser, ? [08:54]
cheeser 1. make it work. 2. make it fast. 3. make it pretty. [08:54]
cheeser do you have working code now? [08:54]
Xatenev yes [08:54]
cheeser is it slow? [08:54]
Xatenev it could be slow, im using the code on a way reduced dataset [08:55]
cheeser worry about it if you find that it is. write the rest of your app first. [08:55]
Xatenev cheeser, i think that is a very bad way to code. [08:55]
cheeser that's fine. on the other, i can deliver working code while you're frittering away at optimizing something you don't even know is slow. [08:56]
Xatenev cheeser, [08:57]
Xatenev you wouldn't code that either, right? [08:57]
Xatenev it "works" but its obviously shit and you don't want stuff like that in your codebase [08:57]
Xatenev sure if you have a lot of time to waste you can also just "make it work" and then fix it all "later" (we all know that never happens) [08:57]
cheeser considering that's not java, no, i wouldn't write that. [08:57]
cheeser you seem to be missing a fundamental point here. [08:58]
Xatenev are you not capable of reading pseudocode? Oo [08:58]
whaley I don't even know what that's supposed to be doing or why it's bad [08:58]
Xatenev whaley, there is a comment right above explaining what it is doing [08:58]
Xatenev whaley, on line 3. [08:58]
cheeser there is is code that is obviously "bad." don't write that code. this loop is not. so write the code that is most readable. if you find a measurable bottleneck in it, optimizie. [08:58]
whaley add 2 to each what? [08:58]
Xatenev whaley, ... entry in the list? [08:58]
whaley ok, so a mapping function? [08:59]
tashie [tashie!] has joined ##java [08:59]
cheeser Xatenev: and that's a fucking stupid contrived example that proves nothing. [08:59]
x256 Xatenev: Steps in stream-pipelines run independent from each other. They do not create a magical query-plan that could be optimized, like an SQL server would. Streams only have certain aspects 8e.g. ordered or not) that allow for certain optimizations, but that's it. [08:59]
cheeser this is why your question is faptimization. you have no obvious performance issues and yet you're here nattering away about it [08:59]
Xatenev x256, ty [09:00]
Xatenev x256, thats nice teo know [09:00]
Xatenev cheeser, no the example is not stupid [09:00]
cheeser it is [09:00]
Xatenev why? [09:00]
Xatenev you pretty much said that you'd write that code... "just make it work" [09:00]
cheeser because no one with anything beyond a third grade education would write that. [09:00]
cheeser i did not say i'd write that. [09:00]
cheeser i said i'd write code that worked first then optimize any performance problems. [09:01]
mindCrime_ [mindCrime_!~mindCrime@] has joined ##java [09:02]
Xatenev why would you even wait for performance problems to happen? [09:02]
Xatenev do you want your customers to have a bad user experience? [09:02]
whaley ... [09:02]
ron should I 5 minute rule myself? [09:02]
whaley ron: no [09:03]
ron because I really wanna answer that [09:03]
Xatenev cheeser, what you say makes really no sense :| [09:03]
mindCrime__ [mindCrime__!~mindCrime@] has joined ##java [09:03]
cheeser because, in the absence of idiot writing two loops to increment a number by 2, performance bottlenecks often happen in nonobvious places. [09:03]
cheeser machines are better at measuring things than you are. [09:03]
Xatenev so should I performance profile every single bit of code I push? [09:04]
cheeser ffs, dude [09:04]
cheeser your new to this software bit, i guess. [09:04]
cheeser build your app. test it. run it. fucking *beta* it if you want. when you find performance problems, fix them. [09:05]
cheeser sometimes those come out in testing. and, yes, sometimes they only come out with customers at scale. this is how the world works. [09:05]
cheeser alternately, you could spend the next 6 weeks asking asinie questions with contrived examples and deliver 0 value to your users. [09:06]
whaley [09:06]
whaley whaley's title: "Suffering-oriented programming - thoughts from the red planet - thoughts from the red planet" [09:06]
jdfthetech [jdfthetech!] has joined ##java [09:06]
ron what? why? [09:07]
ron are you relatively new to development processes? (serious question) [09:07]
whaley ron: I am, yes. [09:07]
sdu [sdu!~doo@] has joined ##java [09:07]
x256 Friendly as always [09:08]
mbooth Xatenev: The first rule of optimisation is "don't" -- the second rule of optimisation (and this is for experts only) is "don't, yet" [09:08]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [09:10]
Toneloc [Toneloc!d4db5cbd@gateway/web/cgi-irc/] has joined ##java [09:10]
whaley there's a larger discussion about monitoring and metrics to even discover where your system is slow and if it even matters if it's slow or not (read: meeting SLO's) so you know if you even need to focus your time on it [09:10]
whaley but... that's not java, so I'm stopping there [09:10]
Toneloc I'm looking for free study material for Java MTA 98-388, does anyone have any recommendations? [09:11]
Toneloc Or has anyone here sat this exam lately? [09:11]
Xatenev cheeser, I asked a simple question that prob requires 2 minutes to answer [09:11]
Xatenev cheeser, not 6 weeks [09:12]
mbooth What is "MTA 98-388"? [09:12]
Toneloc I'm brand new to java ( the last two weeks, and have the exam next week) but not new to dev [09:12]
whaley Toneloc: doubtful in this channel. You are probably better served by googling for that. [09:12]
cheeser it took less than that: "don't worry about it yet" [09:12]
Xatenev cheeser, sometimes those come out in testing. and, yes, sometimes they only come out with customers at scale. this is how the world works [09:12]
Xatenev and this is just... i dunno.. bad? [09:12]
Toneloc MTA = Microsoft technology Associate [09:12]
Xatenev you're saying i should let obvious performance issues go through to the customer [09:12]
Xatenev just because i didnt measure it yet [09:12]
ron umm [09:12]
ron ok [09:13]
cheeser no, i've literally said this was not an obvious performance problem. [09:13]
mbooth Xatenev: Nice straw man :-) [09:13]
Xatenev mbooth, what? [09:13]
cheeser i said finish the app. profile if you see a problem. [09:13]
Xatenev i dont know what that means im not native sorry [09:13]
x256 Trying to understand the complexities and performance implications of certain operations and avoiding performance pitfalls is _not_ premature optimization. I found Xatenevs question valid and answered it shortly. So, why the discussion now? [09:13]
mbooth Xatenev: It means you've invented a position that cheeser doesn't take, and arguing against it anyway [09:13]
cheeser and then using that as if it rebuts my actual claim [09:13]
Toneloc whaley - Google is only offering things that have to be paid for or very limited samples unfortunately [09:14]
Xatenev well thats how I understood it atleast [09:14]
cheeser Toneloc: this is a dev channel and not a support channel. we don't know of any free resources and this isn't the place to find them. [09:14]
Toneloc The sites that are providing the paid-for material look very suspect - would be afraid they would take the money and run! lol [09:14]
Xatenev since i dont understand how 2 loops when 1 is obviously enough is not a performance problem [09:14]
whaley Toneloc: save your money for funky cold medina [09:14]
Toneloc cheeser - I'm starting out in java dev [09:15]
mbooth Toneloc: Don't your examiners provide study materials? Sounds like a scam [09:15]
Xatenev it requires double the time. [09:15]
cheeser Toneloc: that's awesome. welcome. that doesn't change anything *here* [09:15]
cheeser Xatenev: the only person fapping about over those two loops is you. [09:15]
Toneloc whaley - good to know you know at least one Toneloc reference - I'm actually the other Toneloc... [09:15]
Xatenev cheeser, ? yes because thats what my question was about :O [09:16]
Toneloc mbooth- they haven't yet and time is ticking [09:16]
cheeser it was about the compiler optimizing anyMatch() which you've been told "no." [09:16]
cheeser Toneloc: not the place [09:16]
mbooth Xatenev: And the correct answer is, as always, "don't optimise until you've observed and measured a concrete perf problem" [09:16]
Xatenev mbooth, yea i dont agree [09:17]
Xatenev anyways, thanks all [09:17]
mbooth Xatenev: Then I'm glad you're not on my team ;-) We prefer to get work done instead [09:18]
Xatenev not very nice to assume that i dont get work done :| [09:18]
Bombe You?re obviously not getting work done. [09:18]
cheeser oh, would you call that a premature worry, then? [09:18]
Bombe Because you?re arguing on IRC. [09:18]
Xatenev Bombe, why? [09:18]
Toneloc cheeser, thank you! [09:19]
Xatenev Bombe, sure i'll just close my irc client real quick whenever a discussion starts next time ty for the hint [09:19]
Xatenev lol [09:20]
Bombe ? [09:20]
cheeser lol [09:20]
cheeser [09:20]
mbooth Xatenev: Optimising without a plan, is not work, it's masterbation [09:21]
Xatenev mbooth, ok [09:21]
surial mbooth, Xatenev, cheeser: I don't know about you lot, but whilst I fully embrace the 'optimising without a plan is stupid' concepts, I do make an exception for algorithmic complexity. [09:23]
learningc [learningc!~learningc@] has joined ##java [09:23]
adder [adder!~adder@gateway/tor-sasl/adder] has joined ##java [09:23]
surial I feel justified in making a call that something needs 'optimization' if I can make an algorithmic complexity update or I can just tell right off the bat: Yeah. This is gonna run like dogshit if I throw a few thousand entries at it.. and I know I will be doing that. [09:24]
x256 surial: Yes. Thanks for saying it. [09:24]
cheeser surial: i put such things in "obvious performance problems." but a stream with anyMatch() is not that obvious to me. [09:24]
ron not helping. [09:24]
surial Xatenev: now before you run with this and go: A HA!!! I get to call cheeser and mbooth a moron! ? probably not. It's a little more complicated than 'oh I see a double for loop that perhaps possibly I can imagine maybe can run as a single one, MUST OPTIMIZE NOW'. [09:24]
cheeser the only double loop i saw was his stupid example [09:25]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:91:e0e:5f72:c9a] has joined ##java [09:25]
surial Xatenev: did you ever paste your java code that you feel needs optimization? [09:25]
surial Xatenev: I see some example loop unroll where the answer is exceedingly clearly: What the fuck, worrying about optimizing that is fucking retarded. [09:26]
Xatenev I didn't but theres not much to it - as i said i do an sql query and do two .anyMatch() calls on the resulting list [09:26]
spuz Toneloc, looking at the description of the topics covered by MTA 98-388, I think that chapters 1-2 of any Java book would cover it [09:26]
surial not an algorithmic complexity issue, for starters. [09:26]
Xatenev and the main background was really whether I could just stay with the two .anyMatch() calls because it looks a lot cleaner [09:26]
Xatenev than one loop that does both checks. [09:26]
cheeser why not do two sql calls for that? [09:26]
spuz Toneloc in fact, just follow the ~tutorial [09:26]
Xatenev cheeser, thats what I had before but I had been told to only do one sql query [09:27]
cheeser probably by someone prematurely optimizing the database calls. #justsaying [09:27]
cheeser D [09:27]
Xatenev cheeser, yes [09:27]
surial your max improvement is linear (you can make it twice as fast). algorithmic complexity goes further than that. [09:27]
Toneloc spuz - yes, I'm looking for some sort of online quiz/test that would prepare me well for it [09:28]
surial Xatenev: so, given that it is not algorithmic, the answer is 100% crystal clear: [A] write the cleanest, simplest code that is the most flexible and maintainable and readable, and [B] ... if you doubt that is the right way to go about it, bring a profiler report, or you're doing it wrong. [09:28]
Toneloc But yes I will be reading a java book too [09:28]
cheeser Toneloc: spuz: this would be great in a PM [09:28]
Toneloc Apologies cheeser [09:28]
surial Xatenev: and niceties such as 'you shuold not write intentionally slow code' are silly concerns. That kinda thinking leads to buggy slow unreadable spaghetti. [09:28]
Xatenev surial, I find the opposite does [09:29]
surial (slow because all time is spent in 0.1% of the code; once you get to a real performance problem the trick is to rewrite that 0.1% into something better, and to do that properly, you usually need to slightly rework how the code that feeds into and out of the 'hot line' code is written. And if you pre-optimize the shit out of your code at every turn, reworking the feedin and feedout code is hard to impossible, resulting in less [09:29]
surial flex on rewriting the 'hot line', thus: SLOWER CODE). [09:29]
cheeser well, that's the 3rd? 4th? "expert" opinion to the contrary. i'm not all for cargo cult programming but consider that maybe your perspective might be wrong. [09:30]
Xatenev cheeser, you'll find a lot more in the internet to support that perspective, it seems to be like as you said, a cult, people hear it and repeat it [09:31]
Xatenev but the arguments for it are just very weak imho [09:31]
surial Xatenev: so far the entire sum total of the channel thinks you are wrong. In addition, we've given you some more or less falsifiable handholds (I wish I could give you some more specific stuff). If you disagree based on shit you find on a tile in a bathroom such as 'you should not write intentionally slow code', then I suggest you already know what you want to hear and brook no counter arguments at all. i.e. stop asking shit [09:31]
surial where you don't actually want debates on. [09:31]
surial Xatenev: you're telling _US_ we're cult like? Jesus christ man. Find a mirror. [09:31]
cheeser i find all sorts of stupid things on the internet. but when i come to people for advice, i tend to favor their inputs over other randos on the internet [09:31]
Xatenev of course you don't want to spend 5 hours for stuff like that [09:32]
Xatenev but I don't see anything wrong thinking about your code for a minute [09:32]
surial Xatenev: another strawman [09:32]
Xatenev surial, ok :) [09:32]
Xatenev w/e then [09:32]
x256 Can we stop that discussion please? You won't find consent anyway. [09:32]
Xatenev agreed [09:32]
surial Xatenev: let me make it as simple as I can for you, and you can falsify this: If it's wrong, you can prove it. Go learn how to use a profiler if you think this is wrong, and show it to me: For the vast majority of apps, 99% of the resources the app uses are allocated and spent within 0.1% of the code. [09:33]
cheeser agreed. i'm gonna go drink some. [09:33]
surial Xatenev: therefore, if you want to talk about optimizing code, it is fucking idiotically stupid to focus on anything except that 0.1%. Utter waste of time. [09:33]
surial Xatenev: in addition, optimizing code usually requires tweaks to the feedin and feedout code. [09:33]
x256 surial, please. [09:33]
surial Xatenev: tweaking code is harder, generally, for code that has been microoptimized. [09:33]
surial Xatenev: thus, in the vein of 'all animals are mortal, socrates is an animal, therefore socrates is mortal': Micro optimizing without a profiler report makes code harder to maintain and slower and has only downsides. [09:34]
cheeser let's move on, surial. [09:34]
cheeser the point's been made and rejected [09:34]
Maldivia *grumble* stupid JDK magic *grumble* [09:35]
cheeser switches to .net [09:35]
grumble *Maldiva* [09:35]
masuberu [masuberu!] has joined ##java [09:35]
cheeser grumble++ [09:35]
cheeser grumble has a karma level of 1, cheeser [09:35]
mbooth grumble++ # For causing an actual desk snort [09:36]
mbooth grumble has a karma level of 2, mbooth [09:36]
dez [dez!uid92154@fedora/deSouza] has joined ##java [09:36]
Maldivia grumble: ok, I blame you then! [09:36]
grumble mbooth is my nickname a joke to you [09:36]
masuberu hi, is it a good practice to use checked exceptions instead of manage proper validation to check an instance? [09:36]
cheeser that question made no sense [09:37]
x256 It does, but only with a large amount of guesswork. [09:41]
learningc [learningc!~learningc@] has joined ##java [09:44]
LSCody [LSCody!] has joined ##java [09:44]
millerti [millerti!] has joined ##java [09:46]
henbruas [henbruas!~henbruas@unaffiliated/henbruas] has joined ##java [09:48]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [09:50]
jamezp [jamezp!~jamezp@redhat/jboss/jamezp] has joined ##java [09:51]
acidjnk [acidjnk!] has joined ##java [09:58]
learningc [learningc!~learningc@] has joined ##java [10:01]
CookieM [CookieM!] has joined ##java [10:05]
led_dark_1 [led_dark_1!~Thunderbi@] has joined ##java [10:05]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [10:05]
conan [conan!~conan@] has joined ##java [10:06]
bluezone [bluezone!uid104970@gateway/web/] has joined ##java [10:06]
progart [progart!~kamee@] has joined ##java [10:09]
rapidwave [rapidwave!~rapidwave@unaffiliated/rapidwave] has joined ##java [10:12]
rapidwave Does an empty constructor still return the object? [10:13]
yawkat tias [10:13]
yawkat Try it and see. You learn much more by experimentation than by asking without having even tried. [10:13]
mevodad What do you think it does, rapidwave [10:13]
Korbenik [Korbenik!~Korbenik@] has joined ##java [10:13]
Rapture [Rapture!] has joined ##java [10:14]
Maldivia a constructor doesn't return anything :D [10:14]
mevodad Maldivia: I had asked a question of *rapidwave* [10:15]
Maldivia mevodad: sure -- I'm just saying, a Java constructor has no return type, and no return statement in it... so be it an empty constructor or otherwise, it doesn't return anything :D [10:16]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [10:18]
jak2000 [jak2000!~jak2000@] has joined ##java [10:19]
jak2000 hi all [10:19]
mevodad hi [10:20]
rapidwave mevodad: I'm not sure if magic happens behind the scenes, or if it does nothing [10:20]
jak2000 Maldivia 8u212 fix the ssl problem? how to know, thanks [10:20]
cheeser oh, god. [10:20]
kicked jak2000 (asked and answered.) [10:20]
cheeser that was easy [10:20]
mevodad I'm sorry, I'm just not putting up with the same question from him day after day. [10:21]
davlefou [davlefou!~davlefou@unaffiliated/davlefou] has joined ##java [10:21]
bolovanos [bolovanos!] has joined ##java [10:22]
mevodad rapidwave: well, what happens when you try? What do you THINK happens? Take a guess. Experiment. If you're wrong, the results aren't going to be costly. [10:23]
deadbeat rapidwave: well a constructor constructs an object.. that's the magic :) [10:28]
rapidwave Anyone have recommended, free UML design application that works cross-platform? [10:29]
cheeser tech support [10:29]
cheeser Hello, ##java is not a technical support channel for your Java apps or virtual machines; it's a development channel for enthusiasts to discuss programming with the Java language. Please ask the vendor of your software for support if you're having trouble with it. [10:29]
ron pfm [10:31]
licheca [licheca!040fcf61@] has joined ##java [10:31]
Xatenev define: pfm [10:31]
yawkat pfm [10:31]
yawkat pure fucking magic [10:31]
Xatenev yawkat, :) [10:32]
mbooth rapidwave: I don't think *anyone* recommends UML :-o [10:32]
rapidwave Alternative? [10:32]
x256 Depends on what you want to do, rapidwave [10:33]
rapidwave ...I am writing an email checker software, right now specifically I'm trying to decide if Email should be a class to hold sender and subject or if those should just be variables passed to notification view. [10:34]
[twisti] what is the difference ? presumably the class would also hold them in variables and pass those variables around [10:34]
x256 The sender is not part of an email, but only its envelope. It *may* be the same as in the From or Reply-To headers, but that is not guaranteed in any way. [10:37]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [10:46]
lalitmee [lalitmee!~lalitmee@] has joined ##java [10:50]
code_zombie [code_zombie!~code_zomb@2605:a601:aa1:da00:380d:869a:87af:1ca3] has joined ##java [10:52]
ron [ron!~ron@unaffiliated/ron] has joined ##java [10:55]
mevodad uml [10:57]
mevodad mevodad, uml is Unified Modeling Language, a graphical notation for software development. Depending on the shop using it, its either a useful aid or a life-consuming cult. See and the ##uml channel here on FreeNode. [10:57]
rippa [rippa!] has joined ##java [11:02]
mbooth mevodad: That UML link is dead [11:06]
ron [ron!~ron@unaffiliated/ron] has joined ##java [11:06]
mevodad just like UML. (Feel free to amend the factoid.) [11:06]
learningc [learningc!~learningc@] has joined ##java [11:06]
conan [conan!~conan@] has joined ##java [11:07]
mbooth mevodad: The wiki link it gives me when I do "/msg javabot help" is dead [11:09]
tang^ no uml is <reply>Unified Modeling Language, a graphical notation for software development.  Depending on the shop using it, its either a useful aid or a life-consuming cult.  See and the ##uml channel here on FreeNode. [11:10]
tang^ OK, tang^. [11:10]
tang^ uml [11:10]
tang^ Unified Modeling Language, a graphical notation for software development.  Depending on the shop using it, its either a useful aid or a life-consuming cult.  See and the ##uml channel here on FreeNode. [11:10]
mevodad tang^ ++ [11:10]
mevodad tang^ has a karma level of 32, mevodad [11:10]
tang^ help [11:11]
tang^ for a FAQ and a quick tutorial on how to use javabot, see: [11:11]
tang^ mbooth: link works fine for me [11:11]
mbooth tang^: Maybe I am blind, there is no wiki at that link [11:11]
tang^ though it does just redirect to the source because the wiki doesn't exist [11:11]
mbooth Only build/dev instructions [11:11]
mevodad mbooth: *nod* file an issue [11:12]
tang^ hmm, some interesting issues [11:12]
Xatenev also failing build [11:13]
Xatenev man javabot whats going on [11:13]
mevodad it's a project run by volunteers who have tribal knowledge about what works and what doesn't :) [11:13]
tang^ oh I like that "good first issue" tag for devs [11:13]
mbooth mevodad: Done. I got a nice round issue number: [11:14]
mbooth mbooth's title: "The link given by /msg javabot help is broken Issue #256 evanchooly/javabot GitHub" [11:14]
dino82 [dino82!~deeno@unaffiliated/dino82] has joined ##java [11:14]
mevodad thanks [11:16]
sbalmos well crap, that means the next issue will roll over and be issue #1 [11:16]
mevodad the channel site has some instructions but they're not that great either [11:16]
mevodad sbalmos: no, if it was only 8 bits THAT issue would have been #0 [11:16]
Xatenev the bot has 3064 factoids [11:16]
Xatenev holy. [11:16]
sbalmos mevodad: *mutter* [11:16]
tang^ it's a wonder javabot fits through the door some days [11:17]
Xatenev abject [11:17]
Xatenev abject-oriented programming: [11:17]
mevodad and just think: javabot doesn't even do knowledge management well [11:18]
odinsbane knowledge management [11:18]
odinsbane odinsbane, what does that even *mean*? [11:18]
mevodad I'd file an issue on that myself but it'd get rejected [11:18]
mevodad (I'd probably reject it) [11:19]
mevodad odinsbane: by which I mean: facts aren't generated or requested by *triggers* [11:19]
mevodad we say "dropwizard" and get a canned response [11:19]
paddyez [paddyez!~paddyez@wikipedia/paddyez] has joined ##java [11:20]
mevodad but we *gather* more information about dropwizard (and other topics) - we just don't package it. [11:20]
Xatenev +1 mevodad [11:21]
Xatenev This ain't your mom's Google Plus, Xatenev. [11:21]
Xatenev okay [11:21]
tang^ hahaha [11:22]
tang^ probably meant [11:22]
tang^ mevodad ++ [11:22]
tang^ mevodad has a karma level of 2, tang^ [11:22]
odinsbane Or, they're looking at the plethora of rare factoids. [11:23]
mevodad odinsbane: ? [11:24]
jamiejackson [jamiejackson!c7df1efe@gateway/web/cgi-irc/] has joined ##java [11:24]
tang^ well, if you're that bored, do some pull requests on the various javabot issues [11:24]
eof [eof!] has joined ##java [11:38]
ron [ron!~ron@unaffiliated/ron] has joined ##java [11:39]
RedSoxFan07 [RedSoxFan07!] has joined ##java [11:41]
conan [conan!~conan@] has joined ##java [11:43]
Korbenik [Korbenik!~Korbenik@] has joined ##java [11:43]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [11:45]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [12:04]
MarkyC [MarkyC!] has joined ##java [12:05]
learningc [learningc!~learningc@] has joined ##java [12:13]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [12:13]
Velgor [Velgor!] has joined ##java [12:13]
DiabloD3 [DiabloD3!] has joined ##java [12:18]
Diablo-D3 [Diablo-D3!] has joined ##java [12:28]
Sasazuka [Sasazuka!~Sasazuka@unaffiliated/sasazuka] has joined ##java [12:29]
tashie [tashie!] has joined ##java [12:31]
Sheilong [Sheilong!uid293653@gateway/web/] has joined ##java [12:31]
learningc [learningc!~learningc@] has joined ##java [12:32]
Diablo-D3 [Diablo-D3!] has joined ##java [12:38]
ravenous_ [ravenous_!] has joined ##java [12:56]
junktext_ [junktext_!junktext@fsf/member/junktext] has joined ##java [12:57]
User_ [User_!~learningc@] has joined ##java [01:01]
whaley [whaley!~whaley@] has joined ##java [01:01]
magyar [magyar!~magyar@unaffiliated/magyar] has joined ##java [01:12]
esro [esro!] has joined ##java [01:19]
t2mkn [t2mkn!~t2mkn@] has joined ##java [01:20]
ZOrder [ZOrder!~shiranpur@unaffiliated/shiranpuri] has joined ##java [01:28]
raz86 [raz86!] has joined ##java [01:29]
raz86 Hello, I have a question about a java pattern, I think it's an anti-pattern (but I don't know the name ?) , I saw a colleague using heriting to only include code, for example : MyController extends MyBean, so that he can access to its bean into the controller [01:32]
prg318 [prg318!~prg@deadcodersociety/prg318] has joined ##java [01:32]
Maldivia that sounds wrong [01:33]
ernimril raz86, using inheritance to get access is typically not good, yes [01:33]
mevodad what was the question, raz86? [01:34]
raz86 yes of course, but do you know if there is a name of that? I was just wondering, because it's programmaticaly correct (like goto instructions..) [01:34]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [01:34]
mevodad it's preferring delegation over composition, and in java it's stupid, because you get to inherit from ONE class [01:35]
Maldivia well, the likely hood om him actually getting the correct bean like that is slim [01:35]
led1 [led1!~Thunderbi@] has joined ##java [01:35]
manualcrank [manualcrank!] has joined ##java [01:38]
raz86 Yes ^^ I never imagined that we could do like that, I know it's preferable to have clear instances, but I found this way "original" [01:38]
mevodad it's "original" all right [01:38]
mevodad also not idiomatic, and for good reason [01:39]
raz86 I had to share my experience of today ^^ , thank you, I will sleep better now [01:41]
mevodad enjoy [01:41]
Hanii [Hanii!~Hanii@2a00:23c5:c587:a800:ed18:e3d1:6dc:c605] has joined ##java [02:04]
progart [progart!~kamee@] has joined ##java [02:09]
visualshock [visualshock!] has joined ##java [02:11]
cliluw [cliluw!~cliluw@unaffiliated/cliluw] has joined ##java [02:35]
bitwinery [bitwinery!] has joined ##java [02:38]
cliluw [cliluw!~cliluw@unaffiliated/cliluw] has joined ##java [02:42]
ertiportline [ertiportline!~ertiportl@unaffiliated/ertiportline] has joined ##java [02:54]
HumanG33k [HumanG33k!~HumanG33k@] has joined ##java [02:58]
HumanG33k [HumanG33k!~HumanG33k@] has joined ##java [03:05]
Gazooo [Gazooo!~Gazooo@] has joined ##java [03:07]
q9929t [q9929t!~Thunderbi@] has joined ##java [03:09]
nickel8448 [nickel8448!~rahul@] has joined ##java [03:10]
sysmox_ [sysmox_!~mox@gateway/tor-sasl/sysmox] has joined ##java [03:24]
Bombe I have a POJO that I?m serializing with Jackson? sometimes I need to remove field a from the JSON, and sometimes I need to remove field b and rename a to b. [03:29]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [03:29]
cheeser use jackson views [03:30]
Bombe I can create two wrapper POJOs with the features I need, or I could manipulate the intermediate? [03:30]
Bombe Views? That sounds just like what I need. [03:30]
FreEm1nD [FreEm1nD!~freemindm@] has joined ##java [03:30]
Bombe Hmm, okay, that solves one of the problems. [03:33]
Bombe (Also, it pollutes my service layer with UI stuff.) [03:33]
gelignite [gelignite!] has joined ##java [03:38]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [03:41]
Bombe Jackson also has PropertyFilters. [03:44]
Bombe Ah, I?ll leave that for tomorrow. Good night! [03:44]
Korbenik [Korbenik!~Korbenik@] has joined ##java [03:54]
monemonics [monemonics!~monemonic@] has joined ##java [03:56]
whaley [whaley!~whaley@] has joined ##java [04:01]
rorx [rorx!] has joined ##java [04:01]
bluezone [bluezone!uid104970@gateway/web/] has joined ##java [04:03]
LtHummus [LtHummus!] has joined ##java [04:08]
rruizt [rruizt!] has joined ##java [04:12]
extor [extor!~extor@unaffiliated/extor] has joined ##java [04:28]
mindCrime__ [mindCrime__!~mindCrime@] has joined ##java [04:30]
monemonics1 [monemonics1!~monemonic@2a02:908:13c5:4dfc:20e8:e5a4:121d:e31a] has joined ##java [04:31]
Korbenik [Korbenik!~Korbenik@] has joined ##java [04:33]
whaley [whaley!~whaley@] has joined ##java [04:33]
MarkyC [MarkyC!] has joined ##java [04:57]
wad [wad!~wad@] has joined ##java [04:57]
immibis [immibis!] has joined ##java [04:57]
wad Hey guys, question for ya: In this project, there is a class annotated as @ControllerAdvice. It intercepts exceptions on the controllers. I want to refactor it out into a spring-aware library. Will just having the class in the classpath be enough for Spring to hook it up? [05:00]
wad I don't see anything in the @Configuration class that hooks it up... [05:01]
Maldivia if you have annotation scanning enabled for the package that you will refactor it to, then it probably will work [05:11]
livepan yea, the annotation scanning works by scanning all the classes on the classpath, you may need to make sure the package name is correct [05:16]
livepan been a while since i used spring, thankfully.. but IIRC that's all you need to do (make sure classpath annotation scanning packages are configured correctly) [05:16]
wad Thanks guys! Trying this out. Now I know what to google for. :) [05:20]
atslash [atslash!] has joined ##java [05:26]
adder [adder!~adder@gateway/tor-sasl/adder] has joined ##java [05:29]
mindCrime__ [mindCrime__!~mindCrime@] has joined ##java [05:29]
v01d4lph4 [v01d4lph4!~v01d4lph4@] has joined ##java [05:29]
somazero [somazero!~somazero@2600:8805:100:112:c0df:f891:59b3:33aa] has joined ##java [05:35]
ertiportline [ertiportline!~ertiportl@unaffiliated/ertiportline] has joined ##java [06:05]
bf_ [bf_!~bf_@] has joined ##java [06:13]
Lengsdorfer [Lengsdorfer!~Lengsdorf@unaffiliated/lengsdorfer] has joined ##java [06:14]
BasedGob [BasedGob!d8268ee6@] has joined ##java [06:17]
BasedGob Is it good practice to import java.util.* ? Or should you just import the individual thing you need, such as import java.util.ArrayList [06:17]
tang^ star imports [06:21]
tang^ BasedGob, star imports is not something you should use. It makes it unclear where classes come from and additionally may cause naming conflicts (e.g. java.awt and java.util both contain a List class). Always prefer "import my.package.MyClass" over "import my.package.*". See for more information. [06:21]
surial BasedGob: 99% of java devs use tools which make importing trivial. So the act of "'damn I just want to type 'AL' and then hit ctrl+space and just have it be arraylist" is taken care of.. but not by explicitly writing or copying 'import java.util.*;'. [06:22]
surial BasedGob: given that it works like this, might as well have the IDE generate the full import and not with the star; this way it's more clear what's going on. [06:23]
surial BasedGob: now if you are not using one of these tools, oof. I say still go with the explicit imports, but, all bets are off really. I haven't programmed java in let's call it 'notepad.exe' since over 15 years if not more. [06:24]
Korbenik [Korbenik!] has joined ##java [06:28]
BasedGob surial: Yup I'm using Android Studio (AKA intellij). It does a lot of automatic import optimization and whatnot [06:34]
surial ah, well, then it's taken care of :) [06:35]
BasedGob Sometimes this involves combining a bunch of imports into "import ___.*" and I was worried about performance regressions from this. Googled it and it seems like it's fine performance-wise, but I thought I'd ask here as well [06:35]
surial there is literally 0 impact. [06:36]
BasedGob Awesome [06:36]
surial BasedGob: import; means one thing and one thing only: Anywhere in this file 'Bar' is used as a type, '' is intended. It runs zero code from c.f.Bar. [06:36]
BasedGob Got it, got it. That's very relieving. Thank you [06:36]
ernimril BasedGob, imports are only computed while you run javac, the classfile only contains full class references [06:37]
ernimril BasedGob, so compilation speed may be affected, runtime speed is not [06:38]
ernimril BasedGob, but compilation speed is typically not affected in any measurable way [06:38]
BasedGob Man I love how knowledgeable everyone seems to be on here. Thank you, ernimril [06:41]
ernimril BasedGob, once you realize that the regulars here have been doing java since 199* (1996 for me) you can understand that we have picked up a few things over the years [06:42]
BasedGob Also thank you tang^ [06:42]
BasedGob Yeah, I was hardly born at that time. A bit late to the game unfortunately [06:43]
Kundry_Wag [Kundry_Wag!~Kundry_Wa@] has joined ##java [06:45]
RoriconKnight [RoriconKnight!~RoriconKn@] has joined ##java [06:51]
ertiportline [ertiportline!~ertiportl@unaffiliated/ertiportline] has joined ##java [06:59]
idavidasilva [idavidasilva!~Davi@] has joined ##java [06:59]
ernimril hmm, why did they never add a HasetSet constructor that takes a HashCalculator... :-( [07:00]
Korbenik [Korbenik!] has joined ##java [07:06]
CombatVet [CombatVet!~c4@gateway/tor-sasl/combatvet] has joined ##java [07:08]
surial ernimril: 'equality definitions' just aren't in java. anywhere. [07:09]
surial whereas comparator definitions are. [07:09]
surial just.. what it is. trove and various other libs have it. [07:09]
ernimril I know [07:09]
c0ns [c0ns!] has joined ##java [07:43]
Hanii [Hanii!~Hanii@2a00:23c5:c587:a800:ed18:e3d1:6dc:c605] has joined ##java [08:02]
cliluw [cliluw!~cliluw@unaffiliated/cliluw] has joined ##java [08:04]
jdfthetech [jdfthetech!] has joined ##java [08:12]
Diablo-D3 [Diablo-D3!] has joined ##java [08:19]
ItsNotRSX [ItsNotRSX!] has joined ##java [08:20]
nav2002 [nav2002!~nav2002@] has joined ##java [08:21]
Bebef [Bebef!] has joined ##java [08:23]
Diablo-D3 [Diablo-D3!] has joined ##java [08:29]
nokdoot [nokdoot!~nokdoot@] has joined ##java [08:38]
Hanii [Hanii!~Hanii@2a00:23c5:c587:a800:e3:47cc:4cc3:6cae] has joined ##java [08:48]
csd_ [csd_!] has joined ##java [08:50]
csd_ In the following example from Java Concurrency In Practice, could the reference to `reservations` have been replaced by a call to `queue.remainingCapacity()`? (E.g., remove all reference to `reservations` except for within the `if` statement, and replace with the `remainingCapacity()` call instead.) And if not, why not? (Sorry in advance about the [08:51]
csd_ lack of line numbers.) Code snippet: [08:51]
very_sneaky [very_sneaky!~very_snea@] has joined ##java [08:56]
rruizt [rruizt!] has joined ##java [09:00]
henbruas [henbruas!~henbruas@unaffiliated/henbruas] has joined ##java [09:15]
junktext_ [junktext_!junktext@fsf/member/junktext] has joined ##java [09:22]
Kundry_Wag [Kundry_Wag!~Kundry_Wa@] has joined ##java [09:40]
p[a]ddy [p[a]ddy!~paddyez@wikipedia/paddyez] has joined ##java [09:59]
upgrdman [upgrdman!~upgrdman@blender/artist/upgrdman] has joined ##java [10:02]
rajrajraj [rajrajraj!uid72176@gateway/web/] has joined ##java [10:07]
rajrajraj I have been working in java for nearly 5 montha now [10:07]
cheeser congrats? [10:07]
rajrajraj cheeser: thanks [10:12]
rajrajraj cheeser: that makes my total experience in java to be 2 years [10:12]
nickel8448 [nickel8448!~rahul@] has joined ##java [10:14]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [10:14]
macroprep_ [macroprep_!] has joined ##java [10:15]
Rue [Rue!] has joined ##java [10:31]
Jigsy` [Jigsy`!~Jigsy@unaffiliated/jigsy] has joined ##java [10:32]
junktext [junktext!junktext@fsf/member/junktext] has joined ##java [10:41]
Kundry_Wag [Kundry_Wag!~Kundry_Wa@] has joined ##java [10:42]
tasse [tasse!] has joined ##java [10:43]
slosh [slosh!~slosh@] has joined ##java [10:51]
slosh [slosh!~slosh@] has joined ##java [11:02]
t2mkn [t2mkn!~t2mkn@] has joined ##java [11:18]
learningc [learningc!] has joined ##java [11:19]
Kol [Kol!] has joined ##java [11:21]
AMcBain [AMcBain!] has joined ##java [11:40]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:e9c7:f3cd:7c81:d2da] has joined ##java [11:42]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [11:43]