« first day (1462 days earlier)      last day (3462 days later) » 

1:25 AM
Hello
Anyone alive?
 
2:03 AM
Yes
Hi...
How are you ?
 
 
2 hours later…
4:17 AM
Morning Java \0/
 
 
1 hour later…
5:19 AM
Morning!
 
'sup uni? still in school?
 
yes lunch break
 
I see :)
pizza breakfast here :P
 
! :D
 
fattens up for the winter
;P
 
 
3 hours later…
8:57 AM
Anyone used any Java Data mining libraries? For finding patterns.
 
9:07 AM
I don't use libraries, I kind of do it myself.
 
Uni is re-inventing the wheel, whilst not recommending it
:P
"Don't do what I do, do as I say!" Uni will make a great parent ;P
 
xP
Today I taught about calculating the volume of a rectangular cuboid.
2
A: Why does this method not return whether the area is bigger than the parameter cubed?

UnihedronYour use of variables are inconsistent. public boolean tooBig(int i) { boolean bo1, bo2, bo3; bo1 = Math.abs(b1.getX() - b2.getX()) > i; bo2 = Math.abs(b1.getZ() - b2.getZ()) > i; bo3 = Math.abs(b1.getY() - b3.getY()) > i; return bo1 && bo2 && bo3; } Your algorithm is incorrect altogethe...

 
cuboid?
 
In geometry, a cuboid is a convex polyhedron bounded by six quadrilateral faces, whose polyhedral graph is the same as that of a cube. While mathematical literature refers to any such polyhedron as a cuboid, other sources use "cuboid" to refer to a shape of this type in which each of the faces is a rectangle (and so each pair of adjacent faces meets in a right angle); this more restrictive type of cuboid is also known as a rectangular cuboid, right cuboid, rectangular box, rectangular hexahedron, right rectangular prism, or rectangular parallelepiped. == General cuboids == By Euler's formula the...
 
The good thing about wikipedia is that I just have to press my native language tab and I know exactly what it is without needing to read the article :P
I have done the math, but in my native language so I don't know the English terms >_>;
 
9:21 AM
oh :o
 
9:31 AM
So I'm not really at elementary school level at math, just language-wise :P
Are you home now @Uni?
 
Yeah!
 
Assum!
 
Yeah!
 
9:56 AM
@uni You like reinventing the wheel, or are you playing the 2cool4u card ?
 
@miniHessel No, I just keep up the spirit of data science. If you can do it yourself, I'd do it myself.
 
Morning!
 
morning
 
morning
 
Morning
 
10:37 AM
Good morning guys
Anyone knows how operating system scheduling algorithms work :D?
 
morning
 
right back at it again :D
 
You would love Programming Language Theory, it got closed though.
193
Programming Language Theory

Proposed Q&A site for people who wish to influence and foster interest, in the development of new programming languages. For programming language theory enthusiasts and computer science students who wish to learn more about the subject or have their doubts elucidated.

Closed before being launched.

 
i have a question in java ...
 
pls ask
 
10:47 AM
There's more than one way to implement scheduler, so I don't think it's possible to say much about how they work in general. (The current default (CFS) in Linux is at least the fifth implementation, I think).
 
@kiheru I actually have a more general question, about Round Robin. Created a stackoverflow post a minute ago: stackoverflow.com/questions/26546414/…
There are simply no examples in the internet that would cover this thing
Every website shows that execute time is higher than next process arrival time and then there's no problem
 
Wouldn't that be a case of there being only 1 task to schedule? ie, give another time slice for the only task
A special case of being at the end of the task queue
 
I don't know, that's why i made the post. The question stays the same - will it wait for the next process and move P0 to the queue end or will it execute P0 to the end
but at first there's no queue although
so it takes P0 to the queue end, checks that there's no process to execute and executes P0 again
 
(iirc Linux 1.2.13 had that kind of simple circular queue for scheduling. I managed to understand the code back then when I was a newbie in C. The algorithm was simple and the code in question is clean. That may be useful reading)
 
@Unihedron Do you know what´s the best tool to know which method or class is using more memory in netbeans?
 
11:00 AM
I don't do netbeans.
missing problem statement stackoverflow.com/q/24928054
too broad or no problem statement stackoverflow.com/q/24727403
server infrastructure or no code or unclear or whatever stackoverflow.com/q/23751295/3622940
gimme the code thanks thanks stackoverflow.com/q/26242763/3622940
 
Thanks
 
@charen I'm not sure what you mean. If you mean by the arrival time the time when a task is added to the task list, then a task ending before a next is added would normally start processing the tasks that are available. (Which, if there's only one task available, would be restarting that one. If there are no tasks that need running, then sleep until something needs running)
 
okay
 
hiya @kiheru @ita
 
Hi @Unihedron
 
11:08 AM
@Unihedron heya
 
Since there's no one true way to schedule, you'll need to make some decisions about the properties you want it to have anyway. (Like, any sort of real time requirements would have major impact on how to treat the task with the real time priority)
 
@Liza heya
 
Hi
 
Hi there
 
11:30 AM
Can't wait until the weekends where the bad questions stops spewing..
 
you mean when the n00bs don't have class? ;P
 
11:58 AM
Me has an evil idea :)
 
@ita could I ask you for a tips?
 
12:52 PM
Ain't no sunshine when @ItachiUchiha 's gone
 
:shrug:
 
dat gesture
 
alt-e "right right right enter"
Userscripts ftw :)
 
^_^
 
1:08 PM
Hi @ElliottFrisch! :-)
 
@Unihedron Hola. Que pasa?
 
:( frantically rushes to hit the "I'm confused!" button
 
SOUND THE ALARM!
 
Oh god a different language
 
New bounty question:
0
Q: Microsoft JDBC 4.0 Driver apparently ignores responseBuffering=adaptive?

DruxI am dealing with what is apparently a performance issue while retrieving a relatively large ResultSet from a remote Microsoft SQL Server 2012 to a Java client that uses Microsoft JDBC Driver 4.0. When I run the corresponding query on the remote server's Microsoft SQL Server Management Studio, i...

I like the avatar of the user. The puppy is adorable.
 
1:10 PM
@Unihedron Sorry. It's very basic Spanish. OOps.
@Unihedron What's up?
 
A typical day :P Saw you around a month ago
 
It starts out as basic Spanish, but before you know it your head is riding through the desert on a tortoise-
 
@Gemtastic Nah. I don't live in the southwest. We don't have tortoises, just sea turtles.
 
@ElliottFrisch Where you live is irrelephant! ;P
 
1:13 PM
Dophinately... :P
 
No me gusto :O
Me gusto la cama
MY spannish sucks XD
 
Ur whalecom
 
:appealed:
 
Seal of approval
 
1:21 PM
I don’t quite sea it.
 
Missing the porpoise?
 
[generic pun here]
 
@Paradoxis Haha!
 
It's so nice meat punny people
 
1:33 PM
hello
 
Hello :)
 
@fahdijbeli Hey ^^
 
Ouch, out of comment flags.
Anything planned for the weekends?
 
Programming!
 
I dont do weekends.
 
1:46 PM
Everything besides being social
 
it is weird, but these answers were exactly the answers I expected
 
hi everbody
 
Hello
 
@Aamir Hey
 
I'm heading to SoCal with my son - going to LegoLand
That'll be fun, I hope
 
1:54 PM
hell with this android chat room, I make everyday requests to join it but they seem to ignore me everytime.
 
@Kylar have fun!
 
@Kylar Wow! You better have enough fun for all of us :)
 
Hello :)
 
@NadirDev Hey
 
Hi :)
I'm having fun playing a mouse-keyboard multiplayer game all by myself.
 
1:56 PM
Haha, nice.
 
Which one @Uni
 
there is a cloud to accomodate my website (java) for free
Googleapp engine is it free ?
 
@Gemtastic AudioSurf
 
Ah
That is a nice game
 
It's amazing :P
@fahdijbeli maybe
 
1:58 PM
I'll try :)
We're also going to see the San Jose Sharks play against the Ducks there
That's kind of a thing my son & I do - we've been to see the sharks play in Dallas, Columbus, LA and now Anaheim (and in SJ, of course.)
 
@Unihedron thanks I 'll check that :)
 
Adz
2:47 PM
hey guys, in regards to throwing exceptions, does it matter if I use the constructor to do it or a setter? Or is it just an opinion of personal taste?
 
What do you mean
 
@Adz wat
 
That almost sounded right... but not quite. Give us an example of each
and we'll tell you what's what
 
Adz
basically I'm askign this question
21
Q: Is it good practice to make the constructor throw an exception?

akoIs it a good practice to make the constructor throw an exception? For example I have a class Person and I have age as its only attribute. Now I provide the class as class Person{ int age; Person(int age) throws Exception{ if (age<0) throw new Exception("invalid age"); this.age =...

or should i do it in a setter
 
well why dont you use that answer?
 
Adz
2:48 PM
there;s ones saying it is
and another one saying it's not
:s
 
They're basically saying the same thing... sort of
You understand the difference between checked and unchecked exceptions?
(I'm just making sure we have a baseline for this)
 
Adz
never heard of it lol hold on
 
How much Java have you done @adz?
 
@Adz Ok, let's start there. Java gives you two types of Exceptions
 
Adz
couple of uni years
 
2:50 PM
one is "Checked" exceptions - these are exceptions that you have to explicitly state that your method throws
 
You're doomed
 
Nah, we'll be fine.
 
Ok
 
We'll give him enough to go out and learn the rest
 
2:51 PM
goodluck ;P
 
So:
public void someMethod() throws Exception{}
@Adz following me so far?
 
Adz
yeah
 
So wherever your code calls into that method, you need to make sure that you handle it if that exception gets thrown
like a try/catch or something
Java also provides a second kind of exception: an Unchecked exception
These you can throw from anywhere, without declaring them
 
Adz
ohhh
 
public void doSomething(){
    throw new IllegalArgumentException();
}
So to summarize all the answers and add my own comments:
1) It's fine to throw exceptions in Constructors and Methods - it happens all the time
 
fge
2:53 PM
To be precise, unchecked exceptions are RuntimeException and Error, and all their children
 
2) Make sure that what you're throwing is appropriate for the location you're doing it
 
Adz
ok
 
If you're creating a Person class - instead of throwing the exception inside the constructor, you may just want to validate the age first, and not create the object
but let's say you had an object that was representing a specific type of Person like an Adult
then you might throw an

IllegalArgumentException

in the constructor if the age was under 18.
because Adults can't be under 18
 
Adz
okkkk
yeah makes sense
 
And here's the last part:
Generally speaking - You declare a checked exception if it's a case where you expect your program to be able to recover from that exception.
And if you expect that exception to blow up your whole program, then you would likely prefer an unchecked exception
and what's more - you can create your own exceptions:
public class UnderAgeFakeIdException extends Exception{
    public void doSomething(){ System.out.println("Get out, I'm calling the Cops!");
}
 
Adz
2:57 PM
haha
ok cool
thanks :)
 
And as @fge stated, if you want an exception to be unchecked you extend RuntimeException, or if you want it to be checked you extend Exception
and again generally you don't mess with the Error class - those tend to represent stuff wrong with the system, or VM
In 15 years I've yet to need to mess with Error
and they all have a common ancestor: Throwable
so sometimes you'll see something like:
 
fge
@Kylar I've had to... For some moron code which was declared to throws Throwable
Meh
 
catch (Throwable t){}
@fge but Error extends throwable too
@Adz when someone catches throwable, it's usually to log something specific about how the whole world blew up
or in some cases where you're dealing with other people's code and can't trust it (this happens fairly frequently, actually)
 
fge
@Kylar exactly... I had to catch (Error) everywhere in order to distinguish this from "real" exceptions
(before I handled Throwable)
 
Adz
yeah ok
that was a good explanation thanks
 
3:01 PM
@Adz That must be a strange case
Whoops
meant to type:
@Adz glad I could help
@fge that must be a strange case
but my fingers got ahead of me
So the guy with the 30 upvote answer is fairly correct
 
fge
@Adz one more thing; DO NOT catch Exception blindly; this is a fairly common mistake
 
Adz
ok
 
fge
The problem is that RuntimeException is a subclass of Exception, so if you catch (Exception e) you have to deal with all unchecked exceptions in the catch block
Not something to do
You should catch exceptions as specific as possible
 
Adz
ok cool thanks
 
fge
Moreover, if you have two exception classes A and B and B inherits A, catching A will also catch B
 
3:17 PM
Plus, some programmers catch Throwable and was not aware that ThreadDeathExceptions needs to be re-throw, plus some other common mistakes that can cause your JVM to be unstable
 
If I ever catch a ThreadDeath the only thing I'm going to throw is a coffee mug at whoever called thread.stop()
because they're an idiot
 
That too :)
 
and then I'm going to fire them and hire @Unihedron who would never do something like that
 
^_^
Wow, I learned a lot from reading this.
97
Q: Why is Cloneable not deprecated?

KaoIt is commonly understood that Cloneable interface in Java is broken. There are many reasons for this, which I will not mention; others already did it. It is also the position of Java architects themselves. My question is therefore: why has is not been deprecated yet? If the core Java team have ...

I love it when I get an enlightenment from a Stack Overflow thread like that.
 
3:26 PM
hey
 
How you?
 
my code is compiling
Lambda expressions are awesome.
 
I thought you'd be sword fighting, not chatting...
 
I don't have colleagues.
 
Let me guess, your light saber's batteries are dead.
:P
 
3:32 PM
Nope, wrong guess. :P
 
@Joe'sMorgue haha
 
I take my job of comic relief very seriously!
I just need to get started on XML programming...
 
3:40 PM
@Kylar So sweet :D
 
Hello ALL! Is there java interpreter, like scala interpreter (or groovy console) for IDEA? Thx
 
Yes, IDEA has everything
 
@Unihedron Wow, so can you help me find, how to use this? (I know only in-debug evaluate exprassion mode). Thx
 
When you say a java "interpreter" do you mean like a console where you just type things and see them evaluated?
If so, then no - Java, being a compiled language instead of an interpreted language can't do that.
you have to write the code and have it compiled into bytecode where it's then taken and executed inside a virtual machine.
 
Or you could use a Groovy script engine. Java code is groovy-compatible.
 
3:58 PM
@Kylar ofcos' there is REPL. And i using groovy console, but i can't find something like scala's worksheets in IDEA. THX and sorry for my English
 
No, your english is fine :)
 
@Kyl
@Kylar Sorry, but i don't understand, NO - is for java/groovy worksheet in IDEA or only about my English?
 
About your english :)
It's fine
 
Oh, thx! :) I work on it
 
4:32 PM
 
 
2 hours later…
6:10 PM
Burnination, brb
 
7:03 PM
Night!
 
Afternoon
Anyone alive?
 
7:31 PM
@Joe'sMorgue TTL is still positive AFAIK :P
 
How's it going?
 
heya
 
Hey @ItachiUchiha
 
ssup?
 
Nada
 
7:48 PM
nada?
 
American thing, variation of "not-a" (dang thing)
 
 
1 hour later…
fge
9:06 PM
Uh no, "nada" means "nothing" in Spanish
 
 
2 hours later…
11:16 PM
can anyone help me out with a general question about java?
 

« first day (1462 days earlier)      last day (3462 days later) »