« first day (3614 days earlier)      last day (1341 days later) » 

2:04 AM
picks nose
 
 
6 hours later…
8:04 AM
dreams of electric sheep
 
8:25 AM
gud afternoon
 
ohai
 
 
2 hours later…
10:16 AM
morn
 
morn
 
10:41 AM
Question: What tools do you use to work with a database? (management tools, code libraries, etc) and what do you like most about those tools?
 
11:07 AM
I usually work as barebone as possible because I hate myself
 
so you just use SqlConnection and createStatement and stuff?
 
11:39 AM
HI, I have a doubt regarding spring boot +H2 application
 
@vishnu Welcome to the Java Chat, the room for Java enthusiasts! I'm Oak, one of the room's bots. If you want to ask a question, just ask it and someone will respond if they feel like it. But remember that this room is not a help desk or tutoring service! If you want to just hang out, then welcome aboard! Oh, and the room's full list of rules are posted here.
 
Do I have to download H2 database for Spring boot application ?
 
you have to download the h2 package, iirc
the com.h2database:h2 package
 
Thanks for your reply, I've created a Spring boot application , and added the dependency for H2 database. But the application will run only if I download H2 like any other database like Mysql workbench, isn't it ?
 
mysql workbench isnt a database
it is a database management tool
you dont need a database management tool for h2
 
11:48 AM
Okay Wietlol, I thought that I don't have to download the H2 database because spring does everything. Now I got it. Thanks Wietlol.
 
discovered something intriguing
apparently EnumSet.of has multiple methods, up to 5 arguments until it starts to use varargs
/javadoc EnumSet#of
see ^
was darn "kek" when I noticed this.
 
sometimes, there are optimized ways of doing stuff with just 2 or 3 values
just like a singletonList could be for 1
and sometimes, it is just to avoid having the array
not sure if that is much more efficient though
 
if you check the source, it just calls .add x times unless it's varargs, of which uses a loop
Overloadings of this method exist to initialize an enum set with
one through five elements.  A sixth overloading is provided that
uses the varargs feature.  This overloading may be used to create
an enum set initially containing an arbitrary number of elements, but
is likely to run slower than the overloadings that do not use varargs.
like using the loop handle is a problem...
 
the varargs could also be backwards compatibility
before varargs existed or before the author knew
you could say "ok, I will make overloads for up to 5 args, if you want more than that, you are on your own"
and then people use it, and then you add the varargs method but you cant remove the old ones
 
when was varargs added?
I believe at the same time of enumset
🤔 *googles*
 
12:02 PM
iDunno
I suppose it is just a performance thingy
 
and people saying that i'm weird for adding some micro optimizations by default
/whooosh
 
I dont really care about optimizations until I need them
but when I need them, then I go crazy
 
12:29 PM
@KarelG I think they did that to avoid the performance penalty involved with creating an array for a varargs parameter.
@KarelG Java 5
The idea is that, most of the time, you are not going to be passing more than 4 parameters into the method.
@Wietlol ^
 
im not sure how much of a difference it makes though
if it would be <1% of the time optimized, I wouldnt even care
I should find out how to do benchmarks
 
12:44 PM
@Michael that's a rule of thumb of mine aswell
but it happens that you have to add more than 5 to a list.
gotcha use two distinct calls? :D
 
12:55 PM
@Wietlol The same could be said for using an EnumSet instead of a HashSet. :D
 
hmm... perhaps
 
1:39 PM
posted on September 14, 2020

archive - contact - sexy exciting merchandise - search - about ← previousSeptember 14th, 2020nextSeptember 14th, 2020: Hey, I've got a mailing list for SECRET PALS! If you'd like to be a SECRET PAL, baby, now is your chance. I only send out a message like once a month!– Ryan

 
 
6 hours later…
7:23 PM
 

« first day (3614 days earlier)      last day (1341 days later) »