« first day (445 days earlier)      last day (448 days later) » 

10:05 AM
@rightfold Am I blind or does java.math.BigInteger offer no constructor to convert an int to a BigInteger???
Oh wait, it has a static valueOf method taking a long for that purpose. Nevermind.
 
user1804599
10:18 AM
@FredOverflow I do not know Java.
 
user1804599
If I want a big integer in Clojure, I just do 123N.
 
user1804599
room topic changed to Java Sucks: Screw boilerplate. [boilerplate] [checked-exceptions] [design-patterns] [erased-generics] [inheritance-hierarchies] [java] [singleton]
 
@rightfold Nice. What does the N stand for?
 
user1804599
I don’t know.
 
user1804599
123M makes a big decimal.
 
10:23 AM
Are you going to re-implement Styx in Clojure now? ;)
The mathematical set of integers is called N.
 
user1804599
No, that is bullshit.
 
user1804599
It’s called Z.
 
right
 
user1804599
@FredOverflow No.
 
user1804599
I need a fun project for today.
 
user1804599
10:25 AM
Otherwise I will be bored to death.
 
How about a dupe-finder for filesystems?
 
user1804599
That’s the most boring thing ever.
 
user1804599
And not very useful.
 
what interface contains ,its all are present in abstract class.when would we prefer interface because its more advantage than interface
see interface has no instance variables but abstract had
interface had no subclass while abstract had
interface had no constructor but its possible in abstract
interfac had visibility public and abstract while abstract had public privet,abstract etc
The Java Ranch is hilarious sometimes :)
 
user1804599
10:34 AM
@FredOverflow sir ,i Am form indai .. .
 
user1804599
It is retarded that shop and snackbar owners are not allowed to have guns to kill robbers.
 
Are robbers allowed to have guns? ;)
 
user1804599
A Fatality would be cool.
 
user1804599
@FredOverflow No, but they are not allowed to rob either. :P
 
Are you ready for a Java quiz?
 
user1804599
10:40 AM
If I owned a shop, I would have a net that I can catch robbers in, I would take them to my basement and torture them one body part at a time.
 
public class JavaQuiz
{
    static void foo(String x)
    {
        System.out.println("String");
    }

    static void foo(Object x)
    {
        System.out.println("Object");

    }

    public static void main(String[] args)
    {
        foo(null);
    }
}
 
user1804599
I think I would start with removing the eyes.
 
What does the above program print?
a) String
b) Object
c) both
d) neither
 
user1804599
@FredOverflow String.
 
correct!
 
user1804599
10:41 AM
Same with enums.
 
I would have guesses d)
 
user1804599
sehe asked this before.
 
user1804599
What does Boolean.getBoolean("true") return?
 
Certainly not true, otherwise you wouldn't be asking :)
 
user1804599
10:42 AM
> Returns true if and only if the system property named by the argument exists and is equal to the string "true". (Beginning with version 1.0.2 of the JavaTM platform, the test of this string is case insensitive.) A system property is accessible through getProperty, a method defined by the System class.
If there is no property with the specified name, or if the specified name is empty or null, then false is returned.
 
Does it have something to do with environment variables or something?
 
user1804599
The guy who added this method is a complete idiot.
 
Oh yeah, remember that.
 
user1804599
SRP anyone?
 
user1804599
I mean.
 
10:43 AM
Are you saying Booleans shouldn't be concerned with system properties? ;)
 
user1804599
How can you be this bad at software development?
 
user1804599
@FredOverflow Yes.
 
user1804599
It should be the other way around.
 
Let's put every method returning a boolean into the class Boolean while we're at it ;)
 
user1804599
@FredOverflow Sounds like Smalltalk. :v
 
user1804599
10:44 AM
"Hello, world!" println // send println to string
 
user1804599
^ fuck that shit.
 
user1804599
@FredOverflow Do you ask this at an exam? :P
 
@rightfold Not yet, but I wonder if I should :)
 
user1804599
Use Boolean.getBoolean in a question. :P
 
user1804599
Like
 
user1804599
10:52 AM
boolean bar = someMethod();
boolean foo = Boolean.getBoolean("true");
if (foo || bar) {
    System.out.println("yes");
} else {
    System.out.println("no");
}
 
user1804599
“What does this program print?” :]
 
boolean assertsEnabled = false;
assert assertsEnabled = true;
dat hack
 
user1804599
Eww, assignment not being a statement.
 
I think I'm gonna ban = from confx :)
 
user1804599
lol confx.
 
10:55 AM
== comparison
:= initialization
<- assignment
no more confusion over =
 
user1804599
Drop assignment.
 
user1804599
Fun fact: F# uses both := and <- for assignment.
 
user1804599
let mutable x = 42
x <- 314

let x = ref 42
x := 314
 
user1804599
ref returns a pointer-like structure.
 
user1804599
10:58 AM
:P
 
user1804599
I think I know what I will do today.
 
user1804599
I am going to implement MVC in JavaScript, with support for remote models and controllers.
 
@rightfold Fork XKCD comics?
@rightfold That sounds like abstract wankery.
 
user1804599
Why?
 
Because you cannot show it to your mom or girlfriend and make her jaw drop.
 
user1804599
11:00 AM
I have no girlfriend.
 
You have a mom.
 
user1804599
Indeed.
 
Has she ever been impressed with your programming skills?
 
user1804599
No.
 
user1804599
 
user1804599
11:03 AM
MVC is a great thing.
 
1 0 Enter lol
 
user1804599
It’s sad it gets raped by people who think they are doing MVC but actually doing Model 2.
 
Gotta love the naked hardware guy.
 
user1804599
lol
 
One of my colleagues thinks Java is a nice OO language :(
 
user1804599
11:15 AM
Java is 1) not nice and 2) not an OO language.
 
user1804599
 
user1804599
LOL, that slide.
 
user1804599
How about … all of them? XD
 
user1804599
4:43 PM
@FredOverflow I finally made some progress with the Styx compiler. :)
 
9:13 PM
1
Q: Enum-based singleton implementation and unit tests which preserve state as a side-effect of enum

Artem OboturovAs many would say, the singleton is bad, it is an "anti-pattern". Fortunately or not I work with some code which DOES have it and it would not go away in near future. So my problem is as follows. A singleton having a state: import java.util.HashMap; import java.util.Map; public enum Singleton ...

 

« first day (445 days earlier)      last day (448 days later) »