« first day (122 days earlier)      last day (3426 days later) » 

9:47 AM
hey
 
10:35 AM
morning
 
10:46 AM
hey @SimonAndréForsberg
 
 
2 hours later…
12:45 PM
Monking
 
howsit going
 
Good, how about you?
 
not bad so far
 
Been waking up early past few days, strangely. Don't have to leave for work for another 1.5 hour, but just couldn't fall back asleep
 
hey @Phrancis and @bazola
 
12:53 PM
Hey
 
hey @skiwi
 
Finishing assignment on the last day..
 
Living on the edge, huh :)
2
 
due today or tomorrow?
 
@bazola Well...
23:59 today, as what does that count?
 
1:02 PM
Definitely today
 
1:46 PM
@Phrancis You could say that!
 
 
2 hours later…
4:00 PM
Hey @Marc-Andre did not see you come in!
 
I didn't had the time to say hello!
 
4:44 PM
> fixed functionality for adding and removing connections within the tree
> added the possibility to remove a node directly in the tree
> added Add Node button
> editing JS improvements
> added the possibility to save positions
> fixed css tag classes
> restructured tree-controls to always have controls, the content depends on edit-mode
> not adding tags with empty names
> setting the tree for a tag correctly
> added some tag styling
> removed some CSS that was copied from earlier project
 
 
2 hours later…
6:24 PM
Java/general question about variables... Let's say I have this:
public class localVariableExample {
	public static int foo;
	public static void main(String[] args) {
		int bar;
		System.out.println("foo : " + foo);
		System.out.println("bar : " + bar); // compile error
	}
}
Versus this:
public class localVariableExample {
	public static int foo;
	public static void main(String[] args) {
		int bar = 1;
		System.out.println("foo : " + foo);
		System.out.println("bar : " + bar); // no error
	}
}
 
in the first example, the variable is uninitialized
 
Is it where a variable declared inside the same method it's being called need to be explicitly initialized?
I'm just mostly wondering about why foo becomes initialized by default
 
@Phrancis foo is a field and not a local variable.
Local variables don't get automatically initialized.
 
I see. When I System.out.println("foo : " + foo); why does it return 0 if it's not a variable...?
 
I can't quote the JLS (Java Language Specification) by heart, but I know it's in there...
@Phrancis a field is a variable. Just a different kind of it.
 
6:29 PM
So what if I do this:
public class localVariableExample {
	public static int foo = 1;
	public static void main(String[] args) {
		int bar = 1;
		System.out.println("foo : " + foo);
		System.out.println("bar : " + bar);
	}
}
 
that will work, yes.
you initialize both variables to 1.
 
Does that change the nature of foo or just its value?
 
public static int foo; gets initialized by default to 0
@Phrancis just the value
 
Ok... Bit confused about what a "field" is for then, vs. a "variable"... but TFL
By all means I'll read anything else you type meanwhile :)
 
@Phrancis it's about scope. Local variables are only available inside one method. Fields is available in the entire class (if it's not private, it's even available in other classes)
public class localVariableExample {
	public static int foo;
	public static void main(String[] args) {
		System.out.println("foo : " + foo);
	}

	private static void otherMethod() {
		System.out.println("otherMethod foo : " + foo);
	}
}
^^ this will work fine
 
6:36 PM
help
How do I name my character in ESO
skiwi is already taken!
 
public class localVariableExample {
	public static int foo;
	public static void main(String[] args) {
		int bar = 1;
		System.out.println("foo : " + foo);
		System.out.println("bar : " + bar);
		otherMethod();
	}
	private static void otherMethod() {
		System.out.println("foo : " + foo);
		System.out.println("bar : " + bar); // compiler error
	}
}
^^ in otherMethod(), "bar" is not available, because it's a local variable in main
 
Any suggestions for a name, anyone?
 
unfortunately not
Speaking of name, @Phrancis, public class LocalVariableExample
 
I'm thinking MrSkiwi ... but it sounds decent, but not good
 
6:56 PM
9
Q: Java: Why am I required to initialize a primitive local variable?

user1329572public class Foo { public static void main(String[] args) { float f; System.out.println(f); } } The print statement causes the following compile-time error, The local variable f may not have been initialized If primitives in Java already have a default value (float...

SO to the rescue
 
What, no JLS?
 
@skiwi Maybe FrankSkiwi ?
@SimonAndréForsberg That makes a lot of sense! Learning things today :D
Of all data types, why is only String capitalized?
 
@Phrancis String is a class and not a primitive type
 
Is that also my it needs quotes? Is it because it's passing an "argument" to that String class?
 
7:12 PM
@Phrancis String is a bit of a special class in Java. You can use the + operator on it and stuff. The fact that it needs quotes is just that you can give it a value by using the quotes. For example, String name = "Phrancis";
it is the only class in Java that can be treated in a special way
 
Ok. I'm sure it will make more sense later as I learn more about classes and objects :)
I'd be curious to see some code from Cardshifter with these simple basics concepts
 
Use the source, Luke.
 
lol
Yeah looking at some stuff in PhrancisGame
 
@SimonAndréForsberg It's not the only one, you have Integer, Float, Boolean and all the Object class of the primitive type.
 
7:34 PM
/** Comment
* Are comments like these still used in Java?
*/
(working from an older tutorial, trying not to learn bad habits along the way ;)
 
@Marc-Andre good point
 
@Phrancis Considered, but I disliked it, I think I'll roll with MrSkiwi!
 
@Phrancis /** are Javadoc. /* are comments.
 
^^ that
 
7:48 PM
So I wrote this @SimonAndréForsberg :)
public class HelloWorld
{
	String output = "";
	static HelloWorld helloObj;

	public HelloWorld()
	{
		output = "Hello World";
	}

	public String PrintMessage()
	{
		return output;
	}

	public static void main (String args[]) {
		helloObj = new HelloWorld();
		System.out.println(helloObj.PrintMessage());
	}
}
 
So, quick code review:
static HelloWorld helloObj; should be a local object in the main method
String output = ""; does not need to be initialized when it's declared. You can make that private final String output; and initialize in constructor (it can also be initialized where it's declared, of course)
public String PrintMessage() should be named printMessage() according to camelCasing. It doesn't actually print something though so getMessage() would be a better name.
Now, don't listen to my complaints about your code. You write Java, you're making it do the job, awesome!
 
lol. Surprised you haven't said anything about the indentation, I was kind of wanting to gauge your reaction ;-)
 
Indentation is perfect
but you're using C#-style braces and not Java-style ;)
 
Now, which part of this thing would be the "constructor"? Haven't read about that
 
public HelloWorld()
a method that has the same name as the class itself, but no return type (not even void), is a constructor.
 
7:55 PM
So is that constructing an instance of the HelloWorld() class, with a value of "Hello World" basically?
 
@Phrancis yes.
 
Or is it rather, an instance of HelloWorld() with an output property of value "Hello World" ?
 
that's more accurate, yes.
 
public class HelloWorld {
	private final String output;

	public HelloWorld() {
		output = "Hello World";
	}

	public String PrintMessage() {
		return output;
	}

	public static void main (String args[]) {
		static HelloWorld helloObj; 	// illegal start of expression
		helloObj = new HelloWorld();
		System.out.println(helloObj.PrintMessage());
	}
}
 
7:58 PM
remove static when it's a local variable
 
PrintMessage() -- >printMessage()
 
7 mins ago, by Simon André Forsberg
public String PrintMessage() should be named printMessage() according to camelCasing. It doesn't actually print something though so getMessage() would be a better name.
 
Yeah I wanted to make sure it compiled before I started renaming things
 
good thinking ^^
 
Still not too confident about what static and final are for. I think I understand private/public OK
 
8:01 PM
@Phrancis Don't make your privates public!
 
Well, here is the modified code, looks more understandable, thanks for the micro-review :)
public class HelloWorld {
	private final String output;

	public HelloWorld() {
		output = "Hello World";
	}

	public String getMessage() {
		return output;
	}

	public static void main (String args[]) {
		HelloWorld helloObj; 	// illegal start of expression
		helloObj = new HelloWorld();
		System.out.println(helloObj.getMessage());
	}
}
 
@Phrancis A quick definition : final -> Will not change. static -> Will be "attached" to the class
So one is about if it can be modified and one is to define if it's "attached" to the class or an instance of the class.
 
@Marc-Andre static, there is only one such instance for every class
 
So they are not mutually exclusive... like public static final String foo; would mean it cannot be changed (after initialized/set?) but can be attached?
 
@skiwi It's a better definition thanks
@Phrancis Attached is not a good word (that is why I've used quotes) but yeah it's the spirit of the thing. Final static means : the variable is accessible to all the instance of the class and is guarantee to not be modified (there are some exceptions, but those are not worth to be explained at the moment)
Because modifying a final variable is normally an insane thing to do.
3
 
8:07 PM
OK that makes more sense
So once the constructor HelloWorld() sets the output property to "whatever" would declaring output as final throw a compiler flag if it was modified again?
Guess it'd be easy to find out
> Compilation Errors Detected

Line: 12
constructor HelloWorld() is already defined in class HelloWorld
 
Compiler time only happens at compile time. So If you have `final String finalString = "Should not change";
finalString = "Error"; //<-- this will throw a compile error`
@Phrancis You've re-declared the constructor, you just need to try to re-assign a value to the variable and it should break,
 
> Compilation Errors Detected

Line: 9
cannot assign a value to final variable output
 
Good so you see, you can't assign more than once when you use final.
 
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
 
@skiwi ??
 
8:23 PM
whoops
was using the wrong mouse profile and pressed a button
 
> created README.md
 
@skiwi like my keyboard macro? git log --branches --graph --decorate --oneline
git log --branches --graph --decorate --oneline
I love that Macro :)
 
8:36 PM
@SimonAndréForsberg You made a macro for that? That's awesome
 
of course I did!
 
I just set up a mouse profile so I can use (I, J, M) for (Inventory, Quests, Map) on my mouse in The Elder Scrolls Online... No more need to get my hands of my mouse!
 
@skiwi I used my left hand for this ! :P
3
 
@skiwi is it fun so far?
 
@Marc-Andre That's... hard, I'd say ;)
@bazola So far it's good! Just spent 1 hour though
 
8:39 PM
@skiwi Why ? (I guess I'm missing some information here)
 
@Marc-Andre You're usually walking around with WASD using your left hand
 
@skiwi That only 4 finger at most, you still have your thumbs normally. But that is the way I'm used to.
Not trying to say it's not helpful to have I J M on the mouse!
I'm just used with my Razor Naga to have a bunch of additional spells accessible on the mouse instead of utility like quest and map
 
@Marc-Andre The thumb is needed for Alt :p
@Marc-Andre Do you play ESO as well?
 
@skiwi Alt ? And no I'm a Wow player (with a second lvl 100 on the way)
 
@Marc-Andre You need to use Alt a lot, so that's where you thumb is
I don't think ESO has (many) additional spells, it's similar to GW2 in that respect
 
8:48 PM
Then it's a better option to put common utility then! But I'm quick at using my keyboard and do much Pvp so I fell comfortable to access those key with my left hand.
 
I need a naming suggestion, say that I want to extract my ECS code to it's own library, what should be the name?
 
@SimonAndréForsberg ecs
 
ECS ?
 
Whew, just had to defuse an escalation. Fun stuff.
 
@Phrancis what escalation?
@skiwi @Marc-Andre "ECS" feels too common. It is ECS code, but naming it purely "ECS" is not a good idea, as there are other ECS frameworks
 
8:54 PM
Work related stuff, nothing very interesting. Insurance stuff, ya know.
Did take up almost an hour of research though.
 
All the ECS frameworks seem to come up with silly names
 
@bazola I also want a silly name!
Don't force me to use this
 
that is a tall order! at least to avoid using something that has been taken
 
@SimonAndréForsberg Olufunmilayo
 
@SimonAndréForsberg What this library will be used for ? Is it your service layer, api layer or anything else ? {project.name}-api/service could do it
 
8:59 PM
@Marc-Andre I don't think it's either. I guess you could call it a framework-layer.
group name will be net.zomis.
 
Is it like a persistent layer ? I don't quite understand what it's suppose to do
 
@Marc-Andre How much do you know about the Entity Component System approach to games?
I guess you could call it an abstraction layer.
 
@SimonAndréForsberg Well nothing actually. Never worked on a game. So I can't really help to name things I don't understand the concept. But if it's an abstraction layer or something like a framework then give it a simple name that stand out. Some greek god that did a "similar" job.
 
> Some greek god that did a "similar" job.
Decima, perhaps. With perhaps a little reference to Person of Interest :)
It's Roman though, not Greek :/
 
9:16 PM
@SimonAndréForsberg Well it does not matter much ;). Most of Roman deities (plural of deity) are taken from other mythologies so.
 
in The 2nd Monitor, 1 min ago, by Simon André Forsberg
Perhaps Lachesis, the Greek equivalent.
 
I like the name Lachesis though. Although the Goddess is totally irrelevant to what the framework actually does.
Now for a more important question: Java 6 or Java 8...
 
Java 8 and TTQW
 
Well, I can always make it Java 8 now and backport later if I need it.
for what I need right now, I only need Java 8.
Perhaps 'Lachecs' / LachECS
Naaa, Lachesis
 
"esis" almost sounds out ECS, I think it will be cool
 
9:24 PM
net.zomis.lachesis it is!
3
 
When making a constructor, what is the use of the () at the end of the name?
 
@Phrancis it is for parameters, just like calling other methods
public class HelloWorld {
	private final String output;

	public HelloWorld(String name) {
		output = "Hello World, " + name;
	}

	public String getMessage() {
		return output;
	}

	public static void main (String args[]) {
		HelloWorld helloObj; 	// illegal start of expression
		helloObj = new HelloWorld();
		System.out.println(helloObj.getMessage());
	}
}
Make that work ^^
(yes, I copied your code)
 
Hmm, a bit stumped... I got this far:
public class HelloWorld {
	private final String output;
	public HelloWorld(String name) {
		output = "Hello World, " + name;
		name = "Simon";
	}
	public String getMessage() {
		return output;
	}
	public static void main (String args[]) {
		HelloWorld() helloObj; 	// not a statement
		helloObj = new HelloWorld();
		System.out.println(helloObj.getMessage());
	}
}
> Compilation Errors Detected

Line: 13
';' expected

Line: 14
';' expected

Line: 14
not a statement
 
HelloWorld() helloObj;
that's the declaration, you shouldn't use paranthesis when declaring a variable
helloObj = new HelloWorld();
^^ that is where you need to make a change
new HelloWorld() tires to call a constructor without a parameter
but as the code is public HelloWorld(String name) it now requires a parameter
 
9:42 PM
Hmm, ok. Not quite there yet
	public static void main (String args[]) {	// ';' expected
		HelloWorld helloObj;
		helloObj = new HelloWorld(String name);	// illegal start
		System.out.println(helloObj.getMessage());
	}
 
new HelloWorld(String name)
instead of String name you should here specify the actual name that the constructor should use
In the constructor, you have name = "Simon"; but that code doesn't really have any effect because it is called at the end of the constructor and the variable is only local to the constructor.
 
OK. Only one more thing, no idea why but I'm guessing... syntax error somewhere?
	public static void main (String args[]) {	// ';' expected
		HelloWorld helloObj;
		helloObj = new HelloWorld("Simon");
		System.out.println(helloObj.getMessage());
	}
}
 
try String[] args
 
Same thing
 
post all the code
 
9:50 PM
public class HelloWorld {
	private final String output;
	public HelloWorld(String name) {
		output = "Hello World, " + name;
	}
	public String getMessage() {
		return output;
	}
	public static void main (String[] args) {	// ';' expected
		HelloWorld helloObj;
		helloObj = new HelloWorld("Simon");
		System.out.println(helloObj.getMessage());
	}
}
 
works on my machine
blaming Netbeans
 
I'm actually using browxy.com
But you're probably right
Well, lots of new knowledge today! If only my colleagues bothered to try to learn something when we're slow, instead of reading novels... :)
in The 2nd Monitor, 19 mins ago, by Malachi
if they only knew what was good for them
I think I might pursue this Java escapade. I hear Java developers are in high demand (good ones, that is).
 
10:07 PM
Ping: Practicality beats purity.
4
[Zomis/Lachesis] Zomis created branch master
[Zomis/Lachesis] Zomis pushed commit 40008333 to master
> initial commit
[Zomis/Lachesis] Zomis pushed commit 3817c592 to master
> added core classes, players and events
 
10:30 PM
@SimonAndréForsberg Does this also work on your machine?
public class Foo {
		// What would be the difference here?
		// this
		int i1 = 1;
		// versus
		Integer i2 = new Integer("1");
	public static void main(String[] args) {	// ';' expected
		System.out.println("i1 : " + i1);
		System.out.println("i2 : " + i2);
	}
}
 
10:41 PM
class Foo {
	// What would be the difference here?
	// this
	int i1 = 1;
	// versus
	Integer i2 = new Integer("1");
	public static void main(String[] args) {
		System.out.println("i1 : " + i1); // Cannot make a static reference to the non-static field i1
		System.out.println("i2 : " + i2); // Cannot make a static reference to the non-static field i1
	}
}
@Phrancis it's about primitive variables and non-primitives. It's.... complicated. But I'd recommend that whenever possible, stick to primitives (int)
 
Hm. Interesting. Neither of those came up on that compile site
 
for the record, Integer i2 = 1; also works.
 
Ok. Will do
 
OK I'll give that one a whirl. Are imports needed at all, for real simple stuff like I'm doing?
 
10:47 PM
Everything in java.lang is imported automatically.
When you use Lists and stuff, then you'll need imports.
both String, Integer, and System are in java.lang.
 
@Phrancis try the edit button
 
Yeah that does nothing either. Gods I hate this fudging browser
Guess I could just write in Notepad and run it from console lol.
Well anyways, TTGH
Thx again for all the help @SimonAndréForsberg :)
 

« first day (122 days earlier)      last day (3426 days later) »