« first day (2755 days earlier)      last day (2410 days later) » 
00:00 - 14:0014:00 - 20:00

14:00
> writeToConsole & writeToFile
Single Responsibility Principle
> if i change my file from an arraylist to a list
you cant "change" a file to a list
files arent lists, nor arraylists
at a glance, your method should work in the simple cases
but you should try to use a library to do the stuff for you
or you should read up on how to do things properly
for example
In computing, a comma-separated values (CSV) file is a delimited text file that uses a comma to separate values (many implementations of CSV import/export tools allow other separators to be used). It stores tabular data (numbers and text) in plain text. Each line of the file is a data record. Each record consists of one or more fields, separated by commas. The use of the comma as a field separator is the source of the name for this file format. The CSV file format is not standardized. The basic idea of separating fields with a comma is clear, but that idea gets complicated when the field data may...
> Year,Make,Model,Description,Price
1997,Ford,E350,"ac, abs, moon",3000.00
1999,Chevy,"Venture ""Extended Edition""","",4900.00
1999,Chevy,"Venture ""Extended Edition, Very Large""",,5000.00
1996,Jeep,Grand Cherokee,"MUST SELL!
air, moon roof, loaded",4799.00
quotes, commas and newlines must be escaped, so the values arent just the strings appended to each other with a comma as separator
you have to escape the values when necessary
Wot-LeL actually is constructive. Nice!
im only trolling people that deserve to be trolled... like geisterpunz007
user8622974
@Wietlol Like yourself? :3
or @Zoe
14:07
or me
Can we access a public class marked with @Internal annotation?
if the Internal annotation comes from me.wietlol.troll.Internal, then yes you can
as far as my IDE tells me, Internal doesnt exist
Zoe
Zoe
@geisterfurz007 did you see Datcord? Dis(\s)cord isn't working
Gimme a second
Zoe
Zoe
14:11
@geisterfurz007 </pun>
Oh
Should I kick you or will you find your way out on your own?
Zoe
Zoe
I'll show myself the door
Thanks. Walk through it as well please.
Zoe
Zoe
Did you at least get the horrible pun @geis? :D
@geisterfurz007 You missed it tho :>
No because I am the stupidest person on earth, you know?
And now get out.
Zoe
Zoe
14:15
SeriousSloth
why so serious?
Zoe
Zoe
Geis and me both have a plugin that enables twitch emotes everywhere
That is what you think. I don't have it on my laptop
Zoe
Zoe
aw
@Zoe Twitch emotes? Really?
Zoe
Zoe
14:18
Yeah
Almost every single sentence is better with SeriousSloth
That is true.
Don't use it extensively here though because not a lot of users will be able to see it.
Zoe
Zoe
//shrug
¯\_(ツ)_/¯
user8622974
¯\_(ツ)_/¯
Zoe
Zoe
¯\_(ツ)_/¯
14:22
//yoga
user8622974
/&#175;(ツ)&#175;
Excellent.
^still didnt learn yoga eh?
Alisha needs practice
Zoe
Zoe
Otherwise occupied atm
Zoe
Zoe
14:27
It's finally weekend, meaning I got time to finish another project I've been working on for a while :>
i need the plugin link
@Zoe what project?
Getting out the door once each year.
:)
Zoe
Zoe
Lol, no
@Wietlol It's not programming though
14:41
pfft
scrub
Zoe
Zoe
I got a bunch of programming projects too though :D
@Zoe Gonna get your skydiving license?
Zoe
Zoe
Nope
Gonna get your pilot license? :o
Zoe
Zoe
That's still you geis XD
14:46
lol
geissspilot
driving license?
sup guys anyway its been days?
Zoe
Zoe
@Wietlol Not for another year
hahaha
you are so young :)
IntelliJ license?
Zoe
Zoe
14:47
@geisterfurz007 lol
@geisterfurz007 lol
Zoe
Zoe
@Wietlol Too damn expensive >.> lol
You are student. You can get it for free :)
Zoe
Zoe
I can?
if you are a Java champion, you can also get it for free
Zoe
Zoe
14:49
//linkify jetbrains.com
user8622974
@Zoe yes, I have a full license for everything
@Wietlol so you still had to buy it. Unfortunate :/
@Zoe lazy af
@geisterfurz007 im also a student
i get 2 licenses for free
Zoe
Zoe
14:50
@geisterfurz007 Yep :D
also, I have a perpetual license
But why?
Also: Where can I get that?
Or will you be a student forever
i will always be learning
but not always be a student
(X) Doubt
i dont know how i got the perpetual license
but I happen to have it
14:51
mhmm
hmhh
@Wietlol lmao
late reply is late
Is it a "perpetual fallback license"?
yea
> When purchasing an annual subscription, you will immediately get a perpetual fallback license for the exact version available at the time.
Zoe
Zoe
Congrats @Wietlol, you're forever doomed to an outdated version on IntelliJ. xD
14:59
@Wietlol when purchasing a what?
@geisterfurz007 is something wrong?
15:14
Nothing anymore :)
Zoe
Zoe
Lol
So I get a fallback license for the current version of intelliJ when I have used it one year as a student?
Also for Webstorm?
:o
Zoe
Zoe
And CLion? :o
static factory methods v constructors - who wins?
15:29
@Zoe :O
@TheCoder I win. I always win.
Zoe
Zoe
lol
and rider
but you weren't an option
@TheCoder factory constructors
@TheCoder Ouch. That one hurt....
That one hurt a damn lot...
15:32
you were never an option geis
Stop it ;-;
the truth will out i'm afraid
factory methods are preferable because they provide the same functionality but are named so you can avoid ambiguity
agreed
however, the syntax for constructors and their general presence make it easier to work with
15:40
team debate. I'm on factory side. Opponent says static methods arent OOP
I call BS
static methods not being OOP is nonsense
I like to use constructors when all the constructor does is set private fields.
please elaborate that
constructors are static methods that gain a this reference at the super call
I need back up
15:41
I like to use static factory methods when they do something more complex, like parse a string.
I saw a constructir with x = new MyClass(true)
that to me is a smell
and dangerous
its a massive smell
so suggested 2 factory methods - one for true and one for false
if you name your variables "x" and classes "MyClass" you are a horrible person
@TheCoder so, that means that I have to do "if (x) createTrue() else createFalse()" ?
hell nah
you provide low level functionality
(optionally) with preset helper methods
@Wietlol no u
15:44
Dependant on what type of object I need, I call one of 2 factory methods
your reason of using factory methods is really bad
there are good reasons to use factory methods, but yours isnt one of them
if you want to follow strict oop, try factory classes
iirc the builder pattern is a good example
How ould you solve the constructor with boolean issue
I wouldnt because there is no issue
you said it's a massive smell
your naming convention is a massive smell
> if you name your variables "x" and classes "MyClass" you are a horrible person
15:49
you surely know that was pseudo code
you surely know that I was being sarcastic
christ how would I know
I don't know you
the "true" is a smell since boolean parameters have no context attached to them and limit the options of the input
those could be replaced by an enum for example
in most cases, that is a better choice
but there are cases where a boolean makes good sense
agreed, but you dont think factory method construction solves this?
i dont think there is an issue
15:51
Bloch suggests using an enum instead of a boolean
you dont say "here, I wrote a few methods for you based on what your input should be"
you should say "here, I wrote a method where you can throw your input in and it will work"
For example: new Temperature(Scale.CELCIUS) instead of new Temperature(true)
@Michael who the hell is Bloch?
ow, effective Java
I still need to read that :D
but since they based most of the content on my statements, it should be good /j
15:52
ITEM 1: CONSIDER STATIC FACTORY METHODS INSTEAD OF CONSTRUCTORS
ITEM 2: CONSIDER TURNING CAPSLOCK OFF
Zoe
Zoe
ITEM 2: ABUSING THE ROYAL CANTERLOT VOICE
lol @gei
how does one turn off caps when pasting caps?
ITEM 1: FIX THE AUTO-INCREMENT ALGORITHM (CC @Zoe)
Zoe
Zoe
15:53
One re-writes it
@Wietlol -1, YOU DIDN'T WRITE @ZOE IN ALL-CAPS
I "pasted" it
but fine ill do a -1
16:06
Zoe
Zoe
lol
16:22
If I have a class HomeView which extends abstract class View, can I not instantiate HomeView like this:
View homeView = new View();
homeView.update(); // Update method exists in HomeView but not View
posted on May 09, 2018 by CommitStrip

It is strange how accurate essentially all of those are.
Zoe
Zoe
@Feeds Lmfao
16:44
@CoderDudeTwodee No. Because you declared the object as View. To use the update method, you would have to cast it to HomeView which in this case should throw a ClassCastException because the underlying object (being a View) cannot be casted to an object that is lower in the class hierarchy (which would be the HomeView). Also: You cannot instantiate abstract classes
16:56
Guys ? Is it faster to loop a ArrayList with about 100 entrys or is it faster to use mysql and query a table which contains 100 data sets ?
Zoe
Zoe
<apparently not qualified to answer> :p
Im using java for my game server and i cant decide between two variants ... 1. Get the mysql table (contains static stuff ) at server start and convert it to a ArrayList which is stored on the server and everytime i need an entry out of it just loop over the list... or 2. Use a mysql query everytime i need a certain entry
What would be more performant ?
if you use arraylist you will have to update mysql anyway
What do you mean ?
if you convert data to arraylist and edit it playing
you will have to convert it back to mysql to be loaded later in arraylist again
Zoe
Zoe
17:01
If you have an arraylist it's faster than grabbing them from SQL
Since the database content has to be loaded into memory and then indexed
The data in this mysql table is static... it wont change during the game. I just thought about grapping it once on server start to acess it as an arraylist later
also if server goes down the data is lost
with arraylist
Zoe
Zoe
^
The table only contains stuff like configurations... build time for certain items and such things
if its static then convert it once to arraylist and dont use mysql process
17:03
Alright thanks ^^
@genaray how do you read the data from the collection?
(arraylist might not be the most optimal variation for your case)
on a side note... wth?!
Like this : dbManager.executeQuery("SELECT * FROM craftableitems", new Object[0]) it returns an ISFSArray... im using the standard jbcd library
in 2017, for the Woodlandz event, ANDY SVGE made the anthem and called it "The In-Between"
in 2018, for the Woodlandz event, In Between made the anthem
@genaray but how do you read from the list?
you said you loop over it
Oh im sorry... just showed you how i fill it... wait here : BuildingTypesConfig.getInstance().getInt(BuildingTypesColumns.ID, buildingTypeID, BuildingTypesColumns.buildingTime).intValue() its hard to read... but im storing all buildings in this class... the method getInt just uses a lamba expression to check if theres an entry with the same values.... if yes than intValue() returns the int value
Im using this for acessing the "Build Time" when a player starts building something on client side... the server gets the build time from the list and sends it back
getInt doesnt use a lambda expression
17:11
i wrote getInt myself... its an extension
public Integer getInt(String idKey, String typeID, String valueKey) {
    return this.typesList.stream().filter(element -> element.getInt(idKey) == Integer.parseInt(typeID)).findFirst().get().getInt(valueKey);
}
you could use a hashmap to get your items with similar algorithms as the database would use
which would make the search algorithm O(1) and leave little advantage to use the database version
in your case, you would have a Map<String, Integer>
Well thats an great idea... thanks :)
when the name fits with the question
@O.Rares where?
I need to see this
link or it didnt happen
at @genaray
the question he asked here
17:14
i dont really see much of a relation
genaray->generate array
its not an array and its not generated
its a collection and its allocated
knowledge
wins again
note to self, stop having knowledge
5
17:16
@genaray can you change your name to alocoll please ?
@Wietlol thank you. That would make many things much more enjoyable
Nah not really... Normally my nickname is : genar... but i needed to choose another one because "genar" is already in use :/
> already in use
wat is dat?
And only "genar" because my first pc display was produced by the company gnr ^^
@genaray change it fast to is taken
17:28
@genaray try "genar⠀"
Zoe
Zoe
@genaray it's possible to have multiple users with the same username
@MarcusK. Not sure if you are still here, but I couldn't really test yet. Honestly, I have no clue how to inject classes in Java EE. I guess I have to look into CDI and add the java.inject jar to my project as dependency. Or should you be able to inject regular classes with @Resource?
Usernames are not unique on SO.
I have seen other Michaels before...
18:07
Scary stuff
Heads flew.
Zoe
Zoe
WELCOME TO STACKOVERFLOW, where the usernames are duplicated and the points do absolutely matter!
18:24
@Michael "Your username expires in 6 days, would you like to change your username now?"
"The username 'Wietlol' is already in use by 'Wietlol'. Please choose a different username."
Zoe
Zoe
lol
also
"The password 'hunter2' is already in use by 'Wietlol'. Please choose a different username."
And how is Michael supposed to know which password is already in use if you only write asterisks?
iDunno
because its the one he typed?
or are you someone who, when he has to log in on a website, is like "what the hell happens? when I type my password, only stars come up, but my password doesnt have stars in it. how am I supposed to provide my actual password?"
@Wietlol wut.jpg
18:32
@Wietlol you click the "show password" button
you remember making a website that is made to be stupid?
@JennaSloan black magic buttons?
you provide stars and it automatically knows your password
no thank you
Aren't they little circles?
depends on the font being used
18:48
@JennaSloan Simulated circle. Computer monitors can't draw true circles.
pushes nerd glasses up the nose
Zoe
Zoe
lol
@Michael just because your monitor can't draw true circles doesn't mean all monitors are incapable of drawing true circles.
Is there any such thing as a true circle at all though?
Obviously there is, otherwise we wouldn't be talking about it
18:53
How though?
Zoe
Zoe
There technically isn't
Do electrons orbit nucleus in a perfect circle?
Oh I see! I was stuck on the idea of how to visualize it.
I think blackholes form perfect circles
Zoe
Zoe
@Michael wow
dat sound
Me after a burrito
00:00 - 14:0014:00 - 20:00

« first day (2755 days earlier)      last day (2410 days later) »