« first day (2024 days earlier)      last day (2925 days later) » 

12:39 AM
@Michael you are, evident by the (poor) choice of a stack
also what does "hard-coded HTML" mean anyway
 
 
1 hour later…
1:58 AM
@Unihedron As in String html = "<html>...</html>"; xD
 
Hi fellow programmers. If any of you use IntelliJ IDE or any other JetBrains product please have a look at this Q stackoverflow.com/questions/37095394/… thx!
 
 
4 hours later…
6:15 AM
@Unihedron what would you recommend, rails? :P
 
@Unihedron then what is the language you use in 2016?
 
 
3 hours later…
9:18 AM
1
A: How to increase array size and add every new element on the top of the array?

java8.being Do you know how to increase dynamically the size of the array with new elements and every new element goes on the top of the array in Java? You can use List, all of it's implementations will take care of increasing the size dynamically as per requirements. If you want every new element to ...

Just want to learn about how can this answer be improved?
 
9:44 AM
giving some demonstrate code? like when you say "It's the contract of Stack to put every element on top and remove every element from top." it will be very clear when you state some code for that
 
 
2 hours later…
11:30 AM
@JanakaRRajapaksha Thank you, that's a good suggestion. Added
 
 
1 hour later…
user4298677
12:45 PM
Hey!
 
user4298677
 
Seen this a lot of times :)
I really like and at the same time hate the modular system
 
fge
@ItachiUchiha why do you hate it?
 
Loads of configuration just to setup a simple project.
But, I think that will improve once IDEs start supporting it
 
fge
12:49 PM
Well, I think that's a good thing
You don't have to do as many package gymnastics anymore
 
package gymnastics?
 
1:35 PM
Morning, Java!
 
Morning Jerry!
 
Hello
Hi ItachiUchiha and Michael.
nihonjin ?
someone is coding desktop applications in java ?
 
2:07 PM
Morning @Itachi @GiaRui.
 
@GiaRui I am .. But in JavaFX
 
hajimemashite
 
Bless you.
 
Oh, I thought he sneezed. xD
 
2:13 PM
haha
 
better to use hiragana hehe
JavaFx seems more powerful than Swing and maybe simpler.
 
in Japanese, hajimemashite means nice to meet you, how do you do, etc
 
2:37 PM
@GiaRui yes it is
 
Ah. Hjimemashite then. xD
 
@GiaRui ohayou
 
Man, I need a new laptop. This netbook is slow as all heck.
Anyone have a couple grand to spare? xD
 
If you agree to return double of what I give you after a few months :P
 
Eh, nevermind then.
 
fge
3:37 PM
Well, I don't use my old laptop anymore, but... :p
 
but?
just send it to jerry
 
@fge Old? It's probably just as fast as my netbook then...
 
fge
With a core i7 and 8 GiB or RAM plus a 512 GiB SSD? :p
 
Mmm nevermind. xD
Off to lunch, bye Java!
 
fge
4:02 PM
7 weeks to Le Mans
I'm impatient
 
4:16 PM
Hi I have a question : I want to remove a specific number from my arraylist let's say remove number 4 .. why my code does not do that paste.ofcode.org/XMLvRAXDxRVcUdZPgZistA
 
fge
4:57 PM
Because you are calling the wrong .remove() method...
/javadoc List#remove(int)
 
I couldn't find a signature with that parameter. Did you mean one of these? (type the number)
1. java.awt.List#remove(int)
2. java.util.List#remove(int)
 
fge
2
 
@fge Object remove(int index): Removes the element at the specified position in this list (optional operation). Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.
 
fge
^^^ that is the method you are calling
You have to list.remove(Integer.valueOf(k)) on line 14
 
hello i'm new to maven.netbeans trying to download something big when i add small dependency.
 
5:16 PM
thanks guys
 
5:56 PM
Hi, Can anyone help with the following: I am making a ajax chat panel "Wordpress" I have made the made parts and can insert and export from the database but not sure what is the best way to update the div as for testing I am using Jquery append but every 10 seconds it just loads the whole chat and repeats the chat every time it is pulled from the database .. I have an ID so wondering if its best to just added the items from last pulled?
 
this is not the Javascript room
6
 
6:13 PM
Ok Sorry
 
what is wrong with my code : int [] array = new int[10];

for (int i=0; i<10; i++) {
array[i]=i;

}

System.out.println(array);
why can not it print out numbers from 1 to 10
Now it works : int [] array = new int[10];
int x=0;
for (int i=0; i<10; i++) {
array[i]=x;
x++;
System.out.println(array[i]);

}
 
6:38 PM
What does this means : private Class<? extends Throwable> exception;
 
@DfgfHgh Use Arrays.toString
 
@Michael Sorry, I never heard of that class. :(
@Michael Sorry, I never heard of that class. :(
 
I fixed that problem ...thanks
you know what private Class<? extends Throwable> exception; means ??
 
@DfgfHgh It's a Class object for a class that extends Throwable.
 
Why we have ? sign
is it importatnt
 
6:50 PM
@DfgfHgh Yes. It means anything that extends Throwable. For example Class<IOException>
I take PayPal or bitcoin.
 
@Michael did find some Laptop bargain ?
have you a 64bit architecture ?
 
7:29 PM
@GiaRui My netbook is 32-bit.
 
user4196492
When developing games, is it bad to revert back to pre-production in the midst of designing the game?
 
why can't I do like this : if (s.charAt(k).equals(null)) {
 
7:45 PM
@DfgfHgh The charAt method returns a primative type, not an object.
 
yes we can use this : for (char c: s.toCharArray()) {
// do stuff with char c
}
 
@DfgfHgh Usually not a good idea. toCharArray creates a copy of the string.
 
@ what is best you think ?
 
8:12 PM
@Michael Maybe you need a new operating system. Okay I don't know what is the use of it.
 
for (int i = 0; i < s.length(); i++)
// use s.charAt(i)
also char type has no function equals, nor will comparing with null yield you anything because if the original target is null, you're dereferencing a null variable and crash
 
@GiaRui 64-bit just lets you have more than 4GB of memory. That's it.
And I use Linux. But some stuff is slow, like if I want to do anything on Google Drive.
And watching videos...forget it. xD
 
You have a phone though, right?
You can use your phone for multimedia usage and your potato for anything else.
 
8:37 PM
@Michael Yes that's a Problem, if the applications consuming so much ram and cpu.
newer netbooks have also 64bit, if it's a problem of space.
 
fge
8:53 PM
@Michael that is not all there is to it
 
@fge hi
@Unihedron hello
 
@GiaRui WHAT
 
@Unihedron busy ?
you know about Jprogressbar ?
 
9:29 PM
@fge Nope, that's it.
@Unihedron I have my 9 year old iMac for that.
 
fge
Eh
No it isn't
 
fight fight fight
 
Enlighten me.
crickets
 
fge
64bit registers, more direct memory access (yes, you can access 4 GiB of memory with 32bit btw), revised ISA, etc
 
And that effects the end user how?
 
9:33 PM
popcorn
 
fge
If you only care about the end user, you don't get anywhere
Eh
 
Although, Eclipse loads faster on my netbook than my iMac. xD
Probably because my netbook has an SSD.
Oh yeah. The 2020 time bug thing. You won't be able to use 32-bit computers past that year.
 
fge
9:54 PM
What? Why?
THis is not 2020 by the way, it's Jan 19th 2038 if you are talking about Unix time
 
Was gonna say that
(Also, hOi)
 
fge
And this is a library problem more than anything else anyway
 
Yeah, it's trivial to represent arbitrary dates up to year "well over a million" with 32 bits
Just not as "number of milliseconds since unix epoch"
 
fge
By 2038 I'll probably be dead anyway, so I won't see that :p
 
Ah, yeah, wrong year, sorry. xD
@fge Ah. So if Unix had chosen to represent dates differently, we wouldn't have to worry about this issue.
Hey @Madara
 
9:59 PM
not the same as 2000 bug ?
 
@fge Yeah, with that attitude, probably.
 
fge
@Michael my guess is that by the time we get there, the problem will already have been solved
 
Not me though, Imma live forever.
 
@GiaRui 2000 bug had to do how most applications were written to use a two-digit year, instead of a four-digit year.
 
fge
@GiaRui both problems are similar in the sense that they are (well, were in the case of Y2K) a consequence of "shortsighted" representations of datetimes
 
10:01 PM
@GiaRui The 2000 bug was "What comes after '99? why, '00 of course" Only '00 would be understood by crappy software as 1900, and not 2000.
@fge Dates are hard
And we suck at them, a lot.
 
fge
JSR 310 does a pretty fine job with them I believe
 
okay thanks
 
@fge Even with a dedicated type, you still have issue of mutability and immutability
Addition, subtraction, range
 
fge
@MadaraUchiha all JSR 310 types are immutable
 
@fge Doesn't that kinda go against "the Java way"?
 
fge
10:03 PM
And as to "ranges", there is a distinction between Period and Duration for a reason
 
Not that I'm complaining mind you, immutables are good for reasoning about code
 
fge
@MadaraUchiha since when is "the Java way" about mutability?
 
@fge Java programs are, by default, a gigantic state machine
Immutability doesn't work well with that...
 
fge
Err
 
There, after 3 pings, I corrected myself
 
fge
10:04 PM
Well, not mine :p
 
@fge Yours is probably the only one I've seen that isn't like that, let's be honest.
And Java is popular because lots of people learn it because it's a solid language to build a career on, not because they're very passionate about it.
Just like PHP and JavaScript
And I'll admit that bad Java code is better than bad JavaScript code
But then again, I'm entering religious arguments again :P
 
fge
I can't tell about that, any JS code I write is probably veery bad
 
@fge This is a recurring theme I've found with Java devs forced to write JavaScript
Java devs for years, tens of years in OO experience, modeling, patterns, abstractions, state management, everything
Everything is poof gone once you start doing JavaScript :P
(not you specifically)
 
poof, gone
sitcom in production: Java dev doing JS
 
Everything is procedural, no abstraction, no objects (save for literals, which are always abused as maps), no inheritance, no nothing
 
fge
10:07 PM
Well, I have to write ObjectScript code right now, and that is hard
 
@fge Yey obscure proprietary languages?
If you go for an obscure language, go for Lisp :P
Lisp totally blew my mind with regards to OO, to be honest
JS's OO is more powerful than Java's (prototypal), and Lisp's (CLOS) is more powerful than JS's.
 
They are adding OOP constructs to the new ECMAScript, aren't they?
 
class and whatnot
 
@Michael class is just syntactic sugar
You still need to (and really should) understand prototypal inheritence
 
Have a nice day
 
10:15 PM
Because it's still all runtime, and you still have a lot of untapped power if you only use this new syntax without understanding what goes on underneath.
 
Mmm.
 
I've come to theorize that most Java devs only ever practice OO because the language forced them to.
That's why it all crumbles in a "free" language like JavaScript that doesn't impose anything on you.
 
@MadaraUchiha why would they have used java in the first place then?
 
You wanna do everything without a single function? Go ahead, write it all in the global context, see if I care. (Browser, probably)
@Vogel612 Market share, job security
Java is still a very solid language for a veriaty of things
Even if JavaScript is slowly but surely taking over.
 
@Vogel612 in addition to what Madara said, some people learned Java from school and never expanded their knowledge pool
 
10:17 PM
"free languages" only became viable after the introduction of java which was to alleviate problems with imperative languages like Pascal, BASIC and C
@Unihedron "learn" java... sad but true
 
@Unihedron Definitely that.
That's why I wouldn't want to hire someone who only ever learned one language and only one language
No matter how good you are, a jack of all trades but master of none is still a lot better than master of one.
 
@MadaraUchiha wow, you totally killed my rhyme lol
 
there is no such thing as "master of one" trade.. because there is no way you can write code being master of one
it's simply impossible
 
@Vogel612 Tell that to the multitude of code monkeys in the markett
 
I agree with "it's better having many options", especially when you're a programmer because there are better tools for most jobs
 
10:20 PM
I take offense to that.
 
meh. code monkeys are not masters of one
 
@Michael 99.5% of potential candidates floating in the pool don't even pass FizzBuzz...
 
@MadaraUchiha is it really that bad?
 
(referring to my profile picture)
 
@Vogel612 no, but they're normally just "something" of one.
@Michael Hah, missed that joke
 
10:20 PM
xD
 
also how do they pass as "potential candidates" if they don't even manage to FizzBuzz
 
@Vogel612 They apply.
 
they can't be considered potential candidates for all I care
 
The FizzBuzz is there to filter them out.
And I think it's sad that our initial filter is set so low, and is still 99.5% effective.
 
I think Vog is targeting the "candidate" part - candidature as a programmer implies that they can program
 
10:21 PM
^^ that
 
and most people who apply to be a programmer can't program
 
At first, I learned mIRC Scripting
And to be fair, for such a niche program/scripting language, you had a LOT of things to do
From the basic variables/loops/conditions all the way up to GUIs, event based programming, sockets, COM, and canvas processing
From there, I moved to PHP, which was my first "real" programming language
I learned OOP there
JavaScript gave me intro to functional and a different perspective on OOP
Lisp gave me a different perspective on... everything really...
 
... I learned to program by building a Flash game.
Too bad it's dead.
 
/me wants to see @Uni's flash game
 
I don't even have them anymore, I didn't keep them after I got rid of Windows.
It was eight years ago too, so you can imagine how low-quality they were.
 
10:29 PM
Weren't you in diapers then?
 
It's like a maiden's diary kept when they were a kid, totally unexhibitable.
@Michael I'm 17.
 
@Unihedron Yeah? Your point?
 
I was in primary school back then.
 
Oh, so you were.
xD jk
 
@Michael hhhhhhhhhhhhhhhh
i remeber playing a game of flush in pentium 4 pc
i should shoot cats with rocks
something like this
 
11:05 PM
ohayou
 
oha
 
fge
youtube.com/watch?v=OJrIMv4dAek <-- high changes that it will be in JDK 9
 
*chances
 
I have still a book i need to read based on Java 7 or 8.
interesting nonetheless
 

« first day (2024 days earlier)      last day (2925 days later) »